/* QuizMonkey marketing site, v2. Tokens are the brand kit's (tokens/brand.css), verbatim. */
/* Fonts: the kit's own files (fonts/), subset to Latin and converted to woff2. SIL OFL, licenses alongside. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --qm-blue: #304AF5;
  --qm-blue-dark: #2034CE;
  --qm-yellow: #FFDB57;
  --qm-cream: #FFFCF5;
  --qm-ink: #18223D;
  --qm-muted: #62677B;
  --qm-line: #E3E5EF;
  --qm-success: #176540;
  --qm-white: #FFFFFF;
  --qm-heading: "Bricolage Grotesque", system-ui, sans-serif;
  --qm-body: "DM Sans", system-ui, sans-serif;
  --qm-button-radius: 12px;
  --qm-card-radius: 24px;

  /* Feedback: a miss is ink-on-grey with an amber edge, never alarm red. */
  --miss-bg: #FFF3E0;
  --miss-edge: #C26A00;
  /* Mascot skin tone for the blink lids, taken from the kit artwork around the eyes. */
  --lid: #F3C997;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 1px 0 rgba(24, 34, 61, .04), 0 18px 40px -18px rgba(24, 34, 61, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--qm-cream);
  color: var(--qm-ink);
  font: 400 16px/1.55 var(--qm-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--qm-heading); font-weight: 800; letter-spacing: -.03em; }
kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: #fff; border: 1px solid var(--qm-line); box-shadow: 0 2px 0 var(--qm-line); font: 700 12px/1 var(--qm-body); color: var(--qm-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--qm-ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--qm-blue); outline-offset: 3px; border-radius: 6px; }
.hand { font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", var(--qm-body); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 700 16px/1 var(--qm-body); color: #fff; text-decoration: none;
  background: var(--qm-blue);
  border: 0; border-radius: var(--qm-button-radius);
  box-shadow: 0 4px 0 var(--qm-blue-dark), 0 14px 28px -12px rgba(48, 74, 245, .7);
  transition: transform .35s var(--ease-out), box-shadow .2s ease, background .2s ease;
  cursor: pointer; overflow: hidden; isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.btn::before { /* shine sweep on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease-out);
}
.btn span { display: inline-flex; align-items: center; gap: 10px; }
.btn span::after { content: "↗"; display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover::before { transform: translateX(120%); }
.btn:hover span::after { transform: translate(2px, -2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--qm-blue-dark), 0 6px 14px -8px rgba(48, 74, 245, .7); background: var(--qm-blue-dark); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; box-shadow: 0 3px 0 var(--qm-blue-dark); }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn--ink { background: var(--qm-ink); box-shadow: 0 4px 0 #0c1225, 0 14px 28px -12px rgba(24,34,61,.6); }
.btn--ink:active { background: #0c1225; box-shadow: 0 1px 0 #0c1225; }
.textlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; background: none; border: 0; padding: 8px 4px; font: 600 16px var(--qm-body); color: var(--qm-blue); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.kicker { display: inline-flex; align-items: center; gap: 10px; font: 700 11.5px/1.2 var(--qm-body); letter-spacing: .08em; text-transform: uppercase; color: var(--qm-blue); margin-bottom: 12px; }
.kicker--light { color: var(--qm-yellow); }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--qm-blue); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(48,74,245,.45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(48,74,245,0); } }
.h2 { font-size: clamp(1.55rem, 6.4vw, 1.8rem); line-height: 1.03; text-wrap: balance; }
.h2--xl { font-size: clamp(1.75rem, 7.4vw, 2.1rem); }
.lede { font-size: 1rem; line-height: 1.55; color: var(--qm-muted); margin-top: 12px; max-width: 44ch; }
.lede--light { color: rgba(255,255,255,.86); }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font: 700 12px/1 var(--qm-body); letter-spacing: .02em; white-space: nowrap; }
.chip--topic { background: #EEF0FE; color: var(--qm-blue); }
.chip--again { background: var(--qm-yellow); color: var(--qm-ink); animation: pop .45s var(--ease-out); }
.chip--again::before { content: "↺"; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ---------- Brand + header ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--qm-ink); }
.brand__mark { width: 32px; height: 32px; object-fit: contain; }
.brand__word { font: 800 19px/1 var(--qm-heading); letter-spacing: -.03em; }
.brand--light { color: #fff; }
.brand--light .brand__mark { width: 32px; height: 32px; }
.brand--light .brand__word { font-size: 20px; }

.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 252, 245, .94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.is-scrolled { border-bottom-color: var(--qm-line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; }
.top__nav { display: flex; align-items: center; gap: 22px; }
.top__link { font-weight: 600; font-size: 15px; text-decoration: none; }
.top__link:hover { color: var(--qm-blue); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 16px 0 36px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.hero__title { font-size: clamp(2rem, 8.4vw, 2.35rem); line-height: .98; max-width: 11ch; }
.hl { position: relative; white-space: nowrap; z-index: 0; }
.hl::after { content: ""; position: absolute; left: -.06em; right: -.06em; bottom: .04em; height: .38em; z-index: -1; background: var(--qm-yellow); border-radius: 6px; transform-origin: left; animation: mark .8s .5s var(--ease-out) both; }
@keyframes mark { from { transform: scaleX(0); } }
.hero__sub { margin-top: 14px; font-size: 1rem; line-height: 1.5; color: var(--qm-muted); max-width: 36ch; }
.hero__cta { margin-top: 22px; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.hero__copy > * { animation: rise .9s var(--ease-out) both; }
.hero__copy > .hero__title { animation-delay: .06s; }
.hero__copy > .hero__sub { animation-delay: .16s; }
.hero__copy > .hero__cta { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Stage geometry: the monkey's fingertip sits at (99%, 29.5%) of its image and points up-right,
   so the monkey stands bottom-left and the phone's answer list sits just up-right of the finger. */
.hero__stage { position: relative; aspect-ratio: 1 / 1.12; max-height: 660px; }
.blob { position: absolute; border-radius: 50%; }
.blob--blue { width: 70%; aspect-ratio: 1; right: -4%; top: 10%; background: radial-gradient(circle at 35% 35%, #4c63ff, var(--qm-blue) 55%, var(--qm-blue-dark)); animation: breathe 9s ease-in-out infinite; }
.blob--yellow { width: 20%; aspect-ratio: 1; left: 4%; top: 12%; background: var(--qm-yellow); animation: breathe 7s ease-in-out infinite reverse; }
@keyframes breathe { 50% { transform: scale(1.05) translate(-6px, 4px); } }

.paper {
  position: relative; background: #fff; border-radius: 14px; padding: 16px 18px 18px;
  box-shadow: var(--shadow-card);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, #E9EEFB 31px 32px);
  background-position: 0 40px;
}
.paper__label { font: 700 11px/1 var(--qm-body); letter-spacing: .1em; text-transform: uppercase; color: var(--qm-muted); margin-bottom: 10px; }
.paper__line { font-size: clamp(15px, 1.4vw, 19px); line-height: 32px; color: #2a3a8f; white-space: nowrap; }
.paper--hero { position: absolute; width: 46%; right: -4%; top: 0; transform: rotate(4deg); z-index: 1; }

.phone { position: absolute; background: var(--qm-ink); border-radius: 34px; padding: 9px; box-shadow: 0 40px 60px -30px rgba(24,34,61,.55); }
.phone__screen { background: var(--qm-cream); border-radius: 26px; height: 100%; padding: 16px 12px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.phone--hero { width: 50%; aspect-ratio: 9 / 16; left: 42%; top: 24%; z-index: 2; transform: rotate(-3deg); }

.hcard { background: #fff; border-radius: 18px; padding: 14px 12px; box-shadow: 0 1px 0 var(--qm-line), 0 10px 24px -16px rgba(24,34,61,.35); }
.hcard__q { margin: 10px 0; font: 800 clamp(14px, 1.45vw, 18px)/1.2 var(--qm-heading); letter-spacing: -.01em; }
.hcard__opts { display: grid; gap: 7px; }
.hcard__opts li { padding: 8px 10px; border: 2px solid var(--qm-line); border-radius: 11px; font-size: clamp(13px, 1.2vw, 15px); font-weight: 500; transition: border-color .3s, background .3s, color .3s, transform .3s var(--ease-out); }
.hcard__opts li.is-hover { border-color: var(--qm-blue); transform: translateX(3px); }
.hcard__opts li.is-right { border-color: var(--qm-success); background: #EAF5EF; color: var(--qm-success); font-weight: 700; }
.hcard__opts li.is-right::after { content: " ✓"; }
.hcard__why { margin-top: 10px; font-size: clamp(12px, 1.1vw, 14px); line-height: 1.35; color: var(--qm-success); font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease-out); }
.hcard__why.is-on { opacity: 1; transform: none; }

/* ---------- Mascot ---------- */
.mascot { position: absolute; z-index: 3; }
.mascot__body { position: relative; transform-origin: 50% 100%; }
.mascot__body img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 18px 18px rgba(24,34,61,.18)); }
.lid { position: absolute; width: 11.4%; height: 9.2%; background: var(--lid); border-radius: 50% 50% 46% 46%; transform-origin: 50% 0; pointer-events: none; transition: transform .07s ease-in; }
.lid--l { left: 30.4%; top: 22.9%; transform: rotate(8deg) scaleY(0); }
.lid--r { left: 50.9%; top: 18.4%; transform: rotate(-6deg) scaleY(0); }
.mascot.is-blinking .lid--l { transform: rotate(8deg) scaleY(1); }
.mascot.is-blinking .lid--r { transform: rotate(-6deg) scaleY(1); }
.mascot--hero { width: 44%; left: 0; bottom: 0; }
.mascot--hero .mascot__body { animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(-1.5deg) translateY(-4px); } }

.bubble {
  position: absolute; z-index: 4; max-width: 220px; padding: 10px 14px; border-radius: 16px;
  background: #fff; color: var(--qm-ink); font: 700 15px/1.3 var(--qm-body);
  box-shadow: 0 1px 0 var(--qm-line), 0 12px 24px -14px rgba(24,34,61,.4);
  opacity: 0; transform: translateY(6px) scale(.92); transition: opacity .25s, transform .4s var(--ease-out);
  pointer-events: none;
}
.bubble::after { content: ""; position: absolute; left: 28px; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.bubble.is-on { opacity: 1; transform: none; }

/* ---------- Fun ---------- */
.fun { padding: 44px 0; background: var(--qm-blue); color: #fff; overflow: hidden; }
.fun__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.fun__list { margin-top: 28px; display: grid; gap: 12px; }
.fun__list li { position: relative; padding-left: 32px; color: rgba(255,255,255,.86); }
.fun__list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--qm-yellow); box-shadow: inset 0 0 0 5px var(--qm-yellow), inset 0 0 0 9px var(--qm-blue); }
.fun__list b { color: #fff; }
.fun__visual { position: relative; justify-self: center; width: min(100%, 340px); }
.feed { height: 420px; border-radius: 30px; background: var(--qm-ink); padding: 0 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); overflow: hidden; }
/* Seamless loop: two identical sets; every card carries its own bottom margin, so -50% lands exactly on the copy. */
.feed__track { will-change: transform; animation: feed 52s linear infinite; }
.feed:hover .feed__track { animation-play-state: paused; }
@keyframes feed { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.feed__set { display: flow-root; } /* keeps the last card's margin inside the set, so both sets are the same height */
.fcard { --tag-bg: #EEF0FE; --tag-fg: var(--qm-blue); margin-bottom: 8px; border-radius: 16px; padding: 11px 13px; background: var(--qm-cream); color: var(--qm-ink); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fcard p { font: 800 15px/1.2 var(--qm-heading); letter-spacing: -.01em; }
.fcard__tag { padding: 5px 10px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-fg); font: 700 11px/1 var(--qm-body); letter-spacing: .02em; }
.fcard__ans { padding: 5px 11px; border-radius: 999px; background: #fff; color: var(--qm-success); font: 700 12px/1.25 var(--qm-body); box-shadow: 0 1px 0 rgba(24,34,61,.08); }
.fcard--cream { background: var(--qm-cream); }
.fcard--sky { background: #DCE8FF; --tag-bg: #fff; --tag-fg: #1F4FC4; }
.fcard--coral { background: #FFE0D4; --tag-bg: #fff; --tag-fg: #A83A12; }
.fcard--mint { background: #D8F1E2; --tag-bg: #fff; --tag-fg: var(--qm-success); }
.fcard--lilac { background: #E7E2FF; --tag-bg: #fff; --tag-fg: #4B32C3; }
.fcard--yellow { background: var(--qm-yellow); --tag-bg: #fff; --tag-fg: var(--qm-ink); }
.fcard--blue { background: var(--qm-blue); color: #fff; --tag-bg: rgba(255,255,255,.18); --tag-fg: #fff; }
.fcard--blue .fcard__ans { background: var(--qm-yellow); color: var(--qm-ink); }
.fcard--ink { background: #2b3553; color: #fff; --tag-bg: var(--qm-yellow); --tag-fg: var(--qm-ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.streak { position: absolute; z-index: 2; left: -34px; top: -18px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: #fff; color: var(--qm-ink); font: 700 14px/1 var(--qm-body); box-shadow: 0 16px 30px -16px rgba(0,0,0,.5); transform: rotate(-6deg); animation: bob 4s ease-in-out infinite; }
.streak__flame { width: 22px; height: 22px; }
.onemore { position: absolute; right: -24px; bottom: 44px; padding: 12px 16px; border-radius: 16px; background: var(--qm-yellow); color: var(--qm-ink); font: 800 17px/1 var(--qm-heading); box-shadow: 0 16px 30px -16px rgba(0,0,0,.5); transform: rotate(5deg); animation: bob 4s 1.2s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }

/* ---------- Play ---------- */
.play { padding: 44px 0; }
.play__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.play__keys { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--qm-muted); }
.play__stage { position: relative; padding-right: 150px; }

.quiz { position: relative; z-index: 2; background: #fff; border-radius: 28px; padding: 14px; box-shadow: var(--shadow-card), 0 0 0 1px var(--qm-line); min-height: 520px; display: flex; flex-direction: column; }
.quiz__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; }
.quiz__count { margin-left: auto; font: 600 14px/1 var(--qm-body); color: var(--qm-muted); font-variant-numeric: tabular-nums; }
.quiz__bar { margin-top: 14px; height: 10px; border-radius: 999px; background: #EEF0FE; overflow: hidden; }
.quiz__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--qm-blue), #5b6fff); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.quiz__play { display: flex; flex-direction: column; flex: 1; }
.quiz__noscript { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: #EEF0FE; font-weight: 600; }
.quiz__q { margin: 16px 0 12px; font-size: 1.2rem; line-height: 1.15; letter-spacing: -.02em; outline: none; }
.quiz__opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px;
  background: #fff; border: 2px solid var(--qm-line); border-radius: 14px; box-shadow: 0 3px 0 var(--qm-line);
  font: 600 15px/1.3 var(--qm-body); color: var(--qm-ink); text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .25s var(--ease-out), box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.opt kbd { flex: none; transition: background .2s, color .2s, border-color .2s; }
.opt span { flex: 1; }
.opt:hover:not(:disabled) { border-color: var(--qm-blue); transform: translateY(-2px); box-shadow: 0 5px 0 #C9CFFB; }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--qm-line); }
.opt:disabled { cursor: default; }
.opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }
.opt.is-right { border-color: var(--qm-success); background: #EAF5EF; color: var(--qm-success); box-shadow: 0 3px 0 #BFE0CD; animation: yes .5s var(--ease-out); }
.opt.is-right kbd { background: var(--qm-success); border-color: var(--qm-success); color: #fff; box-shadow: none; }
.opt.is-right::after { content: "✓"; font-weight: 800; }
.opt.is-wrong { border-color: var(--miss-edge); background: var(--miss-bg); color: #6b3a00; box-shadow: 0 3px 0 #F2D2A6; animation: no .45s ease; }
.opt.is-wrong kbd { background: var(--miss-edge); border-color: var(--miss-edge); color: #fff; box-shadow: none; }
.opt.is-wrong::after { content: "✕"; font-weight: 800; }
@keyframes yes { 40% { transform: scale(1.025); } }
@keyframes no { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.quiz__fb { margin-top: 12px; padding: 12px 14px; border-radius: 14px; animation: rise .4s var(--ease-out); }
.quiz__fb.is-right { background: #EAF5EF; }
.quiz__fb.is-wrong { background: var(--miss-bg); }
.quiz__fb-title { font: 800 16px/1.25 var(--qm-heading); letter-spacing: -.01em; }
.quiz__fb.is-right .quiz__fb-title { color: var(--qm-success); }
.quiz__fb.is-wrong .quiz__fb-title { color: #6b3a00; }
.quiz__fb-why { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--qm-ink); }
.quiz__next { margin-top: 12px; align-self: flex-end; }
.quiz__next span::after { content: "→"; }

.quiz__done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px 4px 4px; animation: rise .5s var(--ease-out); }
.quiz__done-mascot { width: 96px; margin-bottom: 8px; animation: hop 1.6s var(--ease-out) .2s; }
.quiz__done-mascot picture, .quiz__done-mascot img { display: block; width: 100%; height: auto; }
@keyframes hop { 15% { transform: translateY(-18px) rotate(-3deg); } 30% { transform: none; } 45% { transform: translateY(-9px) rotate(2deg); } 60% { transform: none; } }
.quiz__done-title { font-size: 1.5rem; line-height: 1.05; outline: none; }
.quiz__done-text { margin-top: 10px; max-width: 38ch; color: var(--qm-muted); }
.quiz__done-next { margin-top: 14px; font-weight: 700; }
.quiz__done-actions { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.mascot--play { width: 140px; right: 0; bottom: -10px; z-index: 3; }
.mascot--play .bubble { right: 0; bottom: 100%; margin-bottom: 6px; width: max-content; max-width: 150px; }
.mascot--play .bubble::after { left: auto; right: 22px; }

/* ---------- Shared section heads ---------- */
.head { max-width: 720px; margin-bottom: 24px; }
.head--center { margin-left: auto; margin-right: auto; text-align: center; }
.head--center .lede { margin-left: auto; margin-right: auto; }
.h2 em { font-style: normal; color: var(--qm-blue); }

/* ---------- How it works ---------- */
.how { padding: 44px 0; background: #fff; border-top: 1px solid var(--qm-line); border-bottom: 1px solid var(--qm-line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step { position: relative; padding: 16px; border-radius: var(--qm-card-radius); background: var(--qm-cream); border: 1px solid var(--qm-line); }
.step__art { height: 128px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 18px; background: #EEF0FE; overflow: hidden; padding: 14px; }
.step__num { display: block; font: 800 14px/1 var(--qm-heading); color: var(--qm-blue); letter-spacing: .04em; margin-bottom: 8px; }
.step h3 { font-size: 1.1rem; line-height: 1.1; }
.step p { margin-top: 8px; color: var(--qm-muted); }
.paper--mini { width: 88%; transform: rotate(-3deg); padding: 12px 14px; }
.paper--mini .paper__line { font-size: 16px; line-height: 30px; }
.mini-q { width: 92%; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow-card); }
.mini-q p { margin: 8px 0; font: 800 15px/1.2 var(--qm-heading); letter-spacing: -.01em; }
.mini-q__opt { display: block; padding: 7px 10px; border: 2px solid var(--qm-blue); border-radius: 10px; font-size: 14px; font-weight: 600; }
.mini-why { width: 92%; display: flex; gap: 10px; align-items: flex-start; background: #EAF5EF; border-radius: 16px; padding: 14px; font-size: 14.5px; line-height: 1.45; }
.mini-why__tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--qm-success); color: #fff; font-weight: 800; }

/* ---------- Science ---------- */
.science { padding: 44px 0; }
.patterns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pattern { padding: 18px; border-radius: var(--qm-card-radius); background: #fff; box-shadow: var(--shadow-card), 0 0 0 1px var(--qm-line); }
.pattern__art { width: 100%; height: 64px; margin-bottom: 10px; }
.pattern h3 { font-size: 1.1rem; }
.pattern p { margin-top: 8px; color: var(--qm-muted); }
.caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.pillars { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pillar { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--qm-card-radius); background: var(--qm-yellow); }
.pillar h3 { font-size: 1.1rem; }
.pillar p { margin-top: 4px; }
.pillar__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.pillar__icon img { width: 34px; height: 34px; }
.places { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.places li { padding: 5px 10px; border-radius: 999px; background: #fff; font: 700 12px/1.2 var(--qm-body); white-space: nowrap; text-align: center; }

/* ---------- Features ---------- */
.features { padding: 44px 0; background: var(--qm-ink); color: #fff; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feat { padding: 16px; border-radius: var(--qm-card-radius); background: #212c4d; border: 1px solid rgba(255,255,255,.08); }
.feat__art { height: 180px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 18px; background: #18223D; padding: 14px; overflow: hidden; }
.feat h3 { font-size: 1.1rem; line-height: 1.12; }
.feat p { margin-top: 8px; color: rgba(255,255,255,.78); }
.feat__art--dial { display: flex; flex-direction: column; justify-content: center; }
.feat__art--dial svg { width: 160px; }
.needle { transform-origin: 100px 108px; animation: needle 6s var(--ease-out) infinite; }
@keyframes needle { 0% { transform: rotate(-62deg); } 22% { transform: rotate(48deg); } 40%, 100% { transform: rotate(0deg); } }
.dial__labels { display: flex; justify-content: space-between; gap: 10px; width: 220px; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.6); }
.dial__labels b { color: var(--qm-yellow); }
.map { position: relative; display: grid; gap: 10px; width: 86%; }
.map::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 3px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.35) 0 6px, transparent 6px 12px); }
.map__node { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; background: #2b3553; font-weight: 700; }
.map__node span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--qm-success); color: #fff; font-size: 14px; }
.map__node.is-new { background: var(--qm-yellow); color: var(--qm-ink); animation: glow 2.4s ease-in-out infinite; }
.map__node.is-new span { background: var(--qm-blue); }
.map__node em { margin-left: auto; font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--qm-ink); color: #fff; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(255,219,87,.25); } }
.chat { display: grid; gap: 8px; width: 94%; font-size: 14px; line-height: 1.4; }
.chat__msg { max-width: 86%; padding: 8px 12px; border-radius: 16px; }
.chat__msg--me { justify-self: end; background: var(--qm-blue); border-bottom-right-radius: 4px; }
.chat__msg--qm { display: flex; gap: 8px; align-items: flex-start; background: #fff; color: var(--qm-ink); border-bottom-left-radius: 4px; }
.chat__msg--qm img { flex: none; width: 26px; height: 26px; }
.feat .chat__msg { margin: 0; color: #fff; }
.feat .chat__msg--qm { color: var(--qm-ink); }

/* ---------- Rewards ---------- */
.rewards { padding: 44px 0; }
.rewards__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.tiers { position: relative; display: grid; gap: 10px; counter-reset: t; }
.tiers::before { content: ""; position: absolute; left: 23px; top: 28px; bottom: 28px; width: 6px; border-radius: 3px; background: linear-gradient(to top, #C9CFFB, var(--qm-blue) 60%, var(--qm-yellow)); }
.tier { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-card), 0 0 0 1px var(--qm-line); }
.tier b { display: block; font: 800 1.05rem/1.1 var(--qm-heading); letter-spacing: -.02em; }
.tier span { display: block; color: var(--qm-muted); font-size: 14px; }
.tier__dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: 0; border-radius: 50%; background: #fff; border: 5px solid var(--qm-blue); }
.tier:nth-child(1) .tier__dot { border-color: #C9CFFB; }
.tier:nth-child(2) .tier__dot { border-color: #7d8cff; }
.tier--top { background: var(--qm-yellow); box-shadow: 0 18px 40px -18px rgba(24,34,61,.4); }
.tier--top span { color: var(--qm-ink); }
.tier--top .tier__dot { width: 48px; height: 48px; margin-left: -8px; border: 0; background: #fff; box-shadow: 0 0 0 4px var(--qm-ink); }
.tier--top .tier__dot img { width: 36px; height: 36px; }
.rewards__grid .tiers { display: flex; flex-direction: column-reverse; }

/* ---------- Reviews ---------- */
.reviews { padding: 44px 0; background: #fff; border-top: 1px solid var(--qm-line); }
.sample-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 12px; border-radius: 999px; background: var(--qm-ink); color: #fff; font: 700 13px/1 var(--qm-body); letter-spacing: .06em; text-transform: uppercase; }
.sample-label::before { content: "i"; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--qm-yellow); color: var(--qm-ink); font: 800 11px/1 var(--qm-heading); text-transform: none; }
.quotes { columns: 3 280px; column-gap: 12px; }
.quote { break-inside: avoid; margin: 0 0 12px; padding: 16px; border-radius: var(--qm-card-radius); background: var(--qm-cream); border: 1px solid var(--qm-line); }
.quote:nth-child(2) { background: #EEF0FE; }
.quote:nth-child(4) { background: #FFF6D6; }
.quote blockquote { margin: 0; font: 800 1.05rem/1.3 var(--qm-heading); letter-spacing: -.015em; }
.quote figcaption { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--qm-muted); font-weight: 600; }
.quote__tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--qm-line); background: #fff; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- FAQ ---------- */
.faq { padding: 44px 0; }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq__list { display: grid; gap: 12px; }
.faq details { border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--qm-line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; padding: 12px 16px; cursor: pointer; list-style: none; font: 700 15.5px/1.35 var(--qm-body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #EEF0FE; color: var(--qm-blue); font: 800 20px/1 var(--qm-heading); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 16px 14px; color: var(--qm-muted); max-width: 60ch; }

.step > p, .pattern > p, .feat > p, .pillar > div > p { font-size: 15px; } /* card body copy only, not the illustrations inside */

/* ---------- Final ---------- */
.final { padding: 44px 0 0; background: var(--qm-yellow); overflow: hidden; }
.final__grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 72px); align-items: end; }
.final__copy { padding-bottom: clamp(56px, 7vw, 96px); }
.final__copy .btn { margin-top: 28px; }
.final .kicker { color: var(--qm-ink); }
.mascot--final { position: relative; width: 140px; margin-bottom: -8px; }

/* ---------- Footer ---------- */
.foot { background: var(--qm-ink); color: rgba(255,255,255,.8); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot__line { font-size: 15px; }

/* ---------- Reveal ---------- */
/* Only hidden once site.v2.js has its observer running (it sets html.reveal-on), so a JS failure never hides content. */
.reveal-on .reveal:not(.is-in) { opacity: 0; transform: translateY(22px); }
.reveal-on .reveal { transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }

/* ---------- 600px and up: the original desktop/tablet values ----------
   The rules above are phone-first. This block puts back the exact pre-phone-first values,
   so 600px+ (tablet and desktop) renders as before. */
@media (min-width: 600px) {
  html { scroll-padding-top: 84px; }
  body { font: 400 17px/1.6 var(--qm-body); }
  .btn { min-height: 52px; padding: 0 28px; font: 700 17px/1 var(--qm-body); }
  .btn--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
  .btn--lg { min-height: 58px; padding: 0 32px; font-size: 18px; }
  .kicker { font: 700 13px/1.2 var(--qm-body); margin-bottom: 18px; }
  .h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
  .h2--xl { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
  .lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); margin-top: 18px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__word { font: 800 23px/1 var(--qm-heading); }
  .top__row { height: 68px; }
  .hero { padding: clamp(24px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }
  .hero__title { font-size: clamp(2.6rem, 6vw, 5.2rem); }
  .hero__sub { margin-top: 22px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
  .hero__cta { margin-top: 30px; }
  .fun { padding: clamp(64px, 9vw, 120px) 0; }
  .fcard { margin-bottom: 10px; border-radius: 20px; padding: 14px 16px; gap: 8px; }
  .fcard p { font: 800 17px/1.2 var(--qm-heading); }
  .fcard__tag { font: 700 12px/1 var(--qm-body); }
  .fcard__ans { font: 700 13px/1.25 var(--qm-body); }
  .play { padding: clamp(64px, 9vw, 120px) 0; }
  .quiz { padding: clamp(18px, 3vw, 30px); }
  .quiz__q { margin: 22px 0 18px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
  .quiz__opts { gap: 10px; }
  .quiz__fb { margin-top: 16px; padding: 14px 16px; }
  .quiz__fb-title { font: 800 18px/1.25 var(--qm-heading); }
  .quiz__fb-why { font-size: 15.5px; }
  .quiz__next { margin-top: 16px; }
  .quiz__done-mascot { width: 120px; }
  .quiz__done-title { font-size: clamp(1.7rem, 3vw, 2.3rem); }
  .head { margin-bottom: clamp(32px, 5vw, 56px); }
  .how { padding: clamp(64px, 9vw, 120px) 0; }
  .steps { gap: clamp(16px, 2.5vw, 28px); }
  .step { padding: 22px; }
  .step__art { height: 170px; margin-bottom: 18px; }
  .step h3 { font-size: 1.45rem; }
  .science { padding: clamp(64px, 9vw, 120px) 0; }
  .patterns { gap: clamp(16px, 2.5vw, 28px); }
  .pattern { padding: 26px; }
  .pattern__art { height: 90px; margin-bottom: 16px; }
  .pattern h3 { font-size: 1.35rem; }
  .pillars { margin-top: clamp(16px, 2.5vw, 28px); gap: clamp(16px, 2.5vw, 28px); }
  .pillar { gap: 20px; padding: 24px 26px; }
  .pillar h3 { font-size: 1.35rem; }
  .pillar__icon { width: 68px; height: 68px; }
  .pillar__icon img { width: 44px; height: 44px; }
  .features { padding: clamp(64px, 9vw, 120px) 0; }
  .feats { gap: clamp(16px, 2.5vw, 28px); }
  .feat { padding: 22px; }
  .feat__art { height: 200px; margin-bottom: 20px; }
  .feat h3 { font-size: 1.4rem; }
  .feat__art--dial svg { width: 190px; }
  .map { gap: 14px; }
  .rewards { padding: clamp(64px, 9vw, 120px) 0; }
  .tiers { gap: 14px; }
  .tiers::before { left: 25px; }
  .tier { gap: 16px; padding: 14px 18px 14px 12px; }
  .tier b { font: 800 1.2rem/1.1 var(--qm-heading); }
  .tier span { font-size: 15px; }
  .reviews { padding: clamp(64px, 9vw, 120px) 0; }
  .quotes { column-gap: clamp(16px, 2.5vw, 24px); }
  .quote { margin: 0 0 clamp(16px, 2.5vw, 24px); padding: 24px; }
  .quote blockquote { font: 800 1.2rem/1.3 var(--qm-heading); }
  .faq { padding: clamp(64px, 9vw, 120px) 0; }
  .faq summary { min-height: 60px; padding: 14px 20px; font: 700 17px/1.35 var(--qm-body); }
  .faq details p { padding: 0 20px 18px; }
  .final { padding: clamp(64px, 8vw, 110px) 0 0; }
  .mascot--final { width: clamp(170px, 22vw, 260px); }
  .opt { min-height: 54px; padding: 10px 14px; font: 600 17px/1.3 var(--qm-body); }
  .step > p, .pattern > p, .feat > p, .pillar > div > p { font-size: inherit; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .fun__grid, .play__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 12ch; }
  .hero__stage { max-width: 520px; width: 100%; margin: 8px auto 0; }
  .fun__visual { width: min(100%, 300px); }
  .feed { height: 380px; }
  .play__stage { padding-right: 0; padding-bottom: 156px; }
  .mascot--play { left: 0; right: auto; bottom: 0; width: 110px; }
  .mascot--play .bubble { left: 100%; right: auto; bottom: 34%; margin: 0 0 0 4px; max-width: 200px; }
  .mascot--play .bubble::after { left: -5px; right: auto; bottom: 16px; }
  .quiz { min-height: 0; }
  .final__grid { grid-template-columns: 1fr; }
  .steps, .patterns, .feats, .pillars, .rewards__grid, .faq__grid { grid-template-columns: 1fr; }
  .top__nav .top__link:not([href="#play"]) { display: none; }
  .final__copy { padding-bottom: 0; order: -1; }
  .mascot--final { justify-self: center; margin-top: 24px; }
}
@media (max-width: 599.98px) {
  .hero__stage { max-width: 340px; }
  .fun__visual { width: min(100%, 290px); }
  .feed { height: 340px; }
  .play__stage { padding-bottom: 124px; }
  .mascot--play { width: 88px; }
  .phone--hero { width: 58%; left: 38%; border-radius: 26px; padding: 7px; }
  .phone__screen { border-radius: 20px; padding: 10px 7px; justify-content: flex-start; padding-top: 18px; }
  .hcard { padding: 10px 9px; border-radius: 14px; }
  .hcard .chip { font-size: 10px; padding: 4px 8px; }
  .hcard__q { font-size: 13px; margin: 8px 0; }
  .hcard__opts { gap: 5px; }
  .hcard__opts li { font-size: 12px; padding: 6px 8px; border-radius: 9px; }
  .hcard__why { font-size: 11px; margin-top: 7px; }
  .paper--hero { width: 50%; }
  .paper--hero .paper__line { font-size: 13px; line-height: 26px; }
  .pillar { flex-direction: column; align-items: flex-start; }
  .top__link { display: none; }
  .hero__cta .btn { width: 100%; }
  .streak { left: -6px; top: -22px; }
  .onemore { right: -6px; }
  .quiz__next { align-self: stretch; }
  .quiz__done-actions .btn { width: 100%; }
}

@media (hover: none) and (pointer: coarse) {
  .play__keys { display: none; }
}

/* Reduced motion: keep the page alive, but only with short fades and colour changes.
   Big movement, shakes, hops and endless loops are switched off. */
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .mascot--hero .mascot__body, .streak, .onemore, .needle, .map__node.is-new, .kicker .dot, .quiz__done-mascot, .opt.is-right, .opt.is-wrong { animation: none; }
  .hero__copy > *, .quiz__fb, .quiz__done, .chip--again { animation-name: fade; animation-duration: .35s; }
  .hl::after { animation-duration: .35s; }
  .feed__track { animation-duration: 130s; }
  .reveal-on .reveal:not(.is-in) { transform: none; }
  .reveal-on .reveal { transition: opacity .4s ease; }
  .btn, .opt, .hcard__opts li, .hcard__why { transition-duration: .2s; }
  .btn:hover span::after, .opt:hover:not(:disabled), .hcard__opts li.is-hover { transform: none; }
  .hcard__why { transform: none; }
}
