/* RupeeCheck — design system */
:root {
  --bg: #f6f7fb;
  --bg-2: #eef0f8;
  --surface: #ffffff;
  --surface-2: #f9faff;
  --text: #12142b;
  --muted: #5b6080;
  --line: #e4e7f3;
  --brand: #5b4bff;
  --brand-2: #8b5cf6;
  --accent: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --brand-text: #5b4bff;
  --good-text: #047857; --bad-text: #dc2626;                 /* readable green and red for text on light surfaces */
  --grad: linear-gradient(135deg, #5b4bff 0%, #8b5cf6 55%, #c084fc 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,75,255,.10), rgba(139,92,246,.10));
  --shadow-sm: 0 1px 2px rgba(18,20,43,.05), 0 2px 8px rgba(18,20,43,.04);
  --shadow: 0 10px 30px -8px rgba(40,30,140,.18), 0 2px 6px rgba(18,20,43,.05);
  --shadow-lg: 0 30px 60px -20px rgba(60,40,200,.35);
  --radius: 18px;
  --radius-sm: 12px;
  --c1: #5b4bff; --c2: #10b981; --c3: #f59e0b; --c4: #ec4899; --c5: #06b6d4; --c6: #94a3b8;
}
:root[data-theme="dark"] {
  --good-text: #34d399; --bad-text: #f87171; --brand-text: #a49bff;
  --bg: #0b0d1c;
  --bg-2: #10132a;
  --surface: #151833;
  --surface-2: #1a1e3d;
  --text: #eceefb;
  --muted: #9aa0c7;
  --line: #262a4f;
  --grad-soft: linear-gradient(135deg, rgba(91,75,255,.22), rgba(139,92,246,.18));
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 10px 30px -8px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 60px -20px rgba(91,75,255,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 1.1rem; box-shadow: 0 6px 16px -4px rgba(91,75,255,.6);
}
.logo span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  white-space: nowrap; color: var(--muted); font-weight: 500; font-size: .93rem; padding: 8px 12px; border-radius: 10px; transition: .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; transition: .15s;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.menu-btn { display: none; }
@media (max-width: 1360px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 16px 18px;
    display: none; box-shadow: var(--shadow); max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: .98rem; border: 0; cursor: pointer;
  transition: transform .15s, box-shadow .15s; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -8px rgba(91,75,255,.7); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 11px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 60px; text-align: center; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; z-index: 0; pointer-events: none;
}
.hero::before { width: 460px; height: 460px; background: #8b5cf6; top: -160px; left: -120px; opacity: .35; }
.hero::after { width: 420px; height: 420px; background: #06b6d4; top: -100px; right: -120px; opacity: .28; }
.hero > .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--brand-text);
  box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.08; letter-spacing: -.035em; margin: 22px auto 18px; max-width: 880px; font-weight: 800; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats { display: flex; gap: 12px 36px; justify-content: center; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: .92rem; }
.stats b { color: var(--text); font-size: 1.15rem; display: block; }

.page-hero { padding: 44px 0 10px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.03em; line-height: 1.15; font-weight: 800; }
.page-hero p { color: var(--muted); margin-top: 10px; max-width: 720px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards / grid ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.03em; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px;
}
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: .2s; overflow: hidden;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); text-decoration: none; }
.tool-card .ico {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--grad-soft);
}
.tool-card h3 { font-size: 1.1rem; letter-spacing: -.01em; }
.tool-card p { color: var(--muted); font-size: .92rem; flex: 1; }
.tool-card .go { color: var(--brand-text); font-weight: 600; font-size: .9rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--grad); color: #fff; margin-left: 6px; vertical-align: middle; }

