/* TN Trade Exams — "Volunteer" brand (Tennessee-local, premium, sharp).
   Tennessee Orange used with restraint (one strong moment per view); cool slate
   for structure/trust; warm-white + charcoal carry the rest. Space Grotesk /
   Inter / JetBrains Mono. Real type scale, soft depth + hairline borders + mono
   accents. WCAG-AA verified. Light + dark. Var NAMES preserved for app.js. */

:root {
  /* ---- Brand — Tennessee Orange, used with intent (one strong moment/view) ---- */
  --brand: #FF8200;          /* Pantone 151 — CTA fills, active bars, logo, demo highlight */
  --brand-strong: #E36F00;   /* hover / pressed CTA */
  --brand-ink: #B85C00;      /* the ONLY orange for large/bold link/label text on white */
  --on-brand: #1F2430;       /* charcoal text ON orange (white-on-orange fails AA) */
  --brand-soft: #FFF1E2;     /* warm orange wash for chips / highlights */

  /* ---- Structure — cool slate (trust) ---- */
  --slate: #2E4A63;
  --slate-soft: #EAF0F5;

  /* ---- 60% warm-neutral canvas ---- */
  --paper: #FAF6F1;          /* warm-paper page ground */
  --surface: #FFFFFF;        /* cards */
  --surface-2: #F3EDE4;      /* warm tint blocks */
  --ink: #22242A;            /* body text (~14:1) */
  --muted: #5A5C60;          /* secondary text (~6:1, AA) */
  --faint: #86868C;          /* tertiary */
  --line: #E7E3DD;           /* warm hairline */
  --line-strong: #D7D0C6;

  /* structural accent (links, eyebrows, active tabs) = slate — AA-safe on white */
  --accent: #2E4A63;
  --accent-soft: #EAF0F5;
  --accent-ink: #FFFFFF;     /* text on a saturated slate chip */

  /* the app's CTA/"primary" family -> brand orange (fills only; text = --on-brand) */
  --green: #FF8200;          /* progress fills + brand accent (non-text) */
  --green-deep: #FF8200;     /* primary button fill */

  /* quiz semantics — distinct from brand so they stay legible */
  --ok: #2E8B6F;   --ok-soft: #E4F2EC;
  --bad: #C0453B;  --bad-soft: #F8E8E6;
  --warn: #9A6410; --warn-soft: #F6ECD6;   /* beta / time-warning */
  --flag: #2E4A63; --flag-soft: #EAF0F5;   /* flagged-for-review (kept off brand) */

  --shadow: 0 1px 2px rgba(31, 36, 48, .05), 0 6px 20px rgba(31, 36, 48, .06);
  --shadow-sm: 0 1px 2px rgba(31, 36, 48, .06);
  --shadow-lg: 0 14px 38px rgba(31, 36, 48, .13);
  --ring: 0 0 0 3px rgba(255, 130, 0, .35);

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2.15rem;
  --fs-3xl: clamp(2.6rem, 5.2vw, 3.4rem);

  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --maxw: 880px;
}

:root[data-theme="dark"] {
  --paper: #16181C;
  --surface: #1E2126;
  --surface-2: #24272D;
  --ink: #EDEEF0;
  --muted: #A7ABB2;
  --faint: #82868D;
  --line: #2C2F35;
  --line-strong: #3A3E45;

  --slate-soft: #223648;
  --brand-soft: #2A2016;
  --brand-ink: #FF9A33;      /* orange text usable on charcoal */

  --accent: #7EA8CE;         /* light slate for links on charcoal */
  --accent-soft: #223648;
  --accent-ink: #16181C;

  --green: #FF8200;          /* brand stays #FF8200 — pops on charcoal (the premium look) */
  --green-deep: #FF8200;

  --ok: #57BE97;   --ok-soft: #16291F;
  --bad: #E5847A;  --bad-soft: #2E1E1C;
  --warn: #D9B45F; --warn-soft: #2C2718;
  --flag: #7EA8CE; --flag-soft: #223648;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 42px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(255, 130, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--ink);
}
a { color: var(--accent); }
button { font-family: inherit; }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding-block: 13px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; text-decoration: none; }
.brand .logo { flex: none; display: block; }
.brand .brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand .mark {
  font-family: var(--display); font-size: var(--fs-lg); font-weight: 700;
  color: var(--ink); letter-spacing: -.02em; line-height: 1;
}
.brand .sub {
  font-size: var(--fs-xs); color: var(--muted); letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600;
}
.header-tools { display: flex; align-items: center; gap: 12px; }

main { padding-block: 30px 60px; }
.view { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- Buttons / controls ---- */
.btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); padding: 10px 17px; border-radius: var(--radius-sm); font-size: var(--fs-sm);
  cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s, transform .04s;
  font-weight: 600; letter-spacing: .01em;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(31,36,48,.12), 0 6px 18px rgba(255,130,0,.28); font-weight: 700;
}
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); filter: none; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: var(--fs-xs); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line-strong); }
.icon-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  width: 38px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-base);
  transition: border-color .12s, color .12s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

