/* ============================================================
   FreeCashCalculator: shared stylesheet
   Design tokens first; components below. Rename/re-brand by
   editing the tokens only.
   ============================================================ */

:root {
  /* slate scale + primary blue, matched to deployn.de */
  --bg: #f8fafc;            /* page plane (slate-50) */
  --surface: #ffffff;       /* cards, inputs, chart surface */
  --ink: #0f172a;           /* primary text (slate-900) */
  --ink-2: #475569;         /* secondary text (slate-600) */
  --ink-3: #64748b;         /* muted labels (slate-500) */
  --line: #e2e8f0;          /* hairline borders (slate-200) */
  --grid: #e8eef5;          /* chart gridlines */
  --accent: #0a5dd6;        /* primary blue */
  --accent-ink: #ffffff;    /* text on accent fills */
  --accent-soft: #edf8ff;   /* tinted fills, hovers */
  --accent-ring: rgba(10, 93, 214, 0.16);
  --success: #007348;       /* emerald secondary */
  --danger: #d03b3b;        /* warning states */
  --meter-track: #d6ecff;   /* unfilled meter, light step of accent ramp */
  --series-putin: #2a78d6;  /* chart: money you put in (validated slot 1) */
  --series-interest: #1baf7a; /* chart: interest earned (validated slot 2) */
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.07);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #020617;
    --surface: #0f172a;
    --ink: #f1f5f9;
    --ink-2: #94a3b8;
    --ink-3: #64748b;
    --line: #1e293b;
    --grid: #1c2941;
    --accent: #48b0ff;
    --accent-ink: #06182b;
    --accent-soft: #0c2a4d;
    --accent-ring: rgba(72, 176, 255, 0.28);
    --success: #009e65;
    --danger: #d03b3b;
    --meter-track: #0c2a4d;
    --series-putin: #3987e5;
    --series-interest: #199e70;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header / footer ---------- */

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark svg { display: block; }

.site-nav a {
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  padding: 8px 10px; border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); text-decoration: none; }

.site-footer {
  margin-top: 72px; padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 13.5px;
}
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }

.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px 40px; flex-wrap: wrap;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }

@media (max-width: 720px) {
  .site-footer { margin-top: 56px; padding: 28px 0 36px; }
  .footer-grid { flex-direction: column; gap: 20px; }
  .footer-links { gap: 12px 22px; }
}

/* ---------- all-calculators sitemap ---------- */

.calc-intro + .prose { margin-top: 24px; }

.toc h2 { margin-top: 40px; }
.toc h3 {
  font-size: 14px; font-weight: 650; color: var(--ink);
  margin: 22px 0 8px;
}
.toc ul {
  list-style: none; padding: 0; margin: 0 0 8px;
  columns: 3 240px; column-gap: 36px;
}
.toc li {
  font-size: 13.5px; color: var(--ink-3); line-height: 1.5;
  padding: 2.5px 0; break-inside: avoid;
}
.toc li a { color: var(--accent); font-weight: 550; }

/* ---------- index: hero + search ---------- */

.hero { text-align: center; padding: 52px 0 36px; }

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero .tagline {
  color: var(--ink-2); font-size: clamp(1rem, 2.2vw, 1.125rem);
  margin: 0 auto 28px;
}

.search {
  position: relative; max-width: 540px; margin: 0 auto;
}
.search svg {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
.search input {
  width: 100%; height: 54px; padding: 0 52px 0 48px;
  font: inherit; font-size: 16.5px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.search kbd {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font: 600 11.5px/1 system-ui, sans-serif; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 7px; background: var(--bg);
}

/* ---------- index: category sections + cards ---------- */

.cat { margin: 34px 0; }

.cat > h2 {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 12px 2px;
}
.cat > h2 .cat-count {
  font-weight: 600; letter-spacing: 0.02em; text-transform: none;
  opacity: 0.75; margin-left: 6px;
}

.grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 10px 18px; text-align: center;
  color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.card-icon { font-size: 27px; line-height: 1.2; }

.card h3 { font-size: 13.5px; font-weight: 650; margin: 0; letter-spacing: 0; }

.card.soon { opacity: 0.55; }
.badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 6px; line-height: 1.4;
}

.no-results {
  text-align: center; color: var(--ink-2); padding: 48px 0;
}

/* ---------- calculator page: content + ad rail ---------- */

.page-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px; align-items: start;
}

