/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0a0f1e;
  --navy-mid:    #111827;
  --navy-light:  #1a2436;
  --navy-card:   #151e30;
  --emerald:     #10b981;
  --emerald-dim: #0d9268;
  --emerald-glow:rgba(16,185,129,0.15);
  --emerald-pale:rgba(16,185,129,0.08);
  --sky:         #38bdf8;
  --amber:       #f59e0b;
  --rose:        #f43f5e;
  --slate:       #94a3b8;
  --slate-dim:   #64748b;
  --border:      rgba(255,255,255,0.07);
  --border-em:   rgba(16,185,129,0.3);
  --white:       #ffffff;
  --font-display:'Fraunces', Georgia, serif;
  --font-mono:   'IBM Plex Mono', monospace;
  --radius:      6px;
  --radius-lg:   12px;
  --ease:        0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(16,185,129,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,185,129,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  background: rgba(10,15,30,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: stretch;
  justify-content: space-between; gap: 2rem;
}

.brand {
  text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 0;
}

.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--emerald), var(--sky));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 18px var(--emerald-glow);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1; color: var(--white);
}
.brand-name span { color: var(--emerald); }
.brand-tag {
  font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-top: 0.2rem;
}

.site-nav { display: flex; align-items: center; }

.nav-link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0 0.85rem; height: 100%;
  font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--slate-dim); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.nav-link:hover { color: var(--white); }
.nav-link.active { color: var(--emerald); border-bottom-color: var(--emerald); }

/* ── Page Hero ───────────────────────────────────────────────────── */
.page-hero {
  max-width: 1200px; margin: 0 auto;
  padding: 2.5rem 2rem 1.75rem;
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}

.hero-eyebrow {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.hero-eyebrow::before {
  content: ''; display: inline-block;
  width: 18px; height: 2px;
  background: var(--emerald); border-radius: 1px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
  font-weight: 900; line-height: 1.08; letter-spacing: -0.03em;
}
.hero-title em { font-style: italic; color: var(--emerald); }

.hero-sub {
  font-size: 0.73rem; color: var(--slate);
  margin-top: 0.65rem; max-width: 480px; line-height: 1.75;
}

.hero-stats { display: flex; gap: 2rem; flex-shrink: 0; }
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 900; line-height: 1; color: var(--emerald);
}
.hero-stat-label {
  font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-top: 0.2rem;
}

/* ── Main ────────────────────────────────────────────────────────── */
.site-main { flex: 1; padding: 0 2rem 3rem; }

