/* Compliance CTC Tracker: bright and punchy.
   Layout concept: loud colour blocks with thick ink outlines and hard offset shadows; the hero IS the calculator.
   Palette: ink indigo, canary yellow, electric blue, hot pink, mint, lilac. Colour carries meaning:
   mint = compliant, yellow = review, pink = non-compliant. */
:root {
  --bg: #F4F7FF; --surface: #FFFFFF; --surface-2: #F0F0FA;
  --ink: #071A44; --ink-2: #4A5578; --bd: #071A44; --line: #E1E1F0; --shadow-c: #071A44;
  --yellow: #FDCB14; --yellow-soft: #FFF3B0;
  --blue: #0558FD; --blue-soft: #DDE3FF; --on-blue: #FFFFFF;
  --pink: #FF5C8A; --pink-soft: #FFD9E4;
  --mint: #12C98F; --mint-soft: #CFF5E7;
  --lilac: #B79CFF; --lilac-soft: #E8DEFF;
  --on-pop: #071A44;
  --ok: #08795A; --warn: #8A5A00; --bad: #BD1646;
  --link: #0446CC;
  --f-display: "Bricolage Grotesque", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Figtree", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E22; --surface: #18183A; --surface-2: #222249;
    --ink: #F4F4FF; --ink-2: #AEAED0; --bd: #F4F4FF; --line: #2C2C58; --shadow-c: #000000;
    --yellow-soft: #4A4310; --blue: #8794FF; --blue-soft: #232A66; --on-blue: #14142B;
    --pink: #FF7EA3; --pink-soft: #4A1E35; --mint: #35E0AE; --mint-soft: #11443A; --lilac: #C4AEFF; --lilac-soft: #33285F;
    --ok: #4BE3B5; --warn: #FFD25C; --bad: #FF8FAE; --link: #A5AFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E22; --surface: #18183A; --surface-2: #222249;
  --ink: #F4F4FF; --ink-2: #AEAED0; --bd: #F4F4FF; --line: #2C2C58; --shadow-c: #000000;
  --yellow-soft: #4A4310; --blue: #8794FF; --blue-soft: #232A66; --on-blue: #14142B;
  --pink: #FF7EA3; --pink-soft: #4A1E35; --mint: #35E0AE; --mint-soft: #11443A; --lilac: #C4AEFF; --lilac-soft: #33285F;
  --ok: #4BE3B5; --warn: #FFD25C; --bad: #FF8FAE; --link: #A5AFFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 1rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }
.muted { color: var(--ink-2); } .small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); border-bottom: 2px solid var(--bd); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.15rem var(--f-display); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: none; margin-left: auto; gap: 6px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .93rem; border: 2px solid transparent; }
.nav a:hover { border-color: var(--bd); }
.nav a[aria-current="page"] { background: var(--yellow); color: var(--on-pop); border-color: var(--bd); }
.menu-btn { margin-left: auto; background: var(--yellow); color: var(--on-pop); border: 2px solid var(--bd); padding: 8px 14px; border-radius: 999px; font: 800 .9rem var(--f-body); cursor: pointer; box-shadow: 2px 2px 0 var(--shadow-c); }
.mobile-nav { display: none; border-top: 2px solid var(--bd); padding-block: 8px 14px; }
.mobile-nav.open { display: grid; }
.mobile-nav a { color: var(--ink); text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
@media (min-width: 900px) { .nav { display: flex; } .menu-btn, .mobile-nav { display: none !important; } }

/* ---------- buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--bd); background: var(--blue); color: var(--on-blue); font: 800 1rem var(--f-body); padding: 12px 22px; border-radius: 999px; text-decoration: none; cursor: pointer; min-height: 48px; box-shadow: 4px 4px 0 var(--shadow-c); transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.yellow { background: var(--yellow); color: var(--on-pop); }
.btn.small { min-height: 40px; padding: 7px 16px; font-size: .9rem; box-shadow: 3px 3px 0 var(--shadow-c); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
label, .lbl { display: block; font-weight: 700; font-size: .875rem; margin-bottom: 6px; color: var(--ink); }
.hint { display: block; font-weight: 500; color: var(--ink-2); font-size: .8rem; margin-top: 5px; line-height: 1.4; }
input[type="text"], input[type="number"], input[type="email"], input[type="search"], select {
  width: 100%; min-height: 48px; padding: 9px 14px; font: 700 1rem var(--f-body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--bd); border-radius: 12px; font-variant-numeric: tabular-nums; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
input.key { background: var(--yellow-soft); font-size: 1.35rem; font-family: var(--f-display); font-weight: 800; }
.field-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field-grid.two { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.group-title { font: 800 1rem var(--f-display); margin: 0 0 12px; padding: 0; }
.switches { display: grid; gap: 10px; }
.sw { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; font-size: .93rem; margin: 0; cursor: pointer; }
.sw input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.sw span small { display: block; color: var(--ink-2); font-weight: 500; font-size: .8rem; }
details.more { border-top: 2px dashed var(--line); padding-top: 12px; }
details.more > summary { cursor: pointer; font: 800 1rem var(--f-display); list-style: none; display: flex; justify-content: space-between; gap: 8px; padding: 4px 0 10px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--bd); border-radius: 50%; background: var(--yellow); color: var(--on-pop); font-weight: 800; line-height: 1; }
details.more[open] > summary::after { content: "–"; }

/* category pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills label { margin: 0; padding: 8px 14px; border: 2px solid var(--bd); border-radius: 999px; font-weight: 800; font-size: .88rem; cursor: pointer; background: var(--surface); color: var(--ink); }
.pills input:checked + label { background: var(--ink); color: var(--bg); }
.pills input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

/* range slider */
.range-wrap { position: relative; padding-top: 6px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 99px; border: 2px solid var(--bd); background: linear-gradient(90deg, var(--pink) 0 var(--min, 0%), var(--mint) var(--min, 0%) 100%); cursor: pointer; margin: 10px 0 6px; padding: 0; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--bd); box-shadow: 2px 3px 0 var(--shadow-c); cursor: grab; }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--bd); box-shadow: 2px 3px 0 var(--shadow-c); cursor: grab; }
.range-note { font-size: .8rem; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.range-note b { color: var(--ink); }

/* ---------- colour bands (page heads) ---------- */
.band { border-bottom: 2px solid var(--bd); position: relative; overflow: hidden; color: var(--on-pop); }
.band-yellow { background: var(--yellow); } .band-blue { background: var(--blue); color: var(--on-blue); }
.band-pink { background: var(--pink); } .band-mint { background: var(--mint); } .band-lilac { background: var(--lilac); }
.band .crumbs, .band .crumbs a { color: inherit; opacity: .85; }
.tool-head { padding-block: 40px 44px; display: grid; gap: 14px; position: relative; z-index: 1; }
.tool-head p { max-width: 40em; margin: 0; font-size: 1.12rem; font-weight: 600; }
.band .art { position: absolute; right: 4%; bottom: -8px; width: clamp(110px, 20vw, 220px); opacity: .98; pointer-events: none; display: none; }
@media (min-width: 760px) { .band .art { display: block; } }
.band .badge { border-color: currentColor; }

/* ---------- hero ---------- */
.hero { background: var(--yellow); color: var(--on-pop); border-bottom: 2px solid var(--bd); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; padding-block: 44px 56px; position: relative; z-index: 1; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 56px; padding-block: 68px 76px; } }
.hero h1 .hl { background: var(--surface); color: var(--ink); border: 2px solid var(--bd); border-radius: 14px; padding: 0 .18em; box-shadow: 5px 5px 0 var(--shadow-c); display: inline-block; transform: rotate(-1.5deg); margin-block: .06em; }
.lede { font-size: 1.2rem; font-weight: 600; max-width: 32em; margin-top: 22px; }
.hero .btn-row { margin-top: 28px; }
.assure { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 26px 0 0; padding: 0; list-style: none; font-size: .88rem; font-weight: 800; }
.assure li { background: var(--surface); color: var(--ink); border: 2px solid var(--bd); border-radius: 999px; padding: 4px 12px; }
.hero-art { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-art > div { position: absolute; }
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-art .a1 { left: -22px; bottom: 5%; width: 110px; transform: rotate(-12deg); }
.hero-art .a2 { right: 2%; top: 3%; width: 92px; }
.hero-art .a3 { left: 46%; top: 5%; width: 120px; }
.hero-art .a4 { right: -40px; bottom: -30px; width: 190px; opacity: .95; }
@media (max-width: 959px) { .hero-art .a1, .hero-art .a3 { display: none; } .hero-art .a2 { width: 64px; } .hero-art .a4 { opacity: .35; } }

/* receipt (hero calculator) */
.receipt { background: var(--surface); color: var(--ink); border: 2px solid var(--bd); border-radius: 20px; box-shadow: 8px 8px 0 var(--shadow-c); padding: 22px; position: relative; }
.receipt h2 { font-size: 1.25rem; }
.receipt .perf { border-top: 3px dashed var(--line); margin: 16px -4px; }
.big { font: 800 clamp(2.4rem, 7vw, 3.2rem)/1 var(--f-display); letter-spacing: -.03em; }
.big small { font-size: .9rem; letter-spacing: 0; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 4px; }

/* ---------- live results ---------- */
.card { background: var(--surface); border: 2px solid var(--bd); border-radius: 20px; box-shadow: 6px 6px 0 var(--shadow-c); }
.pad { padding: 20px; } @media (min-width: 720px) { .pad { padding: 26px; } }
.live { padding: 20px; display: grid; gap: 16px; }
@media (min-width: 720px) { .live { padding: 26px; } }
.verdict-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.stamp { display: inline-block; font: 800 1.15rem var(--f-display); padding: 7px 18px; border: 2px solid var(--bd); border-radius: 999px; transform: rotate(-3deg); box-shadow: 3px 3px 0 var(--shadow-c); color: var(--on-pop); }
.stamp.ok { background: var(--mint); } .stamp.warn { background: var(--yellow); } .stamp.bad { background: var(--pink); }
.reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.reasons li { display: flex; gap: 10px; font-size: .93rem; font-weight: 600; line-height: 1.4; }
.reasons li::before { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; margin-top: 1px; border: 2px solid var(--bd); color: var(--on-pop); }
.reasons li.ok::before { content: "✓"; background: var(--mint); } .reasons li.warn::before { content: "!"; background: var(--yellow); } .reasons li.bad::before { content: "✕"; background: var(--pink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.tile { border: 2px solid var(--bd); border-radius: 16px; padding: 12px 14px; box-shadow: 3px 3px 0 var(--shadow-c); color: var(--ink); }
.tile:nth-child(1) { background: var(--lilac-soft); } .tile:nth-child(2) { background: var(--mint-soft); }
.tile:nth-child(3) { background: var(--yellow-soft); } .tile:nth-child(4) { background: var(--pink-soft); }
.tile span { display: block; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.tile b { display: block; font: 800 clamp(1.4rem, 3.4vw, 1.9rem)/1.15 var(--f-display); letter-spacing: -.02em; margin-top: 2px; }
.moneybar-wrap h3 { font-size: .95rem; margin-bottom: 8px; }
.moneybar { display: flex; height: 52px; border: 2px solid var(--bd); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.moneybar .seg { min-width: 0; display: grid; place-items: center; font: 800 .85rem var(--f-body); color: var(--on-pop); overflow: hidden; white-space: nowrap; transition: flex-grow .6s cubic-bezier(.2, .9, .3, 1.1); flex: 1 1 0; border-right: 2px solid var(--bd); }
.moneybar .seg:last-child { border-right: 0; }
.seg-net { background: var(--mint); } .seg-ded { background: var(--yellow); } .seg-er { background: var(--lilac); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .82rem; font-weight: 700; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--bd); margin-right: 6px; vertical-align: -1px; }
.callout { background: var(--blue-soft); border: 2px solid var(--bd); border-radius: 14px; padding: 12px 14px; font-size: .92rem; font-weight: 600; color: var(--ink); }
.callout.warn { background: var(--yellow-soft); }
.callout strong { font-weight: 800; }

/* ledger statement (kept: it is the audit trail) */
.statement { background: var(--surface); border: 2px solid var(--bd); border-radius: 20px; box-shadow: 6px 6px 0 var(--shadow-c); padding: 20px; margin-top: 24px; }
@media (min-width: 720px) { .statement { padding: 28px; } }
.statement h3 { font-size: 1rem; margin: 24px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--bd); }
.statement h3:first-child { margin-top: 0; }
.row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; min-width: 0; font-weight: 600; }
.row .k { flex: 0 1 auto; min-width: 0; }
.row .dots { flex: 1 1 12px; min-width: 12px; border-bottom: 2px dotted var(--ink-2); opacity: .5; transform: translateY(-4px); }
.row .v { flex: none; font-weight: 800; text-align: right; }
.row.sub .k { color: var(--ink-2); padding-left: 14px; }
.row.out .k { color: var(--ink-2); } .row.out .v { font-weight: 600; color: var(--ink-2); }
.row.total { margin-top: 8px; padding: 8px 10px; background: var(--yellow-soft); border: 2px solid var(--bd); border-radius: 10px; font-weight: 800; }
.row.total .v { font-size: 1.1rem; } .row.total .dots { opacity: .3; }
.row .tag { font-size: .75rem; font-weight: 700; color: var(--ink-2); margin-left: 6px; }
.note-line { font-size: .85rem; color: var(--ink-2); margin: 8px 0 0; line-height: 1.45; font-weight: 500; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }

/* ---------- tool layout ---------- */
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 34px 44px; align-items: start; }
@media (min-width: 1000px) { .tool-grid { grid-template-columns: minmax(310px, 410px) minmax(0, 1fr); } .tool-form { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); } }
.tool-form form { display: grid; gap: 24px; }
.mw-info { background: var(--lilac-soft); border: 2px solid var(--bd); border-radius: 12px; padding: 10px 12px; font-size: .85rem; color: var(--ink); line-height: 1.45; font-weight: 600; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 99px; border: 2px solid var(--bd); background: var(--surface); color: var(--ink); white-space: nowrap; }
.badge.cur { background: var(--mint); color: var(--on-pop); } .badge.old { background: var(--yellow); color: var(--on-pop); } .badge.der { background: var(--pink); color: var(--on-pop); }
.errors { color: var(--bad); font-weight: 800; font-size: .9rem; min-height: 1.2em; margin: 0; }

