/* =====================================================================================================
   CD design layer (loaded last): an editorial look — a grotesque display face with tight tracking, monospace
   labels, large soft cards, a deep-navy hero that the header melts into, tabs for the parts of the exam, plain
   accordions and a dark closing band. Our own colours: royal blue for actions, deep navy for dark surfaces.
   Test screens (.ex, body.in-test) keep their own calm exam styling.
   ===================================================================================================== */
:root {
  --font-display: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink: #0a1230;
  --ink-2: #111b42;
  --night: #070d24;
  --hero-glow: radial-gradient(55% 75% at 100% 0%, rgba(37, 88, 230, .38), transparent 70%), radial-gradient(45% 60% at 0% 100%, rgba(37, 88, 230, .22), transparent 70%);
  --radius: 14px;
  --radius-lg: 22px;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 48px -28px rgba(15, 23, 42, .22);
}
body { font-family: var(--font); font-size: 15.5px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; }
h1 { font-weight: 700; letter-spacing: -.035em; }

/* ---------- calm: the decorative motion of the old look is switched off ---------- */
.wow-particles, .wow-cubes, .wow-marquee { display: none !important; }
.wow-shine::after { display: none; }
body:not(.in-test) .view-root { animation: cdIn .35s ease both; }
@keyframes cdIn { from { opacity: 0; } to { opacity: 1; } }
.pf-test::before, .lp-section-card::before, .lp-why .card::before { display: none; }
.pf-banner-ic, .pf-premium-btn, .pm-crown, .pm-hero::before { animation: none !important; }
.pm-hero::before { display: none; }