.rail { position: sticky; top: 24px; margin-top: 10px; }

.ad-caption {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 6px 2px;
}

.ad-slot {
  border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center;
  color: var(--ink-3); font-size: 12.5px;
}
/* placeholder look — remove .ad-empty when pasting a real ad tag */
.ad-slot.ad-empty { border: 1px dashed var(--line); background: var(--surface); }
.ad-rect { width: 300px; min-height: 250px; }
.ad-inline { margin: 28px 0 0; text-align: center; }
.ad-inline .ad-slot { width: 100%; max-width: 728px; min-height: 90px; margin: 0 auto; }
.ad-article { margin: 30px 0 40px; text-align: center; }
.ad-article .ad-slot { width: 100%; max-width: 728px; min-height: 90px; margin: 0 auto; }
.rail-ad-2 { margin-top: 24px; }

.grid-even4 { grid-template-columns: repeat(4, 1fr); }

.about-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  margin: 22px 0 10px;
}
.about-stat {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 12px 15px; text-align: center;
}
.about-stat b { display: block; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.about-stat span {
  display: block; margin-top: 3px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3);
}

.related-calcs { margin-top: 28px; }
.related-calcs h2 {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 10px 2px;
}
.related-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.related-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.related-name { font-size: 14px; line-height: 1.3; }
.related-arrow { color: var(--accent); font-weight: 700; flex: none; }

/* ---------- E-E-A-T meta: breadcrumbs, byline, verify note, corrections, sources ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px;
}
.crumbs a { color: var(--ink-3); font-weight: 550; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.55; }
.crumbs [aria-current] { color: var(--ink-2); }

.byline { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.byline a { color: var(--ink-2); font-weight: 600; }
.byline a:hover { color: var(--accent); }

.verify-note {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 6px 0 0; padding: 11px 14px;
  background: var(--accent-soft); border-radius: var(--radius);
  font-size: 13px; color: var(--ink-2);
}
.verify-note .check { color: var(--success); font-weight: 800; }
.verify-note a { font-weight: 600; white-space: nowrap; }
.prose section:has(.verify-note) { margin-bottom: 24px; }

.corrections {
  margin: 22px 0 36px;
  font-size: 13.5px; color: var(--ink-3);
}

.sources ul { list-style: none; padding: 0; margin: 0; }
.sources li { font-size: 14px; color: var(--ink-3); line-height: 1.6; padding: 5px 0; }
.sources li a { font-weight: 600; }
.sources .src-note { color: var(--ink-3); }

/* ---------- contact form ---------- */
.contact-layout {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px;
  align-items: start; margin-top: 10px;
}
.contact-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 28px;
}
.contact-card h2 { font-size: 18px; margin: 0 0 4px; }
.contact-card .form-sub { color: var(--ink-2); font-size: 14px; margin: 0 0 22px; }
.field-row { margin-bottom: 16px; }
.field-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field-row label .req { color: var(--danger); margin-left: 2px; }
.field-row input, .field-row textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-row input:focus, .field-row textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring);
}
.field-row input::placeholder, .field-row textarea::placeholder { color: var(--ink-3); }
.field-row textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  display: none; align-items: center; gap: 9px;
  padding: 12px 15px; border-radius: 8px; font-size: 14px; font-weight: 600;
  margin-bottom: 18px; line-height: 1.45;
}
.form-status.show { display: flex; }
.form-status.ok { background: var(--accent-soft); color: var(--success); border: 1px solid var(--line); }
.form-status.err { background: var(--surface); color: var(--danger); border: 1px solid var(--danger); }
.form-status svg { flex: none; }
.cf-turnstile { margin-bottom: 18px; }
.contact-submit {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); border: none; border-radius: 8px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.contact-submit:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.contact-submit:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.contact-aside .info-note { margin-bottom: 20px; }
.contact-aside h3 { font-size: 14.5px; margin: 0 0 4px; }
.contact-aside p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.55; }
.contact-aside a { font-weight: 600; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 24px; } }

