/* Practice-test website – styles. Mobile first. Light + dark. No framework.
   Colours are tokens on :root; dark mode re-defines them. */

:root {
  --navy: #0f1b33;
  --navy-2: #182a4d;
  --navy-3: #22396a;
  --gold: #f2c14e;
  --gold-2: #f7d47f;
  --gold-ink: #8a5d00;          /* gold-coloured text on light backgrounds (AA) */

  --bg: #f7f5f0;
  --bg-2: #efebe2;
  --surface: #ffffff;
  --surface-2: #f6f3ec;
  --ink: #142140;
  --ink-2: #33405c;
  --muted: #5b6478;
  --line: #e5e0d5;
  --line-2: #d6cfbf;

  --accent: #1f4fd1;             /* links, focus */
  --good: #0f7a55;
  --good-bg: #e6f6ee;
  --good-line: #9fd9bf;
  --bad: #b42318;
  --bad-bg: #fdeceb;
  --bad-line: #f3b4ae;
  --warn-bg: #fff5d9;
  --warn-line: #f0d48a;

  --chosen: #0f1b33;
  --chosen-bg: #eef2fb;

  --shadow-sm: 0 1px 2px rgba(15, 27, 51, .06), 0 1px 3px rgba(15, 27, 51, .05);
  --shadow: 0 2px 4px rgba(15, 27, 51, .04), 0 8px 24px rgba(15, 27, 51, .08);
  --shadow-lg: 0 10px 30px rgba(15, 27, 51, .14), 0 30px 60px rgba(15, 27, 51, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --tabbar-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1122; --bg-2: #0e1830; --surface: #111c34; --surface-2: #16233f;
    --ink: #eef2fa; --ink-2: #c9d2e3; --muted: #9eabc4; --line: #22325a; --line-2: #2d4070;
    --accent: #8fb3ff; --gold-ink: #f2c14e;
    --good: #4ade9b; --good-bg: rgba(52, 211, 153, .12); --good-line: rgba(52, 211, 153, .45);
    --bad: #ff8a80; --bad-bg: rgba(248, 113, 113, .12); --bad-line: rgba(248, 113, 113, .45);
    --warn-bg: rgba(242, 193, 78, .12); --warn-line: rgba(242, 193, 78, .45);
    --chosen: #f2c14e; --chosen-bg: rgba(242, 193, 78, .10);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1122; --bg-2: #0e1830; --surface: #111c34; --surface-2: #16233f;
  --ink: #eef2fa; --ink-2: #c9d2e3; --muted: #9eabc4; --line: #22325a; --line-2: #2d4070;
  --accent: #8fb3ff; --gold-ink: #f2c14e;
  --good: #4ade9b; --good-bg: rgba(52, 211, 153, .12); --good-line: rgba(52, 211, 153, .45);
  --bad: #ff8a80; --bad-bg: rgba(248, 113, 113, .12); --bad-line: rgba(248, 113, 113, .45);
  --warn-bg: rgba(242, 193, 78, .12); --warn-line: rgba(242, 193, 78, .45);
  --chosen: #f2c14e; --chosen-bg: rgba(242, 193, 78, .10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font: 800 clamp(1.9rem, 6.5vw, 2.6rem)/1.12 var(--serif); letter-spacing: -.01em; }
h2 { font: 800 clamp(1.45rem, 4.6vw, 1.9rem)/1.18 var(--serif); }
h3 { font-size: 1.12rem; font-weight: 800; }
p { margin: 0 0 1em; }
b, strong { font-weight: 800; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 18px; height: 18px; }
.ic-lg { width: 28px; height: 28px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
main:focus, h1:focus, h2:focus, legend:focus, [tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);   /* older browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand .logo { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 2px 4px rgba(15, 27, 51, .2)); }
.brand-text { font: 800 1.12rem/1.1 var(--serif); letter-spacing: -.01em; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; padding: 10px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .nav a[aria-current="page"] { background: var(--gold); color: var(--navy); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-actions .header-cta { display: none; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform .2s, background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.ic-sun { display: none; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-actions { margin-left: 8px; }
  .header-actions .header-cta { display: inline-flex; }
}

/* ---------- mobile tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  color: var(--muted); text-decoration: none; font-size: .74rem; font-weight: 800; border-radius: 12px; min-height: 52px;
}
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] .ic { color: var(--navy); background: var(--gold); border-radius: 999px; width: 52px; height: 28px; padding: 3px 0; stroke-width: 2.2; }
:root { --tabbar-h: 70px; }
@media (min-width: 900px) { .tabbar { display: none; } :root { --tabbar-h: 0px; } }
body.focus .tabbar { display: none; }
body.focus { --tabbar-h: 0px; }

/* ---------- layout ---------- */
.layout { display: block; padding-top: 20px; padding-bottom: 40px; }
.sidebar { display: none; }
@media (min-width: 1200px) {
  body:not(.wide):not(.focus) .layout:not(.no-side) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
  body:not(.wide):not(.focus) .sidebar { display: block; position: sticky; top: 88px; }
}
main { min-height: 50vh; }
body.wide .layout { max-width: none; padding: 0; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* page entry animation */
@media (prefers-reduced-motion: no-preference) {
  .page-in > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
  .page-in > *:nth-child(2) { animation-delay: .04s; }
  .page-in > *:nth-child(3) { animation-delay: .08s; }
  .page-in > *:nth-child(4) { animation-delay: .12s; }
  .page-in > *:nth-child(n+5) { animation-delay: .16s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- cards + buttons ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 0 0 18px; }
.pad { padding: 22px 20px; }
@media (min-width: 640px) { .pad { padding: 30px 32px; } }
.btn {
  -webkit-appearance: none; appearance: none; font: inherit; font-weight: 800; font-size: 1.02rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: center;
  min-height: 54px; padding: 12px 22px; border-radius: 14px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .95rem; border-radius: 12px; }
.btn-lg { min-height: 60px; padding: 14px 28px; font-size: 1.1rem; border-radius: 16px; }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 6px 18px rgba(242, 193, 78, .35), inset 0 -2px 0 rgba(0, 0, 0, .12); }
.btn-gold:hover { background: var(--gold-2); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(15, 27, 51, .22), inset 0 -2px 0 rgba(0, 0, 0, .25); }
.btn-navy:hover { background: var(--navy-2); }
:root[data-theme="dark"] .btn-navy { background: var(--gold); color: var(--navy); box-shadow: none; }
:root[data-theme="dark"] .btn-navy:hover { background: var(--gold-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-navy { background: var(--gold); color: var(--navy); box-shadow: none; }
  :root:not([data-theme="light"]) .nav a[aria-current="page"] { background: var(--gold); color: var(--navy); }
}
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--bg-2); }
.btn-link { background: none; border: 0; color: var(--ink-2); min-height: 44px; padding: 8px 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.btn-video { background: #c4302b; color: #fff; }
.btn-video:hover { background: #a82722; }
.btn-white { background: #fff; color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn .ic { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn-row > .btn { flex: 1 1 200px; }
.btn-row.tight > .btn { flex: 0 1 auto; }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; font-weight: 800; color: var(--ink-2); text-decoration: none; min-height: 44px; }
.back:hover { color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 800; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip .ic { width: 16px; height: 16px; }
.chip-good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.chip-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.chip-gold { background: var(--gold); color: var(--navy); border-color: transparent; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 12px 16px; border-radius: 12px; color: var(--ink); }

/* page heading */
.page-head { margin: 8px 0 22px; }
.page-head h1 { margin-bottom: .3em; }
.page-head p { color: var(--ink-2); font-size: 1.05rem; max-width: 62ch; }

/* ---------- ads ---------- */
.ad {
  display: flex; align-items: center; justify-content: center; border-radius: 14px;
  border: 1px dashed var(--line-2); background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--line) 35%, transparent) 10px 20px);
  color: var(--muted); margin: 8px 0 22px; min-height: 100px; overflow: hidden;
}
.ad-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.ad-side { min-height: 600px; margin: 0; }
.ad-inline { min-height: 120px; }
.ad-band { margin: 0 auto; max-width: 970px; }
/* a real ad (AdSense): small label on top, fixed-size unit below (sizes: <style> in templates/index.html) */
.ad.ad-live { display: block; min-height: 0; border: 0; background: none; padding: 0; overflow: hidden; text-align: center; margin: 18px 0 24px; }
/* no ad to show: keep the space (so nothing below moves), but do not show an empty white box */
.ad-live ins.adsbygoogle[data-ad-status="unfilled"], .ad-live:has(ins.adsbygoogle[data-ad-status="unfilled"]) { opacity: 0; pointer-events: none; }
.ad.ad-band.ad-live { margin: 0 auto; }
.ad.ad-live .ad-label { display: block; font-size: .62rem; margin-bottom: 4px; }
.ad-side.ad-live { min-height: 0; margin: 0; }

/* ================= HOME ================= */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(242, 193, 78, .22), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(64, 104, 200, .35), transparent 60%),
    linear-gradient(160deg, #0f1b33 0%, #13244a 55%, #0c1630 100%);
}
.hero::before { /* faint grid pattern */
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 30%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero-in { position: relative; display: grid; gap: 36px; padding: 36px 16px 56px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 8.6vw, 3.6rem); line-height: 1.06; margin-bottom: .45em; }
.hero h1 .gold { color: var(--gold); font-style: italic; }
.hero .lead { font-size: 1.15rem; color: #d6deef; max-width: 34ch; margin-bottom: 26px; }
.hero .pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.hero .pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: .8rem; font-weight: 800; color: #e9eefa; }
.hero .pill .ic { width: 16px; height: 16px; color: var(--gold); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .cta .btn { flex: 1 1 220px; }
.hero .cta-note { margin: 14px 0 0; font-size: .92rem; color: #aebbd6; display: flex; align-items: center; gap: 8px; }
.hero .cta-note .ic { width: 18px; height: 18px; color: var(--gold); }

.hero-art { position: relative; max-width: 520px; width: 100%; margin: 0 auto; padding: 0 6px 30px; }
.hero-photo {
  position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg);
  border: 6px solid rgba(255, 255, 255, .92); transform: rotate(1.5deg);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(15, 27, 51, .45)); }
.float-card {
  position: absolute; background: var(--surface); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.float-q { left: -4px; bottom: -6px; width: min(78%, 300px); padding: 14px 14px 12px; transform: rotate(-2deg); }
.float-q .fq-title { font-weight: 800; font-size: .92rem; line-height: 1.3; margin-bottom: 10px; }
.float-q .fq-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1.5px solid var(--line); font-size: .85rem; font-weight: 700; margin-top: 6px; }
.float-q .fq-opt .l { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); font-size: .75rem; font-weight: 900; flex: none; }
.float-q .fq-opt.ok { border-color: var(--good-line); background: var(--good-bg); color: var(--good); }
.float-q .fq-opt.ok .l { background: var(--good); color: #fff; }
.float-score { right: -2px; top: -14px; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; transform: rotate(3deg); }
.float-score .ring-mini { width: 46px; height: 46px; }
.float-score b { display: block; font-size: 1.05rem; line-height: 1.1; }
.float-score span { font-size: .78rem; color: var(--good); font-weight: 900; letter-spacing: .06em; }
@media (prefers-reduced-motion: no-preference) {
  .float-q { animation: bob 6s ease-in-out infinite; }
  .float-score { animation: bob 7s ease-in-out -2s infinite; }
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1.05fr .95fr; align-items: center; padding: 72px 16px 92px; gap: 56px; }
  .hero .lead { font-size: 1.25rem; }
  .hero .cta .btn { flex: 0 1 auto; }
  .hero-art { padding: 0 20px 20px; }
  .float-q { left: -36px; bottom: -28px; }
  .float-score { right: -18px; top: -22px; }
}

/* stats band */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -30px; position: relative; z-index: 2; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font: 800 clamp(1.6rem, 7vw, 2.2rem)/1 var(--serif); color: var(--ink); margin-bottom: 4px; }
.stat span { font-size: .9rem; color: var(--muted); font-weight: 700; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } .stat { padding: 22px 16px; } }

.section { padding: 56px 0 8px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }

/* progress card on home */
.progress-card { display: flex; gap: 18px; align-items: center; padding: 18px 20px; margin-top: 28px; }
.progress-card .ring { width: 76px; height: 76px; flex: none; }
.progress-card h2 { font-size: 1.25rem; margin-bottom: .2em; }
.progress-card p { margin: 0; color: var(--ink-2); }
.progress-card .btn { margin-left: auto; }
@media (max-width: 639px) { .progress-card { flex-wrap: wrap; } .progress-card .btn { flex: 1 1 100%; margin: 4px 0 0; } }

/* how it works */
.steps3 { display: grid; gap: 14px; counter-reset: step; }
.step { position: relative; padding: 22px 20px 20px; }
.step .step-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--gold); margin-bottom: 14px; }
.step .step-ic .ic { width: 26px; height: 26px; }
.step .step-n { position: absolute; top: 18px; right: 20px; font: 800 2.4rem/1 var(--serif); color: var(--line-2); }
.step h3 { margin-bottom: .3em; font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-2); }
@media (max-width: 759px) {
  .steps3 { gap: 10px; margin: 0; }
  .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; padding: 16px; margin: 0; }
  .step .step-ic { grid-row: span 2; margin: 0; }
  .step h3 { align-self: end; margin: 0; }
  .step .step-n { top: 14px; right: 16px; font-size: 1.8rem; }
}
@media (min-width: 760px) { .steps3 { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.site-footer .logo, :root[data-theme="dark"] .brand .logo { border-radius: 11px; box-shadow: 0 0 0 1.5px rgba(242, 193, 78, .55); filter: none; }

/* chapter cards */
.chapters { display: grid; gap: 16px; }
@media (min-width: 640px) { .chapters { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .chapters { grid-template-columns: repeat(3, 1fr); } .chapters .ch-card:nth-child(1), .chapters .ch-card:nth-child(2) { grid-column: span 1; } }
.ch-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--ink); margin: 0;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.ch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ch-card .ch-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.ch-card .ch-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ch-card:hover .ch-img img { transform: scale(1.04); }
.ch-card .ch-num { position: absolute; left: 12px; top: 12px; background: rgba(15, 27, 51, .82); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 900; letter-spacing: .06em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ch-card .ch-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ch-card h3 { font: 800 1.2rem/1.25 var(--serif); margin: 0; }
.ch-card .ch-meta { color: var(--muted); font-size: .9rem; font-weight: 700; }
.ch-card .ch-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink); padding-top: 6px; }
.ch-card .ch-go .ic { width: 18px; height: 18px; transition: transform .2s; }
.ch-card:hover .ch-go .ic { transform: translateX(4px); }
.ch-cta { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px; background: var(--navy); color: #fff; border-color: transparent; }
.ch-cta h3 { color: #fff; font: 800 1.4rem/1.2 var(--serif); margin: 0; }
.ch-cta p { color: #c8d2e8; margin: 0; }

/* video band */
.video-band { margin-top: 56px; background: linear-gradient(160deg, #0f1b33, #182a4d); color: #fff; border-radius: 0; padding: 52px 0; }
.video-band h2 { color: #fff; }
.video-band .section-head p { color: #c8d2e8; }
.video-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
.vcard { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b1428; color: #fff; text-decoration: none; display: block; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.vcard img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .6s, opacity .3s; }
.vcard:hover img { transform: scale(1.04); opacity: .85; }
.vcard .vplay { position: absolute; left: 50%; top: 44%; translate: -50% -50%; width: 56px; height: 56px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--navy); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.vcard .vplay .ic { width: 26px; height: 26px; margin-left: 3px; stroke: none; }
.vcard .vtitle { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; background: linear-gradient(180deg, transparent, rgba(5, 10, 25, .9)); font-weight: 800; display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.vcard .vtitle small { display: block; font-weight: 700; color: #c8d2e8; font-size: .8rem; }
.vcard .soon { position: absolute; top: 10px; right: 10px; background: var(--gold); color: var(--navy); font-size: .72rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; letter-spacing: .04em; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; transition: box-shadow .2s, border-color .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { margin-left: auto; transition: transform .25s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq .faq-a { padding: 0 18px 16px; color: var(--ink-2); }
.faq .faq-a p:last-child { margin: 0; }

.final-cta { margin: 56px 0 8px; text-align: center; padding: 40px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.final-cta::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(closest-side, rgba(242, 193, 78, .25), transparent); pointer-events: none; }
.final-cta > * { position: relative; }
.final-cta p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 20px; }

/* ================= MOCKS LIST ================= */
.summary-card { display: flex; align-items: center; gap: 18px; padding: 18px 20px; }
.summary-card .ring { width: 84px; height: 84px; flex: none; }
.summary-card p { margin: 0; color: var(--ink-2); }
.grid-mocks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid-mocks { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .grid-mocks { grid-template-columns: repeat(4, 1fr); } }
.mock-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; min-height: 112px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.mock-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.mock-tile .mt-top { display: flex; justify-content: space-between; align-items: center; }
.mock-tile .mt-n { font: 800 1.3rem/1 var(--serif); }
.mock-tile .mt-n small { display: block; font: 800 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.mock-tile .ring { width: 40px; height: 40px; }
.mock-tile .mt-status { margin-top: auto; font-size: .85rem; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mock-tile.pass { border-color: var(--good-line); }
.mock-tile.pass .mt-status { color: var(--good); }
.mock-tile.fail .mt-status { color: var(--bad); }
.mock-tile.next { border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(242, 193, 78, .18); }
.mock-tile .mt-status .ic { width: 16px; height: 16px; }

/* ---------- rings ---------- */
.ring { display: block; }
.ring circle { fill: none; stroke-width: 8; }
.ring .track { stroke: var(--line); }
.ring .val { stroke: var(--gold); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1); }
.ring.good .val { stroke: var(--good); }
.ring.bad .val { stroke: var(--bad); }
.ring text { font: 900 22px var(--sans); fill: var(--ink); }

/* ================= MOCK INTRO ================= */
.intro-card { overflow: hidden; }
.intro-top { background: linear-gradient(160deg, #0f1b33, #1b2f58); color: #fff; padding: 26px 22px; }
.intro-top h1 { color: #fff; margin: 0; }
.intro-top .eyebrow { color: var(--gold); }
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.facts3 div { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px 8px; text-align: center; }
.facts3 b { display: block; font: 800 1.7rem/1 var(--serif); color: var(--gold); margin-bottom: 4px; }
.facts3 span { font-size: .85rem; color: #d6deef; font-weight: 700; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; align-items: flex-start; }
.rules .ic { color: var(--good); margin-top: 2px; }
.kbd-tip { display: none; }
@media (hover: hover) and (pointer: fine) { .kbd-tip { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; margin: 14px 0 0; flex-wrap: wrap; } }
kbd { font: 800 .8rem var(--sans); background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: var(--ink); }

/* ================= QUESTION SCREENS ================= */
.qwrap { max-width: 760px; margin: 0 auto; }
.qtop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qtop .exit { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); background: var(--surface); flex: none; cursor: pointer; }
.qtop .exit:hover { color: var(--ink); border-color: var(--line-2); }
.qtop .qtitle { font-weight: 800; color: var(--ink-2); font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: var(--navy); color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; font-size: 1.02rem; flex: none;
}
.timer .ic { width: 18px; height: 18px; color: var(--gold); }
.timer.low { background: var(--bad); }
.timer.low .ic { color: #fff; }
@media (prefers-reduced-motion: no-preference) { .timer.low { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); } 50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); } }
.streak { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink); font-weight: 900; font-size: .9rem; flex: none; }
.streak .ic { width: 18px; height: 18px; color: #e0661b; }
.streak.zero { background: var(--surface); border-color: var(--line); color: var(--muted); }
.streak.zero .ic { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .streak.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

.qprogress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qprogress .bar { flex: 1; }
.qprogress .qcount { font-size: .9rem; font-weight: 800; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #f5a524); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.bar.good > span { background: var(--good); }
.bar.bad > span { background: var(--bad); }
.dots { display: flex; flex-wrap: wrap; gap: 5px; margin: -6px 0 16px; }
.dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--line); transition: background .3s, transform .3s; }
.dots i.on { background: var(--navy-3); }
:root[data-theme="dark"] .dots i.on { background: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dots i.on { background: var(--gold); } }
.dots i.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }

.qcard { padding: 22px 18px 18px; }
@media (min-width: 640px) { .qcard { padding: 30px 30px 26px; } }
.question { border: 0; margin: 0; padding: 0; min-width: 0; }
.question legend { font-size: clamp(1.2rem, 4.6vw, 1.45rem); font-weight: 800; line-height: 1.35; padding: 0; margin-bottom: 10px; color: var(--ink); }
.hint { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 14px; }
.options { display: grid; gap: 10px; }
.option {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 14px; min-height: 60px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s, box-shadow .2s; font-weight: 700; font-size: 1.05rem; line-height: 1.35;
}
.option:hover { border-color: var(--line-2); background: var(--surface-2); }
.option:active { transform: scale(.99); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .letter {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1.5px solid var(--line-2); color: var(--ink-2); font-weight: 900; font-size: .95rem;
  transition: background .15s, color .15s, border-color .15s;
}
.option .otext { flex: 1; }
.option.checked { border-color: var(--chosen); background: var(--chosen-bg); box-shadow: 0 0 0 1px var(--chosen) inset; }
.option.checked .letter { background: var(--chosen); border-color: var(--chosen); color: var(--bg); }
.option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.option input:focus-visible ~ .letter { outline: 3px solid var(--accent); outline-offset: 2px; }   /* browsers without :has() */
.option.is-disabled { opacity: .5; cursor: not-allowed; }
.option.right { border-color: var(--good); background: var(--good-bg); box-shadow: none; opacity: 1; }
.option.right .letter { background: var(--good); border-color: var(--good); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: none; opacity: 1; }
.option.wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.option.dim { opacity: .55; }
:root[data-theme="dark"] .option.right .letter, :root[data-theme="dark"] .option.wrong .letter { color: #0a1122; }
.option .mark { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; flex: none; }
.option.right .mark { color: var(--good); }
.option.wrong .mark { color: var(--bad); }
.option .mark .ic { width: 24px; height: 24px; stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) {
  .option.checked .letter { animation: pop .28s cubic-bezier(.3, 1.6, .5, 1); }
  .revealed .option.right { animation: glow .9s ease-out; }
  .revealed .option.wrong { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
  .revealed .option.right .mark .ic { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .1s ease-out forwards; }
}
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(15, 122, 85, .5); } 100% { box-shadow: 0 0 0 14px rgba(15, 122, 85, 0); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.qnav { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 16px; }
.qnav .btn-prev { min-width: 54px; padding: 12px 16px; }
.qnav-sub { display: flex; justify-content: center; margin-top: 8px; }

/* feedback (practice) */
.feedback { margin-top: 16px; border-radius: 16px; padding: 18px 18px 16px; border: 1.5px solid; }
.feedback.good { background: var(--good-bg); border-color: var(--good-line); }
.feedback.bad { background: var(--bad-bg); border-color: var(--bad-line); }
.feedback .fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.feedback .fb-badge { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; flex: none; color: #fff; }
.feedback.good .fb-badge { background: var(--good); }
.feedback.bad .fb-badge { background: var(--bad); }
:root[data-theme="dark"] .feedback .fb-badge { color: #0a1122; }
.feedback .fb-badge .ic { width: 24px; height: 24px; stroke-width: 3; }
.feedback h2 { font: 800 1.3rem/1.2 var(--sans); margin: 0; }
.feedback.good h2 { color: var(--good); }
.feedback.bad h2 { color: var(--bad); }
.feedback p { color: var(--ink); margin: 0 0 .6em; }
.feedback .explain { font-size: 1.02rem; }
.lesson-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 800; color: var(--muted); margin: 4px 0 0; }
.lesson-tag .ic { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .feedback { animation: slideup .4s cubic-bezier(.2, .7, .2, 1) both; }
  .feedback .fb-badge { animation: pop .45s .05s cubic-bezier(.3, 1.8, .5, 1) both; }
}
@keyframes slideup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* review grid (mock) */
.review-grid { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 560px) { .review-grid { grid-template-columns: repeat(8, 1fr); } }
.review-grid button {
  width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 12px; font: 900 1rem var(--sans); cursor: pointer;
  background: var(--surface); color: var(--ink); border: 2px dashed var(--line-2); transition: transform .15s;
}
.review-grid button:hover { transform: translateY(-2px); }
.review-grid button.done { background: var(--navy); color: #fff; border: 2px solid var(--navy); }
:root[data-theme="dark"] .review-grid button.done { background: var(--gold); color: var(--navy); border-color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .review-grid button.done { background: var(--gold); color: var(--navy); border-color: var(--gold); } }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); font-weight: 700; }
.legend-row i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.legend-row .l-done { background: var(--navy); }
:root[data-theme="dark"] .legend-row .l-done { background: var(--gold); }
.legend-row .l-none { border: 2px dashed var(--line-2); }

/* ================= RESULTS ================= */
.result-hero { text-align: center; overflow: hidden; position: relative; }
.result-hero .rh-top { padding: 28px 20px 8px; }
.result-hero.pass .rh-top { background: radial-gradient(600px 220px at 50% 0, var(--good-bg), transparent 70%); }
.result-hero .ring-big { width: 180px; height: 180px; margin: 6px auto 12px; position: relative; }
.result-hero .ring-big svg { width: 100%; height: 100%; }
.result-hero .ring-big circle { stroke-width: 12; }
.result-hero .ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.result-hero .ring-num b { font: 800 3rem/1 var(--serif); color: var(--ink); }
.result-hero .ring-num span { font-size: .9rem; color: var(--muted); font-weight: 800; }
.verdict { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 900; font-size: 1.05rem; letter-spacing: .04em; }
.verdict .ic { width: 20px; height: 20px; stroke-width: 3; }
.verdict.pass { background: var(--good); color: #fff; }
.verdict.fail { background: var(--bad-bg); color: var(--bad); border: 1.5px solid var(--bad-line); }
:root[data-theme="dark"] .verdict.pass { color: #0a1122; }
.result-hero .msg { font-size: 1.12rem; color: var(--ink-2); max-width: 40ch; margin: 14px auto 0; }
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 22px; }
.rstats div { padding: 14px 8px; }
.rstats div + div { border-left: 1px solid var(--line); }
.rstats b { display: block; font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.rstats span { font-size: .82rem; color: var(--muted); font-weight: 800; }
.result-hero .btn-row { padding: 0 20px 22px; margin-top: 0; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.bars .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; margin-bottom: 6px; }
.bars .row span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); }

.study-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.study-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.study-item img, .thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--line); }
.study-item .si-text b { display: block; line-height: 1.3; }
.study-item .btn-row { grid-column: 1 / -1; margin-top: 0; }
.study-item .btn-row .btn { min-height: 48px; }
details.more summary { cursor: pointer; font-weight: 800; padding: 12px 0; min-height: 44px; color: var(--ink-2); }

.filter-tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.filter-tabs button { font: inherit; font-weight: 800; font-size: .92rem; border: 0; background: none; color: var(--ink-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 40px; }
.filter-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.answers > li.ans { border: 1px solid var(--line); border-left-width: 5px; border-radius: 14px; padding: 14px 16px; }
.answers > li.ans.ok { border-left-color: var(--good); }
.answers > li.ans.no { border-left-color: var(--bad); }
.answers.only-wrong > li.ok { display: none; }
.answers .qtext { font-weight: 800; margin: 4px 0 8px; }
.answers .you { font-weight: 700; margin: 0 0 4px; display: flex; gap: 8px; align-items: flex-start; }
.answers .you .ic { width: 20px; height: 20px; margin-top: 2px; stroke-width: 3; }
.answers .you.good { color: var(--good); }
.answers .you.bad { color: var(--bad); }
.answers .rightans { margin: 0 0 6px; }
.answers .explain { color: var(--ink-2); margin: 0; font-size: .98rem; }

/* ================= PRACTICE HOME ================= */
.quick { display: grid; gap: 12px; margin-bottom: 26px; }
@media (min-width: 640px) { .quick { grid-template-columns: 1fr 1fr; } }
.quick a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); margin: 0; transition: transform .2s, box-shadow .2s; }
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick .q-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--navy); color: var(--gold); }
.quick .q-ic.red { background: var(--bad-bg); color: var(--bad); }
.quick b { display: block; font-size: 1.08rem; }
.quick span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.quick .go { margin-left: auto; color: var(--muted); }

.chapter-block { overflow: hidden; }
.chapter-banner { position: relative; min-height: 150px; display: flex; align-items: flex-end; color: #fff; background: var(--navy); }
.chapter-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chapter-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 17, 34, .1) 0%, rgba(10, 17, 34, .85) 100%); }
.chapter-banner .cb-text { position: relative; z-index: 1; padding: 18px 20px; }
.chapter-banner .cb-text span { font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.chapter-banner h2 { color: #fff; margin: 2px 0 0; font-size: clamp(1.3rem, 4.4vw, 1.7rem); }
.chapter-inner { padding: 16px 16px 18px; }
@media (min-width: 640px) { .chapter-inner { padding: 20px 24px 24px; } }
.chapter-inner .btn-row { margin-top: 0; margin-bottom: 14px; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lesson-link {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px 10px 10px; min-height: 72px;
  border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface);
  transition: background .15s, border-color .15s, transform .15s;
}
a.lesson-link:hover { background: var(--surface-2); border-color: var(--line-2); }
.lesson-link .thumb { width: 52px; height: 52px; }
.lesson-link .lt { font-weight: 800; line-height: 1.3; min-width: 0; }
.lesson-link .lt small { display: block; font-weight: 700; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.lesson-link .lt .bar { height: 6px; margin-top: 8px; max-width: 220px; }
.lesson-link .go { color: var(--muted); }
.lesson-link.disabled { opacity: .6; }
.lesson-link .lnum { font-size: .75rem; font-weight: 900; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ================= VIDEOS PAGE ================= */
.video-list { display: grid; gap: 12px; }
@media (min-width: 640px) { .video-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { body.wide .video-list, .video-list.three { grid-template-columns: repeat(3, 1fr); } }
.vitem { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); }
a.vitem:hover { border-color: var(--line-2); background: var(--surface-2); }
.vitem .vthumb { position: relative; width: 96px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; flex: none; background: var(--navy); }
.vitem .vthumb img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.vitem .vthumb .ic { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 26px; height: 26px; color: #fff; stroke: none; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
.vitem b { display: block; line-height: 1.3; }
.vitem small { color: var(--muted); font-weight: 700; }

/* ================= TEXT PAGES ================= */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.draft-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 20px; font-weight: 700; }
.draft-banner .ic { color: var(--gold-ink); margin-top: 2px; }
.about-hero { display: grid; gap: 22px; align-items: center; }
@media (min-width: 760px) { .about-hero { grid-template-columns: 1.2fr .8fr; } }
.about-hero img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.values { display: grid; gap: 12px; margin: 18px 0; }
@media (min-width: 640px) { .values { grid-template-columns: repeat(3, 1fr); } }
.values div { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.values .ic { color: var(--gold-ink); margin-bottom: 6px; }
.values b { display: block; }
.values span { color: var(--ink-2); font-size: .95rem; }

/* credits */
.credit-search { position: relative; margin: 6px 0 18px; max-width: 460px; }
.credit-search .ic { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.credit-search input { width: 100%; font: inherit; padding: 12px 14px 12px 44px; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); }
.credit-search input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.site-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 8px; }
.site-pics li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.site-pics img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.site-pics .sp-text { padding: 8px 10px 10px; font-size: .88rem; line-height: 1.35; }
.site-pics .sp-text a { font-weight: 800; }
.site-pics .sp-text small { display: block; color: var(--muted); font-weight: 700; margin-top: 2px; }
.credit-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.credit-group summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; min-height: 54px; }
.credit-group summary::-webkit-details-marker { display: none; }
.credit-group summary .count { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 800; white-space: nowrap; }
.credit-group summary .ic { color: var(--muted); transition: transform .2s; }
.credit-group[open] summary .ic { transform: rotate(180deg); }
.credit-list { list-style: none; margin: 0; padding: 0 16px 14px; columns: 1; }
@media (min-width: 760px) { .credit-list { columns: 2; column-gap: 28px; } }
.credit-list li { break-inside: avoid; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.credit-list a { font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #c8d2e8; padding: 44px 0 calc(24px + var(--tabbar-h)); margin-top: 40px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-in { display: grid; gap: 28px; }
.footer-brand p { margin: 12px 0 0; max-width: 34ch; }
.brand-footer { color: #fff; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer-cols h2 { font: 900 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.footer-cols a, .footer-cols span { display: block; padding: 6px 0; font-weight: 700; }
.footer-cols span:empty { display: none; }
.link-btn { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.site-footer .link-btn { color: #fff; }
@media (min-width: 760px) { .footer-in { grid-template-columns: 1.3fr 1fr; } }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; padding-top: 18px; font-size: .88rem; color: #aebbd6; }
.disclaimer a { text-decoration: underline; }

/* ---------- confetti ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; display: none; }

/* ---------- focus mode (question screens) ---------- */
body.focus .site-footer { display: none; }
body.focus .header-actions .header-cta { display: none; }

/* dark mode: keep the navy bands apart from the dark page */
:root[data-theme="dark"] .site-footer { border-top: 1px solid var(--line); background: #08101f; }
:root[data-theme="dark"] .video-band { background: linear-gradient(160deg, #13244a, #0e1a36); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
:root[data-theme="dark"] .ch-cta, :root[data-theme="dark"] .step .step-ic, :root[data-theme="dark"] .quick .q-ic:not(.red) { background: var(--navy-3); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