.layout {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; align-items: start;
}
.layout.wide { grid-template-columns: 1fr; max-width: 780px; }
.layout.three { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 860px) {
  .layout, .layout.three { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
  .site-nav { display: none; }
  .header-inner { padding: 0 1.25rem; }
  .page-hero { padding: 1.75rem 1.25rem 1.25rem; }
  .site-main { padding: 0 1.25rem 2rem; }
}

/* ── Panel ───────────────────────────────────────────────────────── */
.panel {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: panelIn 0.35s ease both;
}
@keyframes panelIn {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}
.panel + .panel { animation-delay: 0.07s; }

.panel-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.step-badge {
  width: 22px; height: 22px;
  background: var(--emerald); color: var(--navy);
  font-size: 0.58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}

.panel-header h2 {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700; color: var(--white);
}

.panel-body { padding: 1.25rem; }

/* ── Form Elements ───────────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }

label, .field-label {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.59rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate-dim); margin-bottom: 0.38rem;
}

.label-hint {
  font-size: 0.57rem; letter-spacing: 0;
  text-transform: none; color: var(--slate-dim);
  font-style: italic;
}

.source-badge {
  font-size: 0.53rem; padding: 0.1rem 0.4rem;
  border: 1px solid var(--border); border-radius: 4px;
  color: var(--slate-dim); background: var(--navy-light);
  text-transform: none; letter-spacing: 0; font-style: normal;
}
.source-badge.from-db {
  border-color: var(--emerald-dim); color: var(--emerald);
  background: var(--emerald-pale);
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 0.58rem 0.85rem;
  background: var(--navy-light);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-mono); font-size: 0.875rem;
  border-radius: var(--radius); outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--emerald-dim);
  box-shadow: 0 0 0 3px var(--emerald-pale);
}
input::placeholder { color: var(--slate-dim); }
option { background: var(--navy-mid); }

.input-wrap { position: relative; }
.prefix-wrap input { padding-left: 1.75rem; }
.suffix-wrap input { padding-right: 2.25rem; }

.prefix, .suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--slate-dim); font-size: 0.82rem; pointer-events: none;
}
.prefix { left: 0.85rem; }
.suffix { right: 0.85rem; }

.select-wrap { position: relative; }
.select-wrap select { padding-right: 2rem; cursor: pointer; }
.select-arrow {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: var(--slate-dim); pointer-events: none;
}

fieldset { border: none; }
fieldset legend {
  font-size: 0.59rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.38rem;
}

.radio-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.radio-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; background: var(--navy-light);
  font-size: 0.78rem; color: var(--slate);
  transition: all var(--ease); user-select: none;
}
.radio-btn input[type="radio"] { accent-color: var(--emerald); width: 12px; height: 12px; }
.radio-btn:has(input:checked) {
  border-color: var(--emerald-dim); color: var(--emerald);
  background: var(--emerald-pale);
}

.range-wrap { display: flex; align-items: center; gap: 0.75rem; }
input[type="range"] {
  flex: 1; height: 4px; appearance: none; -webkit-appearance: none;
  background: var(--navy-light); border-radius: 2px;
  border: 1px solid var(--border); padding: 0; cursor: pointer;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  background: var(--emerald); border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-glow);
}
input[type="range"]:focus { box-shadow: none; border-color: var(--border); }
.range-val { font-size: 0.9rem; font-weight: 500; min-width: 2.5rem; text-align: right; color: var(--emerald); }

.field-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1rem 0; color: var(--slate-dim);
  font-size: 0.59rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.field-divider::before, .field-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.calc-btn {
  width: 100%; margin-top: 1.25rem; padding: 0.88rem 1.25rem;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dim));
  color: var(--navy); font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  border: none; border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  transition: all var(--ease); position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}
.calc-btn svg { width: 16px; height: 16px; transition: transform var(--ease); }
.calc-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(16,185,129,0.45); }
.calc-btn:hover svg { transform: translateX(3px); }
.calc-btn:active { transform: translateY(0); }

/* ── Program Search ──────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap input { padding-right: 2.25rem; }
.search-icon {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--slate-dim); pointer-events: none;
}

.program-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: var(--navy-mid); border: 1px solid var(--border-em);
  border-radius: var(--radius); max-height: 240px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6); list-style: none; display: none;
}
.program-dropdown.open { display: block; }
.program-dropdown li {
  padding: 0.6rem 0.9rem; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background var(--ease);
}
.program-dropdown li:last-child { border-bottom: none; }
.program-dropdown li:hover { background: var(--navy-light); }
.prog-name { font-size: 0.8rem; font-weight: 500; color: var(--white); }
.prog-meta { font-size: 0.61rem; color: var(--slate-dim); margin-top: 0.1rem; }
.program-dropdown .no-result { color: var(--slate-dim); cursor: default; font-size: 0.78rem; }
.program-dropdown .no-result:hover { background: none; }

/* ── PGY Grid ────────────────────────────────────────────────────── */
.pgy-result {
  padding: 0.9rem; background: var(--emerald-pale);
  border: 1px solid var(--border-em); border-radius: var(--radius);
  margin-bottom: 0.75rem; animation: fadeSlide 0.3s ease;
}
@keyframes fadeSlide {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}
.pgy-result-header {
  font-size: 0.59rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--emerald); margin-bottom: 0.6rem;
}
.pgy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.pgy-pill {
  padding: 0.45rem 0.3rem; background: var(--navy-light);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center; cursor: pointer; transition: all var(--ease);
}
.pgy-pill:hover { border-color: var(--emerald-dim); transform: translateY(-1px); }
.pgy-pill.selected {
  border-color: var(--emerald); background: var(--emerald-pale);
  box-shadow: 0 0 12px var(--emerald-glow);
}
.pgy-label { font-size: 0.53rem; color: var(--slate-dim); letter-spacing: 0.06em; }
.pgy-val { font-size: 0.78rem; font-weight: 500; color: var(--white); margin-top: 2px; }
.pgy-note { font-size: 0.59rem; color: var(--slate-dim); margin-top: 0.5rem; font-style: italic; line-height: 1.5; }

