/* ==========================================================================
   Rate and Reason — shared stylesheet
   One file for the whole site. All colors are CSS custom properties so the
   light and dark themes stay in sync. Theme is set on <html data-theme="...">
   by a tiny inline script in <head> before first paint.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #edf2ef;
  --surface-3: #e2eae5;
  --text: #13201b;
  --muted: #4b5a53;
  --border: #d5ded9;
  --brand: #0d6647;          /* emerald: "Rate" */
  --brand-strong: #0a5239;
  --brand-ink: #ffffff;
  --brand-soft: #dcefe6;
  --accent: #9a4a07;         /* amber: "Reason" */
  --accent-soft: #fbeedc;
  --link: #0b5f43;
  --focus: #1a73e8;
  --warn-bg: #fff6e0;
  --warn-border: #e7c36a;
  --error: #b42318;
  --shadow: 0 1px 2px rgba(16, 32, 27, .06), 0 6px 20px rgba(16, 32, 27, .07);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1311;
  --surface: #141c19;
  --surface-2: #1b2521;
  --surface-3: #23302b;
  --text: #e6eeea;
  --muted: #a4b3ac;
  --border: #2b3833;
  --brand: #4cc79b;
  --brand-strong: #6fd8b1;
  --brand-ink: #062016;
  --brand-soft: #173a2d;
  --accent: #f2b25c;
  --accent-soft: #3a2a14;
  --link: #74d9b4;
  --focus: #8ab4f8;
  --warn-bg: #2e2612;
  --warn-border: #7a6124;
  --error: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); margin-top: .4em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.prose { max-width: 760px; overflow-wrap: break-word; }
.prose a { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- 3. Header + navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; margin-right: auto; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .logo-and { color: var(--accent); font-weight: 700; }

.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 4px 16px 20px;
}
.site-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nav-list > li { margin: 0; }
.nav-link, .mega-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .5rem .8rem; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font: inherit; font-size: .98rem; font-weight: 600;
  background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .mega-toggle:hover, .mega-toggle[aria-expanded="true"] { background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--brand); }
.nav-soon { color: var(--muted); cursor: default; }
.nav-soon:hover { background: none; }
.mega-toggle .chev { width: 12px; height: 12px; transition: transform .15s; }
.mega-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.theme-toggle, .menu-toggle {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--surface-2); }
.theme-toggle svg, .menu-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mega menu — mobile first (accordion) */
.mega { display: none; }
.mega-inner { padding: 8px 0 16px; }
.mega-city-btn {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  padding: .75rem .25rem; background: none; border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.mega-city-btn::after { content: "+"; font-weight: 700; color: var(--muted); }
.mega-city-btn[aria-expanded="true"]::after { content: "−"; }
.mega-panel { display: none; padding: 6px 0 12px 10px; }
.mega-panel.is-open { display: block; }
.mega-panel-title { display: none; }
.mega-group { margin: 0; }
.mega-cat {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  margin: 0; padding: .55rem .25rem; background: none; border: 0; color: var(--muted);
  font: inherit; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-align: left;
}
.mega-cat::after { content: "+"; }
.mega-cat[aria-expanded="true"]::after { content: "−"; }
.mega-links { list-style: none; margin: 0 0 6px; padding: 0 0 0 8px; display: none; }
.mega-group.is-open .mega-links { display: block; }
.mega-links li { margin: 0; }
.mega-links a, .mega-links .soon { display: block; padding: .3rem 0; font-size: .95rem; }
.mega-links a { color: var(--text); text-decoration: none; }
.mega-links a:hover { color: var(--link); text-decoration: underline; }
.mega-all { display: inline-block; margin-top: 6px; font-weight: 600; font-size: .95rem; }

/* Mobile: nav items stack full width */
.site-nav .nav-link, .site-nav .mega-toggle { width: 100%; justify-content: space-between; padding: .8rem .25rem; border-radius: 0; border-bottom: 1px solid var(--border); }
.mega.is-open { display: block; }

@media (min-width: 1000px) {
  .menu-toggle { display: none; }
  .site-nav { display: block; position: static; padding: 0; border: 0; box-shadow: none; max-height: none; overflow: visible; background: none; }
  .nav-list { flex-direction: row; align-items: center; gap: 2px; }
  .site-nav .nav-link, .site-nav .mega-toggle { width: auto; padding: .5rem .8rem; border-radius: var(--radius-sm); border-bottom: 0; }
  .has-mega { position: static; }
  .mega {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .mega.is-open { display: block; }
  .mega-inner {
    display: grid; grid-template-columns: 230px 1fr; grid-template-rows: repeat(11, auto) 1fr;
    column-gap: 28px; padding: 20px 24px 24px; max-width: var(--maxw); margin: 0 auto;
  }
  .mega-city { display: contents; }
  .mega-city-btn {
    grid-column: 1; grid-row: var(--r);
    border: 0; border-radius: var(--radius-sm); padding: .45rem .75rem; font-size: .95rem;
  }
  .mega-city-btn::after { content: "›"; opacity: 0; }
  .mega-city-btn[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand-strong); }
  .mega-city-btn[aria-expanded="true"]::after { content: "›"; opacity: 1; }
  .mega-panel { grid-column: 2; grid-row: 1 / -1; padding: 0; }
  .mega-panel-title { display: block; margin: 0 0 12px; font-size: 1.05rem; }
  .mega-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 24px; }
  .mega-cat { cursor: default; padding: 0 0 6px; }
  .mega-cat::after { display: none; }
  .mega-links { display: block; padding: 0; }
  .mega-links a, .mega-links .soon { padding: .2rem 0; font-size: .93rem; }
}