select, input[type="text"] {
  font-family: inherit; font-size: var(--fs-sm); padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
select:focus-visible, input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--muted); cursor: pointer; font-weight: 600; }
.switch input { accent-color: var(--green-deep); width: 15px; height: 15px; }

/* ---- Cards ---- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.mode-card {
  display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; width: 100%;
  position: relative; transition: border-color .14s, box-shadow .14s, transform .06s;
}
.mode-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(52, 97, 142, .12); }
.mode-card:active { transform: translateY(1px); }
.mode-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-card .num {
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent); letter-spacing: .12em;
  font-weight: 700;
}
.mode-card h3 { font-size: var(--fs-lg); margin: 0; }
.mode-card p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }

.lede { color: var(--muted); font-size: var(--fs-lg); max-width: 60ch; line-height: 1.55; }
.lede b { color: var(--ink); }
.eyebrow { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--muted); background: var(--surface-2); font-weight: 600;
}
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.badge.beta { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Question card ---- */
.q-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.q-cat { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.q-text { font-size: var(--fs-lg); margin: 0 0 18px; font-family: var(--display); font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); cursor: pointer; font-size: var(--fs-base); color: var(--ink);
  transition: border-color .1s, background .1s, box-shadow .1s;
}
.choice:hover:not(:disabled) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .key {
  flex: none; width: 27px; height: 27px; border-radius: 7px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted);
  font-family: var(--mono); transition: background .1s, color .1s, border-color .1s;
}
.choice.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice.selected .key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice.correct { border-color: var(--ok); background: var(--ok-soft); }
.choice.correct .key { background: var(--ok); color: var(--accent-ink); border-color: var(--ok); }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.wrong .key { background: var(--bad); color: var(--accent-ink); border-color: var(--bad); }
.choice:disabled { cursor: default; }

/* ---- Feedback ---- */
.feedback { margin-top: 18px; border-radius: 10px; padding: 15px 17px; border: 1px solid var(--line); background: var(--surface-2); }
.feedback.good { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.feedback.bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); }
.feedback .verdict { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feedback.good .verdict { color: var(--ok); }
.feedback.bad .verdict { color: var(--bad); }
.feedback .exp { font-size: var(--fs-sm); line-height: 1.6; }
.feedback .coach {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line-strong);
  font-size: var(--fs-sm); color: var(--muted);
}
.feedback .coach b { color: var(--ink); }
.ref-tag {
  font-family: var(--mono); font-size: var(--fs-xs); background: var(--accent-soft);
  color: var(--accent); padding: 2px 8px; border-radius: 6px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ---- Progress + toolbar ---- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { margin-left: auto; }
.progressline { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 4px 0 20px; }
.progressline > span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .25s; }
.count { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }

.timer {
  font-family: var(--mono); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--ink);
}
.timer.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.timer.danger { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }

/* ---- Navigator grid (sim two-pass) ---- */
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px; margin: 6px 0 4px; }
.navcell {
  aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface);
  font-size: var(--fs-xs); cursor: pointer; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600;
  transition: border-color .1s, background .1s;
}
.navcell:hover { border-color: var(--accent); }
.navcell.answered { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.navcell.flagged { border-color: var(--warn); box-shadow: inset 0 0 0 2px var(--warn-soft); color: var(--warn); }
.navcell.current { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--line-strong); }

/* ---- Mastery map ---- */
.mastery-row { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.mastery-row .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--fs-sm); font-weight: 600; }
.mastery-row .top .acc { font-variant-numeric: tabular-nums; font-weight: 700; }
.bar { height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.bar > span.hi { background: var(--ok); }
.bar > span.mid { background: var(--warn); }
.bar > span.lo { background: var(--bad); }
.bar > span.none { background: var(--faint); }

/* ---- Result / report ---- */
.result-hero { text-align: center; padding: 30px 20px; }
.result-hero .score { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; margin: 6px 0; letter-spacing: -.02em; }
.result-hero .score.pass { color: var(--ok); }
.result-hero .score.fail { color: var(--bad); }
.result-hero .verdict-word { font-size: var(--fs-lg); font-weight: 700; letter-spacing: .02em; }
table.report { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.report th, table.report td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.report th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
table.report td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.report tr.miss td:first-child { border-left: 3px solid var(--bad); }
.wrapper-scroll { overflow-x: auto; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 2px; }
.section-title h3 { font-size: var(--fs-lg); }
.hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: var(--fs-sm); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 44px; }
.site-footer .wrap { padding-block: 24px 32px; }
.disclaimer { font-size: var(--fs-xs); color: var(--faint); line-height: 1.65; max-width: 78ch; }
.disclaimer b { color: var(--muted); }

.back-link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); padding: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.back-link:hover { color: var(--accent); }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .brand .sub { display: none; }
  .q-text { font-size: var(--fs-base); }
  main { padding-block: 22px 40px; }
}

/* ============================================================================
   MARKETING SITE  — added for the product/marketing pages.
   Reuses the "Focus" tokens above; does not alter the practice-app rules.
   ========================================================================== */

/* wider canvas for marketing layouts (practice app keeps --maxw) */
:root { --maxw-wide: 1080px; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 20px; }

/* ---- Header logo image ---- */
.brand .logo-img { height: 34px; width: auto; display: block; flex: none; }