/* ---------- sections ---------- */
.section { padding-block: 60px; }
.section.alt { background: var(--surface); border-block: 2px solid var(--bd); }
.section-head { max-width: 40em; margin-bottom: 30px; }
.section-head p { color: var(--ink-2); margin-top: 12px; font-weight: 600; font-size: 1.05rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; } .split > * { min-width: 0; }
@media (min-width: 880px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } }

/* marquee */
.marquee { background: var(--ink); color: var(--bg); border-bottom: 2px solid var(--bd); overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 0; animation: slide 90s linear infinite; padding-block: 12px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { color: inherit; text-decoration: none; font: 800 1rem var(--f-display); padding-inline: 22px; display: inline-flex; align-items: center; gap: 10px; }
.marquee a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); }
.marquee a:nth-child(3n+2)::before { background: var(--pink); } .marquee a:nth-child(3n)::before { background: var(--mint); }
.marquee a b { color: var(--yellow); font-weight: 800; }
@keyframes slide { to { transform: translateX(-50%); } }

/* tool tiles */
.tool-tiles { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .tool-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile-link { display: grid; gap: 12px; align-content: start; padding: 24px; border: 2px solid var(--bd); border-radius: 22px; box-shadow: 6px 6px 0 var(--shadow-c); text-decoration: none; color: var(--on-pop); transition: transform .14s ease, box-shadow .14s ease; }
.tile-link:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 10px 10px 0 var(--shadow-c); }
.tile-link:nth-child(1) { background: var(--blue); color: var(--on-blue); } .tile-link:nth-child(2) { background: var(--pink); } .tile-link:nth-child(3) { background: var(--mint); }
.tile-link svg { width: 76px; height: 76px; }
.tile-link h3 { font-size: 1.5rem; }
.tile-link .q { font-weight: 600; margin: 0; }
.tile-link .ex { background: var(--surface); color: var(--ink); border: 2px solid var(--bd); border-radius: 12px; padding: 10px 12px; font-size: .88rem; font-weight: 600; margin: 0; }
.tile-link .ex b { font-weight: 800; }
.tile-link .go { font-weight: 800; text-decoration: underline; text-underline-offset: .2em; }

