/* Quaero Learning — public site design system (landing page + /try/).
   Warm paper neutrals with one violet accent and pastel highlights. No web fonts or
   third-party requests: homepage type uses the system's rounded face where it has one.
   The sample reader loads its bundled fonts through sample-study.css. */

:root {
  --bg: #f6f3ee;
  --bg-2: #efe9e0;
  --surface: #ffffff;
  --ink: #17141f;
  --muted: #5d5869;
  --line: #e6dfd4;
  --violet: #6246ea;
  --violet-ink: #ffffff;
  --violet-soft: #ece7ff;
  --violet-deep: #2a1d73;
  --peach: #ffd9c4;
  --sage: #d3ead6;
  --sun: #ffe58f;
  --pink: #ffcfe6;
  --sky: #cfe6ff;
  --ok: #1f8a4c;
  --ok-soft: #dcf3e4;
  --bad: #c2334d;
  --bad-soft: #fde2e7;
  --shadow: 0 1px 2px rgba(23, 20, 31, 0.06), 0 8px 28px rgba(23, 20, 31, 0.08);
  --shadow-lift: 0 2px 4px rgba(23, 20, 31, 0.08), 0 16px 40px rgba(98, 70, 234, 0.18);
  --radius: 20px;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Light only, whatever the visitor's system setting: the owner found the dark
     variant too dark (2026-09-29), and the Brilliant-style look this follows is light. */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--violet); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 850; margin: 0 0 20px; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 1.2rem; font-weight: 750; margin: 0 0 6px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 700 0.8rem/1 var(--body);
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--violet); margin-bottom: 14px;
}
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.9rem; }

