/* ==========================================================================
   FastPass (考試快格迅) — single stylesheet
   Gamified bilingual (繁中 / English) HK finance-licence exam-prep platform.
   "Turn revision into a game." Warm cream + coral→violet, big rounded corners,
   chunky friendly buttons, playful streak/ring/quota micro-motion.
   --------------------------------------------------------------------------
   TABLE OF CONTENTS
   01. Design tokens (:root)            12. Testimonials
   02. Reset & base                     13. FAQ
   03. Layout primitives                14. CTA band
   04. Buttons                          15. Quiz setup
   05. Header / nav / mobile menu       16. Dashboard
   06. Footer + regulator strip         17. Auth
   07. Hero + sp-hero-card mock         18. Quiz runtime (engine-built DOM)
   08. Trusted-by / marquees            19. FastPass gamified widgets (sp-*)
   09. Features / modes                 20. Plan compare / pricing (pc-* / sp-plan-*)
   10. Exams hub + detail + papers      21. Admin console
   11. Pricing cards                    22. Motion / reduced-motion / dark theme
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS
   ========================================================================== */
:root {
  color-scheme: light;

  /* --- Palette (light) --- */
  --cream: #FFF9F4;          /* warm off-white page background */
  --surface: #FFFFFF;        /* cards / panels */
  --surface-2: #FFFDFB;      /* slightly tinted surface (inputs etc.) */
  --ink: #221A2E;            /* primary text (warm plum-near-black) */
  --ink-2: #4A4458;          /* secondary text */
  --muted: #6E6878;          /* muted text (AA on cream) */
  --muted-2: #8C8696;        /* fainter still */
  --line: #EFE7DE;           /* warm hairlines / borders */
  --line-2: #F4EDE6;         /* faintest hairline */

  --coral: #FF5A5F;          /* PRIMARY brand / CTAs */
  --coral-deep: #F03E47;     /* hover */
  --violet: #6C4CF1;         /* SECONDARY accent */
  --violet-deep: #5739D8;
  --sun: #FFC83D;            /* highlight / streak / badges */
  --sun-deep: #F0A714;
  --mint: #15C7A8;           /* success / positive */
  --mint-deep: #0FA98F;
  --danger: #F0436A;         /* wrong / errors */
  --danger-deep: #D62B54;

  /* Legacy aliases so any stray old token names still resolve sanely. */
  --paper: var(--surface);
  --bg: var(--cream);
  --bg-tint: #FFF3EA;
  --blue: var(--violet);
  --blue-bright: var(--violet);
  --blue-deep: var(--violet-deep);
  --emerald: var(--mint);
  --emerald-deep: var(--mint-deep);
  --warm: var(--sun-deep);
  --gold: var(--sun);
  --success: var(--mint-deep);
  --danger-soft: #FF7E9A;

  /* --- Signature gradients --- */
  --grad: linear-gradient(100deg, #FF5A5F 0%, #6C4CF1 100%);
  --grad-warm: linear-gradient(100deg, #FFC83D 0%, #FF5A5F 100%);
  --grad-mint: linear-gradient(100deg, #15C7A8 0%, #43E3C2 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 90, 95, .10), rgba(108, 76, 241, .10));
  --grad-deep: linear-gradient(120deg, #2B1846 0%, #4A2A6E 48%, #7A2F6B 100%);

  /* --- Radii (big & rounded) --- */
  --r-sm: 12px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* --- Warm, coral/violet-tinted soft shadows --- */
  --sh-xs: 0 1px 2px rgba(72, 40, 90, .05);
  --sh-sm: 0 2px 8px rgba(108, 76, 241, .06), 0 1px 2px rgba(255, 90, 95, .05);
  --sh-md: 0 10px 28px rgba(108, 76, 241, .10), 0 3px 8px rgba(72, 40, 90, .06);
  --sh-lg: 0 22px 52px rgba(108, 76, 241, .14), 0 8px 18px rgba(72, 40, 90, .08);
  --sh-xl: 0 36px 84px rgba(72, 40, 90, .20), 0 12px 30px rgba(108, 76, 241, .12);
  --sh-ring: 0 0 0 4px rgba(255, 90, 95, .18);
  --sh-coral: 0 10px 24px rgba(255, 90, 95, .30);
  --sh-violet: 0 10px 24px rgba(108, 76, 241, .28);

  /* --- Spacing scale --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* --- Layout --- */
  --container: 1160px;
  --container-narrow: 760px;
  --header-h: 72px;

  /* --- Type --- */
  --font: 'Plus Jakarta Sans', 'Noto Sans HK', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Noto Sans HK', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(.16, .84, .44, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--coral); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--coral-deep); }

button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
h4 { font-weight: 700; }

ul { list-style: none; padding: 0; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(255, 90, 95, .18); color: var(--ink); }

/* Sticky-header-aware anchor scrolling */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

/* Helper utilities used in markup */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* ==========================================================================
   03. LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.container.narrow,
.container-narrow { max-width: var(--container-narrow); }
.narrow { max-width: var(--container-narrow); margin-inline: auto; }

main { display: block; }

.section { padding-block: clamp(56px, 9vw, 104px); }

.section-tint {
  background:
    radial-gradient(60% 80% at 85% -10%, rgba(108, 76, 241, .07), transparent 60%),
    radial-gradient(50% 70% at 0% 110%, rgba(255, 90, 95, .07), transparent 60%),
    var(--bg-tint);
}

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-top: 10px; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin-top: 14px; }
.section-head.start { text-align: left; max-width: 720px; margin-left: 0; margin-right: 0; }
.section-head.start h2 { margin-inline: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--coral);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Generic elevated card surface */
.card-elevated {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--coral); color: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 700;
}
.skip-link:focus { left: 12px; }

/* ==========================================================================
   04. BUTTONS  (chunky, friendly, rounded)
   ========================================================================== */
.btn {
  --btn-pad-y: 12px;
  --btn-pad-x: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-primary {
  color: #fff;
  background-image: var(--grad);
  background-size: 150% 150%;
  background-position: 0% 50%;
  box-shadow: var(--sh-coral), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 16px 32px rgba(255, 90, 95, .40), inset 0 1px 0 rgba(255, 255, 255, .26);
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover {
  color: var(--coral-deep);
  border-color: rgba(255, 90, 95, .42);
  background: #FFFDFC;
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.btn-light {
  color: var(--coral-deep);
  background: #fff;
  box-shadow: 0 12px 28px rgba(43, 24, 70, .26);
}
.btn-light:hover { color: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 18px 38px rgba(43, 24, 70, .32); }

.btn-lg { --btn-pad-y: 15px; --btn-pad-x: 30px; font-size: 1.04rem; }
.btn-sm { --btn-pad-y: 6px; --btn-pad-x: 14px; font-size: .82rem; }
.btn-block { display: flex; width: 100%; }

.btn-danger { color: #fff; background: var(--danger); border-color: transparent; box-shadow: 0 8px 20px rgba(240, 67, 106, .26); }
.btn-danger:hover { background: var(--danger-deep); color: #fff; transform: translateY(-1px); }

.btn-ghost-light { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .42); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .26); color: #fff; }

/* ==========================================================================
   05. HEADER / NAV / MOBILE MENU
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 249, 244, .78);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(72, 40, 90, .07);
  background: rgba(255, 249, 244, .90);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }

/* SVG brand logo (FastPass speed badge) */
.brand-logo { width: 42px; height: 42px; flex: none; display: block; filter: drop-shadow(0 4px 10px rgba(255, 90, 95, .28)); }
.brand-footer .brand-logo { width: 34px; height: 34px; filter: none; }

/* Fallback text mark (kept for any legacy use) */
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background-image: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.04em;
  box-shadow: var(--sh-coral), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-size: 1.12rem;
  font-weight: 800;
}
.brand-text em {
  font-style: normal;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  font-family: var(--font);
}

/* Desktop: the menu wrapper is transparent (display:contents); its children
   join the .nav flexbox. On mobile it becomes the dropdown panel. */
.nav-menu { display: contents; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-2);
  font-weight: 600;
  font-size: .94rem;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { color: var(--coral-deep); background: rgba(255, 90, 95, .08); }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink-2);
  background: var(--surface);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.lang-toggle:hover { color: var(--coral-deep); border-color: rgba(255, 90, 95, .42); transform: translateY(-1px); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { color: var(--coral-deep); border-color: rgba(255, 90, 95, .42); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--sh-xs);
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   06. FOOTER + REGULATOR STRIP
   ========================================================================== */
.site-footer {
  background: var(--grad-deep);
  color: #E8DDF2;
  padding-block: clamp(48px, 7vw, 80px) 28px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 100% at 80% 0%, rgba(255, 90, 95, .22), transparent 60%),
    radial-gradient(50% 90% at 10% 110%, rgba(108, 76, 241, .26), transparent 60%);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.brand-footer { color: #fff; }
.brand-footer:hover { color: #fff; }
.brand-footer .brand-text { color: #fff; }
.footer-tag { margin-top: 14px; max-width: 32ch; color: #CBBFDC; font-size: .95rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.footer-cols h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-cols a {
  display: block;
  color: #CBBFDC;
  font-size: .94rem;
  padding: 5px 0;
}
.footer-cols a:hover { color: #fff; }

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .82rem;
  color: #A99CBC;
}

/* Regulator strip (text wordmarks + non-affiliation marquee) */
.reg-strip { border-top: 1px solid var(--line); padding: 1.6rem 0 .25rem; }
.reg-strip-label { text-align: center; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.reg-marquee { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.reg-track { display: flex; gap: 1rem; width: max-content; animation: reg-scroll 38s linear infinite; }
.reg-marquee:hover .reg-track { animation-play-state: paused; }
.reg-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-width: 10rem; padding: .75rem 1.15rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--sh-xs); }
.reg-abbr { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; color: var(--ink); }
.reg-name { font-size: .72rem; line-height: 1.3; text-align: center; color: var(--muted); }
.reg-disclaimer { max-width: 62rem; margin: 1.2rem auto 0; text-align: center; font-size: .76rem; line-height: 1.65; color: var(--muted); }
.reg-terms-link { color: var(--coral); text-decoration: underline; white-space: nowrap; }
@keyframes reg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* WhatsApp CTAs */
.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff; padding: 12px 16px; border-radius: var(--r-pill); box-shadow: 0 12px 28px rgba(0, 0, 0, .22); font-weight: 700; font-size: .92rem; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.wa-fab svg { width: 24px; height: 24px; flex: none; }
.wa-fab:hover { background: #1ebe5d; color: #fff; transform: translateY(-2px); }
.wa-fab-txt { white-space: nowrap; }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff; font-weight: 700; padding: 10px 20px; border-radius: var(--r-pill); font-size: .92rem; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.wa-btn:hover { background: #1ebe5d; color: #fff; transform: translateY(-1px); }
@media (max-width: 560px) { .wa-fab .wa-fab-txt { display: none; } .wa-fab { padding: 14px; border-radius: 50%; } }

/* ==========================================================================
   07. HERO  + sp-hero-card (CSS-illustrated quiz mock)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 9vw, 104px);
}
.hero-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 130%;
  z-index: 0;
  background:
    radial-gradient(42% 50% at 16% 12%, rgba(255, 90, 95, .22), transparent 62%),
    radial-gradient(40% 46% at 88% 6%, rgba(108, 76, 241, .20), transparent 60%),
    radial-gradient(48% 60% at 64% 102%, rgba(255, 200, 61, .16), transparent 62%);
  filter: blur(10px);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(28% 30% at 32% 32%, rgba(21, 199, 168, .16), transparent 70%);
  animation: blob-float 18s ease-in-out infinite alternate;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-copy { max-width: 620px; }
.hero-copy .eyebrow { margin-bottom: 18px; }

.hero-title {
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -.03em;
}
.hero-lead {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted);
  max-width: 48ch;
}
.hero-trust { margin-top: 16px; font-size: .9rem; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-stats .sp-stat,
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.hero-stats span { font-size: .8rem; color: var(--muted); letter-spacing: .01em; }

/* Visual side wrapper */
.hero-visual { position: relative; }

/* --- sp-hero-card : a delightful CSS-only quiz / phone screen --- */
.sp-hero-card {
  position: relative;
  width: min(420px, 100%);
  margin-inline: auto;
  padding: 22px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(108, 76, 241, .08), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xl);
  transform: rotate(-1.2deg);
  transition: transform .35s var(--ease);
}
.sp-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .5;
  pointer-events: none;
}
.hero-visual:hover .sp-hero-card { transform: rotate(0deg) translateY(-4px); }

.sp-hero-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

/* The inner question card */
.sp-hero-q {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  margin-top: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.sp-hero-stem {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 4px 0 6px;
}
.sp-hero-opt {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  transition: transform .2s var(--ease);
}
.sp-hero-opt.is-right {
  color: var(--mint-deep);
  background: rgba(21, 199, 168, .12);
  border-color: rgba(21, 199, 168, .5);
  box-shadow: 0 6px 16px rgba(21, 199, 168, .18);
}
.sp-hero-opt.is-wrong {
  color: var(--danger-deep);
  background: rgba(240, 67, 106, .08);
  border-color: rgba(240, 67, 106, .4);
  text-decoration: line-through;
  text-decoration-color: rgba(240, 67, 106, .5);
}
.sp-hero-expl {
  margin-top: 6px;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-2);
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--bg-tint);
  border-left: 3px solid var(--coral);
}

/* ==========================================================================
   19a. FASTPASS GAMIFIED WIDGETS — chips, streak, ring, quota, stats
   (defined early so hero/dashboard/features markup all resolve)
   ========================================================================== */

/* Generic rounded surface card */
.sp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 24px;
}

/* Small inline tag/label */
.sp-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--violet-deep);
  background: rgba(108, 76, 241, .10);
  border: 1px solid rgba(108, 76, 241, .18);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Rounded pill badge (Pro / Free / Best value / 🔥) */
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background-image: var(--grad-warm);
  box-shadow: 0 4px 12px rgba(255, 90, 95, .26);
  white-space: nowrap;
}
.sp-badge-pro,
a.sp-badge.sp-badge-pro {
  color: #fff;
  background-image: var(--grad);
  box-shadow: var(--sh-violet);
}
.sp-badge-upsell,
a.sp-badge.sp-badge-upsell {
  color: var(--violet-deep);
  background: rgba(108, 76, 241, .10);
  border: 1px solid rgba(108, 76, 241, .32);
  box-shadow: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.sp-badge-upsell:hover { color: var(--violet-deep); background: rgba(108, 76, 241, .18); transform: translateY(-1px); }

/* Streak chip — flame + number + label (sun→coral) */
.sp-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .92rem;
  color: var(--coral-deep);
  padding: 5px 13px 5px 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(100deg, rgba(255, 200, 61, .22), rgba(255, 90, 95, .18));
  border: 1px solid rgba(255, 90, 95, .28);
  white-space: nowrap;
}
.sp-streak strong { font-weight: 800; font-size: 1.04em; color: var(--coral-deep); }
.sp-streak-label { font-weight: 600; font-size: .82em; color: var(--ink-2); }
.sp-streak-flame {
  display: inline-block;
  font-size: 1.05em;
  transform-origin: 50% 80%;
  animation: flame-flicker 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255, 140, 60, .5));
}
.sp-streak-nav { font-size: .85rem; padding: 4px 11px 4px 8px; }

/* Streak banner (home) */
.sp-streak-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
  padding: 24px 28px;
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(255, 200, 61, .12), transparent 60%),
    var(--surface);
}
.sp-streak-banner .sp-streak { font-size: 1.15rem; padding: 8px 18px 8px 14px; }
.sp-streak-banner .sp-streak strong { font-size: 1.4em; }
.sp-streak-banner p { flex: 1; min-width: 220px; margin: 0; }
.sp-streak-banner .btn { margin-left: auto; }

/* Streak flow (4 ring steps) */
.sp-streak-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sp-streak-step {
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.sp-streak-step:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: rgba(255, 90, 95, .25); }
.sp-streak-step h3 { font-size: 1.12rem; margin: 14px 0 8px; }
.sp-streak-step p { color: var(--muted); font-size: .94rem; line-height: 1.6; }

/* Conic-gradient progress ring with centered number */
.sp-ring {
  --p: 50%;
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0, var(--violet) var(--p), var(--line) var(--p));
  animation: ring-grow .9s var(--ease) both;
}
.sp-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
}
.sp-ring-num {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  line-height: 1;
}