/* what it catches */
.trap-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .trap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trap-grid .trap:first-child { grid-column: 1 / -1; } }
.trap { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px; border: 2px solid var(--bd); border-radius: 18px; background: var(--surface); box-shadow: 4px 4px 0 var(--shadow-c); }
.trap:nth-child(1) { background: var(--pink-soft); } .trap:nth-child(2) { background: var(--lilac-soft); } .trap:nth-child(3) { background: var(--yellow-soft); }
.trap:nth-child(4) { background: var(--mint-soft); } .trap:nth-child(5) { background: var(--blue-soft); }
.trap svg { width: 64px; height: 64px; }
.trap h3 { margin-bottom: 6px; } .trap p { margin: 0; font-weight: 500; max-width: 46em; }

/* tables */
.table-wrap { overflow-x: auto; border: 2px solid var(--bd); border-radius: 16px; background: var(--surface); box-shadow: 4px 4px 0 var(--shadow-c); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 600; }
th { font-weight: 800; font-size: .82rem; color: var(--on-pop); background: var(--yellow); white-space: nowrap; border-bottom: 2px solid var(--bd); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: var(--yellow-soft); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.toolbar input[type="search"] { max-width: 320px; } .toolbar select { width: auto; min-width: 210px; }
th button { all: unset; cursor: pointer; font: inherit; color: inherit; } th button:hover { text-decoration: underline; }

.prose { max-width: 46em; } .prose h2 { margin: 1.8em 0 .5em; font-size: 1.7rem; } .prose h3 { margin: 1.4em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.2em; } .prose li { margin-bottom: .5em; }
.crumbs { font-size: .88rem; color: var(--ink-2); padding-top: 22px; font-weight: 700; } .crumbs a { color: var(--ink-2); }
.faq details { background: var(--surface); border: 2px solid var(--bd); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--shadow-c); }
.faq summary { cursor: pointer; font: 800 1.02rem var(--f-display); }
.faq details[open] { background: var(--lilac-soft); }
.faq details p { margin: 10px 0 0; max-width: 44em; font-weight: 500; }