/* ---- Primary nav ---- */
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  text-decoration: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-sm); letter-spacing: -.005em;
  transition: color .12s, background .12s;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a.active { color: var(--accent); background: var(--accent-soft); }
.site-nav a.nav-cta {
  color: var(--on-brand); background: var(--brand); margin-left: 6px; font-weight: 700;
  box-shadow: 0 1px 2px rgba(31,36,48,.12), 0 4px 12px rgba(255,130,0,.26);
}
.site-nav a.nav-cta:hover { color: var(--on-brand); background: var(--brand-strong); filter: none; }
.nav-toggle {
  display: none; appearance: none; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); width: 40px; height: 36px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 1.1rem; line-height: 1;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Section rhythm for marketing pages ---- */
.section { padding-block: 46px; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section.tint { background: var(--surface); }
.section.tint-accent { background: var(--accent-soft); }
.section-head { max-width: 62ch; margin-bottom: 26px; }
.section-head h2 { font-size: var(--fs-2xl); margin: .1em 0 .3em; }
.section-head p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; margin: 0; }
.prose { max-width: 68ch; }
.prose p { color: var(--ink); line-height: 1.7; margin: 0 0 16px; }
.prose p.muted, p.muted { color: var(--muted); }
.prose h3 { font-size: var(--fs-lg); margin: 28px 0 8px; }
.prose ul { margin: 0 0 16px; padding-left: 1.15em; }
.prose li { margin: 6px 0; line-height: 1.6; }

/* ---- Hero ---- */
.hero { padding-block: 60px 40px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.hero h1 { font-size: var(--fs-3xl); line-height: 1.05; letter-spacing: -.025em; margin: 20px 0 16px; max-width: 15ch; }
.hero h1 .hl {
  color: var(--brand-ink);
  background: linear-gradient(var(--brand), var(--brand)) left bottom / 100% .1em no-repeat;
  padding-bottom: .04em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
:root[data-theme="dark"] .hero h1 .hl { color: var(--brand-ink); background-image: linear-gradient(var(--brand), var(--brand)); }
.hero .sub { font-size: var(--fs-lg); color: var(--muted); line-height: 1.55; max-width: 54ch; margin: 0 0 26px; }
.hero .sub b { color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn.lg { padding: 13px 24px; font-size: var(--fs-base); }
.btn.link-arrow { border: 0; background: none; color: var(--accent); padding: 13px 6px; }
.btn.link-arrow:hover { text-decoration: underline; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }

.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.trust-row .stat { display: flex; flex-direction: column; gap: 2px; }
.trust-row .stat .n { font-family: var(--display); font-weight: 800; font-size: var(--fs-xl); color: var(--ink); letter-spacing: -.02em; line-height: 1; }
.trust-row .stat .l { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.trust-row .stat + .stat { border-left: 1px solid var(--line); padding-left: 22px; }

/* ---- Feature grid ---- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature .ficon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.feature .ficon svg { width: 22px; height: 22px; }
.feature h3 { font-size: var(--fs-base); margin: 0 0 6px; }
.feature p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }

/* ---- Compare (vs multi-state) ---- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare .col { border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.compare .col.them { background: var(--surface-2); }
.compare .col.us { background: var(--surface); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); box-shadow: var(--shadow); }
.compare .col h3 { font-size: var(--fs-base); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.compare ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.compare li { display: flex; gap: 10px; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink); }
.compare li .m { flex: none; font-weight: 700; }
.compare .them li .m { color: var(--faint); }
.compare .us li .m { color: var(--ok); }

/* ---- Steps / checklist ---- */
.steps { display: flex; flex-direction: column; gap: 14px; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.step .n {
  counter-increment: step; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: var(--fs-base);
}
.step .n::before { content: counter(step); }
.step h3 { font-size: var(--fs-lg); margin: 0 0 5px; }
.step p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-base); line-height: 1.5; }
.checklist li .ck {
  flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--ok-soft); color: var(--ok);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.checklist li b { color: var(--ink); }

/* ---- Callout / note boxes ---- */
.note {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0; box-shadow: var(--shadow-sm);
}
.note.warn { border-left-color: var(--warn); }
.note.caution { border-left-color: var(--bad); }
.note.tip { border-left-color: var(--green-deep); }
.note h4 { margin: 0 0 6px; font-size: var(--fs-sm); font-family: var(--display); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.note p { margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink); }
.note p + p { margin-top: 8px; }

/* ---- Fact table ---- */
.fact-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact-table th, .fact-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }
.fact-table th { width: 38%; font-weight: 700; color: var(--ink); background: var(--surface-2); font-size: var(--fs-sm); }
.fact-table td b { color: var(--ink); }

/* ---- Chip cloud (jurisdictions) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.chip { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 12px; }

/* ---- Pricing ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--green-deep); box-shadow: 0 6px 22px rgba(52,97,142,.14); }
.price-card .ribbon { position: absolute; top: -11px; left: 24px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--on-brand); background: var(--brand); padding: 4px 12px; border-radius: 999px; box-shadow: 0 3px 10px rgba(255,130,0,.3); }
.price-card .tier { font-family: var(--display); font-weight: 700; font-size: var(--fs-lg); margin: 0; }
.price-card .tier-sub { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 16px; min-height: 2.6em; }
.price-card .price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.price-card .price .amt { font-family: var(--display); font-weight: 800; font-size: 2.4rem; letter-spacing: -.02em; color: var(--ink); }
.price-card .price .per { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.price-card .price-note { font-size: var(--fs-xs); color: var(--faint); margin: 0 0 18px; }
.price-card ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-card ul li { display: flex; gap: 10px; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink); }
.price-card ul li .ck { color: var(--ok); font-weight: 800; flex: none; }
.price-card ul li.off { color: var(--faint); }
.price-card ul li.off .ck { color: var(--faint); }
.price-card .btn { margin-top: auto; width: 100%; justify-content: center; }
.editable {
  background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn);
  padding: 0 6px; border-radius: 5px; font-weight: 800; font-family: var(--display);
}

/* ---- Big CTA band ---- */
/* CTA band — fixed dark slate in BOTH themes, with the orange primary as the
   one strong brand moment for the view. */
.cta-band { position: relative; overflow: hidden; background: var(--slate); color: #fff; border-radius: var(--radius-lg); padding: 44px 34px; text-align: center; }
.cta-band::after { content: ""; position: absolute; right: -8%; top: -40%; width: 30rem; height: 30rem; background: radial-gradient(closest-side, rgba(255,130,0,.28), rgba(255,130,0,0) 70%); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); margin: 0 0 10px; }
.cta-band p { color: rgba(255,255,255,.86); font-size: var(--fs-lg); margin: 0 auto 22px; max-width: 46ch; }
.cta-band .btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.cta-band .btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); filter: none; }
.cta-band .btn.ghost { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.cta-band .btn.ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.14); }