/* ---------- buttons ---------- */
.btn { border-radius: 11px; font-weight: 700; letter-spacing: -.005em; }
.btn-lg { height: 54px; padding: 0 28px; border-radius: 12px; font-size: 1rem; }
.btn-primary { background: linear-gradient(180deg, #3a6bf0, #2052da); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 28px -12px rgba(37, 88, 230, .75); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #3a6bf0, #2052da); filter: brightness(1.06); transform: translateY(-1px); }
.cd-btn-main { color: #fff; border: 0; background: linear-gradient(180deg, #3a6bf0, #2052da); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 16px 36px -12px rgba(37, 88, 230, .8); }
.cd-btn-main:hover { color: #fff; filter: brightness(1.07); text-decoration: none; }
.cd-btn-glass { color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); }
.cd-btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; }
.cd-btn-dark { color: #fff; border: 0; background: linear-gradient(180deg, #1a2550, var(--ink)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 16px 30px -16px rgba(10, 18, 48, .85); }
.cd-btn-dark:hover { color: #fff; filter: brightness(1.15); text-decoration: none; }
.cd-btn-line { color: var(--ink); background: linear-gradient(180deg, #fff, #f6f8fc); border: 1px solid var(--border-strong); }
.cd-btn-line:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
.cd-btn-white { color: var(--ink); border: 0; background: linear-gradient(180deg, #fff, #eef2f9); box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .55); }
.cd-btn-white:hover { color: var(--ink); filter: brightness(1.03); text-decoration: none; }

/* ---------- cards, inputs, badges ---------- */
.card { border-radius: var(--radius-lg); border-color: rgba(15, 23, 42, .07); box-shadow: var(--card-shadow); }
.input { border-radius: 11px; }
.seg { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.seg button { border-radius: 9px; font-weight: 600; }
.seg button.active { background: var(--ink); color: #fff; box-shadow: 0 6px 14px -8px rgba(10, 18, 48, .8); }
.badge { font-weight: 700; }

/* ---------- labels ---------- */
.cd-mono { font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.cd-muted { color: var(--muted); }
.cd-eyebrow { display: block; margin-bottom: 14px; font: 500 .74rem/1.4 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--primary); }
.cd-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 7px; font: 600 .68rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--primary); background: var(--primary-50); }
.cd-chip-solid { color: #fff; background: var(--primary); }

/* ---------- header ---------- */
.topbar { height: 72px; background: rgba(244, 247, 251, .82); border-bottom-color: rgba(15, 23, 42, .06); }
:root { --topbar-h: 72px; }
.nav a, .nav button.nav-link { font-weight: 500; font-size: .92rem; color: var(--text-2); }
.nav a:hover { background: transparent; color: var(--text); }
.nav a.active { background: transparent; box-shadow: none; color: var(--primary); font-weight: 650; }
.topbar .btn-primary { background: var(--ink); box-shadow: 0 8px 18px -10px rgba(10, 18, 48, .8); }
.topbar .btn-primary:hover:not(:disabled) { background: var(--ink); filter: brightness(1.25); }
/* Home: the header sits on the dark hero, in its colours. */
body.on-home .topbar { background: var(--night); border-bottom-color: rgba(255, 255, 255, .06); }
body.on-home .brand-logo { content: url("../assets/logo-dark.png"); }
body.on-home .nav a, body.on-home .nav button.nav-link, body.on-home .topbar .btn-ghost { color: rgba(255, 255, 255, .72); }
body.on-home .nav a:hover, body.on-home .topbar .btn-ghost:hover { color: #fff; background: transparent; }
body.on-home .nav a.active { color: #fff; }
body.on-home .topbar .btn-primary { background: #fff; color: var(--ink); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
body.on-home .topbar .menu-btn { color: #fff; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); }
body.on-home .user-chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #fff; }
body.on-home .aurora { display: none; }

/* ---------- home: hero ---------- */
.cd-hero { position: relative; overflow: hidden; color: #fff; background: var(--hero-glow), var(--night); padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.cd-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.cd-hero h1 { margin: 0; color: #fff; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.cd-hero h1 em { font-style: normal; color: #7ea6ff; }
.cd-lead { max-width: 470px; margin: 26px 0 0; color: rgba(255, 255, 255, .68); font-size: 1.15rem; line-height: 1.6; }
.cd-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* the sample score report */
.cd-report { color: var(--ink); padding: 26px 28px 24px; border-radius: 22px; background: linear-gradient(180deg, #fff, #f2f5fb); transform: rotate(-3deg);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .7), inset 0 1px 0 #fff; }
.cd-report-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.cd-report-title { display: block; margin-top: 6px; font: 700 1.6rem/1.2 var(--font-display); letter-spacing: -.02em; }
.cd-report-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 16px; font-weight: 600; font-size: .9rem; }
.cd-report-meta small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.cd-report-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cd-report-rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 5px 0; }
.cd-report-rows .cd-mono { color: var(--muted); letter-spacing: .06em; }
.cd-report-rows b { font-weight: 650; }
.cd-band { font: 600 .82rem var(--font-mono); padding: 3px 9px; border-radius: 7px; background: var(--primary-50); color: var(--primary); }
.cd-report-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 2px dashed #d5dbe6; color: var(--muted); }
.cd-report-foot div { text-align: right; }
.cd-report-foot strong { display: block; font: 700 3.3rem/1 var(--font-display); letter-spacing: -.04em; color: var(--primary); }
.cd-report-foot small { color: var(--text-2); font-weight: 600; }

/* ---------- home: sections ---------- */
.cd-section { margin-top: clamp(72px, 9vw, 128px); }
.cd-section h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.02; letter-spacing: -.035em; }
.cd-head-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.cd-head-split p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.cd-head-center { text-align: center; margin-bottom: 40px; }
.cd-head-center h2 { max-width: 760px; margin: 0 auto; }

/* the parts of the exam as tabs; each tab's width follows its share of the time */
.cd-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.cd-tab { flex: 1 1 0; min-width: 0; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(180deg, #fff, #f8fafd); color: var(--text); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.cd-tab .cd-mono { color: var(--muted); letter-spacing: .1em; }
.cd-tab b { display: block; margin-top: 4px; font: 700 1.2rem/1.2 var(--font-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-tab:hover { border-color: var(--border-strong); }
.cd-tab.on { color: #fff; border-color: transparent; background: linear-gradient(180deg, #3a6bf0, #1f4fd6); box-shadow: 0 18px 36px -16px rgba(37, 88, 230, .85); }
.cd-tab.on .cd-mono { color: rgba(255, 255, 255, .75); }

.cd-panel, .cd-bigcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 48px);
  border-radius: 28px; background: linear-gradient(180deg, #fff, #fbfcfe); border: 1px solid rgba(15, 23, 42, .06); box-shadow: var(--card-shadow); }
.cd-panel[hidden] { display: none; }
.cd-panel h3 { margin: 12px 0 12px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.08; letter-spacing: -.03em; }
.cd-panel p, .cd-bigcard p { color: var(--muted); font-size: 1.02rem; }
.cd-bigcard h2 { margin-bottom: 16px; }
.cd-checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.cd-checks li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.cd-checks svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 7px; color: var(--primary); background: var(--primary-50); }
.cd-panel .cd-btn-dark, .cd-bigcard .cd-btn-dark { margin-top: 30px; }
.cd-panel-visual .lp-window, .cd-bigcard-visual .lp-window { border-radius: 18px; box-shadow: 0 40px 70px -35px rgba(10, 18, 48, .55); }

/* plans */
.cd-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; margin: 0 auto; }
.cd-plan { display: flex; flex-direction: column; padding: 32px; border-radius: 26px; background: linear-gradient(180deg, #fff, #fbfcfe); border: 1px solid rgba(15, 23, 42, .06); box-shadow: var(--card-shadow); }
.cd-plan h3 { margin: 0; font-size: 1.3rem; }
.cd-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cd-plan-price { margin: 20px 0 0; font: 700 2.5rem/1 var(--font-display); letter-spacing: -.035em; }
.cd-plan-price small { font: 500 1rem var(--font); letter-spacing: 0; color: var(--muted); }
.cd-plan-sub { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.cd-plan .cd-checks { margin-bottom: 30px; }
.cd-plan .btn { margin-top: auto; width: 100%; }
.cd-plan-pro { color: #fff; border: 0; background: radial-gradient(80% 60% at 100% 0%, rgba(37, 88, 230, .5), transparent 70%), var(--ink); box-shadow: 0 50px 90px -40px rgba(10, 18, 48, .85); }
.cd-plan-pro h3 { color: #fff; }
.cd-plan-pro .cd-plan-price small, .cd-plan-pro .cd-plan-sub { color: rgba(255, 255, 255, .6); }
.cd-plan-pro .cd-checks li { color: rgba(255, 255, 255, .88); }
.cd-plan-pro .cd-checks svg { color: #8fb0ff; background: rgba(255, 255, 255, .08); }

/* questions and answers */
.cd-faq-wrap { max-width: 860px; }
.cd-faq-wrap h2 { margin-bottom: 28px; }
.cd-faq details { border-top: 1px solid var(--border-strong); }
.cd-faq details:last-child { border-bottom: 1px solid var(--border-strong); }
.cd-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font: 600 1.15rem/1.35 var(--font-display); letter-spacing: -.01em; color: var(--text); }
.cd-faq summary::-webkit-details-marker { display: none; }
.cd-faq-ic { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); transition: transform .25s, background .25s; }
.cd-faq-ic::before, .cd-faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; border-radius: 2px; background: var(--ink); }
.cd-faq-ic::after { transform: rotate(90deg); }
.cd-faq details[open] .cd-faq-ic { background: var(--primary); transform: rotate(45deg); }
.cd-faq details[open] .cd-faq-ic::before, .cd-faq details[open] .cd-faq-ic::after { background: #fff; }
.cd-faq details p { margin: 0; padding: 0 56px 24px 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }

/* the dark closing band */
.cd-final { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(32px, 6vw, 72px); border-radius: 32px; color: #fff;
  background: radial-gradient(60% 90% at 100% 100%, rgba(37, 88, 230, .42), transparent 70%), var(--ink); }
.cd-final h2 { color: #fff; font-size: clamp(2rem, 3.8vw, 3.1rem); }
.cd-final-k { display: block; margin-bottom: 16px; color: rgba(255, 255, 255, .55); }
.cd-final-cta p { margin: 14px 0 0; font-size: .86rem; color: rgba(255, 255, 255, .55); }
.cd-final-cta a:not(.btn) { color: rgba(255, 255, 255, .82); }

/* ---------- footer ---------- */
.footer { margin-top: clamp(64px, 8vw, 104px); background: transparent; border-top: 1px solid rgba(15, 23, 42, .08); padding: 30px 0; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }

/* ---------- inner pages in the same style ---------- */
.pf-banner { border-radius: 28px; padding: clamp(24px, 3.4vw, 40px); background: radial-gradient(55% 90% at 100% 0%, rgba(37, 88, 230, .42), transparent 70%), var(--ink); box-shadow: 0 30px 60px -36px rgba(10, 18, 48, .8); }
.pf-banner h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -.035em; }
.pf-banner p { color: rgba(255, 255, 255, .7); }
.pf-banner-ic { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); box-shadow: none; }
.pf-pick { border-radius: 11px; }
.tc { border-radius: 22px; }
.tc-tile { background: radial-gradient(90% 70% at 100% 0%, rgba(58, 107, 240, .55), transparent 70%), var(--ink); }
.tc-kicker { font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: .7rem; }
.tc h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.tc-start { border-radius: 10px; font-family: var(--font); font-weight: 700; background: linear-gradient(180deg, #3a6bf0, #2052da); }

.pm-hero { border-radius: 32px; background: radial-gradient(60% 80% at 100% 0%, rgba(37, 88, 230, .45), transparent 70%), radial-gradient(40% 60% at 0% 100%, rgba(245, 158, 11, .14), transparent 70%), var(--ink); }
.pm-hero h1 { letter-spacing: -.04em; }
.pm-plan { border-radius: 26px; box-shadow: var(--card-shadow); }
.pm-plan-pro { background: radial-gradient(80% 60% at 100% 0%, rgba(37, 88, 230, .5), transparent 70%), var(--ink); }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .cd-hero-grid, .cd-panel, .cd-bigcard, .cd-head-split, .cd-final { grid-template-columns: minmax(0, 1fr); }
  .cd-report { max-width: 480px; transform: rotate(-2deg); }
  .cd-head-split { gap: 14px; }
  .cd-tabs { overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 4px 16px 14px; margin-bottom: 4px; }
  .cd-tabs::-webkit-scrollbar { display: none; }
  .cd-tab { flex: 0 0 auto !important; min-width: 136px; }
}
@media (max-width: 720px) {
  .cd-plans { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cd-hero h1 { font-size: 2.6rem; }
  .cd-lead { font-size: 1.02rem; margin-top: 18px; }
  .cd-hero-cta { flex-direction: column; }
  .cd-hero-cta .btn { width: 100%; }
  .cd-report { padding: 22px 20px 20px; }
  .cd-report-meta { font-size: .8rem; }
  .cd-report-foot strong { font-size: 2.6rem; }
  .cd-panel, .cd-bigcard { padding: 22px; border-radius: 22px; }
  .cd-panel .btn, .cd-bigcard .btn, .cd-final .btn { width: 100%; }
  .cd-plan { padding: 24px; }
  .cd-faq summary { font-size: 1.04rem; padding: 18px 0; }
  .cd-faq details p { padding-right: 0; }
  .cd-final { border-radius: 24px; }
}

/* Test screens keep the plain exam face for every heading. */
.ex h1, .ex h2, .ex h3, .ex h4 { font-family: "Inter", "Segoe UI", Arial, sans-serif; letter-spacing: normal; }

/* =====================================================================================================
   WARM LIGHT (overrides everything above): cream and white surfaces, brown for actions and highlights, and
   brown gradients (deep espresso to caramel) for the big bands — the banners, Premium and the closing band —
   which keep white text. The home hero is light: cream with soft caramel light, dark brown text.
   Depth stays: glossy bevelled buttons, cards lit from above, a 3D score report and glass orbs in the hero.
   Exam screens (.ex) and the test previews (.lp-window) stay white and calm.
   ===================================================================================================== */
:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f6efe5;
  --surface-3: #ede2d3;
  --border: #ebdfcf;
  --border-strong: #dccab3;
  --text: #2d2016;
  --text-2: #5b4636;
  --muted: #8b7564;
  --primary: #8a5a2b;
  --primary-600: #6e4420;
  --primary-50: #f7ede1;
  --primary-100: #eedbc4;
  --success-50: #e8f5ec;
  --warning-50: #fdf3e1;
  --danger-50: #fbeceb;
  --violet-50: #f4ece6;
  --teal-50: #e8f3ef;
  --amber-50: #fdf3e1;
  --success: #2f855a;
  --danger: #c0392b;
  --warning: #b7791f;
  --violet: #8e5b7a;
  --c-reading: #8a5a2b;
  --accent-a: #a06a3a;
  --accent-b: #c49563;
  --grad-primary: linear-gradient(135deg, #b07a47, #8a5a2b 55%, #6b4220);
  --grad-accent: linear-gradient(100deg, #c69563 0%, #8a5a2b 55%, #5e3b1f 100%);
  --grad-night: linear-gradient(150deg, #4a2b14 0%, #6e4420 38%, #9a6535 72%, #c08b58 100%);
  --grad-brown: var(--grad-night);
  --ink: #2d2016;
  --night: #f3e7d8;
  --hero-glow: radial-gradient(55% 75% at 100% 0%, rgba(196, 149, 99, .38), transparent 70%), radial-gradient(40% 50% at 0% 70%, rgba(138, 90, 43, .14), transparent 70%);
  --shadow-sm: 0 1px 2px rgba(80, 50, 20, .06);
  --shadow: 0 10px 30px -14px rgba(80, 50, 20, .22);
  --shadow-lg: 0 30px 60px -26px rgba(80, 50, 20, .32);
  --card-shadow: 0 1px 2px rgba(80, 50, 20, .05), 0 24px 48px -28px rgba(80, 50, 20, .26);
  --bevel: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(120, 80, 40, .08);
  color-scheme: light;
}
body { background: radial-gradient(1200px 700px at 85% -10%, rgba(214, 176, 132, .26), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(176, 122, 71, .12), transparent 60%), linear-gradient(180deg, #fffdf9, #f8f0e5); background-attachment: fixed; color: var(--text); }
.aurora { display: none; }
::selection { background: rgba(196, 149, 99, .32); }
a { color: var(--primary); }
:focus-visible { outline-color: var(--primary); }

/* Light islands: the exam screen previews keep the real exam's white look. */
.lp-window, .ex { --surface: #fff; --surface-2: #f6f2ec; --surface-3: #ece5dc; --border: #e6ddd2; --border-strong: #d3c5b4; --text: #1f1a15; --text-2: #4a4036; --muted: #7a6d60;
  --primary: #8a5a2b; --primary-50: #f7ede1; --primary-100: #eedbc4; --success: #0f9f6e; --danger: #dc2626; --success-50: #e9fbf3; --danger-50: #fef2f2; color-scheme: light; color: var(--text); }
.lp-window-bar { background: linear-gradient(180deg, #8a5a2b, #6b4220); }
body.cdi-mode:has(.ex) { background: #fff; }

/* ---------- surfaces: lit from above ---------- */
.card, .cd-panel, .cd-bigcard, .cd-plan, .tc, .pm-plan, .modal, .dropdown-menu {
  background: linear-gradient(180deg, #fff, #fffaf4); border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.card-link:hover, .tc:hover { border-color: rgba(138, 90, 43, .35); box-shadow: 0 1px 2px rgba(80, 50, 20, .06), 0 30px 60px -30px rgba(80, 50, 20, .38), 0 0 0 1px rgba(196, 149, 99, .18); transform: translateY(-3px); }
.tc, .card-link { transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s; }
.input, select.input, textarea.input { background-color: #fff; border-color: var(--border-strong); color: var(--text); }
.input:hover { border-color: #c9ad8c; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(138, 90, 43, .16); }
.input::placeholder { color: #a8927f; }
.seg { background: var(--surface); }
.seg button { color: var(--text-2); }
.seg button.active { background: var(--grad-primary); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 20px -10px rgba(110, 68, 32, .7); }
.badge { background: var(--surface-3); color: var(--text-2); }
.badge-blue { background: var(--primary-50); color: #6e4420; }
.badge-green, .pm-free { background: var(--success-50); color: #2f6b45; }
.badge-amber { background: var(--warning-50); color: #8a5a12; }
.badge-red { background: var(--danger-50); color: #a33a2b; }
.table th { background: var(--surface-2); color: var(--text-2); }
.table td, .table th { border-color: var(--border); }
hr { border-color: var(--border); }

/* ---------- buttons: glossy, with a lower edge ---------- */
.btn-primary, .cd-btn-main, .tc-start { color: #fff; border: 0; background: linear-gradient(180deg, #bd8752 0%, #9a6535 50%, #7a4b24 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(60, 30, 10, .25), 0 4px 0 #5e3a1c, 0 18px 36px -14px rgba(122, 75, 36, .55); }
.btn-primary:hover:not(:disabled), .cd-btn-main:hover, .tc:hover .tc-start { color: #fff; background: linear-gradient(180deg, #bd8752 0%, #9a6535 50%, #7a4b24 100%); filter: brightness(1.07); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(60, 30, 10, .25), 0 5px 0 #5e3a1c, 0 22px 40px -14px rgba(122, 75, 36, .6); }
.btn-primary:active:not(:disabled), .cd-btn-main:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 0 #5e3a1c; }
.btn-secondary, .cd-btn-line { color: var(--text); background: linear-gradient(180deg, #fff, #f6eee3); border: 1px solid var(--border-strong); box-shadow: var(--bevel), 0 3px 0 #e2d2bd; }
.btn-secondary:hover:not(:disabled), .cd-btn-line:hover { color: var(--text); border-color: #b08a62; }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(138, 90, 43, .08); color: var(--text); }
.btn-soft { background: var(--primary-50); color: #6e4420; }
/* white buttons sit on the brown bands */
.cd-btn-dark, .cd-btn-white { color: #4a2b14; border: 0; background: linear-gradient(180deg, #ffffff, #f3e7d8); box-shadow: inset 0 -2px 0 rgba(90, 55, 25, .12), 0 4px 0 #c9ad8c, 0 18px 36px -16px rgba(60, 35, 15, .6); }
.cd-btn-dark:hover, .cd-btn-white:hover { color: #4a2b14; filter: brightness(1.03); }
.cd-btn-glass { color: var(--text); background: rgba(255, 255, 255, .7); border: 1px solid rgba(138, 90, 43, .25); box-shadow: inset 0 1px 0 #fff; }
.cd-btn-glass:hover { color: var(--text); background: #fff; }

/* ---------- header ---------- */
.topbar, body.on-home .topbar { background: rgba(255, 251, 245, .84); border-bottom: 1px solid rgba(120, 80, 40, .12); }
.brand-logo, body.on-home .brand-logo { content: url("../assets/logo.png"); }
.nav a, .nav button.nav-link, .topbar .btn-ghost, body.on-home .nav a, body.on-home .nav button.nav-link, body.on-home .topbar .btn-ghost { color: var(--text-2); }
.nav a:hover, .topbar .btn-ghost:hover, body.on-home .nav a:hover, body.on-home .topbar .btn-ghost:hover { color: var(--text); }
.nav a.active, body.on-home .nav a.active { color: #6e4420; position: relative; }
.nav a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad-accent); }
.topbar .btn-primary, body.on-home .topbar .btn-primary { color: #fff; background: linear-gradient(180deg, #9a6535, #6e4420); box-shadow: 0 3px 0 #4a2b14, 0 10px 24px -12px rgba(80, 50, 20, .6); }
.topbar .menu-btn, body.on-home .topbar .menu-btn { color: var(--text); border: 1px solid var(--border-strong); background: #fff; }
.user-chip, body.on-home .user-chip { background: #fff; border-color: var(--border); color: var(--text); }
.mobile-nav { background: #fffaf3; border-color: var(--border); }
.mobile-nav a { color: var(--text-2); }
.dropdown-menu a { color: var(--text-2); }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); }

/* ---------- home ---------- */
.cd-hero { color: var(--text); background: var(--hero-glow), linear-gradient(180deg, #fffaf3, #f7ecdf 70%, transparent); perspective: 1400px; isolation: isolate; }
.cd-hero h1 { color: var(--text); }
.cd-hero h1 em { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-lead { color: var(--text-2); }
/* glass orbs: soft 3D spheres of caramel glass, lit from the top left */
.cd-hero::before, .cd-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95), rgba(240, 215, 180, .7) 18%, rgba(196, 149, 99, .6) 42%, rgba(122, 75, 36, .55) 70%, rgba(80, 50, 20, .15) 100%);
  box-shadow: inset -12px -16px 40px rgba(90, 55, 25, .35), 0 30px 60px -20px rgba(138, 90, 43, .4); }
.cd-hero::before { width: 120px; height: 120px; right: 4%; bottom: 10%; animation: cdFloat 9s ease-in-out infinite; }
.cd-hero::after { width: 54px; height: 54px; left: 46%; top: 12%; animation: cdFloat 7s ease-in-out -2s infinite; }
@keyframes cdFloat { 50% { transform: translateY(-14px); } }

/* the score report: a 3D card that leans back, with a thick lit edge */
.cd-report { color: var(--text); transform: rotateY(-16deg) rotateX(8deg) rotateZ(-2deg); transform-style: preserve-3d;
  background: linear-gradient(160deg, #fff, #fbf4ea);
  border: 1px solid #e6d6c1;
  box-shadow: inset 0 1px 0 #fff, 1px 1px 0 #eadbc8, 2px 2px 0 #e3d1bb, 3px 3px 0 #dcc7ae, 4px 4px 0 #d4bda1, 5px 5px 0 #cdb395, 6px 6px 0 #c5a988,
    30px 50px 80px -20px rgba(90, 55, 25, .35), 0 0 80px -20px rgba(196, 149, 99, .45); transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.cd-report:hover { transform: rotateY(-8deg) rotateX(4deg) rotateZ(-1deg); }
.cd-report-top, .cd-report-meta small, .cd-report-rows .cd-mono, .cd-report-foot { color: var(--muted); }
.cd-report-foot { border-top-color: rgba(120, 80, 40, .15); }
.cd-report-foot small { color: var(--text-2); }
.cd-report-foot strong { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 18px rgba(138, 90, 43, .3)); }
.cd-band { background: rgba(196, 149, 99, .18); color: #6e4420; box-shadow: inset 0 0 0 1px rgba(138, 90, 43, .22); }
.cd-chip { background: rgba(196, 149, 99, .18); color: #6e4420; }
.cd-chip-solid { background: var(--grad-primary); color: #fff; }
.cd-eyebrow { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; width: max-content; max-width: 100%; }
.cd-head-center .cd-eyebrow { margin-inline: auto; }

.cd-tab { color: var(--text); background: linear-gradient(180deg, #fff, #f6eee3); border-color: var(--border); box-shadow: var(--bevel), 0 4px 0 #e2d2bd; }
.cd-tab:hover { border-color: var(--border-strong); }
.cd-tab.on { color: #fff; background: linear-gradient(180deg, #bd8752, #9a6535 50%, #7a4b24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 0 #5e3a1c, 0 22px 40px -16px rgba(122, 75, 36, .6); transform: translateY(-2px); }
.cd-panel, .cd-bigcard { background: radial-gradient(70% 90% at 100% 0%, rgba(214, 176, 132, .2), transparent 60%), linear-gradient(180deg, #fff, #fffaf4); }
.cd-panel-visual, .cd-bigcard-visual { perspective: 1400px; }
.cd-panel-visual .lp-window, .cd-bigcard-visual .lp-window { transform: rotateY(-10deg) rotateX(4deg); transition: transform .8s cubic-bezier(.2, .7, .2, 1);
  box-shadow: 30px 40px 70px -30px rgba(90, 55, 25, .35), 0 0 70px -30px rgba(196, 149, 99, .5); }
.cd-panel:hover .lp-window, .cd-bigcard:hover .lp-window { transform: rotateY(-3deg) rotateX(1deg); }
.cd-checks svg { color: #6e4420; background: linear-gradient(180deg, rgba(214, 176, 132, .45), rgba(214, 176, 132, .2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
/* brown bands with white text */
.cd-plan-pro { background: radial-gradient(80% 60% at 100% 0%, rgba(232, 200, 160, .35), transparent 70%), var(--grad-brown);
  border: 1px solid rgba(138, 90, 43, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 50px 90px -40px rgba(90, 55, 25, .55); }
.cd-plan-pro .cd-checks svg { color: #fff3e3; background: rgba(255, 255, 255, .16); }
.cd-faq details { border-color: var(--border-strong); }
.cd-faq-ic { background: var(--surface-3); }
.cd-faq-ic::before, .cd-faq-ic::after { background: var(--text); }
.cd-faq details[open] .cd-faq-ic { background: var(--grad-primary); }
.cd-faq details[open] .cd-faq-ic::before, .cd-faq details[open] .cd-faq-ic::after { background: #fff; }
.cd-final { background: radial-gradient(60% 90% at 100% 100%, rgba(232, 200, 160, .38), transparent 70%), var(--grad-brown);
  border: 1px solid rgba(138, 90, 43, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 80px -40px rgba(90, 55, 25, .5); }

/* ---------- inner pages ---------- */
.pf-banner { background: radial-gradient(55% 90% at 100% 0%, rgba(232, 200, 160, .4), transparent 70%), var(--grad-brown);
  border: 1px solid rgba(138, 90, 43, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 30px 60px -36px rgba(90, 55, 25, .5); }
.pf-progress u { background: var(--grad-accent); }
.pf-pick { color: #fff; }
.tc-tile { background: radial-gradient(90% 70% at 30% 0%, rgba(255, 255, 255, .3), transparent 55%), linear-gradient(160deg, #c08a57, #9a6535 45%, #6b4220);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(60, 30, 10, .25), 0 4px 0 #4f3018, 0 16px 30px -12px rgba(122, 75, 36, .5); }
.tc-kicker { color: #8a5a2b; }
.tc-parts li::before { color: #6e4420; background: rgba(196, 149, 99, .22); }
.tc-locked .tc-tile { background: linear-gradient(160deg, #cdbba6, #a8927c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 #8c7763; }
.tc-locked .tc-plans { color: #7a4b12; background: #fdf1dc; box-shadow: inset 0 0 0 1px rgba(183, 121, 31, .4); }
.tc-locked:hover .tc-plans { color: #7a4b12; background: #fbe8c6; }
.pm-hero { background: radial-gradient(60% 80% at 100% 0%, rgba(232, 200, 160, .45), transparent 70%), radial-gradient(40% 60% at 0% 100%, rgba(255, 214, 150, .18), transparent 70%), var(--grad-brown); border: 1px solid rgba(138, 90, 43, .25); }
.pm-plan-pro { background: radial-gradient(80% 60% at 100% 0%, rgba(232, 200, 160, .35), transparent 70%), var(--grad-brown); }
.pm-strip { background: #fdf1dc; border-color: rgba(183, 121, 31, .35); color: #7a4b12; }
.footer { border-top-color: var(--border); }
.footer a { color: var(--muted); }
.footer img { content: url("../assets/logo.png"); }

@media (max-width: 960px) { .cd-report { transform: rotateY(-8deg) rotateX(6deg) rotateZ(-1deg); } .cd-hero::after { display: none; } }
@media (max-width: 560px) { .cd-panel-visual .lp-window, .cd-bigcard-visual .lp-window { transform: none; } .cd-hero::before { width: 70px; height: 70px; bottom: 4%; } }
@media (prefers-reduced-motion: reduce) { .cd-hero::before, .cd-hero::after { animation: none; } }

/* ---------- older components that had light colours built in ---------- */
:root { --c-speaking: #8e5b7a; --c-writing: #4e7d5b; --c-listening: #b85c38; --c-grammar: #b7791f; --grad-focus: var(--grad-accent); }
.brand-logo, .footer img { filter: grayscale(1) sepia(1) saturate(1.9) hue-rotate(-8deg) brightness(.78); }
.page-head { border-color: var(--border); background: radial-gradient(440px 200px at 100% 0%, rgba(160, 106, 58, .22), transparent 70%), radial-gradient(320px 160px at 0% 100%, rgba(176, 122, 71, .1), transparent 70%), var(--surface); box-shadow: var(--card-shadow); }
.prose, .essay { color: var(--text); }
.eyebrow, .float-chip.card-chip { background: var(--surface-2); color: var(--text); }
.test-bar, .test-footer, .cdi-topbar { background: color-mix(in srgb, var(--surface) 94%, transparent); border-color: var(--border); }
.player .play { background: var(--surface-3); color: var(--text); }
.lp-section-card .icon-tile { background: var(--surface-2); }
.lp-mark.ok { background: rgba(16, 185, 129, .14); color: #6ee7b7; }
.cue-card { border-color: rgba(196, 149, 99, .45); }
.cdi-fix { background: var(--surface-2); }
@media print { body { background: #fff; color: #000; } }

/* Premium price under the heading */
.pm-hero > p.pm-price { margin: 18px auto 0; color: rgba(255, 255, 255, .7); font-size: 1.05rem; }
.pm-price b { font: 700 2.6rem/1 var(--font-display); letter-spacing: -.035em; background: linear-gradient(100deg, #fde68a, #fbbf24, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pm-price span { color: rgba(255, 255, 255, .55); }

/* "NEW" mark on a menu item (js/app.js, NAV isNew): a small red tag above the link's top-right corner. */
.nav a.has-new { position: relative; }
.nav-new { position: absolute; top: -9px; right: -14px; padding: 1px 5px; border-radius: 99px; background: #dc2626; color: #fff; font-size: .58rem; font-weight: 800; letter-spacing: .04em; line-height: 1.4; pointer-events: none; }
.nav-new.nav-new-inline { position: static; display: inline-block; margin-left: 8px; vertical-align: middle; font-size: .62rem; }
/* With the Extra mock item the menu is tighter: below 1520px the links sit a little closer (Home is hidden there too). */
@media (max-width: 1520px) { .nav a, .nav button.nav-link { padding-left: 8px; padding-right: 8px; } }
