@charset "UTF-8";
/* ─────────────────────────────────────────────────────────────
 * Main Styles
 * Main stylesheet — layout and auto-import components
 * normalize, vars, fonts, utils, ui are linked separately in HTML
 * ───────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────
 * Mixins & Functions
 * Usage in any partial: @use '../mixins' as *; (or 'mixins' from root)
 * ───────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────
 * Breakpoints (px)
 * Keep in sync with JS defaults (dynamicAdapt / spollers use 767/768)
 * ───────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────
 * Functions
 * ───────────────────────────────────────────────────────────── */
/* Register every component here — explicit order, no glob magic */
/* ─────────────────────────────────────────────────────────────
 * Quiz — screens (welcome → intro → quiz → result)
 * One page; app.js toggles [hidden] and the animation classes.
 * ───────────────────────────────────────────────────────────── */
/* Soft glows behind every screen */
.app {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100dvh;
  overflow: clip;
}

.app::before,
.app::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(0.625rem);
}

.app::before {
  top: -20%;
  left: -15%;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), transparent);
}

.app::after {
  right: -20%;
  bottom: -25%;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(closest-side, rgba(70, 12, 120, 0.55), transparent);
}

/* ─── Screen ─────────────────────────────────────────────── */
.screen {
  grid-area: 1/1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 1.5rem var(--container-padding) calc(1.5rem + env(safe-area-inset-bottom, 0));
}

.screen__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  width: 100%;
  max-width: var(--container-width);
  margin: auto;
  text-align: center;
}

.screen.is-entering {
  animation: screen-in var(--transition-slow) var(--ease-out) both;
}

.screen.is-leaving {
  animation: screen-out var(--transition-base) ease both;
  pointer-events: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}
@keyframes screen-out {
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}
/* ─── Welcome ────────────────────────────────────────────── */
.welcome__logo {
  width: 88%;
  max-width: 32.5rem;
  margin-bottom: 0.5rem;
}

.welcome__logo img {
  width: 100%;
  height: auto;
}

/* Wider than the quiz column so the lead fits on two lines on desktop */
.screen--welcome .screen__inner {
  max-width: 50rem;
}

.welcome__lead {
  max-width: 47.5rem;
  font-size: clamp(1.0625rem, 0.9528508772rem + 0.4678362573vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.5;
  text-wrap: balance;
}

.screen--welcome .btn {
  margin-top: 0.75rem;
}

/* ─── Intro ──────────────────────────────────────────────── */
.intro__rules {
  display: grid;
  gap: 0.875rem;
  width: 100%;
  text-align: left;
}

.intro__rules li {
  padding: 1.125rem 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-muted);
  border: 0.0625rem solid var(--color-line);
  border-radius: var(--radius);
  background-color: var(--color-surface);
}

.intro__rules strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  color: var(--white);
}

.intro__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
}

/* ─── Quiz ───────────────────────────────────────────────── */
.screen--quiz {
  gap: 1.5rem;
}

.quiz__top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.quiz__logo {
  flex-shrink: 0;
  width: 7.5rem;
  height: auto;
}

/* Progress sits right under the navigation: full button width on phones,
   a shorter centred bar from tablets up */
.progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto auto;
}
@media (min-width: 768px) {
  .progress {
    max-width: 20rem;
  }
}

.progress__bar {
  flex: 1 1 auto;
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.22);
}

.progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-color: var(--white);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform var(--transition-slow) var(--ease-out);
}