/* lead capture */
.lead { margin-top: 26px; padding: 24px; border: 2px solid var(--bd); border-radius: 20px; background: var(--lilac); color: var(--on-pop); box-shadow: 6px 6px 0 var(--shadow-c); }
.lead h3 { font-size: 1.4rem; } .lead p { margin: 8px 0 16px; font-weight: 600; }
.lead form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: end; }
.lead label { color: var(--on-pop); } .lead .consent { grid-column: 1 / -1; } .lead .sw span a { color: var(--on-pop); }
.lead input, .lead select { color: var(--ink); }
.lead-msg { margin: 12px 0 0 !important; font-weight: 800 !important; min-height: 1.3em; }
.disclaimer { font-size: .85rem; color: var(--ink-2); border-top: 2px dashed var(--line); padding-top: 14px; margin-top: 26px; max-width: 60em; font-weight: 500; }

/* footer */
.site-footer { background: var(--ink); color: var(--bg); padding-block: 48px 30px; margin-top: 0; font-size: .93rem; border-top: 2px solid var(--bd); }
.site-footer .brand { color: var(--bg); } .site-footer .brand svg { color: var(--yellow); }
.site-footer .muted { color: #B9B9D8; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { font: 800 1rem var(--f-display); margin-bottom: 12px; color: var(--yellow); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #E4E4FA; font-weight: 600; }
.foot-note { margin-top: 30px; padding-top: 18px; border-top: 1px solid #3A3A66; color: #B9B9D8; font-size: .82rem; font-weight: 500; }

.consent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: var(--bg); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); display: none; border-top: 2px solid var(--yellow); }
.consent-bar.show { display: block; }
.consent-bar .in { max-width: 1160px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; font-size: .9rem; font-weight: 600; }
.consent-bar p { margin: 0; flex: 1 1 320px; } .consent-bar a { color: inherit; }
.consent-bar .btn { box-shadow: none; border-color: var(--yellow); background: var(--yellow); color: #14142B; } .consent-bar .btn.ghost { background: transparent; color: var(--bg); }

@media print {
  .site-header, .site-footer, .tool-form, .result-actions, .lead, .consent-bar, .band, .skip, .section.alt, .crumbs, .moneybar-wrap { display: none !important; }
  body { background: #fff; color: #000; } .tool-grid { display: block; } .statement, .live { box-shadow: none; border: 0; padding: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .stamp.fresh { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes pop { from { transform: rotate(-3deg) scale(.4); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 1; } }
  .float { animation: bob 5s ease-in-out infinite; } .float.d2 { animation-duration: 6.5s; animation-delay: -2s; } .float.d3 { animation-duration: 4.2s; animation-delay: -1s; }
  @keyframes bob { 50% { transform: translateY(-10px) rotate(4deg); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .marquee-track { animation: none; } .marquee { overflow-x: auto; } }

.brand .logo { height: 32px; width: auto; display: block; }
.site-footer .brand .logo-icon { height: 34px; width: auto; border-radius: 8px; }

/* day / night toggle */
.theme-btn { margin-left: auto; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 2px solid var(--bd); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--shadow-c); flex: none; }
.theme-btn svg { width: 22px; height: 22px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; } :root[data-theme="dark"] .theme-btn .i-sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } }
.theme-btn + .menu-btn { margin-left: 0; }
/* logo artwork is dark: keep it on a light chip in night mode */
:root[data-theme="dark"] .site-header .brand .logo { background: #fff; padding: 4px 8px; border-radius: 10px; box-sizing: content-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-header .brand .logo { background: #fff; padding: 4px 8px; border-radius: 10px; box-sizing: content-box; } }

/* dark surfaces stay dark in both themes (they use hard-coded light text) */
.site-footer, .marquee, .consent-bar { background: #071A44; color: #F4F7FF; }
.site-footer { border-top-color: #F4F7FF; }
:root[data-theme="dark"] .site-footer { background: #050F2B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #050F2B; } }
.site-footer .brand { color: #fff; }
.consent-bar .btn.ghost { color: #F4F7FF; }

.nav a { white-space: nowrap; padding: 8px 10px; font-size: .9rem; }
.bar { gap: 10px; }
