@font-face { font-family: "Oswald"; src: url("fonts/oswald-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("fonts/carlito-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("fonts/carlito-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Carlito"; src: url("fonts/carlito-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

@layer base {
/* ============ SIGNAL CONSOLE (ROUND 2) TOKENS ============
   Identity: graphite stepped surfaces, one electric lime signal,
   trading-screen numerals. Oswald for numerals, labels, headlines;
   Carlito for body. Every text pair contrast-checked in BUILD-NOTE.md.
   Light rule: lime never carries text on light grounds; figures use
   the deep signal green derived from the same hue. */
:root {
  color-scheme: light dark;
  --lime: #C6F135;
  --on-lime: #141604;
  --band: #14160F;
  --band-ink: #E8EBDD;
  --bg: #F2F4F1;
  --surface-1: #FFFFFF;
  --surface-2: #E7EAE3;
  --surface-3: #D8DCD0;
  --ink: #1B1E17;
  --muted: #454B3C;
  --signal: #3F6212;
  --hairline: rgba(27, 30, 23, 0.16);
  --btn-bg: #1B1E17;
  --btn-ink: #F2F4F1;
  --btn-bg-hover: #2E331F;
  --field-bg: #FFFFFF;
  --field-border: #5C6353;
  --error: #B91C1C;
  --error-bg: #FDECEC;
  --focus: #3F6212;
  --track: #D8DCD0;
  --header-bg: rgba(242, 244, 241, 0.94);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F0C;
    --surface-1: #161814;
    --surface-2: #1E201C;
    --surface-3: #26281F;
    --ink: #F2F4EE;
    --muted: #B7BFA9;
    --signal: #C6F135;
    --hairline: rgba(242, 244, 238, 0.10);
    --btn-bg: #C6F135;
    --btn-ink: #141604;
    --btn-bg-hover: #D4F76A;
    --field-bg: #101208;
    --field-border: #767E6B;
    --error: #FF9D94;
    --error-bg: #3A1712;
    --focus: #C6F135;
    --track: #26281F;
    --header-bg: rgba(14, 15, 12, 0.92);
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F0C;
  --surface-1: #161814;
  --surface-2: #1E201C;
  --surface-3: #26281F;
  --ink: #F2F4EE;
  --muted: #B7BFA9;
  --signal: #C6F135;
  --hairline: rgba(242, 244, 238, 0.10);
  --btn-bg: #C6F135;
  --btn-ink: #141604;
  --btn-bg-hover: #D4F76A;
  --field-bg: #101208;
  --field-border: #767E6B;
  --error: #FF9D94;
  --error-bg: #3A1712;
  --focus: #C6F135;
  --track: #26281F;
  --header-bg: rgba(14, 15, 12, 0.92);
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Carlito", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
}
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 20px; } }
h1, h2, h3 { font-family: "Oswald", sans-serif; line-height: 1.08; margin: 0; }
.display { font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; }
.num { font-family: "Oswald", sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a:active { opacity: 0.78; }
.skip-link { position: absolute; left: 20px; top: -60px; background: var(--band); color: var(--band-ink); padding: 10px 16px; z-index: 60; font-weight: 700; }
.skip-link:focus { top: 12px; color: var(--band-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { color: var(--ink); text-decoration: none; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand .brand-dot { color: var(--signal); }
.head-nav { display: flex; align-items: center; gap: 18px; }
.head-nav a { font-weight: 700; }
.theme-wrap { position: relative; }
.theme-btn { width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 10px; cursor: pointer; transition: background-color 150ms ease, transform 150ms ease; }
.theme-btn:hover { background: var(--surface-3); }
.theme-btn:active { transform: scale(0.94); }
.theme-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.theme-menu { position: absolute; right: 0; top: 56px; min-width: 230px; background: var(--surface-1); color: var(--ink); border: 1px solid var(--hairline); border-radius: 12px; padding: 8px; z-index: 40; }
.theme-menu button { display: flex; width: 100%; align-items: center; gap: 10px; background: transparent; color: var(--ink); border: 0; border-radius: 8px; padding: 12px; font-family: "Oswald", sans-serif; font-size: 0.98rem; font-weight: 500; letter-spacing: 0.03em; cursor: pointer; text-align: left; transition: background-color 150ms ease, transform 150ms ease; }
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button:active { transform: scale(0.97); }
.theme-menu button:disabled { opacity: 0.45; cursor: not-allowed; }
.theme-menu button[aria-checked="true"] { outline: 2px solid var(--signal); }
.theme-menu .menu-note { padding: 4px 12px 8px; font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Live ticker: graphite band with lime text in BOTH schemes */
.ticker { background: var(--band); color: var(--band-ink); display: flex; align-items: stretch; border-bottom: 2px solid var(--lime); }
.ticker-view { flex: 1; overflow: hidden; min-width: 0; }
.ticker-track { display: flex; width: max-content; animation: tickmove 48s linear infinite; }
.ticker:hover .ticker-track, .ticker.paused .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; gap: 2.75rem; padding: 9px 2.75rem 9px 20px; white-space: nowrap; }
.tick-item { font-family: "Oswald", sans-serif; font-size: 0.86rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tick-item b { color: var(--lime); font-weight: 600; }
.tick-item i { font-style: normal; opacity: 0.75; font-size: 0.78rem; }
@keyframes tickmove { to { transform: translateX(-50%); } }
.ticker-btn { flex: none; background: var(--band); color: var(--lime); border: 0; border-left: 1px solid rgba(198, 241, 53, 0.35); font-family: "Oswald", sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0 16px; cursor: pointer; min-height: 44px; transition: background-color 150ms ease, transform 150ms ease; }
.ticker-btn:hover { background: #23261A; }
.ticker-btn:active { transform: scale(0.96); }
.ticker-btn:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; width: auto; flex-wrap: wrap; }
  .ticker-set { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
  html { scroll-behavior: auto; }
}

/* Hero */
.hero { padding-block: 40px 30px; }
.kicker { font-family: "Oswald", sans-serif; display: inline-block; background: var(--surface-2); color: var(--ink); border-left: 5px solid var(--signal); font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.85rem; padding: 6px 12px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.3rem, 8vw, 4.3rem); font-weight: 600; text-transform: uppercase; }
.hero h1 .hl { color: var(--signal); }
.hero .lede { font-size: 1.22rem; max-width: 36em; margin: 20px 0 26px; }
.hero .lede strong { font-weight: 700; }
.proof-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hairline); font-family: "Oswald", sans-serif; font-size: 0.88rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.proof-strip b { color: var(--signal); font-weight: 600; }

/* Buttons: every state (Reactive Interface Bible) */
.btn { font-family: "Oswald", sans-serif; display: inline-block; background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--hairline); border-radius: 10px; font-size: 1.05rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 15px 24px; cursor: pointer; text-decoration: none; box-shadow: inset 0 -4px 0 var(--lime); transition: background-color 150ms ease, transform 150ms ease; }
.btn:hover { background: var(--btn-bg-hover); color: var(--btn-ink); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface-2); color: var(--ink); box-shadow: none; }
.btn.secondary:hover { background: var(--surface-3); color: var(--ink); }
.btn .spinner { display: inline-block; width: 16px; height: 16px; border: 3px solid currentColor; border-top-color: transparent; border-radius: 50%; vertical-align: -3px; margin-right: 8px; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.receipt { margin: 10px 0 0; font-size: 0.98rem; color: var(--muted); font-weight: 700; }

/* Your tools strip */
.your-tools { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; margin-block: 8px 4px; }
.your-tools h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.your-tools p { color: var(--muted); margin: 8px 0 0; }
.pin-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pin-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 8px 8px 8px 16px; }
.pin-chip a { font-weight: 700; text-decoration: none; }
.pin-chip a:hover { text-decoration: underline; }
.unpin { background: var(--surface-3); color: var(--ink); border: 0; border-radius: 999px; width: 34px; height: 34px; font-size: 1rem; cursor: pointer; transition: transform 150ms ease, background-color 150ms ease; }
.unpin:hover { background: var(--surface-2); }
.unpin:active { transform: scale(0.92); }

/* Category tabs */
.tools { padding-block: 30px 20px; }
.tools h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.tab-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.tab { font-family: "Oswald", sans-serif; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 999px; padding: 11px 18px; font-size: 0.98rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; min-height: 44px; transition: background-color 150ms ease, transform 150ms ease; }
.tab:hover { background: var(--surface-3); }
.tab:active { transform: scale(0.96); }
.tab:disabled { opacity: 0.45; cursor: not-allowed; }
.tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-ink); box-shadow: inset 0 -3px 0 var(--lime); }
.showing { color: var(--muted); font-size: 0.98rem; margin: 8px 0 0; }

/* Tool grid: dense console cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
.card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: background-color 150ms ease; }
.card:hover { background: var(--surface-2); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 1.12rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.card .q { margin: 0; font-size: 1.08rem; }
.card .trust { margin: 0; color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--hairline); padding-top: 8px; }
.card .trust b { color: var(--signal); font-family: "Oswald", sans-serif; font-weight: 600; letter-spacing: 0.02em; }
.card a.open { font-weight: 700; margin-top: auto; }
.card.featured { border: 2px solid var(--signal); }
.pin-btn { flex: none; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 8px; font-family: "Oswald", sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 12px; min-height: 36px; cursor: pointer; transition: background-color 150ms ease, transform 150ms ease; }
.pin-btn:hover { background: var(--surface-3); }
.pin-btn:active { transform: scale(0.94); }
.pin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pin-btn[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); }

/* Guided second entry */
.guided { padding-block: 26px 52px; }
.guided h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); text-transform: uppercase; font-weight: 600; }
.guided p { color: var(--muted); max-width: 36em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.g-chip { display: inline-block; background: var(--surface-1); color: var(--ink); border: 1px solid var(--hairline); border-radius: 999px; padding: 12px 18px; font-weight: 700; text-decoration: none; min-height: 44px; transition: background-color 150ms ease, transform 150ms ease; }
.g-chip:hover { background: var(--surface-2); text-decoration: none; }
.g-chip:active { transform: scale(0.96); }

/* Calculator */
.calc-shell { padding-block: 30px 56px; }
.calc-shell h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 600; text-transform: uppercase; }
.calc-shell .lede { font-size: 1.18rem; max-width: 38em; margin: 16px 0 22px; }
.result-panel { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 16px; padding: 22px; margin-top: 26px; }
.verdict h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); text-transform: uppercase; font-weight: 600; }
.verdict p { margin: 8px 0 0; font-size: 1.1rem; max-width: 38em; }
.keep-label { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.9rem; font-weight: 600; color: var(--muted); margin: 22px 0 2px; }
.keep-figure { font-family: "Oswald", sans-serif; font-weight: 600; font-size: clamp(3rem, 13vw, 4.6rem); line-height: 1; color: var(--signal); font-variant-numeric: tabular-nums; margin: 0; }
.period-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.p-chip { font-family: "Oswald", sans-serif; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 999px; padding: 10px 16px; font-size: 0.92rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; min-height: 44px; transition: background-color 150ms ease, transform 150ms ease; }
.p-chip:hover { background: var(--surface-3); }
.p-chip:active { transform: scale(0.96); }
.p-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.p-chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); box-shadow: inset 0 -3px 0 var(--lime); }
.window { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; margin-top: 22px; }
.cell { background: var(--surface-2); padding: 16px; }
.cell .c-label { display: block; font-family: "Oswald", sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cell .c-value { display: block; font-family: "Oswald", sans-serif; font-weight: 600; font-size: clamp(1.35rem, 5.5vw, 1.9rem); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cell .c-value.sig { color: var(--signal); }
.cell .track { height: 8px; background: var(--track); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.cell .fill { height: 100%; background: var(--signal); border-radius: 4px; transition: width 300ms ease; width: 0%; }
@media (max-width: 620px) { .window { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-top: 14px; }
.stat { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; }
.stat-label { display: block; font-family: "Oswald", sans-serif; font-weight: 600; color: var(--muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-value { display: block; font-family: "Oswald", sans-serif; font-weight: 600; font-size: 1.6rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.shortfall { margin: 14px 0 0; font-weight: 700; }

/* Inputs */
fieldset { border: 1px solid var(--hairline); background: var(--surface-1); border-radius: 14px; padding: 20px; margin: 0 0 16px; min-width: 0; }
legend { font-family: "Oswald", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline); border-radius: 8px; padding: 5px 12px; font-size: 0.92rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: "Oswald", sans-serif; font-weight: 500; letter-spacing: 0.03em; margin-bottom: 6px; font-size: 1rem; }
.field .hint { color: var(--muted); font-size: 0.96rem; margin: 6px 0 0; }
input[type="number"], input[type="text"], select { width: 100%; font: inherit; font-variant-numeric: tabular-nums; padding: 14px; background: var(--field-bg); color: var(--ink); border: 2px solid var(--field-border); border-radius: 10px; transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease; }
input[type="number"]:hover, select:hover { border-color: var(--ink); }
input[type="number"]:active, select:active { transform: scale(0.995); }
input[type="number"]:disabled, select:disabled { opacity: 0.5; cursor: not-allowed; }
input[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.field-error { color: var(--error); font-weight: 700; margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input[type="checkbox"] { width: 26px; height: 26px; flex: none; accent-color: var(--signal); cursor: pointer; margin-top: 2px; }
.check input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
.check label { font-weight: 700; font-family: "Carlito", sans-serif; letter-spacing: 0; font-size: 1.1rem; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .cols2 { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* Breakdown bars */
.bars { display: grid; gap: 14px; margin-top: 14px; }
.bar-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.bar-amt { font-family: "Oswald", sans-serif; font-variant-numeric: tabular-nums; font-weight: 600; }
.btrack { height: 14px; background: var(--track); border-radius: 7px; overflow: hidden; }
.bfill { height: 100%; background: var(--muted); border-radius: 7px; transition: width 300ms ease; width: 0%; }
.bfill.keep { background: var(--signal); }

/* Trust block + worked example */
.trust { background: var(--surface-1); border: 1px solid var(--hairline); border-left: 6px solid var(--signal); border-radius: 12px; padding: 20px; margin: 24px 0; }
.trust h2, .trust h3 { text-transform: uppercase; font-weight: 600; letter-spacing: 0.03em; }
.trust p { margin: 10px 0 0; }
.example { background: var(--surface-2); border-radius: 10px; padding: 16px; margin-top: 14px; font-variant-numeric: tabular-nums; }
.example p { margin: 4px 0; }
.example .row { display: flex; justify-content: space-between; gap: 14px; }
.example .row span:last-child { font-family: "Oswald", sans-serif; font-weight: 600; white-space: nowrap; }
.example .total { border-top: 2px solid var(--hairline); padding-top: 8px; margin-top: 8px; font-weight: 700; }

footer { background: var(--band); color: var(--band-ink); padding-block: 30px; margin-top: 10px; }
footer a { color: var(--lime); }
footer .fine { opacity: 0.8; font-size: 0.95rem; }
footer p { margin: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  .btn, .tab, .p-chip, .pin-btn, .theme-btn, .theme-menu button, .ticker-btn, .g-chip, .unpin { transition: none; }
  .cell .fill, .bfill { transition: none; }
  .btn .spinner { animation-duration: 2000ms; }
}
}