/* ── Take-Home Hero ──────────────────────────────────────────────── */
.take-home-hero {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(10,15,30,0));
  position: relative; overflow: hidden;
}
.take-home-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.program-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.25);
  border-radius: 4px; font-size: 0.61rem; color: var(--sky); margin-bottom: 0.75rem;
}

.take-home-amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900; color: var(--emerald);
  letter-spacing: -0.03em; line-height: 1;
}
.take-home-label {
  font-size: 0.59rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--slate-dim); margin-top: 0.35rem;
}
.rate-pill {
  display: inline-block; margin-top: 0.65rem;
  padding: 0.25rem 0.65rem;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3);
  border-radius: 4px; font-size: 0.68rem; color: var(--amber);
}

/* ── Freq Tabs ───────────────────────────────────────────────────── */
.freq-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.freq-tab {
  flex: 1; padding: 0.58rem 0.25rem;
  font-family: var(--font-mono); font-size: 0.59rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: none; border: none; cursor: pointer;
  color: var(--slate-dim); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all var(--ease);
}
.freq-tab.active { color: var(--emerald); border-bottom-color: var(--emerald); }
.freq-tab:hover:not(.active) { color: var(--slate); }
.freq-panel { display: none; padding: 1rem 1.25rem; }
.freq-panel.active { display: block; }
.freq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.freq-card {
  padding: 0.8rem 0.9rem;
  background: var(--navy-light); border: 1px solid var(--border); border-radius: var(--radius);
}
.freq-card-label {
  font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.25rem;
}
.freq-card-value { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

/* ── Breakdown Table ─────────────────────────────────────────────── */
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.77rem; }
.breakdown-table th {
  font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate-dim); padding: 0.55rem 1.25rem; text-align: left;
  border-bottom: 1px solid var(--border); font-weight: 400;
  background: rgba(255,255,255,0.02);
}
.breakdown-table .num-col { text-align: right; }
.breakdown-table td { padding: 0.5rem 1.25rem; border-bottom: 1px solid var(--border); }
.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table .num-col { text-align: right; font-weight: 500; }
.breakdown-table .negative { color: var(--rose); }
.breakdown-table .positive { color: var(--emerald); }
.breakdown-table .cat-row td {
  font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); padding-top: 0.9rem;
}
.breakdown-table .total-row td {
  font-weight: 600;
  border-top: 1px solid rgba(16,185,129,0.3);
  background: var(--emerald-pale);
}