/* ---- Page hero (interior pages) ---- */
.page-hero { padding-block: 44px 10px; }
.page-hero .eyebrow { margin-bottom: 8px; }
.page-hero h1 { font-size: var(--fs-2xl); margin: 0 0 12px; max-width: 20ch; }
.page-hero .lede { max-width: 60ch; }

/* ---- Footer nav ---- */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 26px; }
.footer-brand .mark { font-family: var(--display); font-weight: 700; font-size: var(--fs-lg); color: var(--ink); }
.footer-brand p { font-size: var(--fs-sm); color: var(--muted); margin: 8px 0 0; max-width: 34ch; line-height: 1.6; }
.footer-col h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 12px; font-weight: 700; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: var(--fs-sm); padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }

/* ---- Practice-page beta toggle row ---- */
.practice-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .feature-grid, .price-grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 2px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 20px 16px;
    box-shadow: var(--shadow); display: none;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: 11px 12px; }
  .site-nav a.nav-cta { margin-left: 0; margin-top: 4px; text-align: center; }
  .nav-toggle { display: block; }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trust-row .stat + .stat { border-left: 0; padding-left: 0; }
  .hero { padding-block: 40px 30px; }
}

/* ============================================================================
   "VOLUNTEER" UPGRADE — global polish, card-lift, mono accents, and the
   feature-rich data components (plan-board, heatmap, rings, streak, locator).
   Added components only; app.js class hooks untouched.
   ========================================================================== */

/* ---- Global focus ring (brand) + reduced-motion guard ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ---- Heading sharpness (Space Grotesk) ---- */
h1, h2, h3 { letter-spacing: -.02em; }
.section-head h2 { letter-spacing: -.025em; }

/* ---- Card-lift hover (MASTER pattern) ---- */
.feature, .price-card, .step { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature:hover, .price-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
}
.feature .ficon { transition: transform .18s ease, background .18s ease, color .18s ease; }
.feature:hover .ficon { transform: scale(1.06); }
.price-card.featured { border-color: var(--brand); box-shadow: 0 10px 30px rgba(255,130,0,.16); }
.price-card.featured:hover { box-shadow: 0 18px 44px rgba(255,130,0,.22); }

/* ---- Eyebrow with orange node ---- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .eb-dot, .eb-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); flex: none;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---- Hero warm ground + brand kicker dot ---- */
.hero { position: relative; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 42rem; height: 42rem;
  background: radial-gradient(closest-side, rgba(255,130,0,.14), rgba(255,130,0,0) 70%);
  pointer-events: none; z-index: 0;
}
.hero .wrap-wide { position: relative; z-index: 1; }
.hero .kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}
.trust-row .stat .n { font-size: var(--fs-xl); }

/* ---- Header brand: inline SVG mark + Space Grotesk wordmark ---- */
.brand .logo-svg { height: 38px; width: auto; display: block; flex: none; }
.brand .logo-svg .lg-state { fill: var(--ink); transition: fill .15s ease; }
.brand .logo-svg .lg-check { stroke: var(--brand); }
.brand .mark { letter-spacing: -.03em; font-weight: 700; }
.brand:hover .logo-svg .lg-state { fill: var(--slate); }
:root[data-theme="dark"] .brand:hover .logo-svg .lg-state { fill: var(--muted); }