/* ---------- 4. Buttons, chips, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .7rem 1.2rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink);
}
.btn:hover { background: var(--brand-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-block; padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: .93rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.field { margin-bottom: 1rem; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .96rem; }
.field .hint { display: block; color: var(--muted); font-size: .86rem; margin-top: .25rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="date"], select, textarea {
  width: 100%; padding: .65rem .8rem; font: inherit; font-size: 1rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .88rem; margin-top: .3rem; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-prefix input { padding-left: 1.7rem; }

/* ---------- 5. Page sections ---------- */
main { display: block; }
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 24px; }
.section-head h2 { margin-top: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; }

.hero { padding: 44px 0 36px; background:
  radial-gradient(900px 300px at 85% -10%, var(--brand-soft), transparent 70%),
  radial-gradient(700px 260px at -10% 110%, var(--accent-soft), transparent 70%); }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }
.hero-lead strong { color: var(--text); }
.hero-search { margin-top: 24px; max-width: 720px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-box input { padding: .9rem 1rem .9rem 44px; font-size: 1.05rem; border-radius: 12px; box-shadow: var(--shadow); }
.hero-cities { margin-top: 18px; }
.hero-cities .label { font-size: .9rem; color: var(--muted); }

.search-results { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.search-results[hidden] { display: none; }
.search-results li { margin: 0; border-bottom: 1px solid var(--border); }
.search-results li:last-child { border-bottom: 0; }
.search-results a, .search-results .result-soon { display: flex; justify-content: space-between; gap: 12px; padding: .7rem 1rem; text-decoration: none; color: var(--text); }
.search-results a:hover { background: var(--surface-2); }
.search-results .result-city { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.search-status { font-size: .92rem; color: var(--muted); margin-top: 10px; }

/* Cards */
.grid { display: grid; gap: 16px; }
.grid-cities { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--link); text-decoration: underline; }
.card .card-meta { font-size: .84rem; font-weight: 700; color: var(--accent); letter-spacing: .03em; text-transform: uppercase; margin-bottom: .3rem; }
.card p { color: var(--muted); font-size: .96rem; }
.card ul { list-style: none; padding: 0; margin: 0 0 12px; }
.card li { margin: 0; padding: .28rem 0; border-top: 1px dashed var(--border); font-size: .95rem; }
.card li:first-child { border-top: 0; }
.card .card-foot { margin-top: auto; font-weight: 700; font-size: .95rem; }

.soon { color: var(--muted); }
.soon-tag {
  display: inline-block; margin-left: 6px; padding: 0 .45rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .03em; vertical-align: 1px;
}

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; margin-bottom: 8px; }
.steps strong { display: block; margin-bottom: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); margin: 1rem 0 1.5rem; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: .9rem 1rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 1rem 1rem; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* Callouts — Reasoning box, disclaimer, notes */
.callout { border-radius: var(--radius); padding: 16px 18px; margin: 1.25rem 0; border: 1px solid var(--border); background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 800; margin: 0 0 .35rem; display: flex; align-items: center; gap: 8px; }
.reasoning { border-left: 5px solid var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.reasoning .callout-title { color: var(--accent); }
.disclaimer { background: var(--warn-bg); border-color: var(--warn-border); font-size: .95rem; }
.note { background: var(--brand-soft); border-color: transparent; }

/* Breadcrumbs, byline */
.breadcrumbs { font-size: .9rem; color: var(--muted); padding-top: 18px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 6px 0 2px; color: var(--border); }
.breadcrumbs a { color: var(--muted); }
.byline { font-size: .92rem; color: var(--muted); margin-bottom: 1.2rem; }

/* Page layout for text pages */
.page-head { padding: 8px 0 12px; }
.page-body { padding-bottom: 56px; }

/* ---------- 6. Calculator layout (used from Phase 4 on) ---------- */
.calc { display: grid; gap: 20px; margin: 16px 0 24px; grid-template-columns: minmax(0, 1fr); }
.calc > *, .calc-fields > * { min-width: 0; }
select { max-width: 100%; }
@media (min-width: 900px) { .calc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.calc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.calc-panel h2 { margin-top: 0; font-size: 1.2rem; }
.calc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.result-big { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.result-label { color: var(--muted); font-size: .92rem; font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.result-grid div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.result-grid strong { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; }
.confirm-note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--warn-border); padding-left: 10px; }

/* ---------- 7. Ad slots (reserved height = no layout shift) ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 250px; margin: 32px auto; max-width: 970px;
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  contain: layout;
}
.ad-slot::before { content: "Advertisement"; }
.ad-slot.is-filled::before { content: none; }
@media (min-width: 768px) { .ad-slot { min-height: 120px; } }
/* Top-of-page slot: small fixed height (320x100 mobile / 728x90 desktop) so the calculator stays above the fold,
   with clear space from the navigation and from the calculator buttons to avoid accidental clicks. */
.ad-slot.ad-top { min-height: 100px; max-width: 728px; margin: 4px auto 28px; }
@media (min-width: 768px) { .ad-slot.ad-top { min-height: 90px; } }


/* Hide ad slots until an ad unit is pasted in (an empty slot, or one holding only an HTML comment, matches :empty).
   Once AdSense code is inside, the slot shows with its reserved height and no placeholder label. */
.ad-slot:empty { display: none; }
.ad-slot:not(:empty) { border: 0; background: transparent; }
.ad-slot:not(:empty)::before { content: none; }

/* ---------- 8. Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 44px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1.4fr 1fr 1fr; } }
.footer-title { font-size: .82rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin: 0 0 .4rem; }
.footer-list a { color: var(--text); text-decoration: none; }
.footer-list a:hover { color: var(--link); text-decoration: underline; }
.footer-cities { columns: 2; column-gap: 20px; }
.footer-about p { color: var(--muted); max-width: 360px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* ---------- 9. Misc ---------- */
.not-found { text-align: center; padding: 56px 0 24px; }
.not-found .big { font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: var(--brand); line-height: 1; margin: 0; }
.not-found .hero-search { margin-left: auto; margin-right: auto; text-align: left; }
.two-col { display: grid; gap: 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .ad-slot, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 10. Calculator extras (charts, checkboxes, totals) ---------- */
.chart-fig { margin: 14px 0; }
.chart { max-width: 100%; }
.chart-label { font-size: 13px; fill: var(--text); }
.chart-value { font-size: 13px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.bar-a { fill: var(--brand); } .bar-b { fill: var(--accent); } .bar-c { fill: #3b82c4; } .bar-d { fill: #8a6bbf; } .bar-e { fill: #c2527a; } .bar-f { fill: #6b8f3a; }
:root[data-theme="dark"] .bar-c { fill: #7fb3e6; } :root[data-theme="dark"] .bar-d { fill: #b79be6; } :root[data-theme="dark"] .bar-e { fill: #ec8fb0; } :root[data-theme="dark"] .bar-f { fill: #a8cc72; }
tr.row-total th, tr.row-total td { font-weight: 800; background: var(--surface-2); }
.field.check { display: flex; gap: 10px; align-items: flex-start; }
.field.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.field.check label { margin: 0; font-weight: 600; }
.field-error[hidden] { display: none; }
.calc-form .input-suffix { position: relative; }
.input-suffix span { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-suffix input { padding-right: 2rem; }
.calc-fields { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .calc-fields { grid-template-columns: 1fr 1fr; } .calc-fields .field.wide { grid-column: 1 / -1; } }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 820px; }
.related { margin: 32px 0 8px; }
.related h2 { margin-top: 0; }
.related-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sources ol { font-size: .95rem; }
.tool-list { list-style: none; padding: 0; margin: 0; }
.tool-list li { padding: .35rem 0; border-top: 1px dashed var(--border); margin: 0; }
.tool-list li:first-child { border-top: 0; }
.key-facts th { white-space: normal; }
.guide-meta { color: var(--muted); font-size: .92rem; }