/* Big number + label stat block */
.sp-stat { display: flex; flex-direction: column; gap: 2px; }
.sp-stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.05;
}
.sp-stat span { font-size: .82rem; color: var(--muted); }

/* Daily-quota meter */
.sp-quota {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}
.sp-quota-head,
.sp-quota-label,
.sp-run-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-2);
}
.sp-quota-label { display: inline-flex; color: var(--coral-deep); white-space: nowrap; }
.sp-quota-bar {
  position: relative;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}
.sp-quota-fill {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background-image: var(--grad);
  transition: width .5s var(--ease);
  animation: quota-in .7s var(--ease) both;
}

/* Run snapshot (features page) */
.sp-run-snapshot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(22px, 3vw, 32px);
}
.sp-run-snapshot .sp-streak {
  flex-direction: column;
  gap: 2px;
  font-size: 1.6rem;
  padding: 16px 22px;
  border-radius: var(--r-lg);
}
.sp-run-snapshot .sp-streak strong { font-size: 1.4em; }
.sp-run-snapshot .sp-streak span { font-size: .5em; font-weight: 600; color: var(--ink-2); }
.sp-run-stats { display: flex; gap: clamp(16px, 3vw, 36px); }

/* ==========================================================================
   08. TRUSTED-BY / MARQUEES
   ========================================================================== */
.trusted { padding-block: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.trusted-label {
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 18px;
}
.trusted-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
.trusted-item {
  font-weight: 700;
  font-size: .9rem;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
}
.trusted-marquee { overflow: hidden; position: relative; margin-top: .5rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.trusted-track { display: flex; gap: 1rem; width: max-content; animation: trusted-scroll 30s linear infinite; }
.trusted-track .trusted-item { flex: none; }
.trusted-marquee:hover .trusted-track { animation-play-state: paused; }
@keyframes trusted-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.partner-track { gap: 3.25rem; align-items: center; }
.partner { display: inline-flex; align-items: center; justify-content: center; }
.partner-logo { height: 44px; width: auto; max-width: 150px; object-fit: contain; opacity: .72; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease; }
.partner-logo:hover { opacity: 1; filter: grayscale(0); }
.partner-name { align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .partner-logo { height: 34px; } .partner-track { gap: 2.25rem; } }

/* Page hero (sub-pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(56px, 9vw, 104px) clamp(36px, 5vw, 56px);
  background:
    radial-gradient(50% 80% at 50% -10%, rgba(255, 90, 95, .14), transparent 60%),
    radial-gradient(40% 60% at 85% 0%, rgba(108, 76, 241, .12), transparent 60%),
    var(--cream);
}
.page-title { font-size: clamp(2rem, 4.4vw, 3rem); margin-top: 12px; }
.page-lead { max-width: 56ch; margin: 16px auto 0; color: var(--muted); font-size: 1.08rem; }

.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.pill {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
}

/* ==========================================================================
   09. FEATURES / MODES / STEPS
   ========================================================================== */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: rgba(255, 90, 95, .25); }
.feature-card .sp-badge { margin: 14px 0 6px; }
.feature-card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .98rem; }

.feature-lg {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(21, 199, 168, .08), transparent 60%),
    var(--surface);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 1.6rem;
  border-radius: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 90, 95, .14), rgba(108, 76, 241, .14));
  border: 1px solid rgba(108, 76, 241, .16);
}
.feature-img { margin-top: 22px; width: 100%; border-radius: var(--r-md); border: 1px solid var(--line-2); }
.feature-lg .feature-img { max-height: 280px; object-fit: cover; }
.feature-how { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.feature-how li { position: relative; padding-left: 22px; font-size: .92rem; color: var(--ink-2); line-height: 1.4; }
.feature-how li::before { content: "\2713"; position: absolute; left: 0; color: var(--mint-deep); font-weight: 800; }

/* Toolkit cards (features page) */
.func-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.func-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.func-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: rgba(108, 76, 241, .25); }
.func-card .sp-badge { align-self: flex-start; margin-bottom: 6px; }
.func-ico {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  border-radius: 15px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255, 90, 95, .14), rgba(108, 76, 241, .14));
  border: 1px solid rgba(108, 76, 241, .16);
}
.func-card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.func-card p { color: var(--muted); font-size: .96rem; line-height: 1.65; flex-grow: 1; }
.func-card .btn { align-self: flex-start; margin-top: 14px; }

/* Mode showcase */
.mode-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode-show {
  position: relative;
  overflow: hidden;
  padding: 30px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.mode-show:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: rgba(255, 90, 95, .22); }
.mode-show::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.mode-show-emoji { font-size: 2.2rem; margin-bottom: 14px; }
.mode-show h3 { font-size: 1.28rem; margin-bottom: 10px; }
.mode-show p { color: var(--muted); font-size: .98rem; line-height: 1.7; }