/* ---- Mono citation / source chips ---- */
.nec-chip {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; color: var(--slate);
  background: var(--slate-soft); border: 1px solid color-mix(in srgb, var(--slate) 22%, transparent);
  border-radius: 6px; padding: 2px 8px; letter-spacing: .01em; white-space: nowrap;
}
:root[data-theme="dark"] .nec-chip { color: var(--accent); }
.chip-mono {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

/* ============================ SIGNATURE PLAN-BOARD ========================= */
.planboard-section { background: var(--surface); }
.planboard {
  margin-top: 30px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
  position: relative;
}
.pb-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 6px 16px; flex-wrap: wrap;
}
.pb-range { font-family: var(--mono); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); letter-spacing: .01em; }
.pb-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-sm); }
.pb-meta .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pb-meta #pbHours { color: var(--brand-ink); font-weight: 600; }
.dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.pb-weak {
  display: none; align-items: center; gap: 7px; font-family: var(--mono); font-size: var(--fs-xs);
  font-weight: 600; color: var(--on-brand); background: var(--brand); padding: 3px 10px; border-radius: 999px;
  letter-spacing: .02em; box-shadow: 0 3px 10px rgba(255,130,0,.3);
}
.pb-weak.show { display: inline-flex; }
.pb-weak svg { width: 13px; height: 13px; }

