/* ── AHI Theme System ─────────────────────────────────────────────────── */
/* theme.css — loaded on every page. Overrides :root variables via        */
/* html[data-theme] selectors which have higher specificity than :root.   */

/* ── DARK THEME ──────────────────────────────────────────────────────── */
html[data-theme="dark"] {
  /* Canonical theme variables */
  --bg-primary:     #0A1628;
  --bg-secondary:   #162333;
  --bg-surface:     #1E3048;
  --bg-card:        #1E3048;
  --bg-instrument:  #0A1628;
  --text-primary:   #F5F0E8;
  --text-secondary: #B8CADC;
  --text-muted:     #8A9BB0;
  --border-subtle:  rgba(255,255,255,0.08);
  --border-standard:rgba(255,255,255,0.12);
  --accent:         #1B6CA8;
  --accent-hover:   #2480C2;

  /* Aliases — existing page CSS uses these variable names */
  --navy:        var(--bg-primary);
  --navy-mid:    var(--bg-secondary);
  --navy-light:  var(--bg-surface);
  --cream:       var(--text-primary);
  --text-mid:    var(--text-secondary);
  --border:      var(--border-subtle);
  --border-amber:rgba(107,90,80,0.3);
  --amber:       var(--accent);
  --amber-light: #4A90D9;
  --amber-dim:   #155A8A;
  --st-track-empty: rgba(255,255,255,0.15);
}

/* ── LIGHT THEME ─────────────────────────────────────────────────────── */
html[data-theme="light"] {
  /* Backgrounds */
  --bg-primary:     #FAF8F5;
  --bg-secondary:   #F2E8DC;
  --bg-surface:     #FDFAF8;
  --bg-card:        #FDFAF8;
  --bg-instrument:  #0A1628;

  /* Text */
  --text-primary:   #2C2218;
  --text-secondary: #6B5D52;
  --text-muted:     #9A8E82;

  /* Borders */
  --border-subtle:  #E8E0D5;
  --border-standard:#D1CBB5;
  --border-strong:  #C2B0A6;

  /* Interactive */
  --accent:         #6B5A50;
  --accent-hover:   #4A3F35;

  /* Palette colours */
  --color-stone:    #C2B0A6;
  --color-sand:     #EAD7C6;
  --color-rose:     #E1C3AB;
  --color-olive:    #AAA891;
  --color-savannah: #D1CBB5;
  --color-dark-warm:#2C2218;

  /* Aliases */
  --navy:        var(--bg-primary);
  --navy-mid:    var(--bg-secondary);
  --navy-light:  var(--bg-surface);
  --cream:       var(--text-primary);
  --text-mid:    var(--text-secondary);
  --border:      var(--border-subtle);
  --border-amber:rgba(194,176,166,0.4);
  --amber:       #AAA891;   /* Olive Leaf — decorative labels, section markers */
  --amber-light: #6B5A50;   /* Deep Stone — interactive, links, emphasis text  */
  --amber-dim:   #9A8E82;   /* Warm muted — secondary labels                  */
  --st-track-empty: rgba(0,0,0,0.1);
}

/* ── STRESS BAND COLOURS — theme-invariant ──────────────────────────── */
:root {
  --stress-stable:   #2D6A4F;
  --stress-elevated: #E07C2A;
  --stress-high:     #E05C3A;
  --stress-severe:   #C0392B;
  --stress-critical: #8B0000;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-variant-numeric: tabular-nums;
}

/* ── LIGHT MODE SPECIFIC OVERRIDES ──────────────────────────────────── */

/* Logo: SVGs are colour-correct for their context — no filter needed.   */
/* Dark mode: swap to the light (white text) version of the logo.        */
/* Light mode: use the dark (navy text) version — already the img src.   */
html[data-theme="dark"] .nav-logo img {
  content: url('../ahi-logo-horizontal-light.svg') !important;
  filter: none !important;
  opacity: 1 !important;
}
html[data-theme="light"] .nav-logo img {
  filter: none !important;
  opacity: 1 !important;
}

/* Hero logo — theme-aware visibility swap */
html[data-theme="light"] .logo-dark-only  { display: none !important; }
html[data-theme="light"] .logo-light-only { display: block !important; }
html[data-theme="dark"]  .logo-light-only { display: none !important; }
html[data-theme="dark"]  .logo-dark-only  { display: block !important; }

/* Score numbers use var(--white) — invisible on white card. Force dark. */
html[data-theme="light"] .tscore-number,
html[data-theme="light"] .score-number {
  color: var(--text-primary);
}

/* Links — Deep Stone */
html[data-theme="light"] a {
  color: var(--amber-light);
}

/* Section headers with letter-spacing in light mode (editorial) */
html[data-theme="light"] .sc-panel-head,
html[data-theme="light"] .acc-section-head,
html[data-theme="light"] .method-section-head {
  letter-spacing: 0.02em;
}

/* ── LIGHT MODE REFINEMENTS ──────────────────────────────────────────── */

/* Hero headings — dark warm text on linen */
html[data-theme="light"] .hero-h1,
html[data-theme="light"] .hero h1 {
  color: #2C2218 !important;
}
html[data-theme="light"] .hero-h2,
html[data-theme="light"] .hero .hero-subtitle,
html[data-theme="light"] .hero .tagline,
html[data-theme="light"] .hero .hero-tagline,
html[data-theme="light"] .hero p em,
html[data-theme="light"] .hero h2 {
  color: #AAA891 !important;
}
html[data-theme="light"] .hero-headline {
  color: #2C2218;
}
html[data-theme="light"] .hero-headline em {
  color: var(--amber-light);
}
html[data-theme="light"] .identity-url {
  color: rgba(44,34,24,0.45);
}

/* General headings */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 {
  color: #2C2218;
}

/* Card borders — warm border on all card surfaces */
html[data-theme="light"] .score-card,
html[data-theme="light"] .card,
html[data-theme="light"] .tscore-card,
html[data-theme="light"] .calc-box,
html[data-theme="light"] .tracker-box {
  border: 1px solid #C2B0A6;
}

/* Score/tscore cards: uniform 1px all sides — no accent top              */
/* AHI Score card: regime colour is set dynamically by JS (inline style)  */
/* and overrides border for that specific card.                           */
html[data-theme="light"] .score-card {
  border: 1px solid #C2B0A6;
}
html[data-theme="light"] .tscore-card {
  border: 1px solid #C2B0A6;
}

/* Score number: 10% larger in light mode for visual dominance */
html[data-theme="light"] .tscore-primary .tscore-number {
  font-size: 80px;
}

/* Elements using var(--white) for text — invisible on warm white cards  */
html[data-theme="light"] .card-value {
  color: #2C2218;
}
html[data-theme="light"] .regime-name {
  color: #2C2218 !important;
}
html[data-theme="light"] .regime-label {
  color: #9A8E82;
  background: none;
}
html[data-theme="light"] .hero-regime-badge {
  color: #6B5D52;
}
/* Regime text pill — semantic amber fill, always dark text */
html[data-theme="light"] .regime-text {
  color: #8B4A00;
  background: #FEF3E2;
  border-color: #E07C2A;
}
/* beh-bar percentage sits on a coloured bar — keep white */
html[data-theme="light"] .beh-bar-pct {
  color: #FFFFFF;
}