.rail-box {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px;
}
.rail-box h2 {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-3); margin: 0 0 8px;
}
.rail-links { list-style: none; margin: 0; padding: 0; }
.rail-links li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 5px 0; font-size: 13.5px; line-height: 1.4;
}
.rail-links a { color: var(--accent); font-weight: 550; }
.rail-links .soon-item { color: var(--ink-3); }
.rail-links .soon-item::after {
  content: "soon"; flex: none;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 1.5px 6px;
}
.rail-links .all { margin-top: 7px; padding-top: 11px; border-top: 1px solid var(--line); }
.rail-links .all a { color: var(--ink-2); font-weight: 600; }
.rail-links .all a:hover { color: var(--ink); }

/* ---------- calculator page: intro ---------- */

.calc-intro { padding: 26px 0 16px; }
.calc-intro h1 { font-size: clamp(1.5rem, 3.6vw, 2rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.calc-intro .lede { color: var(--ink-2); font-size: 16.5px; margin: 0; }

/* ---------- calculator card ---------- */

.calc-card {
  display: grid; grid-template-columns: minmax(0, 10fr) minmax(0, 11fr);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 22px 0 10px; overflow: hidden;
}

.calc-form { padding: 26px 26px 22px; }
.calc-results { padding: 26px 26px 22px; border-left: 1px solid var(--line); }

.privacy-note {
  color: var(--ink-3); font-size: 12.5px; margin: 10px 2px 0;
}

/* ---------- form fields ---------- */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field > label {
  display: block; font-size: 13px; font-weight: 650;
  color: var(--ink-2); margin-bottom: 7px;
}

.input {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.input .affix {
  flex: none; padding: 0 2px 0 14px; color: var(--ink-3);
  font-size: 15px; font-weight: 600;
}
.input .affix.suffix { padding: 0 14px 0 2px; }
.input input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: none; border: 0; outline: none;
}
.input:has(.affix:not(.suffix)) input { padding-left: 6px; }
.input:has(.suffix) input { padding-right: 6px; text-align: right; }

input[type="range"] {
  width: 100%; margin: 10px 0 0; accent-color: var(--accent);
}

.hint { font-size: 12.5px; color: var(--ink-3); margin: 7px 2px 0; line-height: 1.45; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font: 600 12.5px/1 system-ui, sans-serif; color: var(--ink-2);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; cursor: pointer;
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}

/* ---------- results ---------- */

.result-label { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 0 0 2px; }

.result-value {
  font-size: clamp(2.3rem, 5vw, 2.9rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); margin: 0;
}
.result-value .per { font-size: 0.45em; font-weight: 650; color: var(--ink-2); letter-spacing: 0; }
.result-value.ontrack { color: var(--success); }
.result-value.text { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.result-value.danger { color: var(--danger); }

.result-sub { font-size: 14px; color: var(--ink-2); margin: 6px 0 0; }

.breakdown { list-style: none; margin: 18px 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.breakdown li {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13.5px; color: var(--ink-2); padding: 3.5px 0;
}
.breakdown li strong {
  font-weight: 650; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.breakdown li.total {
  margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line);
}

/* ---------- chart ---------- */

.chart-legend {
  display: flex; gap: 18px; align-items: center;
  font-size: 12.5px; color: var(--ink-2); margin: 4px 0 6px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch {
  width: 11px; height: 11px; border-radius: 3px; flex: none;
}
.swatch.putin { background: var(--series-putin); }
.swatch.interest { background: var(--series-interest); }

.chart { position: relative; outline-offset: 4px; }
.chart svg { display: block; width: 100%; height: auto; }

.chart .area-putin { fill: var(--series-putin); opacity: 0.1; }
.chart .area-interest { fill: var(--series-interest); opacity: 0.1; }
.chart .line-putin { fill: none; stroke: var(--series-putin); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-interest { fill: none; stroke: var(--series-interest); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .crosshair { stroke: var(--ink-3); stroke-width: 1; }
.chart .hover-dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot-putin { fill: var(--series-putin); }
.chart .dot-interest { fill: var(--series-interest); }

.chart-tooltip {
  position: absolute; z-index: 2; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 11px; min-width: 150px;
}
.chart-tooltip .tt-date { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; }
.chart-tooltip .tt-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2); padding: 1.5px 0;
}
.chart-tooltip .tt-row b {
  color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650;
}
.chart-tooltip .tt-key {
  width: 10px; height: 2.5px; border-radius: 2px; flex: none;
}
.tt-key.putin { background: var(--series-putin); }
.tt-key.interest { background: var(--series-interest); }
.tt-key.total { background: var(--ink-3); }

.chart-empty {
  color: var(--ink-3); font-size: 14px; text-align: center; padding: 40px 0;
}

/* ---------- meter (progress toward a target) ---------- */

.meter { margin: 16px 0 4px; }
.meter-track {
  height: 14px; border-radius: 999px; background: var(--meter-track);
  overflow: hidden;
}
.meter-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  transition: width 0.2s ease;
}
.meter-caption {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-2); margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.meter-caption b { color: var(--ink); font-weight: 650; }

/* ---------- callouts & actions ---------- */

.teaser {
  margin: 16px 0 20px; padding: 11px 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--ink-2);
  font-size: 13.5px; line-height: 1.5;
}
.teaser b { color: var(--ink); font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 14.5px; line-height: 1;
  padding: 13px 18px; border-radius: 10px; text-decoration: none;
  transition: filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }

/* ---------- yearly table ---------- */

.year-table { margin-top: 14px; border-top: 1px solid var(--line); }
.year-table summary {
  cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  padding: 11px 2px; list-style: none; display: flex; align-items: center; gap: 8px;
}
.year-table summary::-webkit-details-marker { display: none; }
.year-table summary::before {
  content: "+"; font-weight: 500; font-size: 16px; color: var(--ink-3);
  width: 14px; text-align: center; line-height: 1;
}
.year-table[open] summary::before { content: "−"; }
.year-table summary:hover { color: var(--ink); }

.year-table table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  font-variant-numeric: tabular-nums; margin: 2px 0 12px;
}
.year-table th {
  text-align: right; font-weight: 650; color: var(--ink-3);
  padding: 6px 8px; border-bottom: 1px solid var(--line);
}
.year-table th:first-child, .year-table td:first-child { text-align: left; padding-left: 2px; }
.year-table td {
  text-align: right; padding: 6px 8px; color: var(--ink-2);
  border-bottom: 1px solid var(--grid);
}
.year-table td:last-child { color: var(--ink); font-weight: 600; }
.year-table tr:last-child td { border-bottom: 0; }

/* ---------- prose content (how it works, FAQ) ---------- */

.prose { margin-top: 28px; }
.prose h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.prose p, .prose li { font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.prose ul { padding-left: 22px; margin: 0 0 1rem; }
.prose li { margin-bottom: 8px; }
.prose li strong, .prose p strong { color: var(--ink); font-weight: 650; }
.prose section { margin-bottom: 40px; }

.formula {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; margin: 0 0 14px;
  font-size: 15.5px; text-align: center; color: var(--ink);
  overflow-x: auto;
}

.faq > h2 { margin-bottom: 16px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 14px 2px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; font-size: 19px; color: var(--ink-3); flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 2px; margin: 0 0 16px; }

.related { color: var(--ink-2); font-size: 14px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .page-grid { grid-template-columns: 1fr; }
  .rail { display: none; }
  .ad-inline .ad-slot { max-width: 336px; min-height: 280px; }
  .ad-article .ad-slot { max-width: 336px; min-height: 280px; }
}

@media (max-width: 800px) {
  .calc-card { grid-template-columns: 1fr; }
  .calc-results { border-left: 0; border-top: 1px solid var(--line); }
  .hero { padding: 36px 0 24px; }
  .search kbd { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .related-card:nth-child(3) { display: none; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-even4 { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