.pb-week {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); gap: 12px;
  overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin;
}
.pb-day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 220px;
}
.pb-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 2px 2px 4px; border-bottom: 1px dashed var(--line); }
.pb-day-name { font-family: var(--display); font-weight: 700; font-size: var(--fs-sm); color: var(--ink); letter-spacing: -.01em; }
.pb-day-sum { font-family: var(--mono); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-card {
  background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--slate);
  border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm); cursor: default; will-change: transform;
}
.pb-card[data-type="locator"] { border-left-color: var(--brand); }
.pb-card[data-type="practice"] { border-left-color: var(--slate); }
.pb-card[data-type="lesson"] { border-left-color: #6b7a52; }
.pb-card[data-type="review"] { border-left-color: var(--bad); }
.pb-card[data-type="sim"] { border-left-color: #7a5cff; }
.pb-card.injected { border-left-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow-sm); }
.pb-src { font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; line-height: 1.2; }
.pb-title { font-size: .82rem; line-height: 1.3; color: var(--ink); font-weight: 500; }
.pb-dur {
  align-self: flex-start; font-family: var(--mono); font-size: .68rem; font-weight: 600;
  color: var(--slate); background: var(--slate-soft); border-radius: 999px; padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .pb-dur { color: var(--accent); }
.pb-caption { margin: 14px 6px 2px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; max-width: 66ch; }
.pb-caption b { color: var(--ink); }
.pb-tally { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 6px 2px; }
.tally-chip {
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.tally-chip b { color: var(--ink); font-family: var(--mono); }
.pb-scrollhint { display: none; }
@media (max-width: 720px) { .pb-scrollhint { display: block; font-size: var(--fs-xs); color: var(--faint); margin: 6px 2px 0; } }

/* ============================ WORKBENCH DATA GRID ========================= */
.workbench { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.wb-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
}
.wb-heat { grid-column: span 7; }
.wb-rings { grid-column: span 5; }
.wb-locator { grid-column: span 7; }
.wb-streak { grid-column: span 5; }
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wb-head h3 { font-size: var(--fs-base); margin: 0; }
.wb-head .chip-mono { flex: none; }

/* mastery heatmap */
.heatmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.hm-cell {
  border-radius: 10px; padding: 11px 10px 9px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; min-height: 72px; justify-content: space-between;
}
/* Heatmap tiles keep a fixed warm-light ground in BOTH themes (a data panel),
   so a single dark text color stays legible across every orange intensity. */
.hm-cell .hm-dom { font-size: .68rem; font-weight: 600; line-height: 1.2; color: #3A2A12; }
.hm-cell .hm-pct { font-family: var(--mono); font-size: .78rem; font-weight: 700; color: #241708; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .hm-cell { border-color: rgba(255,255,255,.08); }
.hm-legend { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--muted); }
.hm-scale { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--brand)); border: 1px solid var(--line); }

/* progress rings */
.rings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring .ring-track { fill: none; stroke: var(--line); stroke-width: 9; }
.ring .ring-arc { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; }
.ring .ring-val { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.ring .ring-lbl { font-size: var(--fs-xs); color: var(--muted); line-height: 1.3; }
.ring-cx { position: relative; }
.ring-cx .ring-num {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display);
  font-weight: 700; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums;
}

/* code-locator mini demo */
.locator { display: flex; flex-direction: column; gap: 12px; }
.loc-prompt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-prompt .lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.loc-clock {
  font-family: var(--mono); font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink); line-height: 1; letter-spacing: -.01em;
}
.loc-clock.running { color: var(--brand-ink); }
:root[data-theme="dark"] .loc-clock.running { color: var(--brand); }
.loc-result { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.loc-result .ok-tick { width: 20px; height: 20px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.loc-result .ok-tick svg { width: 12px; height: 12px; }
.loc-bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.loc-bar > span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .2s linear; }

/* streak */
.streak-top { display: flex; align-items: center; gap: 12px; }
.streak-flame { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; flex: none; }
.streak-flame svg { width: 22px; height: 22px; color: var(--brand); }
.streak-n { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--ink); }
.streak-n small { display: block; font-family: var(--sans); font-weight: 500; font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.streak-dots { display: flex; gap: 7px; }
.streak-dots .sd {
  flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: var(--faint); font-family: var(--mono);
}
.streak-dots .sd.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.streak-dots .sd.today { box-shadow: var(--ring); }

/* ---- Section-band variant: warm ---- */
.section.warm { background: var(--surface-2); }

/* ---- Responsive: workbench + plan-board ---- */
@media (max-width: 860px) {
  .workbench { grid-template-columns: 1fr; }
  .wb-heat, .wb-rings, .wb-locator, .wb-streak { grid-column: auto; }
  .heatmap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .heatmap { grid-template-columns: repeat(2, 1fr); }
  .rings { grid-template-columns: 1fr 1fr; }
  .loc-clock { font-size: 2rem; }
}

/* ============================================================================
   POLISH PASS (v7) — integrated logo lockup, faint TN hero backdrop, one shared
   content gutter, and an interior-page content+rail layout that fills the width.
   Added/overriding rules only; app.js class hooks + CSS var NAMES untouched.
   ========================================================================== */

/* ---- Logo: bigger orange TN mark + custom wordmark (one integrated unit) ---- */
.brand { gap: 13px; align-items: center; }
.brand-mark {
  flex: none; width: 54px; height: 48px; border-radius: 14px;
  background: #1F2430; display: grid; place-items: center;
  box-shadow: 0 2px 7px rgba(31, 36, 48, .20), inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.brand-mark .logo-svg { width: 42px; height: auto; color: var(--brand); display: block; }
:root[data-theme="dark"] .brand-mark { background: #23272F; box-shadow: 0 2px 7px rgba(0,0,0,.5), inset 0 0 0 1px var(--line); }
.brand:hover .brand-mark { box-shadow: 0 3px 12px rgba(255, 130, 0, .30), inset 0 0 0 1px rgba(255,255,255,.05); }
.brand-mark, .brand-mark .logo-svg { transition: box-shadow .16s ease; }

.brand .brand-text { gap: 3px; }
.brand .mark {
  font-family: var(--display); font-size: 1.34rem; font-weight: 700;
  letter-spacing: -.03em; line-height: 1; color: var(--ink);
}
.brand .wm-tn { color: var(--brand-ink); }
:root[data-theme="dark"] .brand .wm-tn { color: var(--brand); }
.brand .sub {
  font-size: .60rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
/* footer wordmark echoes the orange TN */
.footer-brand .wm-tn { color: var(--brand-ink); }
:root[data-theme="dark"] .footer-brand .wm-tn { color: var(--brand); }

@media (max-width: 560px) {
  .brand-mark { width: 46px; height: 42px; border-radius: 12px; }
  .brand-mark .logo-svg { width: 36px; }
  .brand .mark { font-size: 1.18rem; }
}

/* ---- Faint Tennessee silhouette behind the hero (right side, brand backdrop) ---- */
.hero-tn {
  position: absolute; right: -2%; top: 53%; transform: translateY(-50%);
  width: min(52%, 700px); height: auto; color: var(--brand); opacity: .08;
  z-index: 0; pointer-events: none;
}
:root[data-theme="dark"] .hero-tn { opacity: .10; }
@media (max-width: 860px) {
  .hero-tn { width: 78%; right: -14%; top: auto; bottom: 4%; transform: none; opacity: .06; }
}

/* ============================================================================
   INTERIOR PAGE SHELL — main content column + sticky right rail. Kills the dead
   right-side whitespace; every interior page shares the header/footer left edge.
   ========================================================================== */
.page-wrap { padding-block: 6px 8px; }
.page-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 46px; align-items: start;
}
.page-main { min-width: 0; }

.page-main .page-hero { padding-block: 34px 4px; }
.page-main .page-hero h1 { max-width: 22ch; }
.page-main .doc-sec { padding-block: 30px; border-top: 1px solid var(--line); }
.page-main .doc-sec:first-of-type { border-top: 0; padding-top: 10px; }
.page-main .doc-sec:last-of-type { padding-bottom: 6px; }
.page-main .section-head { margin-bottom: 18px; max-width: 66ch; }
/* let lists/prose fill the (already narrower) main column — no half-empty rows */
.page-main .checklist,
.page-main .prose { max-width: none; }
.page-main .fact-table { max-width: none; }

/* ---- Sticky right rail ---- */
.page-rail {
  position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px;
}
.rail-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.rail-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px;
  font-size: var(--fs-xs); letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.rail-cta { background: var(--slate); border-color: transparent; color: #fff; position: relative; overflow: hidden; }
.rail-cta::after {
  content: ""; position: absolute; right: -30%; top: -60%; width: 16rem; height: 16rem;
  background: radial-gradient(closest-side, rgba(255,130,0,.30), rgba(255,130,0,0) 70%); pointer-events: none;
}
.rail-cta > * { position: relative; z-index: 1; }
.rail-cta .rail-eyebrow { color: rgba(255,255,255,.82); }
.rail-cta .rail-eyebrow .eb-dot { box-shadow: 0 0 0 3px rgba(255,130,0,.35); }
.rail-lede { margin: 0 0 14px; font-size: var(--fs-sm); line-height: 1.5; color: rgba(255,255,255,.86); }
.rail-cta .btn { width: 100%; justify-content: center; }
.rail-cta .btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.rail-cta .btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.rail-cta .btn.ghost { margin-top: 9px; border-color: rgba(255,255,255,.42); color: #fff; background: transparent; }
.rail-cta .btn.ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); color: #fff; }

.rail-title {
  margin: 0 0 8px; font-family: var(--display); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--faint);
}
.rail-links { padding: 16px 10px 12px; }
.rail-links a {
  display: block; text-decoration: none; color: var(--muted); font-size: var(--fs-sm);
  font-weight: 600; padding: 8px 10px; border-radius: var(--radius-sm); line-height: 1.35;
  transition: color .12s, background .12s;
}
.rail-links a:hover { color: var(--ink); background: var(--surface-2); }
.rail-links a[aria-current="page"] {
  color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.rail-links .rail-title { padding-left: 10px; }

.rail-motif {
  border-radius: var(--radius); border: 1px dashed var(--line-strong); padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--surface-2);
}
.rail-tn { width: 78%; height: auto; color: var(--brand); opacity: .5; }
:root[data-theme="dark"] .rail-tn { opacity: .6; }
.rail-motif-label {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

/* ---- Interior shell responsive: rail drops below content, then single column ---- */
@media (max-width: 960px) {
  .page-shell { grid-template-columns: 1fr; gap: 30px; }
  .page-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .page-rail .rail-card { flex: 1 1 260px; }
  .rail-motif { display: none; }
}
@media (max-width: 560px) {
  .page-rail { flex-direction: column; }
  .page-main .page-hero { padding-top: 26px; }
}

/* ============================================================================
   PRACTICE PAGE — shares the wide gutter (aligns with header/footer); the quiz
   views keep a comfortable reading measure, left-aligned to that same gutter.
   ========================================================================== */
.practice-page #app .view > .card { max-width: 900px; }
.practice-page #app .view > .card.result-hero { max-width: 620px; }

/* ==========================================================================
   ACCOUNTS · GATING · DASHBOARD  (magic-link auth + paywall + student data)
   Reuses the existing card / ring / heatmap / plan-board vocabulary.
   ========================================================================== */

/* email inputs pick up the same treatment as text/select */
input[type="email"] {
  font-family: inherit; font-size: var(--fs-sm); padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%;
}
input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- header account state ---- */
.nav-acct { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }
.nav-email { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav a.nav-logout { padding: 6px 10px; font-size: var(--fs-xs); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }

/* ---- login page ---- */
.wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 20px; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 480px; padding: 30px 30px 34px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.auth-form .btn { align-self: flex-start; }
.auth-error { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); border-radius: var(--radius-sm); padding: 10px 14px; font-size: var(--fs-sm); font-weight: 600; margin-top: 14px; }
.dev-link { margin: 18px 0 6px; }

/* ---- paywall / locked modes ---- */
.lock-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 999px; padding: 3px 9px; }
.mode-card.locked { position: relative; }
.mode-card.locked .num { color: var(--faint); }
.mode-card .lock-badge { position: absolute; top: 16px; right: 16px; }
.paywall { border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); background: linear-gradient(180deg, var(--brand-soft), var(--surface)); }
.paywall .pw-eyebrow { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .05em; text-transform: uppercase; color: var(--brand-ink); font-weight: 700; }
.paywall h3 { font-size: var(--fs-lg); margin: 6px 0 6px; }
.paywall .pw-price { font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--ink); letter-spacing: -.02em; }
.paywall ul { list-style: none; margin: 12px 0 18px; padding: 0; display: grid; gap: 8px; }
.paywall ul li { display: flex; gap: 9px; font-size: var(--fs-sm); color: var(--ink); }
.paywall ul li .ck { color: var(--brand); font-weight: 800; }
.free-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.free-note b { color: var(--ink); }

/* ---- dashboard ---- */
.dash-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dash-hero .ring svg { width: 108px; height: 108px; }
.dash-hero .dash-hero-copy { min-width: 220px; flex: 1; }
.dash-lock { text-align: center; max-width: 560px; margin: 0 auto; }
.weak-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.weak-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.weak-row .wr-cat { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); flex: 1; }
.weak-row .wr-ref { font-family: var(--mono); }
.weak-row .wr-miss { font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--bad); font-size: var(--fs-sm); flex: none; }
.weak-row .wr-bar { flex: none; width: 90px; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.weak-row .wr-bar span { display: block; height: 100%; background: var(--bad); }
.dash-resume { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dash-resume .dr-copy { font-size: var(--fs-sm); color: var(--muted); }
.dash-resume .dr-copy b { color: var(--ink); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } .dash-hero .ring svg { width: 92px; height: 92px; } }
.dash-empty { text-align: center; padding: 30px 16px; }

/* ============================================================================
   v9 — DARK-DEFAULT + UNIFIED LOGO LOCKUP ("Keystone"): the boxless orange
   Tennessee state IS the "TN" and leads the wordmark on one shared baseline.
   Also: real flex header row (markup uses .wrap-wide), theme toggle pinned far
   right, and a dark-mode hero refinement. Override block — later source order
   wins over the earlier .brand-mark/.wm-tn rules (those elements are now gone).
   ========================================================================== */

/* ---- Header row: deterministic flex layout + toggle at the far right ---- */
.site-header .wrap-wide { display: flex; align-items: center; gap: 14px; padding-block: 12px; }
.brand { margin-right: 0; }                       /* layout now driven by the toggle's auto margin */
.theme-toggle { margin-left: auto; flex: none; }  /* pin light/dark toggle to the far right of the nav row */
.site-nav { flex: 0 1 auto; }
.site-nav a { white-space: nowrap; padding: 8px 10px; }   /* keep multi-word links on one line */

/* ---- The unified, "married" lockup: state  |  orange flare  |  wordmark ----
   The orange hairline flare is the device that marries the mark to the type —
   cozy, tight gaps so the three parts read as ONE object. */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand .brand-tn {
  height: 30px; width: auto; aspect-ratio: 997 / 242;  /* tight box = no letterbox gap */
  flex: none; display: block; color: var(--brand);
  transition: filter .16s ease;
}
.brand .brand-rule {
  flex: none; width: 4px; height: 36px; border-radius: 2px; align-self: center;
  background: linear-gradient(180deg,
    transparent 2%, var(--brand) 14%, var(--brand) 86%, transparent 98%);
}
.brand .brand-text { display: flex; flex-direction: column; gap: 5px; }
.brand .mark {
  font-family: var(--display); font-weight: 700; font-size: 1.42rem; line-height: 1;
  letter-spacing: -.01em; text-transform: uppercase; color: var(--ink);
}
.brand .sub {
  font-size: .585rem; letter-spacing: .185em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; line-height: 1;
}
.brand:hover .brand-tn { filter: brightness(1.05); }

/* orange-on-charcoal should hit hard: a soft glow on the dark default */
:root[data-theme="dark"] .brand .brand-tn { filter: drop-shadow(0 0 9px rgba(255,130,0,.30)); }
:root[data-theme="dark"] .brand:hover .brand-tn { filter: drop-shadow(0 0 13px rgba(255,130,0,.48)); }
:root[data-theme="dark"] .brand .brand-rule { box-shadow: 0 0 10px rgba(255,130,0,.60); }

/* ---- Footer wordmark = same married lockup, smaller ---- */
.footer-brand .brand-lock { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.footer-brand .brand-lock .brand-tn { height: 23px; width: auto; aspect-ratio: 997 / 242; flex: none; color: var(--brand); }
.footer-brand .brand-lock .brand-rule {
  flex: none; width: 3px; height: 27px; border-radius: 2px; align-self: center;
  background: linear-gradient(180deg, transparent 3%, var(--brand) 15%, var(--brand) 85%, transparent 97%);
}
.footer-brand .brand-lock .mark {
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1;
  text-transform: uppercase; letter-spacing: -.01em; color: var(--ink);
}
:root[data-theme="dark"] .footer-brand .brand-lock .brand-tn { filter: drop-shadow(0 0 7px rgba(255,130,0,.26)); }
:root[data-theme="dark"] .footer-brand .brand-lock .brand-rule { box-shadow: 0 0 6px rgba(255,130,0,.4); }

/* ---- Mobile lockup scale + cluster hamburger/toggle on the right ---- */
.nav-toggle { margin-left: auto; }   /* on mobile, brand | ...auto... | hamburger | toggle */
@media (max-width: 860px) {
  .site-header .wrap-wide { position: relative; }   /* dropdown nav anchors under the header row */
}
@media (max-width: 560px) {
  .brand { gap: 8px; }
  .brand .brand-tn { height: 26px; }
  .brand .brand-rule { height: 29px; }
  .brand .mark { font-size: 1.22rem; }
}

/* ============================================================================
   v9 — HERO refinement (dark primary): a more-present TN backdrop, a cleaner
   single accent underline, and tightened balance. AA on headline/body kept.
   ========================================================================== */

/* the faint TN silhouette: felt, not missed — raised presence + soft glow in dark */
.hero-tn { opacity: .09; }
:root[data-theme="dark"] .hero-tn {
  opacity: .17;
  filter: drop-shadow(0 0 46px rgba(255,130,0,.16));
}
@media (max-width: 860px) {
  :root[data-theme="dark"] .hero-tn { opacity: .12; }
}

/* warm ground behind the hero — a touch stronger on the dark default */
:root[data-theme="dark"] .hero::before {
  background: radial-gradient(closest-side, rgba(255,130,0,.20), rgba(255,130,0,0) 70%);
}

/* the "Limited Licensed Electrician" accent underline — thinner, cleaner, seated
   just below the baseline so wrapped lines read as one deliberate marker, not a
   heavy double rule. Keep the orange word color for emphasis. */
.hero h1 .hl {
  background: linear-gradient(var(--brand), var(--brand)) left 100% / 100% .07em no-repeat;
  padding-bottom: .06em;
}