/* ---------- Calculator layout ---------- */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; padding: 26px 0 10px; align-items: start; }
@media (max-width: 920px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
.results { position: sticky; top: 88px; }
@media (max-width: 920px) { .results { position: static; } }
.card h2.card-title { font-size: 1.05rem; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.field { margin-bottom: 20px; }
.field > label, .field .lbl { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field .hint { font-weight: 400; font-size: .78rem; color: var(--muted); margin-top: 5px; display: block; }
.input-wrap {
  display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); transition: .15s; overflow: hidden;
}
.input-wrap:focus-within { border-color: var(--brand-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); background: var(--surface); }
.input-wrap .pre, .input-wrap .suf { padding: 0 12px; color: var(--muted); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.input-wrap input, select {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 13px 12px; font-size: 1.02rem; font-weight: 600;
  color: var(--text); font-family: inherit; outline: none;
}
.input-wrap .pre + input { padding-left: 0; }
select { border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
select:focus { border-color: var(--brand-text); }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; margin-top: 12px;
  background: linear-gradient(to right, var(--brand) var(--p, 0%), var(--line) var(--p, 0%)); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--brand);
  box-shadow: 0 2px 8px rgba(91,75,255,.5); transition: transform .12s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; padding: 4px; background: var(--bg-2); border-radius: 12px; gap: 2px; width: 100%; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font-weight: 600; font-size: .88rem;
  color: var(--muted); cursor: pointer; font-family: inherit; transition: .15s;
}
.seg button.on { background: var(--surface); color: var(--brand-text); box-shadow: var(--shadow-sm); }
details.adv { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 6px; }
details.adv summary { cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--brand-text); list-style: none; margin-bottom: 16px; }
details.adv summary::before { content: "＋ "; }
details.adv[open] summary::before { content: "－ "; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem; font-weight: 600; }
.toggle small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::before { transform: translateX(20px); }

/* ---------- Results ---------- */
.hero-result {
  background: var(--grad); color: #fff; border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg); margin-bottom: 18px;
}
.hero-result::after { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; top: -80px; background: rgba(255,255,255,.14); border-radius: 50%; }
.hero-result .lbl { font-size: .85rem; opacity: .85; font-weight: 500; }
.hero-result .big { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hero-result .sub { font-size: .88rem; opacity: .9; position: relative; z-index: 1; }
.hero-result .pill { display: inline-block; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 99px; font-size: .78rem; font-weight: 700; margin-top: 12px; position: relative; z-index: 1; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.kpi .k { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.good .v { color: var(--good-text); }
.kpi.bad .v { color: var(--bad-text); }
.chart-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 170px; height: 170px; flex: none; }
.donut text { fill: var(--text); font-family: inherit; }
.legend { display: grid; gap: 9px; font-size: .88rem; flex: 1; min-width: 180px; }
.legend div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.legend span.dot { width: 11px; height: 11px; border-radius: 4px; display: inline-block; margin-right: 8px; }
.legend b { font-variant-numeric: tabular-nums; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 18px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.banner.info { background: var(--grad-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }

table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tbl th, table.tbl td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
table.tbl tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
table.tbl tr.neg td:not(:first-child) { color: var(--bad-text); }
table.tbl tr.pos td:not(:first-child) { color: var(--good-text); }
.tbl-wrap { overflow-x: auto; }
.win { color: var(--good-text); font-weight: 700; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.cmp { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); position: relative; }
.cmp.best { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.cmp.best::after { content: "Best ✓"; position: absolute; top: -10px; right: 10px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; }
.cmp .n { font-size: .78rem; color: var(--muted); font-weight: 700; }
.cmp .v { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.cmp .s { font-size: .78rem; color: var(--muted); }

/* ---------- Ads / monetisation ---------- */
.ad-slot {
  display: grid; place-items: center; min-height: 100px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .78rem; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--line) 35%, transparent) 10px 11px);
  margin: 22px 0;
}
.offer {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  margin-top: 18px;
}
.offer b { display: block; }
.offer small { color: var(--muted); }

/* ---------- Content ---------- */
.prose { max-width: 820px; margin: 0 auto; padding: 36px 0 20px; }
.prose h2 { font-size: 1.6rem; letter-spacing: -.02em; margin: 34px 0 12px; font-weight: 800; }
.prose h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--muted); margin-bottom: 12px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose strong { color: var(--text); }
.prose table { margin: 14px 0 20px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--text); }
.faq details[open] summary { margin-bottom: 8px; }
.faq details p { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step .n { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .94rem; }

.cta-band { background: var(--grad); color: #fff; border-radius: 28px; padding: 46px 28px; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.12); left: -80px; bottom: -140px; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; position: relative; }
.cta-band p { opacity: .9; margin: 10px 0 22px; position: relative; }
.cta-band .btn { background: #fff; color: var(--brand); position: relative; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.site-footer li { list-style: none; margin-bottom: 8px; font-size: .92rem; }
.site-footer p { color: var(--muted); font-size: .9rem; margin-top: 12px; max-width: 360px; }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

.fade-in { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .ad-slot, .offer, .hero-cta { display: none; } }

/* ---------- Net worth calculator ---------- */
.nw-groups { display: grid; gap: 14px; }
.grp { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; }
.grp > summary::-webkit-details-marker { display: none; }
.grp .gi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); font-size: 1.15rem; flex: none; }
.grp .gt { flex: 1; min-width: 0; }
.grp .gt small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.grp .gv { font-variant-numeric: tabular-nums; font-weight: 800; }
.grp.liab .gv { color: var(--bad-text); }
.grp .chev { transition: transform .2s; color: var(--muted); }
.grp[open] .chev { transform: rotate(90deg); }
.grp-body { padding: 4px 16px 16px; display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.item input.nm { border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 11px 12px; font: inherit; font-weight: 500; font-size: .92rem; color: var(--text); outline: none; min-width: 0; width: 100%; }
.item input.nm:focus { border-color: var(--brand-text); }
.item .input-wrap { background: var(--surface); }
.item .input-wrap input { padding: 11px 10px; font-size: .95rem; }
.item .x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.item .x:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.add-item { justify-self: start; border: 1.5px dashed var(--line); background: transparent; color: var(--brand-text); font: inherit; font-weight: 600; font-size: .85rem; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.add-item:hover { background: var(--grad-soft); }
.sec-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); margin: 6px 0 -2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 520px) { .item { grid-template-columns: 1fr 34px; } .item .input-wrap { grid-column: 1; } .item .x { grid-row: 1 / span 2; grid-column: 2; } }

.gauge-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gauge { width: 200px; flex: none; }
.gauge text { fill: var(--text); font-family: inherit; }
.score-side { flex: 1; min-width: 180px; }
.score-side .lab { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.score-side p { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.parts { display: grid; gap: 7px; margin-top: 14px; }
.part { display: grid; grid-template-columns: 1fr 60px; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); }
.part .bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.part .bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.vs { display: grid; gap: 14px; }
.vs-row .top { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.vs-row .track { height: 14px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.vs-row .track i { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.insights { display: grid; gap: 10px; }
.insight { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .88rem; background: var(--surface-2); border: 1px solid var(--line); }
.insight.good { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.insight.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.insight.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.hero-result.neg { background: linear-gradient(135deg, #ef4444, #f97316); }

/* ---------- Line chart ---------- */
.lc { position: relative; }
.lc svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.lc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.lc-legend i, .lc-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.lc-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 9px 12px; border-radius: 12px; font-size: .78rem; min-width: 150px; z-index: 5; }
.lc-tip b { display: block; margin-bottom: 4px; }
.lc-tip div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.lc-tip div span:last-child { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Event cards (life simulator) ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ev { border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 14px; transition: .2s; }
.ev.on { border-color: var(--brand-text); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: 0 6px 18px -10px rgba(91,75,255,.5); }
.ev-top { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ev-top .gi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); font-size: 1.1rem; }
.ev-top span.t { flex: 1; font-size: .92rem; }
.ev-body { margin-top: 12px; display: none; gap: 10px; }
.ev.on .ev-body { display: grid; }
.ev-body .field { margin: 0; }
.ev-body .field > label { font-size: .75rem; margin-bottom: 4px; }
.ev-body .input-wrap input { padding: 9px 10px; font-size: .9rem; }
.ev-body .row-2 { gap: 8px; }
.ev-body input[type=range] { margin-top: 8px; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tl:last-child { border-bottom: 0; }
.tl .age { font-weight: 800; color: var(--brand-text); }
.tl .nwv { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Offer comparison ---------- */
.offers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 26px 0 0; }
@media (max-width: 920px) { .offers-grid { grid-template-columns: minmax(0, 1fr); } }
.offer-card { position: relative; }
.offer-card .oname { width: 100%; border: 0; background: transparent; font: inherit; font-size: 1.1rem; font-weight: 800; color: var(--text); padding: 0 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); outline: none; }
.offer-card.win { border-color: var(--accent); box-shadow: 0 10px 30px -12px rgba(16,185,129,.45); }
.offer-card.win::after { content: "🏆 Best overall"; position: absolute; top: -12px; right: 16px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 11px; border-radius: 99px; }
.offer-card.off { opacity: .55; }
.cmp-table td.best { color: var(--good-text); font-weight: 800; }
.cmp-table td.best::after { content: " ✓"; }
.cmp-table tr.grp td { background: var(--bg-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.bars { display: grid; gap: 12px; }
.bars .vs-row .track i { background: var(--grad); }
.full-card { margin-top: 18px; }

/* ---------- Launch-readiness additions ---------- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 8px; text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, white); outline-offset: 2px; border-radius: 6px; }
.input-wrap input:focus-visible, select:focus-visible, .item input.nm:focus-visible { outline: none; }
.share-btn { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); padding: 7px 13px; border-radius: 99px; font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; transition: .15s; }
.share-btn:hover { background: rgba(255,255,255,.34); transform: translateY(-1px); }
.hero-result { position: relative; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin-inline: auto; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px 18px; font-size: .88rem; color: var(--muted); }
.consent p { flex: 1; min-width: 220px; }
.consent div { display: flex; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; z-index: 120; transition: .25s; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.offer .disc { display: block; margin-top: 4px; font-size: .72rem; opacity: .8; }
.ad-live { margin: 22px 0; min-height: 90px; }
.foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

/* Net worth: quick-add chips and hints */
.grp-hint { font-size: .8rem; color: var(--muted); margin: 0 0 2px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.chips[hidden], .chip[hidden] { display: none; }
.chips-l { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 2px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 600; padding: 6px 11px; border-radius: 99px; cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--brand-text); color: var(--brand-text); background: var(--grad-soft); transform: translateY(-1px); }

/* Net worth: gold helper */
details.gold { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
details.gold summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--brand-text); list-style: none; }
details.gold summary small { font-weight: 500; color: var(--muted); margin-left: 6px; }
details.gold[open] summary { margin-bottom: 12px; }
.gold-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.gold-grid .field { margin: 0; }
.gold-grid .field > label { font-size: .75rem; margin-bottom: 4px; }
.gold-grid .input-wrap input { padding: 10px 10px; font-size: .92rem; }
.gold-grid select { padding: 10px; font-size: .9rem; }
.gold-out { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: .88rem; }
.gold-out .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
@media (max-width: 520px) { .gold-grid { grid-template-columns: 1fr; } }

/* ---------- Salary calculator v2 ---------- */
.mode-seg { margin-bottom: 18px; }
.mode-seg button { padding: 12px 10px; font-size: .92rem; }
.words { margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--brand-text); min-height: 1.3em; }
.dual-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.seg-sm { width: auto; }
.seg-sm button { padding: 9px 11px; font-size: .78rem; white-space: nowrap; }
.cap { margin-top: 6px; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.2em; }
.sub-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: var(--muted); margin: 10px 0 -4px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sub-h:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.alloc { margin: -4px 0 18px; }
.alloc-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.alloc-bar i { display: block; height: 100%; transition: width .3s ease; }
.alloc.over .alloc-bar { outline: 2px solid var(--danger); }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .72rem; color: var(--muted); }
.alloc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.alloc-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.special { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); font-size: .86rem; }
.special.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: var(--danger); }
.special b { font-variant-numeric: tabular-nums; }
.orow { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 76px 34px; gap: 8px; align-items: center; }
.orow input.nm { border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 11px 12px; font: inherit; font-weight: 500; font-size: .9rem; color: var(--text); outline: none; min-width: 0; width: 100%; }
.orow input.nm:focus { border-color: var(--brand-text); }
.orow .input-wrap input { padding: 11px 10px; font-size: .92rem; }
.orow select { padding: 11px 6px; font-size: .82rem; }
.orow .x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.orow .x:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
@media (max-width: 520px) { .orow { grid-template-columns: 1fr 1fr 34px; } .orow .nm { grid-column: 1 / 3; } .orow .x { grid-column: 3; grid-row: 1; } }
.meter { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .3s; }
.meter.full i { background: linear-gradient(90deg, #10b981, #34d399); }
.meter-t { font-size: .8rem; color: var(--muted); }
.warns { display: grid; gap: 8px; margin-bottom: 18px; }
.warns:empty { display: none; }
.warn { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: .85rem; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); }
.warn.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
table.pay td.nm2 { color: var(--muted); font-size: .8rem; }
table.pay tr.net td { font-size: 1.02rem; background: var(--grad-soft); }
table.pay tr.off td { color: var(--muted); font-size: .85rem; }
.pay-tools { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pay-tools .seg { width: auto; }
.m-bar { display: none; }
@media (max-width: 920px) {
  .m-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
    border-radius: 16px; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); transform: translateY(140%); transition: transform .25s; }
  .m-bar.show { transform: none; }
  .m-bar small { display: block; opacity: .85; font-size: .72rem; }
  .m-bar b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
  .m-bar a { color: #fff; font-weight: 700; font-size: .85rem; text-decoration: underline; }
}
@media (max-width: 560px) {
  .grp > summary { gap: 10px; padding: 12px 14px; }
  .grp .gt small { display: none; }
  .grp .gv { font-size: .88rem; white-space: nowrap; }
  .grp .gt { font-size: .95rem; }
}

.ab { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -8px 0 18px; padding: 9px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.ab:empty { display: none; }
.ab b { color: var(--text); font-variant-numeric: tabular-nums; }

.legend .pc { display: inline-block; min-width: 3.6em; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--bg-2); color: var(--muted); font-size: .78em; font-weight: 700; text-align: center; }

.legend div > span:first-child { min-width: 0; }
.legend b { white-space: nowrap; flex: none; }

/* ---------- Life simulator: plain-English results ---------- */
.story p { margin-bottom: 10px; font-size: .94rem; line-height: 1.6; }
.story .verdict { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.story .verdict.bad { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.story .verdict.good { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.story .fixes { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); font-size: .92rem; }
.story .fixes ul { margin: 8px 0 0 18px; }
.story .fixes li { margin-bottom: 6px; }
.neg-t { color: var(--bad-text); }
.kpi .kd { font-size: .72rem; color: var(--muted); margin-top: 5px; line-height: 1.4; font-weight: 400; }
.banner.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.ev-info { color: var(--text); background: var(--bg-2); padding: 8px 10px; border-radius: 10px; }
.ev-info:empty { display: none; }

.limit-note { margin-top: 5px; font-size: .78rem; font-weight: 700; color: var(--bad-text); }
.input-wrap.limit-hit { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent); }

/* ---------- Life simulator: existing-vs-planned events, how-it-works ---------- */
.ev[data-past="1"] .only-planned { display: none; }
.ev:not([data-past="1"]) .only-past { display: none; }
.ev-blurb { font-size: .78rem; color: var(--muted); margin: 6px 0 0 44px; line-height: 1.45; }
.ev-body .toggle { margin: 0; padding: 10px 12px; font-size: .86rem; }
.kpi .kv2 { font-size: .74rem; color: var(--brand-text); font-weight: 700; margin-top: 2px; }
.kpi .kv2:empty { display: none; }
details.howcalc { margin-bottom: 18px; padding: 0; }
details.howcalc > summary { cursor: pointer; padding: 18px 22px; font-weight: 800; list-style: none; }
details.howcalc > summary::-webkit-details-marker { display: none; }
details.howcalc[open] > summary { border-bottom: 1px solid var(--line); }
.how { padding: 16px 22px 20px; font-size: .9rem; line-height: 1.6; }
.how ol { padding-left: 20px; } .how li, .how p { margin-bottom: 9px; }
.how .how-eg { background: var(--grad-soft); padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); }

.yr-tools { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.yr-tools p { flex: 1; min-width: 220px; }
.yr-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.yr { min-width: 760px; font-size: .82rem; }
table.yr th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; white-space: nowrap; }
table.yr td { white-space: nowrap; }
table.yr th:first-child, table.yr td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 700; text-align: left; }
table.yr th:first-child { z-index: 3; background: var(--surface-2); }
table.yr tr.ret td { background: var(--grad-soft); }
table.yr tr.ret td:first-child { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
table.yr tr.bad td, table.yr tr.bad td:first-child { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }

/* ---------- Small phones (<= 420px): nothing may force the page to scroll sideways ---------- */
@media (max-width: 420px) {
  .card { padding: 20px 16px; }
  .grp-body { padding: 4px 12px 14px; }
  .grp > summary { padding: 12px; }
  .seg { flex-wrap: wrap; }
  .seg button { flex: 1 1 auto; min-width: 0; padding-inline: 8px; }
  .kpis { gap: 8px; }
  .kpi { padding: 12px; min-width: 0; }
  .kpi .v { font-size: 1.05rem; overflow-wrap: anywhere; }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .cmp .v { font-size: 1.15rem; }
  .hero-result { padding: 20px; }
  .hero-result .big { font-size: 2rem; }
  .tool-card { padding: 18px; }
  .consent { left: 8px; right: 8px; bottom: 8px; }
}

/* "?" help */
.lbl-row { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; } .lbl-row > label { margin: 0; font-size: .88rem; font-weight: 600; color: var(--muted); }
.help-btn { width: 24px; height: 24px; min-width: 24px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card, transparent); color: var(--muted); font: 700 .72rem/1 inherit; cursor: pointer; display: inline-grid; place-items: center; }
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--brand, currentColor); border-color: currentColor; }
.help-tip { font-size: .82rem; line-height: 1.45; padding: 10px 12px; margin: -2px 0 10px; border-radius: 10px; background: var(--soft, rgba(127,127,127,.1)); border: 1px solid var(--line); color: var(--text, inherit); }
.help-tip[hidden] { display: none; }

/* mobile result bar sits above the cookie banner; hero chips */
@media (max-width: 920px) { .m-bar { bottom: calc(12px + var(--consent-lift, 0px)); } }
.hchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hchips span { background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 600; }

/* tenure row */
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.row-3 .input-wrap { min-width: 0; } .sub-l { display: block; font-size: .76rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.row-3 [hidden] { display: none; }

[hidden] { display: none !important; }

.pill:empty, .words:empty { display: none; }

table.tbl td.pos { color: var(--good-text); font-weight: 600; } table.tbl td.neg { color: var(--bad-text); font-weight: 600; }

.insight a { color: var(--text); text-decoration: underline; font-weight: 600; }

/* Phone first screen: get to the calculator sooner */
.quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 640px; margin: 22px auto 0; }
.quick a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 600; text-decoration: none; }
.quick a:hover { border-color: var(--brand); color: var(--brand-text); }
@media (max-width: 600px) {
  .hero { padding: 36px 0 36px; }
  .hero h1 { font-size: 2rem; margin: 16px auto 12px; }
  .hero p.lead { font-size: .98rem; margin-bottom: 20px; }
  .eyebrow { font-size: .8rem; padding: 7px 12px; }
  .hero-cta { display: grid; gap: 10px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
  .quick { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 18px -16px 0; padding: 2px 16px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick a { white-space: nowrap; flex: none; }
  .page-hero { padding: 20px 0 4px; }
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero p { font-size: .95rem; margin-top: 8px; }
}

.guide-links { margin: 18px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.9; }
.guide-links a { color: var(--brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Donut: highlight on hover / focus / tap, and the items inside each slice */
.donut .dseg { cursor: pointer; transition: opacity .15s, stroke-width .15s; }
.donut.hl .dseg { opacity: .28; }
.donut.hl .dseg.on { opacity: 1; stroke-width: 27; }
.legend .lrow { cursor: pointer; border-radius: 10px; padding: 6px 8px; margin: -6px -8px; transition: background .15s, opacity .15s; outline: none; }
.legend .lrow:focus-visible { box-shadow: 0 0 0 2px var(--brand); }
.legend .lrow.on { background: var(--bg-2); }
.legend.hl .lrow:not(.on) { opacity: .55; }
.legend .car { display: inline-block; margin-left: 6px; font-style: normal; font-weight: 700; color: var(--muted); transition: transform .15s; }
.legend .lrow[aria-expanded="true"] .car { transform: rotate(90deg); }
.legend .lsub { list-style: none; margin: -2px 0 2px 19px; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
.legend .lsub li { display: flex; justify-content: space-between; gap: 10px; }
.legend .lsub li b { color: var(--text); font-variant-numeric: tabular-nums; }
.kpi .k .help-btn { margin-left: 6px; vertical-align: middle; }
.card-title .help-btn { margin-left: 8px; vertical-align: middle; }
.help-tip b { font-weight: 700; }
.help-tip .eq { display: block; margin: 6px 0; font-variant-numeric: tabular-nums; }
.help-tip ul { margin: 6px 0 0 18px; padding: 0; } .help-tip li { margin: 2px 0; }
.donut text { pointer-events: none; }

/* Emergency-fund toggle on liquid rows */
.item.has-e { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px 34px; }
.item .em { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1rem; line-height: 1; filter: grayscale(1); opacity: .55; transition: opacity .15s, border-color .15s; }
.item .em[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--accent); background: rgba(16,185,129,.12); }
@media (max-width: 520px) { .item.has-e { grid-template-columns: minmax(0, 1fr) 34px 34px; } .item.has-e .em { grid-row: 1 / span 2; grid-column: 2; } .item.has-e .x { grid-row: 1 / span 2; grid-column: 3; } }

/* Result card: larger supporting text, and a unit tag next to the big number */
.hero-result .lbl { font-size: 1rem; opacity: .92; }
.hero-result .sub { font-size: 1.05rem; line-height: 1.45; opacity: 1; margin-top: 4px; }
.hero-result .pill { font-size: .92rem; padding: 6px 14px; margin-top: 14px; }
.hero-result .big .per { font-size: .36em; font-weight: 600; letter-spacing: 0; margin-left: 8px; opacity: .9; }
.kpi .k { font-size: .85rem; }
.kpi .kd { font-size: .82rem; }
.kpi .kv2 { font-size: .82rem; }