/* marker highlight on a word or two in a headline */
.hl { background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%); padding: 0 0.08em; }
.hl.pink { background: linear-gradient(transparent 58%, var(--pink) 58%, var(--pink) 92%, transparent 92%); }
.hl.sage { background: linear-gradient(transparent 58%, var(--sage) 58%, var(--sage) 92%, transparent 92%); }
.squiggle { position: relative; white-space: nowrap; color: var(--violet); }
.squiggle::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.12em; height: 0.28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 5 Q5 0 10 5 T20 5 T30 5 T40 5' fill='none' stroke='%236246ea' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 1.2em 100%;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  font: 700 1rem/1.1 var(--body); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--violet); color: var(--violet-ink); box-shadow: 0 6px 0 var(--violet-deep); }
.btn-primary:hover { box-shadow: 0 8px 0 var(--violet-deep); }
.btn-primary:active { box-shadow: 0 2px 0 var(--violet-deep); transform: translateY(4px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name { font: 800 1.12rem/1 var(--display); letter-spacing: -0.02em; }
.brand-name sup { font-size: 0.55em; font-weight: 600; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--bg-2); }
@media (max-width: 820px) { .nav { display: none; } .site-header .btn { margin-left: auto; } }
.site-header .btn { white-space: nowrap; }
@media (max-width: 420px) { .long-label { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 64px 0 48px; overflow-x: clip; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: 0.75;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero::before { width: 520px; height: 520px; left: -140px; top: -120px; background: var(--peach); }
.hero::after { width: 560px; height: 560px; right: -160px; top: 40px; background: var(--violet-soft); animation-delay: -6s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.08); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
/* very narrow screens: let the no-break "Understand it." wrap rather than overflow */
@media (max-width: 360px) { h1 { font-size: 2.2rem; overflow-wrap: anywhere; } }
.hero .lede { margin-bottom: 26px; }
.hero-note { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }

.stickers { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.sticker {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  font: 700 0.86rem/1 var(--body); background: var(--surface); border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(var(--r, -2deg));
}
.sticker:nth-child(2) { --r: 1.5deg; background: var(--sun); }
.sticker:nth-child(3) { --r: -1deg; background: var(--sage); }
.sticker:nth-child(4) { --r: 2deg; background: var(--pink); }

/* ---------- question card (hero demo, diagnostic, worked examples) ---------- */
.qcard {
  position: relative; background: var(--surface); border-radius: 26px; padding: 24px;
  box-shadow: var(--shadow-lift); border: 1px solid var(--line);
}
.qcard-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font: 700 0.78rem/1.3 var(--body); background: var(--violet-soft); color: var(--violet);
}
.chip.peach { background: var(--peach); color: var(--ink); }
.chip.sage { background: var(--sage); color: var(--ink); }
.passage { font-size: 0.98rem; line-height: 1.62; }
.passage p:last-child { margin-bottom: 0; }
.passage blockquote, .page-body blockquote {
  margin: 12px 0; padding: 14px 16px; border-left: 4px solid var(--violet); background: var(--bg);
  border-radius: 0 14px 14px 0;
}
.stem { font-weight: 700; margin: 14px 0 12px; }
.choices { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.choice {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  color: var(--ink); font: 500 0.96rem/1.45 var(--body); transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.choice:hover:not([disabled]) { border-color: var(--violet); transform: translateX(3px); }
.choice .letter {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid currentColor; font-weight: 800; font-size: 0.85rem; opacity: 0.8;
}
.choice[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); }
.choice.is-right { border-color: var(--ok); background: var(--ok-soft); }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice[disabled] { cursor: default; }
.choice .body { flex: 1; min-width: 0; }
.trap-tag {
  display: block; margin-top: 6px; font-size: 0.82rem; font-weight: 700; color: var(--muted);
}
.choice.is-right .trap-tag { color: var(--ok); }
.choice.is-wrong .trap-tag { color: var(--bad); }
.trap-tag .note { display: block; font-weight: 500; margin-top: 2px; color: var(--muted); }
.feedback { margin-top: 14px; font-weight: 650; min-height: 1.5em; }
.feedback.ok { color: var(--ok); }
.feedback.bad { color: var(--bad); }
.pop { animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qcard .float-badge {
  position: absolute; top: -16px; right: 18px; transform: rotate(4deg);
  background: var(--sun); color: #17141f; border: 1.5px solid #17141f; box-shadow: 3px 3px 0 #17141f;
  padding: 6px 12px; border-radius: 12px; font: 800 0.82rem/1 var(--body);
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 14px 0; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  white-space: nowrap; padding: 6px 14px; border-radius: 999px; background: var(--bg);
  font: 650 0.9rem/1.4 var(--body); color: var(--muted);
}
.marquee span.rw { background: var(--violet-soft); color: var(--violet); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-inline: inherit; }
.alt { background: var(--bg-2); }

/* steps (how it works) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; margin-bottom: 16px; font: 850 1.25rem/1 var(--display);
  background: var(--sun); color: #17141f; transform: rotate(-4deg);
}
.step:nth-child(2)::before { background: var(--sage); transform: rotate(3deg); }
.step:nth-child(3)::before { background: var(--pink); transform: rotate(-2deg); }
.step p { color: var(--muted); margin: 0; }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; grid-column: span 2; overflow: hidden; position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile.wide { grid-column: span 3; }
.tile.xl { grid-column: span 4; }
.tile p { color: var(--muted); margin: 0; }
.tile .big { font: 850 clamp(2.6rem, 5vw, 3.6rem)/1 var(--display); letter-spacing: -0.04em; display: block; margin-bottom: 8px; }
.tile.violet { background: var(--violet); color: var(--violet-ink); border-color: transparent; }
.tile.violet p { color: color-mix(in srgb, var(--violet-ink) 82%, transparent); }
.tile.peach { background: var(--peach); border-color: transparent; }
.tile.sage { background: var(--sage); border-color: transparent; }
.tile.sun { background: var(--sun); border-color: transparent; }
.tile.peach p, .tile.sage p, .tile.sun p { color: var(--ink); opacity: 0.78; }
.tile .emoji { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.tile.full { grid-column: 1 / -1; }
.tile.grow { display: flex; gap: 18px; align-items: center; background: linear-gradient(100deg, var(--sage), var(--sky)); border-color: transparent; }
.tile.grow .emoji { font-size: 2.4rem; margin: 0; }
.tile.grow p { color: var(--ink); opacity: 0.78; }
@media (max-width: 920px) { .tile, .tile.wide, .tile.xl { grid-column: span 3; } .tile.full { grid-column: 1 / -1; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .tile, .tile.wide, .tile.xl, .tile.full { grid-column: auto; } }

/* mini product mock inside a tile */
.mock-map { margin-top: 18px; display: grid; gap: 8px; }
.mock-unit {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); font-size: 0.88rem; font-weight: 600;
}
.tile.violet .mock-unit { background: rgba(255, 255, 255, 0.14); color: var(--violet-ink); }
.mock-unit .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 800; background: rgba(255, 255, 255, 0.25); }
.mock-unit.done .dot { background: var(--ok); color: #fff; }
.mock-unit .pill { margin-left: auto; font-size: 0.72rem; opacity: 0.8; }

/* audience switch */
.switch { display: inline-flex; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 26px; }
.switch button {
  border: 0; background: transparent; color: var(--muted); font: 700 0.98rem/1 var(--body);
  padding: 12px 22px; border-radius: 999px; cursor: pointer; min-height: 44px;
}
.switch button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.audience-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.audience-panel[hidden] { display: none; }
.point { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.point .emoji { font-size: 1.6rem; }
.point p { color: var(--muted); margin: 0; }

/* app tour */
.tour-tabs { flex-wrap: wrap; border-radius: 22px; }
.tour-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.tour-panel[hidden] { display: none; }
@media (max-width: 900px) { .tour-panel { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
.frame { margin: 0; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff6b6b; }
.frame-bar i:nth-child(2) { background: #ffc94d; }
.frame-bar i:nth-child(3) { background: #4cd07d; }
.frame img, .frame video { display: block; width: 100%; height: auto; background: var(--bg); }
.ticks { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font: 900 0.8rem/22px var(--body); text-align: center; }
.tour-thumb { width: 100%; max-width: 360px; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(-1.5deg); }

/* vocabulary flip cards */
.flip-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .flip-row { grid-template-columns: minmax(0, 1fr); } }
.flip { perspective: 1200px; cursor: pointer; color: var(--ink); min-height: 390px; }
.flip-inner { position: relative; display: grid; width: 100%; height: 100%; min-height: 390px; transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1); transform-style: preserve-3d; }
.flip[data-flipped="true"] .flip-inner { transform: rotateY(180deg); }
.flip-btn { margin-top: auto; align-self: flex-start; border: 0; background: var(--violet-soft); color: var(--violet); border-radius: 999px; padding: 6px 12px; font: 800 0.8rem/1.2 var(--body); cursor: pointer; min-height: 32px; }
/* Both faces share one grid cell, so the card is as tall as its taller face: the back
   never scrolls inside the card. */
.flip-face {
  position: relative; grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; overflow: hidden;
}
.flip-face.back { transform: rotateY(180deg); background: linear-gradient(170deg, var(--violet-soft), var(--surface) 60%); }
.flip-face svg { width: 100%; height: auto; border-radius: 12px; }
.flip-word { font: 850 2rem/1.1 var(--display); letter-spacing: -0.02em; }
.flip-pos { color: var(--muted); font-size: 0.85rem; font-style: italic; }
.flip-hint { margin-top: auto; font-size: 0.8rem; font-weight: 700; color: var(--violet); }
.flip-face.back p { margin: 0; font-size: 1rem; }
.flip-face.back .hook { background: var(--sun); color: #17141f; border-radius: 10px; padding: 7px 9px; font-weight: 600; }
.flip-face.back .ex { color: var(--muted); font-style: italic; }
.langs { display: flex; flex-wrap: wrap; gap: 4px; }
.langs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 2px 8px; font: 700 0.72rem/1.6 var(--body); color: var(--muted); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tr-text { font-weight: 700; }
.tr-text:empty { display: none; }
/* The vocabulary tab gives the cards the full width, with its copy underneath. */
.tour-panel.tour-wide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .tour-wide .tour-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 36px; align-items: center; }
  .tour-wide .tour-copy h3 { grid-column: 1; }
  .tour-wide .tour-copy .ticks { grid-column: 1; }
  .tour-wide .tour-copy .tour-thumb { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }

/* free try callout */
.try-band {
  border-radius: 32px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  background: radial-gradient(circle at 85% 20%, var(--pink), transparent 45%), radial-gradient(circle at 10% 90%, var(--sky), transparent 50%), var(--surface);
  border: 1px solid var(--line);
}
@media (max-width: 820px) { .try-band { grid-template-columns: 1fr; } }
.try-options { display: grid; gap: 12px; }
.try-option {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--surface);
  border: 2px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 0.15s, border-color 0.15s;
}
.try-option:hover { transform: translateY(-3px); border-color: var(--violet); }
.try-option .emoji { font-size: 1.7rem; }
.try-option strong { display: block; font-size: 1.02rem; }
.try-option span.muted { font-size: 0.9rem; }
.try-option .arrow { margin-left: auto; font-weight: 800; color: var(--violet); }


/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.plan.best { border: 2px solid var(--violet); box-shadow: var(--shadow-lift); }
.plan .badge { position: absolute; top: -13px; left: 20px; background: var(--violet); color: var(--violet-ink); font: 800 0.76rem/1 var(--body); padding: 6px 11px; border-radius: 999px; }
.plan .price { font: 850 2rem/1.1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.plan .term { font-size: 0.85rem; color: var(--muted); }
.plan ul { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 7px; flex: 1; align-content: start; }
.plan li { padding-left: 26px; position: relative; font-size: 0.94rem; color: var(--muted); }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 900; }
.plan .open-link { font-size: 0.85rem; text-align: center; }
/* the target plan sits slightly raised; the anchor reads premium but quiet */
/* .reveal.in ends with transform:none, so the lift is restated for the revealed state */
.plan.best, .plan.best.reveal.in { transform: translateY(-10px); background: linear-gradient(180deg, var(--violet-soft), var(--surface) 38%); }
@media (max-width: 1000px) { .plan.best, .plan.best.reveal.in { transform: none; } }
.plan.anchor { background: linear-gradient(160deg, #fffaf2, var(--surface) 55%); border-color: #e9d9bd; }
.plan .badge.alt-badge { background: var(--ink); color: var(--bg); }
.plan .save { align-self: flex-start; background: var(--ok-soft); color: var(--ok); font: 800 0.8rem/1.2 var(--body); padding: 5px 10px; border-radius: 999px; }
.plan li.no { color: var(--muted); opacity: 0.8; }
.plan li.no::before { content: "–"; color: var(--muted); }
.refund-note { font-size: 0.82rem; font-weight: 700; color: var(--ok); text-align: center; }
.addon {
  margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.addon > span:nth-child(2) { flex: 1; min-width: 220px; font-size: 0.94rem; }
.addon .open-link { font-size: 0.85rem; }
.center-note { text-align: center; margin-top: 18px; }

.join-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: j; }
@media (max-width: 900px) { .join-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .join-steps { grid-template-columns: 1fr; } }
.join-steps li { counter-increment: j; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; padding: 16px 16px 16px 54px; position: relative; font-size: 0.94rem; }
.join-steps li::before { content: counter(j); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }
.promise { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.promise span { background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 0.88rem; padding: 7px 13px; border-radius: 999px; }

/* faq */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 800 1.4rem/1 var(--display); color: var(--violet); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 12px; margin: 0; }

/* final cta */
.final { text-align: center; padding: 96px 0; }
.final h2 { max-width: 16ch; margin-inline: auto; }
.final .cta-row { justify-content: center; margin-top: 24px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.88rem; }
.site-footer p { margin: 6px 0; }
.site-footer a { color: inherit; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- /try/ page ---------- */
.try-hero { padding: 56px 0 24px; text-align: center; }
.try-hero .lede { margin-inline: auto; }
.tabs { display: flex; justify-content: center; margin: 22px 0 8px; }
.player { max-width: 760px; margin: 0 auto 64px; }
.player-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 160px; height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), #ff8fb8); border-radius: 999px; transition: width 0.35s ease; }
.player-count { font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.page-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.page-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.page-body { font-size: 1rem; }
.page-body ol, .page-body ul { padding-left: 22px; }
.page-body li { margin: 6px 0; }
.page-body.callout { background: var(--violet-soft); border-radius: 18px; padding: 18px; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
.page-body table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.page-body th, .page-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.page-body th { background: var(--bg); }
.player-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.lesson-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin: 0 auto 24px; }
@media (max-width: 600px) { .lesson-pick { grid-template-columns: 1fr; } }
.lesson-pick button {
  text-align: left; cursor: pointer; background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 18px;
  font: inherit; color: var(--ink); transition: border-color 0.15s, transform 0.15s;
}
.lesson-pick button:hover { transform: translateY(-2px); border-color: var(--violet); }
.lesson-pick button[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); }
.lesson-pick strong { display: block; font-size: 1.05rem; }
.results { display: grid; gap: 10px; margin: 18px 0; }
.result-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.result-row .mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; flex: none; }
.result-row.ok .mark { background: var(--ok-soft); color: var(--ok); }
.result-row.bad .mark { background: var(--bad-soft); color: var(--bad); }
.result-row .where { margin-left: auto; font-size: 0.85rem; color: var(--muted); text-align: right; }
.score-ring { font: 850 3.4rem/1 var(--display); letter-spacing: -0.04em; }
.explain { margin-top: 14px; padding: 14px 16px; background: var(--bg); border-radius: 14px; font-size: 0.95rem; }
.explain p:last-child { margin-bottom: 0; }
.katex { font-size: 1.05em; }
.myth { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 10px 0; background: var(--bg); }
.myth-stamp { display: inline-block; background: var(--bad); color: #fff; font: 800 0.78rem/1 var(--body); letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 8px; }
.myth-verdict { display: inline-block; background: var(--bad-soft); color: var(--bad); font: 700 0.8rem/1 var(--body); padding: 5px 10px; border-radius: 999px; }
.myth-text { font: 750 1.12rem/1.4 var(--display); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); margin: 10px 0 6px; }
.myth p:last-child { margin-bottom: 0; }

/* ---- Sign-in and checkout pages (MVP_PLAN.md 1.2 / 2.2) ---- */
.account-page { padding: 48px 0 72px; }
.account-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.account-title { font-size: clamp(2rem, 5vw, 2.6rem); margin: 0; }
.account-card .join-steps { grid-template-columns: 1fr; margin: 4px 0; }
.account-status:empty { display: none; }
.account-status { background: var(--violet-soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.account-apps, .account-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-card [hidden] { display: none; }
.account-card fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.account-card legend { font: 750 1rem/1.3 var(--display); padding: 0; margin-bottom: 4px; }
.plan-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.plan-option > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-option .muted { font-size: 0.88rem; }
.plan-option:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.plan-option:has(:focus-visible), .check-line:has(:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }
.plan-option input { width: 18px; height: 18px; accent-color: var(--violet); margin: 0; }
.plan-price { font: 850 1.2rem/1 var(--display); }
.text-input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.text-input:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
#student-fields { display: flex; flex-direction: column; gap: 8px; }
.students .btn { align-self: flex-start; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.account-card .btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.big-emoji { font-size: 2.4rem; }
#clerk-sign-in:empty { display: none; }