/* Page/section title classes */
html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .panel-title {
  color: #2C2218;
}

/* Identity bar — deep warm brown brand bar */
html[data-theme="light"] .identity-bar {
  background: #2C2218;
}

/* ── HERO SECTION BODY TEXT ──────────────────────────────────────────── */

html[data-theme="light"] .hero-subline {
  color: #6B5D52;
}

/* Credential badge strip — INDEPENDENT · EMPIRICALLY VALIDATED · etc.   */
html[data-theme="light"] .hero-credentials span {
  color: #AAA891;
}
html[data-theme="light"] .cred-dot {
  color: rgba(170,168,145,0.5) !important;
}

/* Latest analysis teaser strip */
html[data-theme="light"] .hero-teaser {
  border-top-color: #D1CBB5;
}
html[data-theme="light"] .teaser-label {
  color: #AAA891;
  font-weight: 700;
}
html[data-theme="light"] .teaser-headline {
  color: #6B5D52;
}
html[data-theme="light"] .teaser-link {
  color: #6B5A50;
}
html[data-theme="light"] .teaser-link:hover {
  color: #4A3F35;
}

/* ── PAGE HERO HEADERS — LIGHT MODE (warm Sand Dune gradient) ───────── */

/* .sc-hero — used by rba-scenario.html and others                       */
/* nowcast.html adds .nowcast-header class + !important overrides        */
/* so this warm treatment does NOT affect the nowcast page header.       */
html[data-theme="light"] .sc-hero {
  background: linear-gradient(160deg, #F2E8DC 0%, #EAD7C6 60%, #D1CBB5 100%);
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .sc-hero::after { display: none; }
html[data-theme="light"] .sc-hero h1 { color: #2C2218; }
html[data-theme="light"] .sc-hero h1 em { color: #6B5A50; }
html[data-theme="light"] .sc-hero p { color: #6B5D52; }
html[data-theme="light"] .sc-eyebrow { color: #9A8E82; }
html[data-theme="light"] .sc-badge {
  background: rgba(255,255,255,0.5);
  border-color: #C2B0A6;
  color: #6B5A50;
}
/* Dark restore */
html[data-theme="dark"] .sc-hero {
  background: linear-gradient(160deg, var(--navy-mid, #162333) 0%, rgba(14,26,42,0.98) 100%);
  border-bottom-color: rgba(255,255,255,0.08);
}

/* .rate-ribbon — RBA current rate bar (rba-scenario.html)              */
html[data-theme="light"] .rate-ribbon {
  background: #F2E8DC;
  border-top-color: #D1CBB5;
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .rate-now-lbl { color: #9A8E82; }
html[data-theme="light"] .rate-ribbon-meta { color: #6B5D52; }
html[data-theme="light"] .rate-ribbon-meta strong { color: #2C2218; }
html[data-theme="light"] .next-meeting-pill {
  background: rgba(255,255,255,0.6);
  border-color: #D1CBB5;
  color: #6B5D52;
}
html[data-theme="light"] .next-meeting-pill .dot { background: #B01E28; }
/* Dark restore */
html[data-theme="dark"] .rate-ribbon {
  background: rgba(27,108,168,0.08);
  border-top-color: rgba(27,108,168,0.2);
  border-bottom-color: rgba(27,108,168,0.2);
}

/* .st-hero — stress-test.html hero                                     */
html[data-theme="light"] .st-hero {
  background: linear-gradient(160deg, #F2E8DC 0%, #EAD7C6 60%, #D1CBB5 100%);
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .st-hero::after { display: none; }
html[data-theme="light"] .st-hero h1 { color: #2C2218; }
html[data-theme="light"] .st-hero h1 em { color: #6B5A50; }
html[data-theme="light"] .st-hero p { color: #6B5D52; }
html[data-theme="light"] .st-eyebrow { color: #9A8E82; }
/* Dark restore */
html[data-theme="dark"] .st-hero {
  background: linear-gradient(160deg, var(--navy-mid, #162333) 0%, rgba(30,48,72,0.95) 100%);
  border-bottom-color: rgba(255,255,255,0.08);
}

/* .states-hero — states.html hero                                       */
html[data-theme="light"] .states-hero {
  background: linear-gradient(160deg, #F2E8DC 0%, #EAD7C6 60%, #D1CBB5 100%);
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .states-hero::after { display: none; }
html[data-theme="light"] .states-hero h1 { color: #2C2218; }
html[data-theme="light"] .states-hero h1 em { color: #6B5A50; }
html[data-theme="light"] .states-hero p { color: #6B5D52; }
html[data-theme="light"] .states-eyebrow { color: #9A8E82; }
/* Dark restore */
html[data-theme="dark"] .states-hero {
  background: linear-gradient(160deg, var(--navy-mid, #162333) 0%, rgba(14,26,42,0.98) 100%);
  border-bottom-color: rgba(255,255,255,0.08);
}

/* .pc-hero — pay-calculator.html hero                                   */
html[data-theme="light"] .pc-hero {
  background: linear-gradient(160deg, #F2E8DC 0%, #EAD7C6 60%, #D1CBB5 100%);
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .pc-hero::after { display: none; }
html[data-theme="light"] .pc-hero h1 { color: #2C2218; }
html[data-theme="light"] .pc-hero h1 em { color: #6B5A50; }
html[data-theme="light"] .pc-hero p { color: #6B5D52; }
/* Dark restore */
html[data-theme="dark"] .pc-hero {
  background: linear-gradient(160deg, var(--navy-mid, #162333) 0%, rgba(14,26,42,0.98) 100%);
  border-bottom-color: rgba(255,255,255,0.08);
}

/* .page-header — housing, fuel, energy, groceries, transport,          */
/* insurance, health, wages, and other content pages                    */
html[data-theme="light"] .page-header {
  background: linear-gradient(160deg, #F2E8DC 0%, #EAD7C6 60%, #D1CBB5 100%);
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .page-header h1,
html[data-theme="light"] .page-header h2 {
  color: #2C2218;
}
html[data-theme="light"] .page-header h1 em { color: #AAA891 !important; }
html[data-theme="light"] .page-header p,
html[data-theme="light"] .page-header-meta { color: #6B5D52; }
/* Dark restore */
html[data-theme="dark"] .page-header {
  background: var(--navy-mid, #162333);
  border-bottom-color: rgba(255,255,255,0.08);
}

/* ── PAY CALCULATOR GREEN ACCENT — LIGHT MODE REPLACEMENT ──────────── */
/* Replace #4CAF82 green with warm Deep Stone palette                   */
html[data-theme="light"] .pc-hero-card {
  background: #F2E8DC;
  border-color: #C2B0A6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
}
html[data-theme="light"] .pc-hero-card::before {
  background: linear-gradient(90deg, transparent, #C2B0A6 30%, #9A8E82 50%, #C2B0A6 70%, transparent);
}
html[data-theme="light"] .pc-freq-tab.on {
  background: #EAD7C6;
  color: #2C2218;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
html[data-theme="light"] .pc-takehome-label { color: #9A8E82; }
html[data-theme="light"] .pc-takehome-num { color: #2C2218; }
html[data-theme="light"] .pc-takehome-period { color: #6B5D52; }
html[data-theme="light"] .pc-effective-rate {
  background: rgba(194,176,166,0.2);
  border-color: #C2B0A6;
  color: #6B5A50;
}
html[data-theme="light"] .pc-toggle-btn.on {
  background: #6B5A50;
  color: #FAF8F5;
  box-shadow: none;
}
html[data-theme="light"] .pc-slider::-webkit-slider-thumb {
  background: #FAF8F5;
  border-color: #6B5A50;
}
html[data-theme="light"] .pc-slider:focus::-webkit-slider-thumb,
html[data-theme="light"] .pc-slider:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 8px rgba(107,90,80,0.2);
}
/* Dark restore — green accents */
html[data-theme="dark"] .pc-hero-card {
  background: linear-gradient(160deg, rgba(76,175,130,0.06) 0%, rgba(0,0,0,0.3) 100%);
  border-color: rgba(76,175,130,0.2);
  box-shadow: 0 24px 64px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.07);
}
html[data-theme="dark"] .pc-hero-card::before {
  background: linear-gradient(90deg, transparent, #4CAF82 30%, #5dd89c 50%, #4CAF82 70%, transparent);
}
html[data-theme="dark"] .pc-freq-tab.on {
  background: rgba(76,175,130,0.2);
  color: #4CAF82;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
html[data-theme="dark"] .pc-takehome-num { color: #4CAF82; }
html[data-theme="dark"] .pc-effective-rate {
  background: rgba(76,175,130,0.08);
  border-color: rgba(76,175,130,0.15);
  color: #4CAF82;
}
html[data-theme="dark"] .pc-toggle-btn.on {
  background: linear-gradient(135deg, #4CAF82 0%, #3d9e73 100%);
  color: #0D1B2A;
  box-shadow: 0 2px 8px rgba(76,175,130,0.3);
}

/* ── INSTRUMENT DISPLAYS — always dark regardless of page theme ──────── */
/* pred-hero only — sc-hero is now warm in light mode                   */

/* ── PREDICTION INSTRUMENT PANEL — LIGHT MODE (Sand Dune palette) ──────── */
html[data-theme="light"] .pred-hero {
  background-color: #EAD7C6;
  background-image: none;
  border: 1px solid #C2B0A6;
  color: #2C2218;
}
/* All child elements default to dark warm text */
html[data-theme="light"] .pred-hero * {
  color: #2C2218;
}
html[data-theme="light"] .pred-hero-inner {
  background: transparent;
}
/* Status bar */
html[data-theme="light"] .pred-hero .pred-meta {
  background: rgba(0,0,0,0.05);
  border-bottom-color: #D1CBB5;
  color: #6B5D52;
}
/* Live dot stays editorial red */
html[data-theme="light"] .pred-hero .live-dot {
  background: #B01E28;
}
/* STATUS: LIVE text — inline style color:var(--amber), force red */
html[data-theme="light"] .pred-hero [style*="color:var(--amber)"] {
  color: #B01E28 !important;
}
/* Quarter / coverage line */
html[data-theme="light"] .pred-hero .pred-quarter {
  color: #6B5D52;
}
/* Inner cards */
html[data-theme="light"] .pred-hero .pred-box {
  background: #FAF8F5;
  border: 1px solid #D1CBB5;
}
html[data-theme="light"] .pred-hero .pred-box.primary {
  background: #FDFAF8;
  border: 1px solid #C2B0A6;
  border-top: 3px solid #C2B0A6;
}
/* Card labels */
html[data-theme="light"] .pred-hero .pred-box-lbl {
  color: #9A8E82;
}
/* CPI estimate number */
html[data-theme="light"] .pred-hero .pred-val {
  color: #2C2218;
}
/* Underlying signal number */
html[data-theme="light"] .pred-hero .pred-val.raw {
  color: #6B5D52;
}
/* Sub text */
html[data-theme="light"] .pred-hero .pred-sub {
  color: #6B5D52;
}
html[data-theme="light"] .pred-hero .pred-sub strong {
  color: #2C2218;
}
/* CI band */
html[data-theme="light"] .pred-hero .ci-band {
  background: rgba(0,0,0,0.04);
  border-color: #D1CBB5;
}
html[data-theme="light"] .pred-hero .ci-band-lbl {
  color: #9A8E82;
}
html[data-theme="light"] .pred-hero .ci-bar-wrap {
  background: #D1CBB5;
}
html[data-theme="light"] .pred-hero .ci-bar {
  background: linear-gradient(90deg, #C2B0A6, #9A8E82);
}
html[data-theme="light"] .pred-hero .ci-point {
  background: #6B5A50;
}
html[data-theme="light"] .pred-hero .ci-range {
  color: #6B5D52;
}
/* Bank forecasts note — inline style color:rgba(255,255,255,0.55) */
html[data-theme="light"] .pred-hero [style*="rgba(255,255,255,0.55)"] {
  color: #6B5D52 !important;
}
/* Release metadata row */
html[data-theme="light"] .pred-hero .pred-release {
  border-top-color: #D1CBB5;
}
html[data-theme="light"] .pred-hero .pred-release-lbl {
  color: #9A8E82;
}
html[data-theme="light"] .pred-hero .pred-release-val {
  color: #2C2218;
}
html[data-theme="light"] .pred-hero .pred-release-val.amber {
  color: #6B5A50;
}
html[data-theme="light"] .pred-hero .pred-release-sep {
  background: #D1CBB5;
}

/* ── PREDICTION INSTRUMENT PANEL — DARK MODE RESTORE ───────────────────── */
html[data-theme="dark"] .pred-hero {
  background-color: #0A1628;
  background-image: linear-gradient(160deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.3) 100%);
  border: 1px solid rgba(255,255,255,0.09);
  color: #F5F0E8;
}
html[data-theme="dark"] .pred-hero .pred-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
html[data-theme="dark"] .pred-hero .pred-box.primary {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  border-top-width: 1px;
}

/* ── STRESS COLOUR TEXT OVERRIDES FOR LIGHT MODE ────────────────────── */
/* #E05C3A (High) = 3.6:1 on white — fails AA text. Override to         */
/* #8B2500 (dark warm red) = 8.6:1 on white.                            */
/* #E07C2A (Elevated) = 3.0:1 on white — fails AA text. Override to     */
/* #8B4A00 (dark amber) = 6.5:1 on white.                               */

html[data-theme="light"] .result-headline.red,
html[data-theme="light"] .result-row-value.red,
html[data-theme="light"] .calc3-hero-num.c-red,
html[data-theme="light"] .calc3-metric-val.red,
html[data-theme="light"] .cat-val.up,
html[data-theme="light"] .change-up,
html[data-theme="light"] .beh-yoy.pos,
html[data-theme="light"] .beh-signal-state.compressing,
html[data-theme="light"] .dt-dir.rising,
html[data-theme="light"] .cna-value.red,
html[data-theme="light"] .gap-meter-num.behind,
html[data-theme="light"] .cat-gap-val.behind,
html[data-theme="light"] .cat-gap-bar.behind,
html[data-theme="light"] .wages-stat-val.red,
html[data-theme="light"] .h-stat-val.red,
html[data-theme="light"] .tscore-change.chg-up,
html[data-theme="light"] .tscore-stat-val.gap-cost,
html[data-theme="light"] .cycle-label.avoid,
html[data-theme="light"] .cf-metric-val.red,
html[data-theme="light"] .cf-bd-total .cf-bd-val,
html[data-theme="light"] .distress-dir.rising {
  color: #8B2500 !important;
}

/* Inline style overrides — hardcoded colour values on elements */
html[data-theme="light"] [style*="color:#E05C3A"],
html[data-theme="light"] [style*="color: #E05C3A"] {
  color: #8B2500 !important;
}
html[data-theme="light"] [style*="color:#E07C2A"],
html[data-theme="light"] [style*="color: #E07C2A"] {
  color: #8B4A00 !important;
}

/* ── TOGGLE BUTTON ───────────────────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-standard, rgba(255,255,255,0.12));
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-left: 8px;
  flex-shrink: 0;
  vertical-align: middle;
}
/* Dark mode toggle hover — blue */
.theme-toggle:hover {
  border-color: var(--accent, #1B6CA8);
  color: var(--accent, #1B6CA8);
  background: rgba(27,108,168,0.08);
}
/* Light mode toggle hover — stone */
html[data-theme="light"] .theme-toggle:hover {
  border-color: #C2B0A6;
  color: #6B5A50;
  background: rgba(194,176,166,0.1);
}

/* Icon via CSS — no JS needed for initial render */
.theme-toggle::before {
  content: '☀';   /* shown in dark mode — click to switch to light */
}
html[data-theme="light"] .theme-toggle::before {
  content: '☾';   /* shown in light mode — click to switch to dark */
}

/* Mobile: toggle inside collapsible nav-links */
@media (max-width: 860px) {
  .theme-toggle {
    margin: 8px 0 4px 0;
    align-self: flex-start;
  }
}

/* ── LIGHT MODE NAV ─────────────────────────────────────────────────── */
/* .site-nav uses hardcoded rgba(13,27,42,0.96) — must override directly */
html[data-theme="light"] body {
  background: #F2E8DC;
}
html[data-theme="light"] .site-nav {
  background: #F2E8DC !important;
  border-bottom: 1px solid #D1CBB5 !important;
}
html[data-theme="light"] .nav-hamburger span {
  background: #2C2218;
}
/* Nav links */
html[data-theme="light"] .nav-links a {
  color: #2C2218;
}
html[data-theme="light"] .nav-links a:hover {
  color: #6B5A50;
  background: rgba(107,90,80,0.06);
}
html[data-theme="light"] .nav-links a.active {
  color: #2C2218;
  border-bottom: 2px solid #C2B0A6;
}
/* Portal / Login button */
html[data-theme="light"] .nav-links a.nav-login {
  color: #6B5A50;
  border-color: #C2B0A6;
}
html[data-theme="light"] .nav-links a.nav-login:hover {
  background: rgba(194,176,166,0.1);
  color: #6B5A50;
}
/* Subscribe CTA — deep warm brown */
html[data-theme="light"] .nav-links a.nav-cta {
  background: #2C2218;
  color: #FAF8F5;
}
html[data-theme="light"] .nav-links a.nav-cta:hover {
  background: #4A3F35;
  color: #FAF8F5;
}
/* Mobile open dropdown */
html[data-theme="light"] .nav-links {
  background: #F2E8DC;
  border-bottom-color: #D1CBB5;
}

/* ── TABLES IN LIGHT MODE ─────────────────────────────────────────────── */
html[data-theme="light"] table th,
html[data-theme="light"] .table-header {
  background: #EAD7C6;
  color: #2C2218;
  border-bottom: 2px solid #C2B0A6;
}
html[data-theme="light"] table tr:nth-child(even),
html[data-theme="light"] .row-alt {
  background: #F2E8DC;
}
html[data-theme="light"] table td,
html[data-theme="light"] .table-cell {
  border-bottom: 1px solid #E8E0D5;
  color: #2C2218;
}

/* ── TYPOGRAPHY — editorial metadata labels ──────────────────────────── */
html[data-theme="light"] .section-meta,
html[data-theme="light"] .card-meta,
html[data-theme="light"] .data-label,
html[data-theme="light"] .source-label {
  color: #9A8E82;
  font-size: 0.8em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── SECTION BACKGROUNDS — ALTERNATING WARM RHYTHM ───────────────────── */
html[data-theme="light"] .history-section {
  background: #F5F0E8;
  border-top-color: #D1CBB5;
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .categories {
  background: #FAF8F5;
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .behaviour {
  background: #F5F0E8;
  border-top-color: #D1CBB5;
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .wages-section {
  background: #FAF8F5;
  border-top-color: #D1CBB5;
}
html[data-theme="light"] .explained {
  background: #F5F0E8;
  border-bottom-color: #D1CBB5;
}
html[data-theme="light"] .about {
  background: #FAF8F5;
  border-bottom-color: #D1CBB5;
}

/* ── SUBSCRIBE — INTENTIONAL DARK ANCHOR ─────────────────────────────── */
html[data-theme="light"] .subscribe {
  background: linear-gradient(160deg, #2C2218 0%, #4A3F35 100%);
  border-bottom-color: transparent;
}
html[data-theme="light"] .subscribe-headline {
  color: #FAF8F5;
}
html[data-theme="light"] .subscribe-copy {
  color: rgba(250,248,245,0.7);
}
html[data-theme="light"] .subscribe .form-input {
  background: rgba(250,248,245,0.1);
  border-color: rgba(250,248,245,0.2);
  color: #FAF8F5;
}
html[data-theme="light"] .subscribe .form-input::placeholder {
  color: rgba(250,248,245,0.4);
}
html[data-theme="light"] .subscribe .form-btn {
  background: #FAF8F5;
  color: #2C2218;
}
html[data-theme="light"] .subscribe .form-btn:hover {
  background: #EAD7C6;
  color: #2C2218;
}
html[data-theme="light"] .subscribe .form-note {
  color: rgba(250,248,245,0.5);
}

/* ── CARD DEPTH — GENTLE LIFT ─────────────────────────────────────────── */
html[data-theme="light"] .tscore-card,
html[data-theme="light"] .score-card,
html[data-theme="light"] .card {
  box-shadow: 0 1px 4px rgba(44,34,24,0.06), inset 0 1px 2px rgba(255,255,255,0.8);
}

/* ── BAR CHART TRACKS — WARM NOT GREY ────────────────────────────────── */
html[data-theme="light"] .beh-bar-track {
  background: #E8E0D5;
  border-color: #D1CBB5;
}
html[data-theme="light"] .card-bar {
  background: #E8E0D5;
}
html[data-theme="light"] .tscore-cat-bar-wrap {
  background: #E8E0D5;
}

/* ── TYPOGRAPHY — strong text in light content sections ─────────────── */
html[data-theme="light"] .explained-body strong,
html[data-theme="light"] .about-body strong {
  color: #2C2218;
}
html[data-theme="light"] .behaviour strong,
html[data-theme="light"] .wages-section strong {
  color: #2C2218 !important;
}

/* ── METRIC CARDS — secondary label colours ───────────────────────────── */
html[data-theme="light"] .tscore-denom,
html[data-theme="light"] .tscore-pts,
html[data-theme="light"] .tscore-stats-label,
html[data-theme="light"] .tscore-stat-name {
  color: #9A8E82;
}

/* ── CATEGORIES SECTION ───────────────────────────────────────────────── */
html[data-theme="light"] .categories {
  background: #F5F0E8;
}
html[data-theme="light"] .card-icon {
  background: #EAD7C6 !important;
}

/* ── BEHAVIOUR INDEX — signal cards, bar tracks ──────────────────────── */
html[data-theme="light"] .beh-signal {
  border-left: 3px solid #EAD7C6;
}

/* ── WAGES VS COSTS — gap track ──────────────────────────────────────── */
html[data-theme="light"] .gap-track-wages {
  background: #E8E0D5;
}

/* ── METHODOLOGY / ABOUT ─────────────────────────────────────────────── */
html[data-theme="light"] .sources-box {
  border: 1px solid #C2B0A6;
}
html[data-theme="light"] .sources-title {
  background: #EAD7C6;
  color: #2C2218;
  padding: 8px 12px;
  margin-bottom: 12px;
}
html[data-theme="light"] .independence-note {
  background: rgba(225,195,171,0.2);
  border-left: 3px solid #E1C3AB;
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */
html[data-theme="light"] footer {
  border-top: 1px solid #D1CBB5;
}
html[data-theme="light"] .footer-brand-name {
  color: #EAD7C6;
}

/* ── MOVE 1: REGIME BAR — actual class: .hero-regime-line ─────────────── */
html[data-theme="light"] .hero-regime-line {
  background: #2C2218 !important;
  padding: 6px 12px;
  border-radius: 4px;
}
html[data-theme="light"] .hero-regime-line * {
  color: #EAD7C6 !important;
}
html[data-theme="light"] .hero-regime-line a {
  color: #EAD7C6 !important;
}

/* ── MOVE 2: METRIC CARD EYEBROWS — actual class: .tscore-eyebrow ─────── */
html[data-theme="light"] .tscore-card,
html[data-theme="light"] .score-card {
  overflow: hidden !important;
}
html[data-theme="light"] .tscore-eyebrow {
  background: #EAD7C6 !important;
  color: #4A3530 !important;
  padding: 6px 14px !important;
  margin: -32px -32px 12px -32px !important;
  border-radius: 4px 4px 0 0 !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.08em !important;
}

/* ── MOVE 3: ALTERNATING SECTION BACKGROUNDS ──────────────────────────── */
html[data-theme="light"] .behaviour {
  background: #EAD7C6 !important;
}
html[data-theme="light"] .wages-section {
  background: #EAD7C6 !important;
}
html[data-theme="light"] .tracker-section {
  background: #EAD7C6 !important;
}

/* ── BEHAVIOUR — label typography in light mode ───────────────────────── */
html[data-theme="light"] .behaviour .beh-panel-title,
html[data-theme="light"] .behaviour .beh-panel-badge,
html[data-theme="light"] .behaviour .cna-divider,
html[data-theme="light"] .behaviour .cna-source,
html[data-theme="light"] .behaviour .beh-signal-eyebrow,
html[data-theme="light"] .behaviour .beh-bar-label,
html[data-theme="light"] .behaviour .beh-source,
html[data-theme="light"] .behaviour .dt-label {
  color: #6B5A50 !important;
}
/* Inline-styled grey labels (no class — colour embedded in style attr) */
html[data-theme="light"] .behaviour [style*="rgba(138,155,176"] {
  color: #6B5A50 !important;
}

/* ── TASK 2: METRIC CARD BORDER-TOP — remove coloured accent, neutral top */
html[data-theme="light"] .tscore-card,
html[data-theme="light"] .tscore-primary,
html[data-theme="light"] #tscore-cpi,
html[data-theme="light"] #tscore-gap {
  border-top: 1px solid #E0D9D0 !important;
}

/* ── TASK 2: SECTION TITLE UNDERLINE — actual class: .section-title ──── */
html[data-theme="light"] .section-title {
  display: inline-block !important;
  border-bottom: 2px solid #6B5A50 !important;
  padding-bottom: 4px !important;
  margin-bottom: 20px !important;
}

/* ── TASK 2: CATEGORY CARD STATUS BORDER — using :has() (actual cards are
   div.card with child .card-indicator.up/.down/.stable) ─────────────── */
html[data-theme="light"] .card:has(.card-indicator.up) {
  border-top: 3px solid #E05C3A !important;
}
html[data-theme="light"] .card:has(.card-indicator.down) {
  border-top: 3px solid #C2B0A6 !important;
}
html[data-theme="light"] .card:has(.card-indicator.stable) {
  border-top: 3px solid #D1CBB5 !important;
}

/* ── TASK 2: SCORE DENOM — muted and smaller ─────────────────────────── */
html[data-theme="light"] .tscore-denom,
html[data-theme="light"] .score-denom {
  opacity: 0.45 !important;
  font-size: 0.55em !important;
}

/* ── GLOBAL TYPOGRAPHY — Hanken Grotesk hero headings (all pages) ────── */
.hero h1,
.page-hero h1,
.hero-section h1,
.stress-hero h1,
.sc-hero h1,
.page-header h1,
.page-header .page-title {
  font-family: 'Hanken Grotesk', sans-serif !important;
  font-weight: 900 !important;
  font-style: italic !important;
  letter-spacing: -3px !important;
  line-height: 0.92 !important;
}

/* Accent em word — italic within hero h1 (both modes) */
.hero h1 em,
.page-hero h1 em,
.hero-section h1 em,
.hero h1 .accent,
.page-hero h1 .accent {
  font-style: italic !important;
  font-weight: 900 !important;
}
html[data-theme="light"] .hero h1 em,
html[data-theme="light"] .page-hero h1 em,
html[data-theme="light"] .hero h1 .accent {
  color: #AAA891 !important;
}
html[data-theme="dark"] .hero h1 em,
html[data-theme="dark"] .page-hero h1 em,
html[data-theme="dark"] .hero h1 .accent {
  color: #EAD7C6 !important;
}

/* ── STATES PAGE — hero stat cards (actual class: .states-hero-stat) ─── */
html[data-theme="light"] .states-hero-stat .s-val {
  color: #2C2218;
}
html[data-theme="light"] .states-hero-stat .s-lbl {
  color: #6B5D52;
}

/* ── DESIGN AUDIT FIXES — white-on-light text + grey bar tracks ─────── */
html[data-theme="light"] .site-name { color: #2C2218 !important; }
html[data-theme="light"] .commentator-name { color: #2C2218 !important; }
html[data-theme="light"] .tracker-score-big,
html[data-theme="light"] .tracker-bar-score { color: #2C2218 !important; }
html[data-theme="light"] .dt-val { color: #2C2218 !important; }
html[data-theme="light"] .pp-bar-val { color: #2C2218 !important; }
html[data-theme="light"] .cat-gap-bar-wrap,
html[data-theme="light"] .pp-bar-outer { background: #E8E0D5 !important; }
html[data-theme="light"] .gap-outlook-dot { background: #6B5A50 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   FULL-SITE LIGHT MODE SWEEP — all inner pages
   --white stays #FFF and does not auto-resolve; every class that uses it
   needs an explicit light-mode override here.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Cross-page: page titles and section headings ───────────────────────── */
html[data-theme="light"] .page-title { color: #2C2218 !important; }
html[data-theme="light"] .section-title { color: #2C2218 !important; }
html[data-theme="light"] .section-head h2 { color: #2C2218 !important; }

/* ── Cross-page: stat values, category values, calc bar values ──────────── */
html[data-theme="light"] .stat-value { color: #2C2218 !important; }
html[data-theme="light"] .cat-val { color: #2C2218 !important; }
html[data-theme="light"] .calc3-bar-val,
html[data-theme="light"] .st-cat-val { color: #2C2218 !important; }

/* ── Cross-page: shared calc3 tool number components ────────────────────── */
html[data-theme="light"] .calc3-header-left h3 { color: #2C2218 !important; }
html[data-theme="light"] .calc3-value { color: #2C2218 !important; }
html[data-theme="light"] .calc3-hero-num { color: #2C2218 !important; }
html[data-theme="light"] .calc3-metric-val { color: #2C2218 !important; }
html[data-theme="light"] .calc3-section h2 { color: #2C2218 !important; }

/* ── Housing page ────────────────────────────────────────────────────────── */
html[data-theme="light"] .stat-box { background: #F5F0E8 !important; border-color: #D1CBB5 !important; }
html[data-theme="light"] .calc-value { color: #2C2218 !important; }
html[data-theme="light"] .rent-table td:nth-child(2),
html[data-theme="light"] .rent-table td:nth-child(3) { color: #2C2218 !important; }

/* ── Energy page ─────────────────────────────────────────────────────────── */
html[data-theme="light"] .state-table td:nth-child(2),
html[data-theme="light"] .state-table td:nth-child(3) { color: #2C2218 !important; }

/* ── Fuel page ───────────────────────────────────────────────────────────── */
html[data-theme="light"] .city-value { color: #2C2218 !important; }
html[data-theme="light"] .result-headline { color: #2C2218 !important; }
html[data-theme="light"] .result-row-value { color: #2C2218 !important; }
html[data-theme="light"] .sf-station-name { color: #2C2218 !important; }
html[data-theme="light"] .sf-price { color: #2C2218 !important; }
html[data-theme="light"] .hist-chart-header h2 { color: #2C2218 !important; }
html[data-theme="light"] .hist-legend-val { color: #2C2218 !important; }
html[data-theme="light"] .hist-stat-val { color: #2C2218 !important; }
html[data-theme="light"] .hist-range-btn.on { color: #2C2218 !important; background: rgba(44,34,24,0.08) !important; }
html[data-theme="light"] .fuel-type-chip strong { color: #2C2218 !important; }
html[data-theme="light"] .cf-card-title { color: #2C2218 !important; }
html[data-theme="light"] .cf-val { color: #2C2218 !important; }
html[data-theme="light"] .cf-metric-val { color: #2C2218 !important; }
html[data-theme="light"] .cf-bd-val { color: #2C2218 !important; }
html[data-theme="light"] .cf-bd-total .cf-bd-name { color: #2C2218 !important; }
html[data-theme="light"] .fuel-price-table tbody td { color: #2C2218 !important; }

/* ── States page ─────────────────────────────────────────────────────────── */
html[data-theme="light"] .state-abbr { color: #2C2218 !important; }
html[data-theme="light"] .compare-bar-score { color: #2C2218 !important; }
html[data-theme="light"] .compare-row:hover .compare-state-name { color: #2C2218 !important; }
html[data-theme="light"] .weight-item .wi-val { color: #2C2218 !important; }
html[data-theme="light"] .methodology h3 { color: #2C2218 !important; }
html[data-theme="light"] .drill-cat-name { color: #6B5D52 !important; }

/* ── Stress Test page ────────────────────────────────────────────────────── */
html[data-theme="light"] .st-val { color: #2C2218 !important; }
html[data-theme="light"] .st-section-head:hover .st-section-title { color: #2C2218 !important; }
html[data-theme="light"] .st-bd-val { color: #2C2218 !important; }
html[data-theme="light"] .st-bd-name { color: #2C2218 !important; } /* overrides inline color:var(--white) on "Total weekly" */
html[data-theme="light"] .st-share-text strong { color: #2C2218 !important; }
html[data-theme="light"] #st-hero-weekly { color: #2C2218 !important; }
html[data-theme="light"] #st-income-pct-val { color: #2C2218 !important; }
html[data-theme="light"] #st-percentile-txt { color: #2C2218 !important; }

/* ── RBA Scenario page ───────────────────────────────────────────────────── */
html[data-theme="light"] .sc-val { color: #2C2218 !important; }
html[data-theme="light"] .sc-result-move { color: #2C2218 !important; }
html[data-theme="light"] .sc-repay-val { color: #2C2218 !important; }
html[data-theme="light"] #sc-annual-delta { color: #2C2218 !important; }

/* ── Pay Calculator page ─────────────────────────────────────────────────── */
html[data-theme="light"] .pc-card-title { color: #2C2218 !important; }
html[data-theme="light"] .pc-val { color: #2C2218 !important; }
html[data-theme="light"] .pc-bd-val { color: #2C2218 !important; }
html[data-theme="light"] .pc-bd-total .pc-bd-name { color: #2C2218 !important; }
html[data-theme="light"] .pc-donut-pct { color: #2C2218 !important; }
html[data-theme="light"] .pc-legend-val { color: #2C2218 !important; }

/* ── Regime page ─────────────────────────────────────────────────────────── */
html[data-theme="light"] .rlc-regime-name { color: #2C2218 !important; }
html[data-theme="light"] .rc-regime-name { color: #2C2218 !important; }

/* ── Nowcast page ────────────────────────────────────────────────────────── */
html[data-theme="light"] .acc-tier.primary .acc-title { color: #2C2218 !important; }
html[data-theme="light"] .vt td.ens { color: #2C2218 !important; }

/* ── Shadow Inflation page ───────────────────────────────────────────────── */
html[data-theme="light"] .si-gap-text h4 { color: #2C2218 !important; }

/* ── Stress Test page — buttons, sliders, panels ────────────────────────── */
/* Toggle button group container */
html[data-theme="light"] .st-toggle {
  background: rgba(44,34,24,0.04) !important;
  border-color: #D1CBB5 !important;
}
/* Inactive toggle buttons */
html[data-theme="light"] .st-toggle-btn {
  background: transparent !important;
  color: #6B5D52 !important;
  border-right-color: #D1CBB5 !important;
}
html[data-theme="light"] .st-toggle-btn:not(.on):hover {
  background: rgba(44,34,24,0.06) !important;
  color: #2C2218 !important;
}
/* Active toggle button — dark warm fill, no orange gradient */
html[data-theme="light"] .st-toggle-btn.on {
  background: #2C2218 !important;
  color: #EAD7C6 !important;
  box-shadow: none !important;
}

/* Slider track — Deep Stone fill via ::webkit-slider-runnable-track.
   JS sets --pct on both the element AND its parentElement to work around WebKit custom property scoping.
   Literal hex values used in gradient (avoids var() resolution chain that WebKit may fail on).
   Default --pct: 50% set on element so track renders before JS fires. */
html[data-theme="light"] .sc-slider { --pct: 35%; }
html[data-theme="light"] .pc-slider { --pct: 50%; }
html[data-theme="light"] .calc3-slider { --pct: 50%; }
html[data-theme="light"] .cf-slider-el { --pct: 20%; }

html[data-theme="light"] .sc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #6B5A50 var(--pct, 35%), #E8E0D5 var(--pct, 35%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="light"] .pc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #6B5A50 var(--pct, 50%), #E8E0D5 var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="light"] .calc3-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #6B5A50 var(--pct, 50%), #E8E0D5 var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="light"] .cf-slider-el::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #6B5A50 var(--pct, 20%), #E8E0D5 var(--pct, 20%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="light"] .st-slider { --pct: 50%; }
html[data-theme="light"] .st-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #6B5A50 var(--pct, 50%), #E8E0D5 var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="light"] .st-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #FDFAF8; border: 2px solid #6B5A50;
  cursor: pointer; margin-top: -8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
html[data-theme="light"] .st-slider::-moz-range-track {
  background: #E0D9D0; height: 4px; border-radius: 2px; border: none;
}
html[data-theme="light"] .st-slider::-moz-range-progress {
  background: #E07C2A; height: 4px; border-radius: 2px;
}
html[data-theme="light"] .st-slider::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #FDFAF8; border: 2px solid #6B5A50; cursor: pointer;
}
html[data-theme="dark"] .st-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #E07C2A var(--pct, 50%), rgba(255,255,255,0.08) var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="dark"] .sc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #E07C2A var(--pct, 35%), rgba(255,255,255,0.08) var(--pct, 35%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="dark"] .pc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #E07C2A var(--pct, 50%), rgba(255,255,255,0.08) var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="dark"] .calc3-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #E07C2A var(--pct, 50%), rgba(255,255,255,0.08) var(--pct, 50%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
html[data-theme="dark"] .cf-slider-el::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #E07C2A var(--pct, 20%), rgba(255,255,255,0.08) var(--pct, 20%)) !important;
  height: 4px !important; border-radius: 2px !important;
}
/* Category accordion sections */
html[data-theme="light"] .st-section-head {
  border-bottom-color: #E0D9D0 !important;
}
html[data-theme="light"] .st-section-icon {
  background: rgba(107,90,80,0.08) !important;
  border-color: rgba(107,90,80,0.2) !important;
}
/* Results panel */
html[data-theme="light"] .st-result-panel {
  background: #FDFCFA !important;
  border-color: #E0D9D0 !important;
  box-shadow: 0 4px 16px rgba(44,34,24,0.06) !important;
}
/* Breakdown section */
html[data-theme="light"] .st-breakdown {
  background: #F5F0E8 !important;
  border-color: #E0D9D0 !important;
}
html[data-theme="light"] .st-breakdown-head {
  border-bottom-color: #E0D9D0 !important;
}
html[data-theme="light"] .st-breakdown-row:hover {
  background: rgba(44,34,24,0.04) !important;
}
/* Calculator layout — subtle sage tint */
html[data-theme="light"] .st-layout {
  background: rgba(170,168,145,0.05) !important;
  border-radius: 8px !important;
}

/* ── RBA Scenario page — buttons, warning, layout ───────────────────────── */
/* Scenario move buttons — base */
html[data-theme="light"] .sc-move-btn {
  border-color: #D1CBB5 !important;
  color: #6B5D52 !important;
}
html[data-theme="light"] .sc-move-btn:hover {
  background: rgba(44,34,24,0.05) !important;
}
/* Cut buttons — sage green tint */
html[data-theme="light"] .sc-move-btn.cut {
  background: rgba(170,168,145,0.15) !important;
  border-color: #AAA891 !important;
  color: #6B7A5A !important;
}
html[data-theme="light"] .sc-move-btn.cut:hover,
html[data-theme="light"] .sc-move-btn.cut.sel {
  background: rgba(170,168,145,0.3) !important;
  color: #2C2218 !important;
}
/* Hike buttons — warm red tint */
html[data-theme="light"] .sc-move-btn.hike {
  background: rgba(224,92,58,0.08) !important;
  border-color: #E05C3A !important;
  color: #C04030 !important;
}
html[data-theme="light"] .sc-move-btn.hike:hover,
html[data-theme="light"] .sc-move-btn.hike.sel {
  background: rgba(224,92,58,0.18) !important;
  color: #2C2218 !important;
}
/* Hold buttons — neutral stone */
html[data-theme="light"] .sc-move-btn.hold {
  background: rgba(194,176,166,0.2) !important;
  border-color: #C2B0A6 !important;
  color: #6B5D52 !important;
}
html[data-theme="light"] .sc-move-btn.hold:hover,
html[data-theme="light"] .sc-move-btn.hold.sel {
  background: rgba(194,176,166,0.35) !important;
  color: #2C2218 !important;
}
/* Selected state — dark warm fill */
html[data-theme="light"] .sc-move-btn.sel {
  background: #2C2218 !important;
  border-color: #2C2218 !important;
  color: #EAD7C6 !important;
}
/* Hike cycle warning notice */
html[data-theme="light"] .hike-cycle-notice {
  background: rgba(225,195,171,0.25) !important;
  border-color: #E1C3AB !important;
}
html[data-theme="light"] .hike-cycle-notice * {
  color: #2C2218 !important;
}
/* Calculator panels — subtle sage tint */
html[data-theme="light"] .sc-panel {
  background: rgba(170,168,145,0.06) !important;
  border-color: #D1CBB5 !important;
}
html[data-theme="light"] .sc-panel-head {
  border-bottom-color: #D1CBB5 !important;
}

/* ── RBA Scenario — slider & toggle overrides ────────────────────── */
html[data-theme="light"] .sc-slider::-webkit-slider-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; margin-top: -7px !important; }
html[data-theme="light"] .sc-slider:focus::-webkit-slider-thumb,
html[data-theme="light"] .sc-slider:active::-webkit-slider-thumb { box-shadow: 0 0 0 8px rgba(107,90,80,0.15) !important; }
html[data-theme="light"] .sc-slider::-moz-range-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; }
html[data-theme="light"] .sc-slider::-moz-range-track { background: #E8E0D5 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .sc-slider::-moz-range-progress { background: #6B5A50 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .sc-toggle-btn.on { background: #2C2218 !important; color: #EAD7C6 !important; box-shadow: none !important; }
html[data-theme="light"] .sc-toggle-btn:not(.on):hover { background: rgba(44,34,24,0.06) !important; color: #2C2218 !important; }

/* ── Pay Calculator — slider & toggle overrides ──────────────────── */
html[data-theme="light"] .pc-slider::-webkit-slider-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; margin-top: -7px !important; }
html[data-theme="light"] .pc-slider:focus::-webkit-slider-thumb,
html[data-theme="light"] .pc-slider:active::-webkit-slider-thumb { box-shadow: 0 0 0 8px rgba(107,90,80,0.15) !important; }
html[data-theme="light"] .pc-slider::-moz-range-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; }
html[data-theme="light"] .pc-slider::-moz-range-track { background: #E8E0D5 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .pc-slider::-moz-range-progress { background: #6B5A50 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .pc-toggle-btn.on { background: #2C2218 !important; color: #EAD7C6 !important; box-shadow: none !important; }
html[data-theme="light"] .pc-toggle-btn:not(.on):hover { background: rgba(44,34,24,0.06) !important; color: #2C2218 !important; }
html[data-theme="light"] .pc-freq-tab.on { background: rgba(107,90,80,0.15) !important; color: #2C2218 !important; box-shadow: none !important; }
html[data-theme="light"] .pc-freq-tab:not(.on):hover { background: rgba(44,34,24,0.06) !important; color: #2C2218 !important; }

/* ── Calc3 (housing + fuel) — slider & toggle overrides ─────────── */
html[data-theme="light"] .calc3-slider::-webkit-slider-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; margin-top: -7px !important; }
html[data-theme="light"] .calc3-slider:focus::-webkit-slider-thumb,
html[data-theme="light"] .calc3-slider:active::-webkit-slider-thumb { box-shadow: 0 0 0 8px rgba(107,90,80,0.15) !important; }
html[data-theme="light"] .calc3-slider::-moz-range-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; }
html[data-theme="light"] .calc3-slider::-moz-range-track { background: #E8E0D5 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .calc3-slider::-moz-range-progress { background: #6B5A50 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .calc3-toggle-btn.on { background: #2C2218 !important; color: #EAD7C6 !important; box-shadow: none !important; }
html[data-theme="light"] .calc3-toggle-btn:not(.on):hover { background: rgba(44,34,24,0.06) !important; color: #2C2218 !important; }

/* ── Fuel car-finance sliders ────────────────────────────────────── */
html[data-theme="light"] .cf-slider-el::-webkit-slider-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; margin-top: -7px !important; }
html[data-theme="light"] .cf-slider-el::-moz-range-thumb { width: 18px !important; height: 18px !important; background: #FDFCFA !important; border: 2px solid #6B5A50 !important; box-shadow: 0 1px 3px rgba(44,34,24,0.2) !important; }
html[data-theme="light"] .cf-slider-el::-moz-range-track { background: #E8E0D5 !important; height: 4px !important; border-radius: 2px !important; }
html[data-theme="light"] .cf-slider-el::-moz-range-progress { background: #6B5A50 !important; height: 4px !important; border-radius: 2px !important; }

/* ── States page ─────────────────────────────────────────────────── */
html[data-theme="light"] .state-score-bar { background: #E8E0D5 !important; }
html[data-theme="light"] .state-card:hover { border-color: #C2B0A6 !important; box-shadow: 0 8px 24px rgba(44,34,24,0.1) !important; }
html[data-theme="light"] .state-card.selected { border-color: #6B5A50 !important; box-shadow: 0 0 0 1px rgba(107,90,80,0.3), 0 8px 24px rgba(44,34,24,0.12) !important; }
html[data-theme="light"] .compare-bar-track { background: #E8E0D5 !important; }
html[data-theme="light"] .compare-nat-line { background: rgba(44,34,24,0.2) !important; }

/* ── Nowcast page ────────────────────────────────────────────────── */
html[data-theme="light"] .acc-divider { background: rgba(44,34,24,0.1) !important; }
html[data-theme="light"] .vt thead tr { border-color: #E0D9D0 !important; }
html[data-theme="light"] .vt tbody tr { border-color: rgba(44,34,24,0.05) !important; }
html[data-theme="light"] .vt tbody tr:hover { background: rgba(44,34,24,0.03) !important; }
html[data-theme="light"] .acc-tier.primary { background: rgba(107,90,80,0.06) !important; border-color: rgba(107,90,80,0.25) !important; }
html[data-theme="light"] .acc-tier.primary .acc-val { color: #6B5A50 !important; }
html[data-theme="light"] .sc-badge { background: rgba(107,90,80,0.08) !important; border-color: rgba(107,90,80,0.25) !important; color: #6B5D52 !important; }
html[data-theme="light"] .sc-badge.green { background: rgba(107,122,90,0.1) !important; border-color: rgba(107,122,90,0.3) !important; color: #6B7A5A !important; }

/* ── Cross-page calc3 — bar tracks and number inputs ─────────────── */
html[data-theme="light"] .calc3-bar-track { background: #E8E0D5 !important; }
html[data-theme="light"] .calc3-num-input { background: rgba(44,34,24,0.04) !important; border-color: #D1CBB5 !important; color: #2C2218 !important; }
html[data-theme="light"] .calc3-num-input:focus { border-color: rgba(107,90,80,0.5) !important; box-shadow: 0 0 0 3px rgba(107,90,80,0.1) !important; }
html[data-theme="light"] .cf-num-inp { background: rgba(44,34,24,0.04) !important; border-color: #D1CBB5 !important; color: #2C2218 !important; }
html[data-theme="light"] .cf-num-inp:focus { border-color: rgba(107,90,80,0.5) !important; }
html[data-theme="light"] .pc-num-input { background: rgba(44,34,24,0.04) !important; border-color: #D1CBB5 !important; color: #2C2218 !important; }
html[data-theme="light"] .pc-num-input:focus { border-color: rgba(107,90,80,0.5) !important; }

/* ── Regime page ─────────────────────────────────────────────────── */
html[data-theme="light"] .rlc-t2-split { background: rgba(44,34,24,0.04) !important; border-color: #D1CBB5 !important; }
html[data-theme="light"] .prob-track { background: #E8E0D5 !important; }
html[data-theme="light"] .transition-section { background: rgba(170,168,145,0.06) !important; border-color: #D1CBB5 !important; }
html[data-theme="light"] .ts-watch-item { background: rgba(107,90,80,0.08) !important; color: #6B5D52 !important; }
html[data-theme="light"] .signal-item { background: rgba(44,34,24,0.03) !important; border-color: #D1CBB5 !important; }
html[data-theme="light"] .method-box { background: rgba(44,34,24,0.03) !important; border-color: #D1CBB5 !important; }
html[data-theme="light"] .timeline-chart { background: rgba(170,168,145,0.06) !important; border-color: #D1CBB5 !important; }

/* ── Wages page — gap bars and income table ──────────────────────── */
html[data-theme="light"] .wg-stat-val.blue { color: #2C5F8A !important; }
html[data-theme="light"] .wg-gap-wpi { color: #2C5F8A !important; }
html[data-theme="light"] .income-table .green { color: #4A7A46 !important; }
html[data-theme="light"] .calc3-insight.green { background: rgba(74,122,70,0.08) !important; border-color: rgba(74,122,70,0.2) !important; color: #4A7A46 !important; }
html[data-theme="light"] .calc3-insight.red { background: rgba(180,60,48,0.08) !important; border-color: rgba(180,60,48,0.2) !important; color: #B43C30 !important; }

/* ── Stress-test: stress badge, live badge, percentile fills ─────── */
html[data-theme="light"] .stress-low {
  background: rgba(45,106,79,0.12) !important;
  border-color: #2D6A4F !important;
  color: #2D6A4F !important;
}
html[data-theme="light"] .calc3-live-badge {
  background: rgba(45,106,79,0.12) !important;
  border-color: #2D6A4F !important;
  color: #2D6A4F !important;
}
html[data-theme="light"] .calc3-live-badge::before { background: #2D6A4F !important; }
html[data-theme="light"] .st-percentile-fill {
  background: linear-gradient(90deg, #2D6A4F 0%, #8A6C40 50%, #E05C3A 100%) !important;
}
html[data-theme="light"] .st-cat-track { background: #E8E0D5 !important; }
html[data-theme="light"] .st-cat-fill { background: #6B5A50 !important; }
html[data-theme="light"] .st-cat-fill.fill-green { background: #2D6A4F !important; }
html[data-theme="light"] .st-cat-name { color: #9A8E82 !important; }