.progress__label {
  min-width: 2.875rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Logo centred at the top; question, answers, buttons and progress stay
   together (no stretched gaps) and the group is centred vertically in the
   space below the logo: auto margins on its first (stage) and last
   (progress) items split the free height equally */
.quiz__stage {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  width: 100%;
  max-width: var(--container-width);
  margin: auto auto 0;
}

/* Height glide between questions with a different number of answers
   (app.js sets the px heights; clip only vertically so the sideways
   slide of the question is not cut off) */
.quiz__stage.is-resizing {
  overflow: visible clip;
  transition: height var(--transition-slow) var(--ease-out);
}

.question {
  width: 100%;
}

.question__title {
  margin-bottom: 1.75rem;
  font-size: clamp(1.375rem, 1.1557017544rem + 0.9356725146vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  outline: none;
}

.question__answers {
  display: grid;
  gap: 0.75rem;
}

/* Direction-aware question transitions (data-dir="next|prev" on the stage) */
.question.is-leaving {
  animation: question-out-next var(--transition-base) ease both;
}

.question.is-entering {
  animation: question-in-next var(--transition-slow) var(--ease-out) both;
}

[data-dir=prev] .question.is-leaving {
  animation-name: question-out-prev;
}

[data-dir=prev] .question.is-entering {
  animation-name: question-in-prev;
}

@keyframes question-out-next {
  to {
    opacity: 0;
    transform: translateX(-2rem);
  }
}
@keyframes question-in-next {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
}
@keyframes question-out-prev {
  to {
    opacity: 0;
    transform: translateX(2rem);
  }
}
@keyframes question-in-prev {
  from {
    opacity: 0;
    transform: translateX(-2rem);
  }
}
/* ─── Answer option ──────────────────────────────────────── */
.answer {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.875rem 1.125rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  color: var(--white);
  cursor: pointer;
  border: 0.125rem solid var(--color-line);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  transition: background-color var(--transition-fast) ease, border-color var(--transition-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
@media (any-hover: hover) {
  .answer:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.16);
  }
}

.answer__mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border: 0.125rem solid currentcolor;
  border-radius: 50%;
  opacity: 0.7;
}

.answer__mark .icon {
  width: 1rem;
  height: 1rem;
  color: var(--white);
  opacity: 0;
}

.answer[aria-checked=true] {
  color: var(--purple);
  border-color: var(--white);
  background-color: var(--white);
  box-shadow: var(--shadow-soft);
}

.answer[aria-checked=true] .answer__mark {
  border-color: var(--purple);
  background-color: var(--purple);
  opacity: 1;
}

.answer[aria-checked=true] .answer__mark .icon {
  opacity: 1;
}

/* Pop only right after a click (class set by app.js), not on render/F5 */
.answer.is-just-checked .answer__mark .icon {
  animation: check-pop 0.35s var(--ease-out) both;
}

/* Selecting is instant (one frame) — no half-faded in-between state */
.question__answers.is-switching .answer {
  transition: none;
}

@keyframes check-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
/* ─── Quiz navigation ────────────────────────────────────── */
.quiz__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* ─── Result / 404 ───────────────────────────────────────── */
.screen__note {
  margin-top: -0.75rem;
  font-size: 1.125rem;
  color: var(--color-muted);
}

.result__logo {
  width: 80%;
  max-width: 22.5rem;
  height: auto;
}

.result__code {
  margin: 0.5rem 0 0.75rem;
  font-size: min(clamp(5.25rem, 3.4407894737rem + 7.7192982456vw, 9.375rem), 23vw);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.screen--result.is-entering .result__code {
  animation: code-in 0.9s var(--ease-out) 0.15s both;
}

@keyframes code-in {
  from {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(0.5rem);
  }
}
@media (min-width: 768px) {
  .screen {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .quiz__logo {
    width: 11.25rem;
  }
  .answer {
    padding: 1rem 1.375rem;
  }
  .screen--quiz {
    gap: 2rem;
  }
}
/* Short screens: tighten the vertical rhythm so a whole question
   (5 answers + buttons) fits without scrolling */
@media (max-height: 759.98px) {
  .screen {
    padding-top: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  }
  .screen--quiz {
    gap: 0.625rem;
  }
  .quiz__logo {
    width: 6.25rem;
  }
  .progress__label {
    min-width: 2.25rem;
    font-size: 0.75rem;
    line-height: 1;
  }
  .screen__inner {
    gap: 1.375rem;
  }
  .question__title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }
  .question__answers {
    gap: 0.5rem;
  }
  .answer {
    min-height: 3rem;
    padding: 0.5625rem 0.875rem;
    font-size: 0.9375rem;
    gap: 0.75rem;
  }
  .answer__mark {
    width: 1.375rem;
    height: 1.375rem;
  }
  .answer__mark .icon {
    width: 0.875rem;
    height: 0.875rem;
  }
  .btn {
    min-height: 3rem;
    padding: 0.625rem 1.25rem;
  }
  .result__code {
    font-size: min(5.25rem, 23vw);
  }
  .intro__rules {
    gap: 0.625rem;
  }
  .intro__rules li {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  /* Laptops (wide but not tall): answers stay on one line, so the quiz
     needs less squeezing than on phones */
}
@media (max-height: 759.98px) and (min-width: 768px) {
  .screen--quiz {
    gap: 1.25rem;
  }
  .quiz__logo {
    width: 8.75rem;
  }
  .question__title {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
  }
  .question__answers {
    gap: 0.625rem;
  }
  .answer {
    min-height: 3.25rem;
    font-size: 1rem;
  }
}
/* Very short screens (iPhone SE 1st gen, landscape phones) */
@media (max-height: 599.98px) {
  .screen__inner {
    gap: 0.875rem;
  }
  .quiz__logo {
    width: 6.25rem;
  }
  .question__answers {
    gap: 0.5rem;
  }
  /* Landscape phones: two answer columns so a whole question fits,
     and the progress bar sits between Previous and Next (one row) */
}
@media (max-height: 599.98px) and (min-width: 480px) {
  /* Rows: logo · free space · question · buttons/progress · free space
     (the two 1fr rows centre the content below the logo) */
  .screen--quiz {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr);
    grid-template-columns: minmax(0, 12.5rem) minmax(0, 13rem) minmax(0, 12.5rem);
    gap: 0 1rem;
    justify-content: center;
  }
  .quiz__top {
    grid-area: 1/1/2/-1;
    margin-bottom: 0.625rem;
  }
  .quiz__stage {
    grid-area: 3/1/4/-1;
    margin: 0 0 0.625rem;
  }
  .quiz__nav {
    display: contents;
  }
  .quiz__nav [data-prev] {
    grid-area: 4/1;
  }
  .quiz__nav [data-next] {
    grid-area: 4/3;
  }
  .progress {
    grid-area: 4/2;
    align-self: center;
    margin: 0;
  }
  .question__title {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
  }
  .question__answers {
    grid-template-columns: 1fr 1fr;
  }
  .answer {
    min-height: 2.875rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .screen.is-entering,
  .screen.is-leaving,
  .question.is-entering,
  .question.is-leaving,
  .screen--result.is-entering .result__code,
  .answer.is-just-checked .answer__mark .icon,
  .screen.is-revealing [data-reveal],
  .screen.is-revealing .answer {
    animation-duration: 0.01ms;
    animation-delay: 0s;
  }
  .progress__fill {
    transition: none;
  }
}
/* ─── Boot & reveal (first load / F5) ───────────────────── */
/* Set by the inline script in <head>: hidden until app.js restored the step */
.is-booting .app {
  visibility: hidden;
}

/* Staggered entrance of the restored screen; --reveal-delay set by app.js */
.screen.is-revealing [data-reveal],
.screen.is-revealing .answer {
  animation: reveal 0.7s var(--ease-out) var(--reveal-delay, 0s) both;
}

.screen.is-revealing .result__code {
  animation-name: reveal-code;
  animation-duration: 0.9s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1.125rem);
    filter: blur(0.375rem);
  }
}
@keyframes reveal-code {
  from {
    opacity: 0;
    transform: scale(0.85);
    filter: blur(0.625rem);
  }
}
html {
  scrollbar-gutter: stable;
}

body {
  font-size: 1rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrapper {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

.page {
  flex: 1 1 auto;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}