/* ── Bar Chart ───────────────────────────────────────────────────── */
.bar-section {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.bar-label {
  font-size: 0.57rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.5rem;
}
.stacked-bar {
  height: 22px; display: flex; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
}
.bar-seg { height: 100%; transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }
.seg-takehome { background: linear-gradient(90deg, #059669, #10b981); }
.seg-federal  { background: #3b5fa8; }
.seg-state    { background: #6d5fa0; }
.seg-fica     { background: #b06030; }
.legend { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.6rem; list-style: none; }
.legend-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.6rem; color: var(--slate-dim); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Result Hero (other tools) ───────────────────────────────────── */
.result-hero {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(10,15,30,0));
  position: relative; overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.result-big {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900; line-height: 1; letter-spacing: -0.03em;
}
.result-label {
  font-size: 0.59rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--slate-dim); margin-top: 0.35rem;
}
.result-sub { font-size: 0.7rem; color: var(--slate); margin-top: 0.45rem; }

/* ── Stat Row ────────────────────────────────────────────────────── */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  border-top: 1px solid var(--border);
}
.stat-cell {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-cell-label {
  font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.25rem;
}
.stat-cell-value { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }

/* ── Info Boxes ──────────────────────────────────────────────────── */
.info-box {
  padding: 0.8rem 1rem; border-radius: var(--radius);
  font-size: 0.72rem; line-height: 1.65; margin-bottom: 0.75rem;
}
.info-box a { color: var(--sky); }
.info-box.blue   { background: rgba(56,189,248,0.07);  border: 1px solid rgba(56,189,248,0.2);  color: var(--sky); }
.info-box.green  { background: var(--emerald-pale);    border: 1px solid var(--border-em);       color: var(--emerald); }
.info-box.gold   { background: rgba(245,158,11,0.07);  border: 1px solid rgba(245,158,11,0.25); color: var(--amber); }
.info-box.red    { background: rgba(244,63,94,0.07);   border: 1px solid rgba(244,63,94,0.25);  color: var(--rose); }
.info-box.white  { background: rgba(255,255,255,0.04); border: 1px solid var(--border);          color: var(--slate); }

/* ── Comparison Cards ────────────────────────────────────────────── */
.comparison-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem; padding: 1.25rem;
}
.comparison-card {
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--navy-light); text-align: center;
  cursor: pointer; transition: all var(--ease);
}
.comparison-card:hover { border-color: var(--emerald-dim); transform: translateY(-2px); }
.comparison-card.best { border-color: var(--emerald); background: var(--emerald-pale); box-shadow: 0 0 20px var(--emerald-glow); }
.comparison-card-plan {
  font-size: 0.59rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.5rem;
}
.comparison-card-amount { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; }
.comparison-card-label { font-size: 0.6rem; color: var(--slate-dim); margin-top: 0.2rem; }
.comparison-card-badge {
  font-size: 0.58rem; margin-top: 0.5rem; padding: 0.15rem 0.45rem;
  background: var(--emerald); color: var(--navy);
  border-radius: 4px; display: inline-block; font-weight: 600;
}

/* ── Chart Bars ──────────────────────────────────────────────────── */
.chart-section { padding: 1.25rem; border-top: 1px solid var(--border); }
.chart-title {
  font-size: 0.59rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--slate-dim); margin-bottom: 0.75rem;
}
.chart-bar-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.chart-bar-label { font-size: 0.66rem; min-width: 90px; text-align: right; color: var(--slate-dim); }
.chart-bar-track {
  flex: 1; height: 20px; background: var(--navy-light);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.chart-bar-fill {
  height: 100%; border-radius: var(--radius);
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 0.4rem;
}
.chart-bar-fill span { font-size: 0.58rem; color: white; font-weight: 500; white-space: nowrap; }
.chart-bar-val { font-size: 0.68rem; font-weight: 500; min-width: 70px; color: var(--slate); }

/* ── City Cards (COL) ────────────────────────────────────────────── */
.city-search-wrap { position: relative; }
.city-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: var(--navy-mid); border: 1px solid var(--border-em);
  border-radius: var(--radius); max-height: 200px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6); list-style: none; display: none;
}
.city-dropdown.open { display: block; }
.city-dropdown li {
  padding: 0.5rem 0.9rem; cursor: pointer;
  border-bottom: 1px solid var(--border); font-size: 0.8rem;
  transition: background var(--ease); color: var(--white);
}
.city-dropdown li:hover { background: var(--navy-light); }

.city-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--navy-light);
  transition: border-color var(--ease);
}
.city-card.best { border-color: var(--emerald); box-shadow: 0 0 20px var(--emerald-glow); }
.city-card-header {
  background: rgba(255,255,255,0.03); padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.city-card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.city-card-index {
  font-size: 0.6rem; color: var(--slate-dim);
  padding: 0.15rem 0.4rem; border: 1px solid var(--border);
  border-radius: 4px; background: var(--navy);
}
.city-card-body { padding: 1rem; }
.city-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: 0.77rem;
}
.city-stat:last-child { border-bottom: none; }
.city-stat-label { color: var(--slate-dim); }
.city-stat-val { font-weight: 500; }
.city-equiv {
  background: var(--emerald-pale); border: 1px solid var(--border-em);
  border-radius: var(--radius); padding: 0.5rem 0.75rem;
  margin-top: 0.75rem; font-size: 0.7rem; color: var(--emerald); text-align: center;
}

/* ── Disclaimer ──────────────────────────────────────────────────── */
.disclaimer {
  font-size: 0.58rem; color: var(--slate-dim);
  padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); line-height: 1.65;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  background: var(--navy-mid);
  flex-shrink: 0;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-nav a { font-size: 0.62rem; color: var(--slate-dim); text-decoration: none; transition: color var(--ease); }
.footer-nav a:hover { color: var(--emerald); }
.footer-copy { font-size: 0.57rem; color: var(--slate-dim); opacity: 0.5; }

/* ── Utilities ───────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.text-green  { color: var(--emerald); }
.text-red    { color: var(--rose); }
.text-blue   { color: var(--sky); }
.text-amber  { color: var(--amber); }
.text-muted  { color: var(--slate-dim); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.full-width { grid-column: 1 / -1; }