/* How-it-works steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  border-radius: 13px;
  background-image: var(--grad);
  box-shadow: var(--sh-coral);
}
.step h4 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .94rem; line-height: 1.6; }

/* ==========================================================================
   10. EXAMS HUB + DETAIL + PAPERS
   Per-exam accent passed inline as --accent / --accent2.
   ========================================================================== */

/* Shared badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.is-live { color: var(--mint-deep); background: rgba(21, 199, 168, .12); border-color: rgba(21, 199, 168, .34); }
.badge.is-soon { color: var(--sun-deep); background: rgba(255, 200, 61, .14); border-color: rgba(255, 200, 61, .4); }
.badge.is-info { color: var(--violet-deep); background: rgba(108, 76, 241, .10); border-color: rgba(108, 76, 241, .24); }
.badge.is-info::before, .badge.is-plain::before { display: none; }
.badge.is-plain { color: var(--ink-2); }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--coral-deep); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .here { color: var(--ink-2); }

/* Exam hub grid */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.exam-card {
  --accent: var(--coral);
  --accent2: var(--violet);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.exam-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: .95; }
.exam-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
  opacity: .7;
  transition: opacity .3s var(--ease);
}
.exam-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--ink); }
.exam-card:hover::after { opacity: 1; }
.exam-card-top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.exam-glyph {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 38%, transparent);
}
.exam-card h3 { position: relative; font-size: 1.32rem; margin-bottom: 4px; }
.exam-abbr { font-family: var(--font-display); font-weight: 800; color: var(--accent); }
.exam-card-reg { position: relative; font-size: .82rem; font-weight: 600; color: var(--muted-2); margin-bottom: 12px; }
.exam-card p { position: relative; color: var(--muted); font-size: .96rem; flex-grow: 1; }
.exam-card-meta { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 16px; }
.exam-chip {
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-2);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.exam-card-foot { position: relative; display: flex; align-items: center; justify-content: space-between; }
.exam-go { font-family: var(--font-display); font-weight: 800; font-size: .92rem; color: var(--accent); transition: transform .2s var(--ease); }
.exam-card:hover .exam-go { transform: translateX(4px); }

/* Exam detail hero */
.exam-hero {
  --accent: var(--coral);
  --accent2: var(--violet);
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 7vw, 80px) clamp(32px, 5vw, 52px);
  background:
    radial-gradient(48% 80% at 12% -10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    radial-gradient(42% 70% at 92% 0%, color-mix(in srgb, var(--accent2) 18%, transparent), transparent 60%),
    var(--cream);
}
.exam-hero-glyph {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 19px;
  font-size: 2rem;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 38%, transparent);
}
.exam-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); max-width: 18ch; }
.exam-hero .exam-sub { font-size: 1.05rem; font-weight: 600; color: var(--accent); margin-top: 6px; }
.exam-hero .page-lead { margin-left: 0; }
.exam-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.exam-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.exam-hero-cta.center { justify-content: center; }
.exam-hero .btn-primary { background-image: linear-gradient(110deg, var(--accent), var(--accent2)); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 34%, transparent); }

/* Two-column overview + who-for */
.info-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.info-block h2 { font-size: 1.5rem; margin-bottom: 12px; }
.info-block p { color: var(--muted); font-size: 1.02rem; line-height: 1.8; }
.info-card { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.info-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.info-card p { color: var(--muted); font-size: .96rem; }

/* Quick facts */
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.fact { padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs); }
.fact-label { font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.fact-value { font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.45; }

/* Papers grid (legacy /papers + exam pages) */
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.paper-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.paper-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: rgba(255, 90, 95, .28); color: var(--ink); }
.paper-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.paper-no {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 36px;
  padding-inline: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  border-radius: var(--r-sm);
  background-image: var(--grad);
  box-shadow: var(--sh-coral);
}
.paper-count { font-size: .82rem; font-weight: 600; color: var(--muted); }
.paper-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.paper-card p { color: var(--muted); font-size: .95rem; flex-grow: 1; }
.paper-go { display: inline-block; margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--coral); transition: transform .2s var(--ease); }
.paper-card:hover .paper-go { transform: translateX(4px); }
.paper-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.topic-chip {
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(108, 76, 241, .08);
  border: 1px solid rgba(108, 76, 241, .14);
}
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.paper-actions .btn { flex: 1; min-width: 120px; }

/* Syllabus list */
.syllabus-list { display: flex; flex-direction: column; gap: 18px; }
.syl-paper {
  --accent: var(--coral);
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.syl-paper:hover { box-shadow: var(--sh-md); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.syl-paper-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.syl-no {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 46px;
  height: 40px;
  padding-inline: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2, var(--accent)));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.syl-paper-titles { flex-grow: 1; }
.syl-paper-titles h3 { font-size: 1.14rem; line-height: 1.3; }
.syl-paper-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.syl-paper-meta span { display: inline-flex; align-items: center; gap: 5px; }
.syl-paper > p { color: var(--muted); font-size: .98rem; margin-bottom: 14px; }
.syl-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.syl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.syl-guide-link { align-self: center; font-weight: 600; color: var(--accent); font-size: .92rem; }

/* Prep tips */
.tips-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tip { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xs); }
.tip-num {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  color: #fff;
  background-image: var(--grad);
}
.tip p { color: var(--ink-2); font-size: .96rem; line-height: 1.6; }

/* ==========================================================================
   11. PRICING CARDS (legacy price-* + freepaid fp-*)
   ========================================================================== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.price-card h3 { font-size: 1.3rem; }
.price-card.is-pop {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: var(--sh-xl);
  transform: scale(1.035);
}
.price-card.is-pop:hover { transform: scale(1.035) translateY(-4px); }
.price-card.is-free { border-top: 4px solid var(--mint); }

.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background-image: var(--grad);
  box-shadow: var(--sh-violet);
}
.price-badge-free { background: var(--mint) !important; }

.price-amt { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.price-amt .was { font-size: 1.05rem; color: var(--muted-2); text-decoration: line-through; }
.price-amt .now { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.price-period { font-size: .9rem; margin-top: 4px; }
.price-until { font-size: .8rem; margin-top: -.35rem; }

.price-feats { display: flex; flex-direction: column; gap: 11px; margin: 22px 0; flex-grow: 1; }
.price-feats li { position: relative; padding-left: 28px; font-size: .95rem; color: var(--ink-2); }
.price-feats li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(21, 199, 168, .14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230FA98F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Free vs Paid emphasis cards (home) */
.freepaid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 840px; margin: 0 auto; }
.fp-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--sh-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.fp-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.fp-card .sp-badge { margin-bottom: 8px; }
.fp-card h3 { margin: 4px 0 4px; font-size: 1.2rem; }
.fp-price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin: 0 0 14px; color: var(--ink); }
.fp-card ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fp-card li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.45; }
.fp-card li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; }
.fp-free { border-top: 4px solid var(--mint); }
.fp-free li::before { color: var(--mint-deep); }
.fp-paid { border-top: 4px solid var(--coral); }
.fp-paid li::before { color: var(--coral); }
.fp-tag { position: absolute; top: -12px; right: 18px; background-image: var(--grad); color: #fff; font-size: .74rem; font-weight: 700; padding: .2rem .7rem; border-radius: var(--r-pill); }

/* ==========================================================================
   12. TESTIMONIALS
   ========================================================================== */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.testi-stars { color: var(--sun); letter-spacing: 2px; font-size: 1rem; margin-bottom: 14px; }
.testi-card blockquote { font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); flex-grow: 1; }
.testi-card figcaption { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-weight: 700; font-size: .95rem; color: var(--ink); }
.testi-av {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  background-image: var(--grad);
  box-shadow: var(--sh-violet);
  flex-shrink: 0;
}

/* ==========================================================================
   13. FAQ
   ========================================================================== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-xs);
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq-item[open] { border-color: rgba(255, 90, 95, .32); box-shadow: var(--sh-sm); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--coral);
  border-radius: 50%;
  background: rgba(255, 90, 95, .10);
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.faq-item[open] summary::after { content: '–'; transform: rotate(180deg); background: rgba(108, 76, 241, .12); color: var(--violet-deep); }
.faq-item p { padding: 0 22px 20px; color: var(--muted); font-size: .98rem; line-height: 1.7; }

/* ==========================================================================
   14. CTA BAND
   ========================================================================== */
.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 88px);
  background: var(--grad-deep);
  text-align: center;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 90% at 14% 0%, rgba(255, 90, 95, .34), transparent 60%),
    radial-gradient(42% 90% at 86% 100%, rgba(108, 76, 241, .36), transparent 60%);
  pointer-events: none;
}
.cta-band .container { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 28px; max-width: 18ch; margin-inline: auto; }

/* ==========================================================================
   15. QUIZ SETUP
   ========================================================================== */
.quiz-stage { padding-block: clamp(40px, 7vw, 80px); }

.quiz-setup { max-width: 720px; margin-inline: auto; padding: clamp(26px, 4vw, 40px); }
.quiz-setup-head { text-align: center; margin-bottom: 28px; }
.quiz-setup-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-top: 8px; }

.setup-grid { display: flex; flex-direction: column; gap: 22px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label,
.field > span { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.input,
select.input,
input.input {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
  appearance: none;
}
.input:focus,
select.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--coral);
  box-shadow: var(--sh-ring);
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6878' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

/* Mode cards (selectable) */
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.mode-card:hover { border-color: rgba(255, 90, 95, .38); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.mode-card strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); }
.mode-card small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.mode-emoji { font-size: 1.5rem; margin-bottom: 4px; }
.mode-card.is-active {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: var(--sh-md), 0 0 0 4px rgba(255, 90, 95, .1);
}

/* Segmented control (papers) */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: var(--r-md);
  background: var(--bg-tint);
  border: 1px solid var(--line);
}
.seg-btn {
  flex: 1;
  min-width: 64px;
  padding: 9px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active { color: var(--coral-deep); background: #fff; box-shadow: var(--sh-sm); }

/* Checkbox row */
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--coral); cursor: pointer; }

/* Resume banner */
.resume-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, rgba(255, 90, 95, .10), rgba(108, 76, 241, .10));
  border: 1px solid var(--line); border-left: 4px solid var(--coral);
  border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px;
}
.resume-banner-text { font-weight: 600; color: var(--ink); }
.resume-banner-actions { display: flex; gap: 8px; }

/* ==========================================================================
   16. DASHBOARD
   ========================================================================== */
.dash-stage { padding-block: clamp(40px, 6vw, 72px); }
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.dash-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 6px; word-break: break-word; }
.dash-head > .btn { margin-top: 8px; }

/* Streak + Pro badge row under the name */
.dash-head-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }

/* Encouragement line */
.dash-cheer { margin: 0 0 28px; font-size: .98rem; font-weight: 600; }

/* Exam filter tabs */
.dash-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.dash-tab { padding: 7px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem; color: var(--muted); border: 1px solid var(--line); transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.dash-tab:hover { background: var(--bg-tint); color: var(--ink); }
.dash-tab.is-active { background-image: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--sh-coral); }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 52px; }
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.stat-num { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.stat-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.stat-card.accent {
  color: #fff;
  background-image: var(--grad);
  border-color: transparent;
  box-shadow: var(--sh-md), var(--sh-coral);
}
.stat-card.accent .stat-num { color: #fff; }
.stat-card.accent .stat-label { color: rgba(255, 255, 255, .88); }

.dash-h2 { font-size: 1.4rem; margin: 48px 0 20px; }
.dash-h2 .muted { font-weight: 600; }
.dash-stage .stat-cards + .dash-h2 { margin-top: 8px; }

.empty-state { padding: 48px 28px; text-align: center; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

.table-wrap { overflow-x: auto; padding: 6px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.dash-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.dash-table td { padding: 14px 16px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.dash-table tbody tr:nth-child(even) { background: var(--surface-2); }
.dash-table tbody tr:hover { background: rgba(255, 90, 95, .04); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table .row-weak td { background: rgba(240, 67, 106, .05); }

.score-badge { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 800; font-size: .82rem; }
.score-badge.pass { color: var(--mint-deep); background: rgba(21, 199, 168, .14); }
.score-badge.fail { color: var(--danger-deep); background: rgba(240, 67, 106, .12); }
.score-badge.mid { color: var(--sun-deep); background: rgba(255, 200, 61, .18); }

.exam-pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg-tint); color: var(--ink-2); }

/* Membership cards */
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.mem-card { padding: 18px 20px; border-left: 4px solid var(--line); }
.mem-card.is-ok { border-left-color: var(--mint); }
.mem-card.is-soon { border-left-color: var(--sun); }
.mem-card.is-expired { border-left-color: var(--danger); }
.mem-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mem-badge { font-size: .74rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--r-pill); background: var(--bg-tint); color: var(--muted); white-space: nowrap; }
.mem-card.is-ok .mem-badge { background: rgba(21, 199, 168, .14); color: var(--mint-deep); }
.mem-card.is-soon .mem-badge { background: rgba(255, 200, 61, .18); color: var(--sun-deep); }
.mem-card.is-expired .mem-badge { background: rgba(240, 67, 106, .12); color: var(--danger-deep); }
.mem-meta { font-size: .9rem; color: var(--ink-2); margin: 0 0 12px; }

/* Notes */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.note-card { padding: 16px; }
.note-card-meta { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.note-card-q { font-size: .85rem; margin: 0 0 8px; }
.note-card-text { font-size: .95rem; color: var(--ink); white-space: pre-line; margin: 0; }

/* Attempt review */
.review-summary { justify-content: flex-start; gap: 14px; margin: 8px 0 20px; }
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-badge { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.review-badge.ok { color: var(--mint-deep); }
.review-badge.bad { color: var(--danger-deep); }
.review-badge.skip { color: var(--muted-2); }
.q-your-tag { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--violet-deep); align-self: center; }

/* ==========================================================================
   17. AUTH
   ========================================================================== */
.auth-stage {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: clamp(32px, 6vw, 72px) 20px;
  background:
    radial-gradient(50% 60% at 20% 10%, rgba(255, 90, 95, .12), transparent 60%),
    radial-gradient(40% 50% at 90% 90%, rgba(108, 76, 241, .12), transparent 60%),
    var(--cream);
}
.auth-card { width: 100%; max-width: 440px; padding: clamp(28px, 4vw, 42px); text-align: center; }
.auth-brand { justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card > .muted { margin-top: 8px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.auth-form .field { gap: 6px; }
.auth-form .btn { margin-top: 6px; }
.auth-switch { margin-top: 22px; font-size: .92rem; }
.auth-switch a { font-weight: 700; }
.auth-note { font-size: .82rem; line-height: 1.5; margin: -.25rem 0 .5rem; }
.auth-hint { font-size: .8rem; line-height: 1.45; margin: -.3rem 0 .35rem; color: var(--muted); }

.alert-error {
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: var(--r-md);
  background: rgba(240, 67, 106, .08);
  border: 1px solid rgba(240, 67, 106, .26);
  color: var(--danger-deep);
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
}

/* ==========================================================================
   18. QUIZ RUNTIME (engine-built DOM)
   ========================================================================== */
.quiz-runtime { max-width: 820px; margin-inline: auto; }
.quiz-runtime.is-submitting { opacity: .6; pointer-events: none; }

/* Demo banner */
.demo-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; margin-bottom: 18px;
  border-radius: var(--r-md);
  background: rgba(255, 200, 61, .14);
  border: 1px solid rgba(255, 200, 61, .42);
}
.demo-banner-tag { font-size: .9rem; font-weight: 700; color: var(--sun-deep); }
.quiz-demo-pill {
  display: inline-block; margin-top: 14px;
  font-size: .85rem; font-weight: 700; color: var(--sun-deep);
  padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .4);
}

/* Top bar */
.quiz-bar {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 22px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
}
.quiz-progress { flex: 1; min-width: 120px; height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0; border-radius: var(--r-pill); background-image: var(--grad); transition: width .4s var(--ease); }
.quiz-count-ind { font-family: var(--font-display); font-size: .9rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.quiz-timer {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  padding: 5px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  font-variant-numeric: tabular-nums;
}
.quiz-timer.is-warning { color: var(--danger-deep); background: rgba(240, 67, 106, .12); animation: pulse-warn 1.4s ease-in-out infinite; }

/* In-quiz display-language toggle (中 / EN / 中英) */
.quiz-disp { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.quiz-disp-btn { padding: 6px 12px; font-family: var(--font-display); font-size: .82rem; font-weight: 700; color: var(--muted); background: transparent; border: 0; cursor: pointer; line-height: 1.4; transition: background-color .2s var(--ease), color .2s var(--ease); }
.quiz-disp-btn + .quiz-disp-btn { border-left: 1px solid var(--line); }
.quiz-disp-btn.is-active { background-image: var(--grad); color: #fff; }

/* bilingual content visibility */
.t-zh, .t-en { display: block; }
[data-disp="zh"] .t-en { display: none; }
[data-disp="en"] .t-zh { display: none; }
[data-disp="both"] .t-en { color: var(--muted); font-size: .95em; margin-top: 3px; }

/* Question card */
.q-card {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  margin-bottom: 22px;
}
.q-card.is-review { box-shadow: var(--sh-sm); }
.q-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.q-meta { font-size: .8rem; font-weight: 700; color: var(--muted-2); letter-spacing: .02em; }

.q-actions { display: inline-flex; align-items: center; gap: 8px; }
.q-act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 700; color: var(--muted);
  padding: 6px 11px; border-radius: var(--r-pill);
  background: transparent; border: 1px solid var(--line);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.q-act:hover { color: var(--coral-deep); border-color: rgba(255, 90, 95, .4); }
.q-act.is-active { color: var(--violet-deep); background: rgba(108, 76, 241, .10); border-color: rgba(108, 76, 241, .4); }
.q-act:disabled { opacity: .6; cursor: default; }

.q-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; font-weight: 700; color: var(--muted);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: transparent; border: 1px solid var(--line);
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.q-flag:hover { color: var(--sun-deep); border-color: rgba(255, 200, 61, .5); }
.q-flag.is-flagged { color: var(--sun-deep); background: rgba(255, 200, 61, .14); border-color: rgba(255, 200, 61, .5); }

.q-stem {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-line;
  margin-bottom: 22px;
}

.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.5;
  transition: transform .15s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.q-option:hover { border-color: rgba(255, 90, 95, .42); background: #FFFDFC; transform: translateY(-1px); }
.q-option-key {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  color: var(--ink-2);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  transition: inherit;
}
.q-option-text { padding-top: 3px; }

.q-option.is-selected { border-color: var(--coral); background: rgba(255, 90, 95, .07); box-shadow: var(--sh-ring); }
.q-option.is-selected .q-option-key { color: #fff; background-image: var(--grad); border-color: transparent; }
.q-option.is-correct { border-color: var(--mint); background: rgba(21, 199, 168, .10); }
.q-option.is-correct .q-option-key { color: #fff; background: var(--mint-deep); border-color: transparent; }
.q-option.is-wrong { border-color: var(--danger-soft); background: rgba(240, 67, 106, .08); }
.q-option.is-wrong .q-option-key { color: #fff; background: var(--danger); border-color: transparent; }
.q-option.is-disabled { pointer-events: none; cursor: default; }
.q-option.is-disabled:hover { transform: none; }

/* Personal note panel */
.q-note { margin-top: 16px; }
.q-note-area {
  width: 100%; min-height: 84px; padding: 12px 14px;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-md); resize: vertical;
}
.q-note-area:focus { outline: none; border-color: var(--coral); box-shadow: var(--sh-ring); background: #fff; }
.q-note-status { display: inline-block; margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--mint-deep); }

/* Feedback */
.q-feedback { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-tint); }
.q-feedback.is-correct { border-color: rgba(21, 199, 168, .35); background: rgba(21, 199, 168, .08); }
.q-feedback.is-wrong { border-color: rgba(240, 67, 106, .3); background: rgba(240, 67, 106, .06); }
.q-feedback-result { font-family: var(--font-display); font-weight: 800; font-size: 1rem; margin-bottom: 8px; }
.q-feedback.is-correct .q-feedback-result { color: var(--mint-deep); }
.q-feedback.is-wrong .q-feedback-result { color: var(--danger-deep); }
.q-feedback.is-locked { background: rgba(255, 200, 61, .10); border-color: rgba(255, 200, 61, .4); }
.q-feedback.is-locked .q-feedback-result { color: var(--sun-deep); }
.q-explanation { color: var(--ink-2); font-size: .96rem; line-height: 1.7; white-space: pre-line; }
.q-explanation-head { display: block; font-family: var(--font-display); font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.q-explanation-body { white-space: pre-line; }

/* Legacy explanation-lock (never reached, kept for safety) */
.q-expl-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; background: var(--bg-tint); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.q-expl-lock-txt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.q-expl-lock-btn { margin-left: auto; background-image: var(--grad); color: #fff; font-weight: 700; font-size: .82rem; padding: 6px 14px; border-radius: var(--r-pill); }

/* Prev/next nav */
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.q-nav .btn { min-width: 120px; }

/* Navigator grid */
.q-navigator {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  margin-bottom: 26px;
}
.q-nav-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}
.q-nav-cell:hover { transform: translateY(-2px); }
.q-nav-cell.answered { color: #fff; background: var(--violet); border-color: transparent; }
.q-nav-cell.flagged { color: #fff; background: var(--sun-deep); border-color: transparent; }
.q-nav-cell.correct { color: #fff; background: var(--mint-deep); border-color: transparent; }
.q-nav-cell.wrong { color: #fff; background: var(--danger); border-color: transparent; }
.q-nav-cell.current { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--coral); }

/* Case-study stem */
.q-case { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg-tint); }
.q-case-head { font-weight: 700; font-size: .9rem; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.q-case-frame { width: 100%; border: 0; display: block; background: #fff; min-height: 80px; }

/* --- Results --- */
.quiz-results {
  text-align: center;
  padding: clamp(26px, 4vw, 44px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
}
.result-ring {
  --pct: 0;
  --ring-color: var(--violet);
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin: 8px auto 24px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--line) 0);
  animation: ring-grow 1s var(--ease) both;
}
.result-ring::before { content: ''; position: absolute; inset: 16px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 1px 4px rgba(72, 40, 90, .06); }
.result-ring.pass { --ring-color: var(--mint); }
.result-ring.fail { --ring-color: var(--danger); }
.result-score { position: relative; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.result-ring.pass .result-score { color: var(--mint-deep); }
.result-ring.fail .result-score { color: var(--danger-deep); }

.result-headline { margin-bottom: 8px; }
.result-headline strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.result-headline.pass strong { color: var(--mint-deep); }
.result-headline.fail strong { color: var(--danger-deep); }
.result-headline small { color: var(--muted); font-size: .88rem; }

.result-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 22px 0; }
.result-stat {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 96px; padding: 16px 20px; border-radius: var(--r-md);
  background: var(--bg-tint); border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
}
.result-stat.correct { color: var(--mint-deep); background: rgba(21, 199, 168, .08); border-color: rgba(21, 199, 168, .25); }
.result-stat.wrong { color: var(--danger-deep); background: rgba(240, 67, 106, .06); border-color: rgba(240, 67, 106, .22); }
.result-stat.skipped { color: var(--muted); }
.result-stat span,
.result-stat small { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.result-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 20px; }
.result-filters button { padding: 8px 16px; font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease); }
.result-filters button:hover { color: var(--ink); border-color: rgba(255, 90, 95, .38); }
.result-filters button.is-active { color: #fff; background-image: var(--grad); border-color: transparent; box-shadow: var(--sh-coral); }

.result-review { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; text-align: left; }
.result-retake { margin-top: 24px; }

/* Loading */
.quiz-loading { display: grid; place-items: center; gap: 18px; padding: 80px 20px; color: var(--muted); font-weight: 600; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 90, 95, .18); border-top-color: var(--coral); animation: spin .8s linear infinite; }

/* Inline messages + toast */
.quiz-message {
  max-width: 560px; margin: 48px auto; padding: 32px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-md);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.quiz-message p { color: var(--muted); margin: 0; }
.quiz-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-pill);
  font-weight: 600; font-size: .9rem; box-shadow: 0 14px 32px rgba(34, 26, 46, .4);
  z-index: 120; max-width: 90vw; text-align: center; opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.quiz-toast.is-visible { opacity: 1; }
.quiz-toast.is-error { background: var(--danger-deep); }

/* Report modal */
.report-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(34, 26, 46, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: toastIn .2s ease;
}
.report-modal { width: 100%; max-width: 440px; padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-xl); }
.report-modal-title { font-size: 1.2rem; margin-bottom: 16px; }
.report-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.report-reason {
  padding: 10px 12px; font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: var(--muted);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.report-reason:hover { color: var(--ink); border-color: rgba(255, 90, 95, .4); }
.report-reason.is-active { color: var(--coral-deep); background: rgba(255, 90, 95, .08); border-color: var(--coral); }
.report-comment {
  width: 100%; min-height: 80px; padding: 12px 14px;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-md);
  resize: vertical; margin-bottom: 18px;
}
.report-comment:focus { outline: none; border-color: var(--coral); box-shadow: var(--sh-ring); background: #fff; }
.report-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Free-preview / paywall banner */
.preview-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 200, 61, .14); border: 1px solid rgba(255, 200, 61, .42);
  border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px;
}
.preview-banner-tag { font-weight: 700; color: var(--sun-deep); }

/* Checkout success */
.checkout-ok { padding: 32px 0; }
.checkout-ok-mark { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: rgba(21, 199, 168, .14); color: var(--mint-deep); font-size: 2.2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; } }

/* ==========================================================================
   20. PLAN COMPARE / FASTPASS PRICING (sp-plan-* + pc-*)
   ========================================================================== */

/* Monthly / yearly segmented toggle — radios drive the price swap. */
.sp-plan-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin: 0 auto 30px;
  border-radius: var(--r-pill);
  background: var(--bg-tint);
  border: 1px solid var(--line);
}
.sp-plan-toggle { display: flex; width: fit-content; }
.sp-plan-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sp-plan-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.sp-plan-toggle label:hover { color: var(--ink); }
.sp-plan-toggle label .sp-tag { font-size: .64rem; padding: 2px 7px; }
#sp-bill-mo:checked ~ label[for="sp-bill-mo"],
#sp-bill-yr:checked ~ label[for="sp-bill-yr"] {
  color: var(--coral-deep);
  background: #fff;
  box-shadow: var(--sh-sm);
}

/* Price visibility swap (monthly vs yearly). Default markup ships yearly checked. */
.sp-price-mo { display: none; }
.sp-price-yr { display: block; }
form.sp-price-yr { display: block; }
#sp-bill-mo:checked ~ .sp-plan-grid .sp-price-yr,
#sp-bill-mo:checked ~ .sp-plan-grid form.sp-price-yr { display: none; }
#sp-bill-mo:checked ~ .sp-plan-grid .sp-price-mo,
#sp-bill-mo:checked ~ .sp-plan-grid form.sp-price-mo { display: block; }

/* Pricing cards grid */
.sp-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  align-items: stretch;
  max-width: 880px;
  margin-inline: auto;
}

.sp-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 30px 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  text-align: left;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.sp-plan-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.sp-plan-card > .sp-badge { align-self: flex-start; margin-bottom: 6px; }
.sp-plan-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.sp-plan-card .btn,
.sp-plan-card form > .btn { margin-top: auto; }
.sp-plan-card form { margin-top: auto; }

/* Highlighted Pro card */
.sp-plan-pro {
  border: 2px solid transparent;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(108, 76, 241, .08), transparent 55%),
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  box-shadow: var(--sh-xl);
}
@media (min-width: 721px) {
  .sp-plan-grid > .sp-plan-pro { transform: scale(1.03); }
  .sp-plan-grid > .sp-plan-pro:hover { transform: scale(1.03) translateY(-4px); }
}

.sp-plan-price {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.1;
  margin: 10px 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.sp-plan-pro .sp-plan-price { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sp-plan-per,
.pc-plan-per { font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; -webkit-text-fill-color: var(--muted); }
.sp-plan-price .sp-badge { font-size: .68rem; align-self: center; -webkit-text-fill-color: #fff; }

.sp-plan-feats { display: flex; flex-direction: column; gap: 11px; margin: 18px 0 22px; padding: 0; }
.sp-plan-feats li { position: relative; padding-left: 28px; font-size: .94rem; color: var(--ink-2); line-height: 1.45; }
.sp-plan-feats li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(21, 199, 168, .14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230FA98F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* --- Plan compare table --- */
.plan-compare { max-width: 720px; margin: 0 auto; }
.pc-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.pc-table th, .pc-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.pc-table thead th { background: var(--bg-tint); font-weight: 700; color: var(--ink); text-align: center; }
.pc-table thead th:first-child { text-align: left; }
.pc-table td:not(:first-child), .pc-table th:not(:first-child) { text-align: center; width: 28%; }
.pc-table td { color: var(--ink-2); }
.pc-paid-col { background: rgba(108, 76, 241, .05); }
.pc-table thead th.pc-paid-col { background: rgba(108, 76, 241, .12); color: var(--violet-deep); }
.pc-table thead th.pc-paid-col .sp-badge { vertical-align: middle; }
.pc-tick { color: var(--muted-2); font-weight: 700; }
.pc-tick.paid { color: var(--mint-deep); }
.pc-cross { color: var(--danger-soft); }
.pc-text { font-size: .85rem; }
.pc-table tbody tr:last-child td { border-bottom: 0; }
.pc-buy { text-align: center; margin-top: 22px; }
.pc-price { font-size: 1.5rem; margin-bottom: 12px; }
.pc-price strong { color: var(--ink); }
.pc-note { font-size: .82rem; margin-top: 10px; text-align: center; }
.pc-pay { font-size: .82rem; color: var(--ink-2); text-align: center; margin: .85rem auto .25rem; line-height: 1.55; max-width: 560px; }
.pay-methods { max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.55; }

/* --- Plan tiers (PlanCompare cards reuse sp-plan-card) --- */
.pc-tiers { margin-top: 1.5rem; }
.pc-tiers-head { font-family: var(--font-display); font-weight: 700; text-align: center; margin: .25rem 0 1.4rem; font-size: 1.05rem; }
.pc-tier { align-items: stretch; text-align: left; }
.pc-tier.is-best { border-color: var(--violet); }
.pc-tier-badge { position: absolute; top: -.75rem; left: 1.4rem; }
.pc-tier-free { border-style: dashed; }
.pc-tier-days { align-self: flex-start; margin-bottom: 6px; }
.pc-tier-price { margin: 4px 0; }
.pc-tier-sub { font-size: .8rem; display: block; margin-bottom: 6px; -webkit-text-fill-color: var(--muted); }
.pc-tier-until { font-size: .78rem; }
.pc-tier .btn { margin-top: auto; width: 100%; }
.pc-free-badge { background-image: none !important; background: var(--mint) !important; }

/* ==========================================================================
   21. ADMIN CONSOLE
   ========================================================================== */
.admin-breakdown { margin: -6px 0 4px; font-size: .9rem; }
.admin-card { padding: 22px; margin-bottom: 8px; }
.admin-card > p { margin-top: 0; }
.admin-help { margin: 12px 0 16px; font-size: .9rem; }
.admin-help summary { cursor: pointer; font-weight: 600; color: var(--violet-deep); }
.admin-help ul { margin: 12px 0; padding-left: 20px; }
.admin-help li { margin: 5px 0; color: var(--ink-2); }
.admin-help code { background: var(--bg-tint); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .85em; }
.admin-sample { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow-x: auto; font-size: .8rem; line-height: 1.5; white-space: pre; }
.admin-textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: var(--mono); font-size: .85rem; line-height: 1.5; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
}
.admin-textarea:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: transparent; }
.admin-actions { display: flex; gap: 12px; margin-top: 14px; }
.admin-result { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); font-size: .92rem; line-height: 1.5; }
.admin-result.ok { background: rgba(21, 199, 168, .08); border-color: rgba(21, 199, 168, .35); }
.admin-result.warn { background: rgba(255, 200, 61, .12); border-color: rgba(255, 200, 61, .42); }
.admin-result.err { background: rgba(240, 67, 106, .07); border-color: rgba(240, 67, 106, .35); }
.admin-result ul { margin: 8px 0 0; padding-left: 20px; }
.admin-result details summary { cursor: pointer; font-weight: 600; }
.admin-count { display: inline-block; min-width: 22px; text-align: center; background: var(--violet); color: #fff; border-radius: var(--r-pill); font-size: .8rem; padding: 1px 8px; vertical-align: middle; }
.admin-reports td { vertical-align: top; }
.admin-qtext { font-weight: 400; }
.admin-report-actions { white-space: nowrap; }
.admin-qlink { color: inherit; text-decoration: none; display: inline-block; }
.admin-qlink:hover strong { color: var(--coral); text-decoration: underline; }

/* Admin nav */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-nav-link { padding: 7px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem; color: var(--muted); border: 1px solid transparent; transition: background-color .2s var(--ease), color .2s var(--ease); }
.admin-nav-link:hover { background: var(--bg-tint); color: var(--ink); }
.admin-nav-link.is-active { background-image: var(--grad); color: #fff; }

/* Admin filters / tables / editor */
.admin-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px; margin-bottom: 14px; }
.admin-input { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: .92rem; font-family: inherit; }
.admin-input:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: transparent; }
.admin-input-grow { flex: 1 1 240px; }
.admin-resultcount { margin: 6px 2px 10px; font-size: .88rem; }
.admin-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0; }
.admin-qprev { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-qtable td { vertical-align: middle; }
.admin-editor { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.editor-row { display: flex; flex-wrap: wrap; gap: 14px; }
.editor-row.two > .editor-field { flex: 1 1 320px; }
.editor-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.editor-field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.editor-field .admin-input { width: 100%; box-sizing: border-box; }
.editor-check { flex-direction: row; align-items: center; gap: 8px; align-self: flex-end; padding-bottom: 9px; }
.editor-check span { color: var(--ink); font-weight: 600; }
.admin-mono { font-family: var(--mono); font-size: .85rem; }
.admin-danger { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.live-bar { display: block; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; max-width: 170px; margin-bottom: 3px; }
.live-bar span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.guide-card { margin-bottom: 14px; }
.guide-card h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.guide-card p { margin: 0 0 .55rem; line-height: 1.65; font-size: .92rem; }
.xml-progress { height: 10px; background: var(--bg-tint); border-radius: var(--r-pill); overflow: hidden; margin: 14px 0; }
#xml-progress-fill { height: 100%; width: 2%; background: var(--grad); transition: width .2s ease; }

/* Admin: members & memberships */
.mb-badge { display: inline-block; padding: .15rem .55rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.mb-free { background: var(--bg-tint); color: var(--muted); }
.mb-paid { background: rgba(21, 199, 168, .14); color: var(--mint-deep); }
.mb-all { background: rgba(108, 76, 241, .14); color: var(--violet-deep); }
.mb-exp { background: rgba(240, 67, 106, .12); color: var(--danger-deep); }
.mb-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.mb-inline { display: inline-flex; align-items: center; gap: .25rem; margin: 0; }
.mb-days { width: 4.5rem; padding: .25rem .4rem; font-size: .82rem; }
.mb-danger { color: var(--danger-deep); }
.mb-danger:hover { background: rgba(240, 67, 106, .1); }

/* Admin: Stripe setup guide */
.sg-status { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.25rem; border-radius: var(--r-md); background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .42); margin: 1rem 0; }
.sg-status.is-ready { background: rgba(21, 199, 168, .1); border-color: rgba(21, 199, 168, .4); }
.sg-status strong { font-size: 1.05rem; }
.sg-checklist { list-style: none; margin: 0 0 1.5rem; padding: .5rem .75rem; }
.sg-check { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.sg-check:last-child { border-bottom: none; }
.sg-tick { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bg-tint); color: var(--muted); font-weight: 700; font-size: .8rem; }
.sg-check.is-ok .sg-tick { background: var(--mint-deep); color: #fff; }
.sg-state { margin-left: auto; font-size: .78rem; color: var(--muted); }
.sg-check.is-ok .sg-state { color: var(--mint-deep); }
.sg-copy { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .5rem 0; }
.sg-copy code { background: #2B1846; color: #E8DDF2; padding: .5rem .75rem; border-radius: 8px; font-size: .9rem; word-break: break-all; }
.sg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.sg-step { padding: 1.1rem 1.25rem; }
.sg-step h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.sg-step p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.sg-step code { background: var(--bg-tint); padding: .05rem .35rem; border-radius: 5px; font-size: .86em; }

/* ==========================================================================
   21b. PER-PAPER LANDING PAGE
   ========================================================================== */
.paper-hero {
  background:
    radial-gradient(1200px 400px at 12% -10%, color-mix(in srgb, var(--accent, var(--coral)) 16%, transparent), transparent 70%),
    var(--bg-tint);
  padding: 40px 0 52px;
  border-bottom: 1px solid var(--line);
}
.paper-eyebrow { display: inline-block; font-family: var(--font-display); font-weight: 700; color: var(--accent, var(--coral)); font-size: .92rem; margin-bottom: 8px; }
.paper-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; }
.paper-fact-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.paper-fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 16px; text-align: center; border-top: 3px solid var(--accent, var(--coral)); }
.paper-fact-v { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.paper-fact-k { display: block; font-size: .82rem; color: var(--muted); margin-top: 4px; }

.chapter-bars { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.chapter-bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: .95rem; }
.chapter-bar-track { height: 10px; border-radius: var(--r-pill); background: var(--bg-tint); overflow: hidden; }
.chapter-bar-track span { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent, var(--coral)), var(--accent2, var(--violet))); }

.paper-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.25rem; align-items: start; }
.paper-hero-main { min-width: 0; }
.paper-hero-trial { position: sticky; top: 1rem; }
.paper-hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; max-width: 720px; }
.paper-trust { margin-top: 16px; font-size: .9rem; }
.paper-stars { color: var(--sun); letter-spacing: 1px; }

.paper-links { display: flex; flex-wrap: wrap; gap: 12px; }
.paper-link { display: flex; align-items: center; gap: 10px; flex: 1 1 230px; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; transition: border-color .15s ease, transform .15s ease; }
.paper-link:hover { border-color: var(--accent, var(--coral)); transform: translateY(-2px); }
.paper-link.is-current { border-color: var(--accent, var(--coral)); background: var(--bg-tint); }
.paper-link-code { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent, var(--coral)), var(--accent2, var(--violet))); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .85rem; padding: 0 7px; flex: 0 0 auto; }
.paper-link-name { font-weight: 600; color: var(--ink); font-size: .92rem; line-height: 1.3; }
.paper-link-live { margin-left: auto; color: var(--mint-deep); font-size: .6rem; }

/* Trial card (paper hero interactive) */
.trial-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.25rem; box-shadow: var(--sh-lg); color: var(--ink); }
.trial-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.trial-tag { background: var(--accent, var(--coral)); color: #fff; font-weight: 700; font-size: .74rem; padding: .22rem .65rem; border-radius: var(--r-pill); white-space: nowrap; }
.trial-qid { font-size: .76rem; color: var(--muted); }
.trial-q { font-weight: 600; margin: .1rem 0 .9rem; line-height: 1.55; font-size: 1.02rem; }
.trial-opts { display: flex; flex-direction: column; gap: .5rem; }
.trial-opt { display: flex; align-items: center; gap: .65rem; text-align: left; width: 100%; padding: .62rem .75rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.trial-opt:hover:not(:disabled) { border-color: var(--accent, var(--coral)); background: var(--surface-2); }
.trial-opt:disabled { cursor: default; }
.trial-opt-key { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: var(--bg-tint); font-family: var(--font-display); font-weight: 700; font-size: .82rem; flex: none; }
.trial-opt.is-correct { border-color: var(--mint-deep); background: rgba(21, 199, 168, .1); }
.trial-opt.is-correct .trial-opt-key { background: var(--mint-deep); color: #fff; }
.trial-opt.is-wrong { border-color: var(--danger); background: rgba(240, 67, 106, .08); }
.trial-opt.is-wrong .trial-opt-key { background: var(--danger); color: #fff; }
.trial-feedback { margin: .85rem 0 0; padding: .8rem .9rem; border-radius: 12px; background: var(--bg-tint); }
.trial-feedback.ok { background: rgba(21, 199, 168, .1); }
.trial-feedback.bad { background: rgba(255, 200, 61, .12); }
.trial-verdict { display: block; margin-bottom: .25rem; font-weight: 700; }
.trial-answer { margin: .15rem 0 0; font-size: .9rem; }
.trial-expl { margin: .4rem 0 0; font-size: .88rem; color: var(--ink-2); line-height: 1.55; }
.trial-card .btn { margin-top: .9rem; }

/* Calendar chip (paper pricing tiers) */
.cal-until { font-size: .74rem; color: var(--muted); margin-top: .3rem; }
.cal-chip { display: inline-flex; flex-direction: column; align-items: center; width: 66px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); margin: .2rem auto .15rem; box-shadow: var(--sh-sm); }
.cal-chip-m { width: 100%; background: var(--coral); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .06em; padding: 2px 0; text-align: center; }
.cal-chip-d { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: var(--ink); padding-top: 2px; }
.cal-chip-y { font-size: .66rem; color: var(--muted); padding-bottom: 3px; }

/* Sample question card */
.sample-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent, var(--coral)); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm); }
.sample-meta { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.sample-q { font-size: 1.1rem; font-weight: 600; color: var(--ink); line-height: 1.6; margin: 0 0 16px; white-space: pre-line; }
.sample-opts { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.sample-opt { display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 11px 14px; color: var(--ink-2); line-height: 1.5; }
.sample-opt.is-correct { border-color: var(--mint); background: rgba(21, 199, 168, .08); color: var(--mint-deep); font-weight: 600; }
.sample-opt-key { flex: 0 0 auto; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-tint); font-family: var(--font-display); font-weight: 700; font-size: .8rem; }
.sample-opt.is-correct .sample-opt-key { background: var(--mint); color: #fff; }
.sample-reveal { margin: 4px 0 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.sample-reveal summary { cursor: pointer; font-weight: 600; color: var(--accent, var(--coral)); }
.sample-answer { margin: 10px 0 6px; }
.sample-expl { color: var(--ink-2); line-height: 1.7; margin: 0; white-space: pre-line; }

/* Why cards */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; border-top: 3px solid var(--accent, var(--coral)); box-shadow: var(--sh-sm); }
.why-ico { font-size: 1.8rem; margin-bottom: 10px; }
.why-card h3 { font-size: 1.08rem; margin: 0 0 8px; color: var(--ink); }
.why-card p { color: var(--muted); font-size: .96rem; line-height: 1.65; margin: 0; }

/* Comparison table */
.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.compare-table th, .compare-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.compare-table thead th { background: var(--bg-tint); font-weight: 700; color: var(--ink); }
.compare-table td { color: var(--ink-2); }
.compare-table .c-us { text-align: center; font-weight: 700; color: var(--mint-deep); background: rgba(21, 199, 168, .06); }
.compare-table th.c-us { color: var(--violet-deep); background: rgba(108, 76, 241, .08); }
.compare-table .c-them { text-align: center; color: var(--muted); }
.compare-table tbody tr:last-child td { border-bottom: 0; }

/* ==========================================================================
   21c. BLOG + ARTICLE
   ========================================================================== */
.blog-hero { padding-bottom: 8px; }
.blog-group { padding-top: 24px; padding-bottom: 24px; }
.blog-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.blog-group-head h2 { font-size: 1.4rem; margin: 0; }
.blog-group-glyph { margin-right: 6px; }
.blog-group-link { font-weight: 600; color: var(--accent, var(--coral)); white-space: nowrap; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.blog-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; border-top: 3px solid var(--accent, var(--coral)); box-shadow: var(--sh-xs); }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--accent, var(--coral)); }
.blog-card-top { display: flex; align-items: center; justify-content: space-between; }
.blog-cat { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, var(--coral)); }
.blog-card h3 { font-size: 1.12rem; line-height: 1.3; margin: 0; color: var(--ink); }
.blog-card p { font-size: .92rem; color: var(--muted); margin: 0; flex-grow: 1; line-height: 1.55; }
.blog-card-meta { font-size: .8rem; color: var(--muted-2); }

