/* The character-match quiz on meet.kinverie.com. It is loaded after site.css and uses its
   tokens, fonts, buttons, portrait frame and Google Play badge; only the quiz's own layout is
   here. Nothing loads from another origin, and the page works without any of the motion. */

.meet .site-header .header-row {
  justify-content: center;
}

.quiz {
  max-width: 44rem;
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.quiz-step[hidden],
.quiz-result[hidden] {
  display: none;
}

.quiz-intro {
  text-align: center;
}

.quiz-intro .lead {
  margin-inline: auto;
}

.quiz-headline {
  margin-top: 0;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
}

.quiz-headline:focus,
.quiz-title:focus,
.quiz-result-name:focus {
  outline: none;
}

/* The six faces, overlapping, as a promise of what the questions lead to. */

.quiz-faces {
  display: flex;
  justify-content: center;
  margin: 2rem 0 2.25rem;
  padding-left: 0.9rem;
}

.quiz-face {
  flex: none;
  width: clamp(2.9rem, 14vw, 4.75rem);
  aspect-ratio: 1;
  margin-left: -0.9rem;
  overflow: hidden;
  border: 3px solid var(--canvas);
  border-radius: 50%;
  background: #efe6d6;
  box-shadow: 0 14px 26px -18px rgba(var(--shadow), 0.7);
}

.quiz-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.quiz-start {
  margin: 0 0 0.9rem;
}

.quiz-start .button {
  min-width: min(100%, 16rem);
}

.quiz-note,
.quiz-smallprint,
.quiz-result-next {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Questions */

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.5rem;
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quiz-progress-text {
  flex: none;
}

.quiz-progress-track {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.quiz-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.quiz-progress-1 { width: 33.333%; }
.quiz-progress-2 { width: 66.667%; }
.quiz-progress-3 { width: 100%; }

.quiz-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiz-options li {
  margin: 0;
}

.quiz-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  min-height: 64px;
  justify-content: center;
  padding: 1rem 1.25rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--control-border);
  border-radius: 1rem;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

/* Only where a pointer can hover: on a touch screen the hover state would stay on the answer
   that appears under the finger on the next question, and look like a choice already made. */
@media (hover: hover) {
  .quiz-option:hover {
    background: var(--selected);
    border-color: var(--primary);
  }
}

.quiz-option:active {
  background: var(--selected);
}

.quiz-option:focus-visible {
  border-radius: 1rem;
}

.quiz-option-label {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.quiz-option-hint {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.quiz-back,
.quiz-again {
  margin: 1.5rem 0 0;
}

.quiz-link {
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  font: inherit;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.quiz-link:hover {
  text-decoration-thickness: 2px;
}

/* The match. On a phone the portrait sits beside the name, so that the first line and the store
   badge are on the first screen; on a wide screen the portrait takes a column of its own and the
   description moves up under the name. */

.quiz-result-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 1.5rem;
}

.quiz-result-portrait {
  flex: none;
  width: clamp(5.75rem, 30vw, 8rem);
}

.quiz-result-title {
  min-width: 0;
}

.quiz-result-title .eyebrow {
  margin-bottom: 0.35rem;
}

.quiz-result-name {
  margin: 0 0 0.45rem;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.quiz-result-title .cast-role {
  margin: 0;
}

.quiz-opening {
  margin: 0 0 1.5rem;
}

.quiz-opening figcaption {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.quiz-opening blockquote {
  margin: 0;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.35rem 1.25rem 1.25rem 1.25rem;
  box-shadow: 0 18px 32px -26px rgba(var(--shadow), 0.6);
}

.quiz-opening blockquote p {
  margin: 0;
  font-family: var(--editorial);
  font-size: 1.15rem;
  line-height: 1.5;
}

.quiz-result-action {
  margin: 0 0 0.9rem;
}

.quiz-result-action .play-badge {
  --badge-height: 3.75rem;
}

.quiz-result-next {
  margin: 0 0 1.5rem;
}

.quiz-result-description {
  margin: 0;
  font-size: 1.05rem;
}

.quiz-again {
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.quiz-smallprint {
  margin: 0.75rem 0 0;
}

@media (min-width: 48rem) {
  .quiz-result:not([hidden]) {
    display: grid;
    grid-template-columns: 15rem 1fr;
    column-gap: 2.5rem;
    align-items: start;
  }

  .quiz-result-head {
    display: contents;
  }

  .quiz-result-portrait {
    grid-column: 1;
    grid-row: 1 / span 5;
    width: 100%;
  }

  .quiz-result-title,
  .quiz-result-description,
  .quiz-opening,
  .quiz-result-action,
  .quiz-result-next {
    grid-column: 2;
  }

  .quiz-result-title {
    grid-row: 1;
    margin-bottom: 1rem;
  }

  .quiz-result-description {
    grid-row: 2;
    margin-bottom: 1.25rem;
  }

  .quiz-opening {
    grid-row: 3;
  }

  .quiz-result-action {
    grid-row: 4;
  }

  .quiz-result-next {
    grid-row: 5;
    margin-bottom: 0;
  }
}

/* Without JavaScript: the cast and the store badge. */

.quiz-plain {
  margin-top: 2.5rem;
  text-align: left;
}

.quiz-plain h2 {
  text-align: center;
}

.quiz-cast {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 2rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
  padding: 0;
  list-style: none;
}

.quiz-cast li {
  margin: 0;
}

.quiz-plain .quiz-result-action {
  display: flex;
  justify-content: center;
}

/* The footer: a quiet strip, with the legal pages on the main site. */

.meet-footer {
  text-align: center;
}

.meet-footer-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0.75rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.meet-footer-list li {
  margin: 0;
}

.meet-footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (prefers-reduced-motion: no-preference) {
  .quiz-step:not([hidden]) {
    animation: quiz-in 320ms var(--ease) both;
  }

  @keyframes quiz-in {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-option {
    transition: none;
  }
}