.article-hero { background: radial-gradient(1100px 360px at 50% -20%, color-mix(in srgb, var(--accent, var(--coral)) 14%, transparent), transparent 70%), var(--bg-tint); padding: 36px 0 32px; border-bottom: 1px solid var(--line); text-align: left; }
.article-cat { display: inline-block; font-weight: 700; color: var(--accent, var(--coral)); font-size: .9rem; margin-bottom: 10px; }
.article-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2; margin: 0 0 14px; }
.article-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.article-body { padding: 36px 0 56px; }
.article-body h2 { font-size: 1.4rem; margin: 36px 0 12px; }
.article-body p { line-height: 1.75; color: var(--ink-2); margin: 0 0 16px; }
.article-lead { font-size: 1.12rem; color: var(--ink) !important; }
.article-facts { margin: 0 0 18px; padding-left: 4px; list-style: none; }
.article-facts li { padding: 8px 0; border-bottom: 1px dashed var(--line); line-height: 1.6; color: var(--ink-2); }
.article-facts strong { color: var(--ink); }
.article-topics { margin: 12px 0 8px; }
.article-plan { margin: 0 0 20px; padding-left: 22px; }
.article-plan li { margin: 0 0 16px; line-height: 1.6; }
.article-plan strong { display: block; margin-bottom: 4px; color: var(--ink); }
.article-plan p { margin: 0; }
.article-cta { margin: 32px 0; padding: 26px; border-radius: var(--r-lg); background: var(--bg-tint); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--coral)); }
.article-cta h3 { margin: 0 0 8px; font-size: 1.2rem; }
.article-cta p { margin: 0 0 16px; }
.article-related { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 24px; }
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.related-item { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-weight: 600; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.related-item:hover { border-color: var(--accent, var(--coral)); transform: translateX(2px); }
.related-arrow { color: var(--accent, var(--coral)); }
.article-disclaimer { margin-top: 32px; font-size: .82rem; }

/* Legal / Terms */
.legal-doc { max-width: 50rem; }
.legal-clause { margin: 1.6rem 0; }
.legal-clause h2 { font-size: 1.05rem; margin: 0 0 .5rem; color: var(--ink); }
.legal-clause p { margin: 0 0 .7rem; color: var(--ink-2); line-height: 1.7; font-size: .95rem; }
.legal-note { margin-top: 2rem; font-size: .82rem; font-style: italic; }

/* ==========================================================================
   21d. CSS MOCK SCREENSHOTS · DEVICE FRAMES · TOUR
   ========================================================================== */
.device-frame { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--sh-lg); }
.device-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--bg-tint); border-bottom: 1px solid var(--line); }
.device-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.device-dot:nth-child(1) { background: #FF5A5F; } .device-dot:nth-child(2) { background: #FFC83D; } .device-dot:nth-child(3) { background: #15C7A8; }
.device-url { margin-left: 10px; font-size: .76rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 12px; }
.device-screen { padding: 18px; background: var(--surface); }
.hero-visual .device-frame { max-width: 480px; margin-left: auto; }
.device-frame.shot .device-screen { padding: 0; }
.shot-img { display: block; width: 100%; height: auto; }

.mock-qcard { display: flex; flex-direction: column; gap: 12px; }
.mock-qhead { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; }
.mock-tag { font-weight: 700; color: var(--violet-deep); background: var(--bg-tint); border-radius: var(--r-pill); padding: 3px 10px; }
.mock-hot { color: var(--sun-deep); font-weight: 600; }
.mock-acts { color: var(--muted-2); letter-spacing: 2px; }
.mock-q { font-weight: 600; color: var(--ink); line-height: 1.5; margin: 0; }
.mock-q.sm { font-size: .9rem; font-weight: 500; color: var(--muted); }
.mock-opts { display: flex; flex-direction: column; gap: 8px; }
.mock-opt { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; font-size: .92rem; color: var(--ink-2); background: var(--surface); }
.mock-opt.is-correct { border-color: var(--mint); background: rgba(21, 199, 168, .10); color: var(--mint-deep); font-weight: 600; }
.mock-opt.is-wrong { border-color: var(--danger-soft); background: rgba(240, 67, 106, .07); color: var(--danger-deep); }
.mock-expl { font-size: .86rem; color: var(--ink-2); background: var(--bg-tint); border-left: 3px solid var(--mint); border-radius: 8px; padding: 10px 12px; line-height: 1.5; }
.mock-expl strong { color: var(--ink); }
.mock-exam { display: flex; flex-direction: column; gap: 14px; }
.mock-bar { display: flex; align-items: center; gap: 12px; }
.mock-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-tint); overflow: hidden; }
.mock-progress span { display: block; height: 100%; background: var(--grad); }
.mock-timer { font-weight: 700; color: var(--danger-deep); font-variant-numeric: tabular-nums; }
.mock-submit { background-image: var(--grad); color: #fff; font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); }
.mock-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.mock-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .78rem; font-weight: 700; background: var(--bg-tint); color: var(--muted); border: 1px solid var(--line); }
.mock-cell.s-a { background: rgba(108, 76, 241, .12); color: var(--violet-deep); border-color: transparent; }
.mock-cell.s-c { background: rgba(21, 199, 168, .16); color: var(--mint-deep); border-color: transparent; }
.mock-cell.s-w { background: rgba(240, 67, 106, .12); color: var(--danger-deep); border-color: transparent; }
.mock-cell.s-f { background: rgba(255, 200, 61, .18); color: var(--sun-deep); border-color: transparent; }
.mock-cell.s-x { background: var(--bg-tint); }
.mock-dash { display: flex; flex-direction: column; gap: 14px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-stat { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; text-align: center; }
.mock-stat b { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.mock-stat span { font-size: .74rem; color: var(--muted); }
.mock-weak { display: flex; flex-direction: column; gap: 9px; }
.mock-weak-row { display: grid; grid-template-columns: 1fr 90px 36px; align-items: center; gap: 10px; font-size: .82rem; color: var(--ink-2); }
.mock-weak-row .bar { height: 8px; border-radius: 999px; background: var(--bg-tint); overflow: hidden; }
.mock-weak-row .bar b { display: block; height: 100%; background: var(--danger-soft); }
.mock-weak-row.ok .bar b { background: var(--mint); }
.mock-weak-row em { font-style: normal; font-weight: 700; color: var(--danger-deep); text-align: right; }
.mock-weak-row.ok em { color: var(--mint-deep); }
.mock-lang { display: flex; flex-direction: column; gap: 14px; }
.mock-lang-toggle { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; font-size: .82rem; font-weight: 600; }
.mock-lang-toggle span { padding: 6px 16px; color: var(--muted); }
.mock-lang-toggle span.on { background-image: var(--grad); color: #fff; }
.mock-lang-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mock-lang-cols h5 { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mock-lang-cols p { margin: 0; font-size: .9rem; color: var(--ink); line-height: 1.5; }

/* Tour — pure-CSS tabbed gallery */
.tour { position: relative; }
.tour > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tour-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 26px; }
.tour-tabs label { cursor: pointer; padding: 9px 18px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); transition: all .15s ease; }
.tour-tabs label:hover { color: var(--ink); border-color: var(--coral); }
.tour-panel { display: none; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
#tour-study:checked ~ .tour-stage .tour-study,
#tour-exam:checked ~ .tour-stage .tour-exam,
#tour-dash:checked ~ .tour-stage .tour-dash,
#tour-lang:checked ~ .tour-stage .tour-lang { display: grid; }
#tour-study:checked ~ .tour-tabs label[for="tour-study"],
#tour-exam:checked ~ .tour-tabs label[for="tour-exam"],
#tour-dash:checked ~ .tour-tabs label[for="tour-dash"],
#tour-lang:checked ~ .tour-tabs label[for="tour-lang"] { background-image: var(--grad); color: #fff; border-color: transparent; }
.tour-copy h3 { font-size: 1.5rem; margin: 0 0 12px; }
.tour-copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

/* Zig-zag screenshot rows */
.shot-rows { display: flex; flex-direction: column; gap: 48px; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.shot-row:nth-child(even) .shot-row-media { order: -1; }
.shot-row-copy h3 { font-size: 1.45rem; margin: 0 0 12px; }
.shot-row-copy p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px; }
.paper-shot { max-width: 560px; margin: 8px auto 0; }

/* Multi-device mockup */
.device-cluster { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin: 8px auto 0; max-width: 760px; padding: 10px 0; }
.device-cluster .dev img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dev-laptop { position: relative; z-index: 2; width: min(520px, 60vw); flex: 0 0 auto; }
.dev-laptop .dev-screen { border: 12px solid #2B1846; border-bottom: 0; border-radius: 16px 16px 0 0; aspect-ratio: 16 / 10; overflow: hidden; background: #17131F; box-shadow: var(--sh-lg); }
.dev-laptop .dev-base { width: 122%; margin-left: -11%; height: 16px; background: linear-gradient(#EFE7DE, #CBBFDC); border-radius: 0 0 14px 14px; box-shadow: var(--sh-md); position: relative; }
.dev-laptop .dev-base::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 96px; height: 7px; background: #B7ABC9; border-radius: 0 0 8px 8px; }
.dev-tablet { position: relative; z-index: 1; width: 178px; flex: 0 0 auto; margin: 0 -52px 26px 0; border: 11px solid #2B1846; border-radius: 22px; aspect-ratio: 3 / 4; overflow: hidden; background: #17131F; box-shadow: var(--sh-md); }
.dev-phone { position: relative; z-index: 3; width: 124px; flex: 0 0 auto; margin: 0 0 10px -54px; border: 8px solid #17131F; border-radius: 26px; aspect-ratio: 9 / 19; overflow: hidden; background: #17131F; box-shadow: var(--sh-lg); }
.dev-phone::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 46px; height: 5px; background: #17131F; border-radius: 999px; z-index: 4; }

/* ==========================================================================
   22. MOTION / REVEAL / KEYFRAMES
   ========================================================================== */
/* Hidden state applies only when JS is confirmed (html.js set in <head>). */
.js .reveal { opacity: 0; transform: translateY(16px); }
.reveal.in-view { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.feature-grid .feature-card.reveal.in-view { transition-delay: calc(var(--i, 0) * 60ms); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blob-float {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, 4%, 0) scale(.96); }
}
@keyframes pulse-warn { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes flame-flicker {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  25%      { transform: rotate(2deg) scale(1.12); }
  50%      { transform: rotate(-2deg) scale(1.04); }
  75%      { transform: rotate(3deg) scale(1.1); }
}
@keyframes ring-grow { from { transform: scale(.9); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes quota-in { from { width: 0 !important; } }

/* Brand watermark — subtle, tiled, theme-aware (FastPass / 考試快格迅) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='220'%3E%3Ctext x='8' y='120' font-family='Outfit,Arial,sans-serif' font-size='24' font-weight='800' fill='%23221A2E' fill-opacity='0.035' transform='rotate(-22 170 110)'%3EFastPass · 考試快格迅%3C/text%3E%3C/svg%3E");
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-lg { grid-column: span 2; }
  .sp-streak-flow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* Mobile nav: the whole menu drops down from the bar. */
  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 16px 20px 24px;
    background: rgba(255, 249, 244, .98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; margin: 0; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; border-radius: var(--r-md); }
  .nav-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
    margin-top: 2px;
    border-top: 1px solid var(--line);
  }
  .nav-cta .btn { width: 100%; justify-content: center; }
  body.nav-open .nav-menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .nav-burger { display: flex; }
  .nav-actions { margin-left: auto; gap: 8px; }
  .sp-streak-nav { display: none; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 100%; margin-inline: auto; }
  .hero-lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { max-width: 460px; margin: 8px auto 0; order: -1; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-lg { grid-column: span 1; }
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .price-card.is-pop { transform: none; }
  .price-card.is-pop:hover { transform: translateY(-4px); }
  .testi-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .info-split { grid-template-columns: 1fr; }
  .mode-showcase { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .paper-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .paper-hero-trial { position: static; }
  .tour-panel { grid-template-columns: 1fr; gap: 20px; }
  .shot-row { grid-template-columns: 1fr; gap: 20px; }
  .shot-row:nth-child(even) .shot-row-media { order: 0; }
  .sp-run-snapshot { grid-template-columns: 1fr; text-align: center; }
  .sp-run-snapshot .sp-streak { flex-direction: row; align-self: center; }
  .sp-run-snapshot .sp-streak span { font-size: .82rem; }
  .sp-run-stats { justify-content: center; }
}

@media (max-width: 720px) {
  .paper-fact-row { grid-template-columns: repeat(2, 1fr); }
  .freepaid { grid-template-columns: 1fr; max-width: 440px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .nav { gap: 12px; }
  .brand-text { font-size: .98rem; }
  .brand-text em { font-size: .62rem; }
  .brand-logo { width: 36px; height: 36px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .q-nav .btn { min-width: 0; flex: 1; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .sp-streak-flow { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .report-reasons { grid-template-columns: 1fr; }
  .exam-grid { grid-template-columns: 1fr; }
  .sp-streak-banner { flex-direction: column; align-items: flex-start; }
  .sp-streak-banner .btn { margin-left: 0; }
  .sp-run-stats { flex-wrap: wrap; gap: 16px; }
  .paper-hero-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .device-cluster { transform: scale(.82); transform-origin: top center; margin-bottom: -28px; }
  .dev-tablet { display: none; }
  .dev-laptop { width: 72vw; }
  .dev-phone { margin-left: -44px; }
  .sp-plan-toggle { width: 100%; }
  .sp-plan-toggle label { flex: 1; justify-content: center; padding: 9px 12px; }
}

@media (max-width: 380px) {
  .container { padding-inline: 16px; }
  .stat-cards { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .sp-hero-card { transform: none !important; }
  .sp-streak-flame { transform: none !important; }
  .reg-track, .trusted-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .reg-marquee, .trusted-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ==========================================================================
   23. DARK THEME  ([data-theme="dark"])
   Token-driven palette swap cascades; below we patch surfaces that hard-code
   a light value (glass bars, form fields, segmented controls, conic rings…).
   ========================================================================== */
[data-theme="dark"] {
  color-scheme: dark;

  --cream: #17131F;          /* deep plum-charcoal page bg */
  --surface: #211A2D;        /* cards */
  --surface-2: #1C1628;      /* tinted surface */
  --ink: #F6F1FA;
  --ink-2: #C9C0D6;
  --muted: #9A91A8;
  --muted-2: #7E7590;
  --line: #2E2740;
  --line-2: #271F37;

  /* vivid accents, nudged a touch lighter for contrast */
  --coral: #FF6B70;
  --coral-deep: #FF8A8E;
  --violet: #8C73FF;
  --violet-deep: #A992FF;
  --sun: #FFD45E;
  --sun-deep: #FFC83D;
  --mint: #2ED4B8;
  --mint-deep: #43E3C2;
  --danger: #FF5C82;
  --danger-deep: #FF85A0;

  --bg-tint: #1E1830;
  --danger-soft: #FF7E9A;

  --grad-deep: linear-gradient(120deg, #1B1230 0%, #3A2056 48%, #5A2354 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 90, 95, .14), rgba(108, 76, 241, .14));

  --sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
  --sh-md: 0 10px 28px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  --sh-lg: 0 22px 52px rgba(0, 0, 0, .6), 0 8px 18px rgba(0, 0, 0, .4);
  --sh-xl: 0 36px 84px rgba(0, 0, 0, .68), 0 12px 30px rgba(0, 0, 0, .45);
  --sh-ring: 0 0 0 4px rgba(255, 107, 112, .26);
  --sh-coral: 0 10px 24px rgba(255, 90, 95, .34);
  --sh-violet: 0 10px 24px rgba(108, 76, 241, .34);
}

[data-theme="dark"] body { background: var(--cream); }
[data-theme="dark"] ::selection { background: rgba(255, 107, 112, .28); color: #fff; }

/* Glass / translucent bars */
[data-theme="dark"] .site-header { background: rgba(23, 19, 31, .72); }
[data-theme="dark"] .site-header.is-scrolled { background: rgba(23, 19, 31, .86); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
[data-theme="dark"] .nav-menu { background: rgba(28, 22, 40, .98); }
[data-theme="dark"] .quiz-bar { background: rgba(28, 22, 40, .82); }

/* Theme toggle icon swap */
[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* Form fields / surface-2 inputs */
[data-theme="dark"] .input,
[data-theme="dark"] select.input,
[data-theme="dark"] input.input,
[data-theme="dark"] .q-note-area,
[data-theme="dark"] .report-comment { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .input:focus,
[data-theme="dark"] select.input:focus,
[data-theme="dark"] .q-note-area:focus,
[data-theme="dark"] .report-comment:focus { background: #241C33; }
[data-theme="dark"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A91A8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Tinted neutrals + glass bits */
[data-theme="dark"] .seg-btn.is-active,
[data-theme="dark"] .price-card.is-pop,
[data-theme="dark"] .mode-card.is-active,
[data-theme="dark"] .sp-plan-pro,
[data-theme="dark"] .result-ring::before { background-color: var(--surface); }
[data-theme="dark"] .seg-btn.is-active { color: var(--coral-deep); }
[data-theme="dark"] .q-option:hover { background: #261E37; }
[data-theme="dark"] .q-option { background: var(--surface); }
[data-theme="dark"] .btn-ghost:hover { background: #261E37; }
[data-theme="dark"] .q-feedback { background: var(--surface-2); }
[data-theme="dark"] .result-stat,
[data-theme="dark"] .quiz-message { background: var(--surface-2); }
[data-theme="dark"] .result-ring { background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--line) 0); }
[data-theme="dark"] .sp-ring::before { background: var(--surface); }
[data-theme="dark"] .dash-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .025); }
[data-theme="dark"] .dash-table tbody tr:hover { background: rgba(255, 107, 112, .08); }
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .func-ico { background: linear-gradient(135deg, rgba(255, 107, 112, .2), rgba(140, 115, 255, .18)); border-color: rgba(140, 115, 255, .24); }
[data-theme="dark"] .q-case-frame { background: #1C1628; }
[data-theme="dark"] .device-screen,
[data-theme="dark"] .btn-ghost { background: var(--surface); }
[data-theme="dark"] .btn-light { color: var(--coral-deep); }

/* Trial card + sg code keep readable values */
[data-theme="dark"] .sg-copy code { background: #0F0B18; color: #E8DDF2; }

/* Dark watermark */
[data-theme="dark"] body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='220'%3E%3Ctext x='8' y='120' font-family='Outfit,Arial,sans-serif' font-size='24' font-weight='800' fill='%23FFFFFF' fill-opacity='0.045' transform='rotate(-22 170 110)'%3EFastPass · 考試快格迅%3C/text%3E%3C/svg%3E");
}

/* Smooth, contained theme cross-fade (skipped under reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  body, .site-header, .feature-card, .paper-card, .price-card, .testi-card,
  .q-card, .input, .seg, .stat-card, .sp-card, .sp-plan-card, .func-card,
  .exam-card, .mode-show {
    transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  }
}
