/* U.S. Income Tax Calculator — styles
 * Palette: Action Blue #0066cc as the single accent, deep navy for hero/results/footer,
 * cool-neutral surfaces, charcoal text. SF Pro with system fallbacks, pill-shaped actions.
 */
:root {
  --blue: #0066cc;
  --blue-dark: #004f9f;
  --blue-focus: #0071e3;
  --blue-sky: #5ab0ff;
  --blue-tint: #eaf3fd;
  --ink: #16191f;
  --ink-80: #3a3f4a;
  --muted: #646b78;
  --muted-on-dark: #9fb0c8;
  --canvas: #ffffff;
  --surface: #f3f6fb;
  --hairline: #e2e7ef;
  --divider: #eef1f6;
  --field-border: #98a2b3;
  --navy: #0a1a33;
  --navy-2: #102a4f;
  --good: #34d399;
  --good-ink: #0f7a54;
  --warn: #ffb454;
  --error: #b3261e;
  --error-on-dark: #ff9d94;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .07);
  --shadow-lg: 0 24px 60px rgba(4, 14, 36, .35);

  --font-display: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0; font-family: var(--font-text); font-size: 17px; line-height: 1.5; letter-spacing: -0.01em;
  color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r-pill); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue-focus); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .results :focus-visible, .footer :focus-visible { outline-color: var(--blue-sky); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 64px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}
.topbar-inner { max-width: 1160px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 17px; font-weight: 650; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; display: block; box-shadow: 0 2px 8px rgba(0, 102, 204, .35); border-radius: 9px; }
.topnav { display: flex; align-items: center; gap: 28px; }
.topnav a:not(.btn) { font-size: 15px; color: var(--ink-80); font-weight: 500; }
.topnav a:not(.btn):hover { color: var(--blue); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 24px; border-radius: var(--r-pill);
  font-family: var(--font-text); font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; touch-action: manipulation;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(0, 102, 204, .28); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 8px 22px rgba(0, 102, 204, .36); }
.btn-secondary { background: #fff; color: var(--ink-80); border-color: var(--field-border); }
.btn-secondary:hover { background: var(--surface); border-color: var(--ink-80); }
.btn-light { background: #fff; color: var(--blue-dark); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.btn-light:hover { background: #f1f7ff; }
.btn-sm { white-space: nowrap; min-height: 40px; padding: 8px 18px; font-size: 15px; box-shadow: none; }
.btn-lg { min-height: 54px; padding: 14px 34px; font-size: 17px; }
.btn-ghost { background: none; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: var(--r-pill); padding: 13px 26px; min-height: 54px; font-size: 17px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; padding: 88px 24px 96px;
  background: linear-gradient(135deg, #07142b 0%, #0d2a55 55%, #0a4a96 130%); }
.hero-glow { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 82% 20%, rgba(90, 176, 255, .28), transparent 70%),
    radial-gradient(520px 340px at 8% 100%, rgba(0, 102, 204, .35), transparent 70%); }
.hero-inner { position: relative; max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 72px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #cfe3ff;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r-pill); padding: 6px 14px; margin-bottom: 24px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
h1 { font-family: var(--font-display); font-size: 62px; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; }
.lead { font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.35; letter-spacing: -0.015em; color: #d3e2f8; margin-top: 22px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 36px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: #c3d6f2; }
.trust svg { color: var(--good); flex: none; }

.preview { background: rgba(255, 255, 255, .96); color: var(--ink); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-lg); }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview-tag { font-size: 12px; font-weight: 600; color: var(--blue-dark); background: var(--blue-tint); border-radius: var(--r-pill); padding: 4px 12px; }
.preview-year { font-size: 13px; color: var(--muted); }
.preview-label { margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--muted); }
.preview-amount { font-family: var(--font-display); font-size: 58px; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; margin: 4px 0 14px; color: var(--good-ink); }
.preview-bar { height: 8px; background: var(--divider); border-radius: var(--r-pill); overflow: hidden; margin-bottom: 14px; }
.preview-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-sky)); border-radius: inherit; }
.preview-rows div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--divider); font-size: 15px; color: var(--ink-80); }
.preview-rows div span:last-child { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Workspace ---------- */
.workspace { background: var(--surface); padding: 88px 24px 96px; }
.workspace-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 44px; align-items: start; }
.rail { position: sticky; top: 92px; }
.rail-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 8px; }
.rail-sub { font-size: 15px; color: var(--muted); line-height: 1.45; margin-bottom: 20px; }
.rail-list { display: grid; gap: 6px; }
.rail-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); color: var(--ink-80); font-size: 15px; font-weight: 500; transition: background-color .15s; }
.rail-list a:hover { background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; }
.rail-list span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-tint); color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.rail-note { margin-top: 24px; padding: 16px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--hairline); font-size: 14px; line-height: 1.5; color: var(--muted); }
.rail-note strong { color: var(--ink); font-weight: 650; }

.form { display: grid; gap: 28px; min-width: 0; }
.card { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: 36px; box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; margin-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--blue-focus)); color: #fff; font-weight: 700; font-size: 16px; flex: none; box-shadow: 0 4px 10px rgba(0, 102, 204, .3); }
.card h3 { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.group { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dark); margin: 32px 0 16px; padding-top: 26px; border-top: 1px solid var(--divider); }
.card-head + .group, .card-head + .grid { border-top: 0; }
.card-head + .grid { margin-top: 24px; }
.card-head + .group { padding-top: 0; margin-top: 24px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 26px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
label, legend { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); margin-bottom: 8px; padding: 0; }
.hint { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin-top: 7px; }
.err { font-size: 13.5px; line-height: 1.4; color: var(--error); margin-top: 7px; font-weight: 600; }
.err::before { content: "\26A0\FE0E\00a0"; }

.control { position: relative; display: block; }
.control input[type="text"], .control select {
  width: 100%; min-height: 52px; padding: 11px 16px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  font-size: 17px; line-height: 1.3; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.control input::placeholder { color: #9aa3b2; opacity: 1; }
.control.money input { padding-left: 34px; }
.control .affix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 17px; font-weight: 500; }
.control .affix.end { left: auto; right: 16px; }
.suffix-wrap input { padding-right: 38px !important; }
.control.select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink-80); border-bottom: 2px solid var(--ink-80); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.control select { padding-right: 42px; cursor: pointer; font-weight: 500; }
.control input:hover, .control select:hover { border-color: var(--field-border); }
.control input:focus, .control select:focus { outline: none; border-color: var(--blue-focus); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.has-error .control input, .has-error .control select, input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }

.year-note { margin-top: 22px; padding: 14px 18px; border-radius: var(--r-md); background: var(--blue-tint); border: 1px solid #cfe3f9; font-size: 14.5px; line-height: 1.5; color: var(--ink-80); }

/* Self-employment switch */
.se-toggle { margin: 0 0 18px; padding: 8px 18px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; margin: 0; min-height: 48px; font-weight: 500; font-size: 16px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; flex: none; width: 52px; height: 32px; border-radius: var(--r-pill); background: #c4cbd8; transition: background-color .2s ease; }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--blue-focus); outline-offset: 3px; }

/* Follow-up panels */
.followup { margin: 4px 0 22px; padding: 22px 22px 6px; background: linear-gradient(180deg, #f6faff, #fff); border: 1px solid #cfe3f9; border-left: 4px solid var(--blue); border-radius: var(--r-md); display: grid; gap: 18px; }
.followup .field:last-child { margin-bottom: 16px; }
.followup .hint:last-child { margin-bottom: 16px; }
.followup-title { font-size: 15px; font-weight: 700; color: var(--blue-dark); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-choice { display: inline-flex; margin: 0; font-weight: 500; font-size: 15px; cursor: pointer; }
.pill-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-choice span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border-radius: var(--r-pill); background: #fff; border: 1.5px solid var(--hairline); box-shadow: var(--shadow-sm); font-size: 15px; transition: border-color .15s, background-color .15s; }
.pill-choice:hover span { border-color: var(--field-border); }
.pill-choice input:checked + span { border-color: var(--blue); color: var(--blue-dark); font-weight: 650; background: var(--blue-tint); }
.pill-choice input:focus-visible + span { outline: 3px solid var(--blue-focus); outline-offset: 3px; }
.has-error .pill-choice span { border-color: var(--error); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 15px; line-height: 1.45; cursor: pointer; margin: 0; min-height: 44px; padding: 4px 0; }
.check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }
.check-field.has-error .check span { color: var(--error); }

.error-summary { margin-top: 28px; padding: 18px 22px; border-radius: var(--r-md); border: 1.5px solid var(--error); background: #fff5f4; font-size: 15px; line-height: 1.5; }
.error-summary ul { margin: 8px 0 0 18px; list-style: disc; display: grid; gap: 4px; }
.error-summary a { color: var(--error); font-weight: 600; text-decoration: underline; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--hairline); }
.stale-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Results ---------- */
.results { color: #fff; padding: 96px 24px; scroll-margin-top: 64px;
  background: radial-gradient(700px 360px at 85% 0%, rgba(0, 113, 227, .25), transparent 70%), linear-gradient(180deg, #08162d, #0b2142); }
.results-inner { max-width: 900px; margin: 0 auto; }
.results-context { display: inline-block; font-size: 13.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #cfe3ff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-pill); padding: 6px 14px; }
.results-headline { font-family: var(--font-display); font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em; margin-top: 22px; outline: none; color: #e3eefc; }
.results-amount { font-family: var(--font-display); font-size: 104px; font-weight: 700; line-height: 1.02; letter-spacing: -0.045em; margin: 10px 0 14px; font-variant-numeric: tabular-nums; word-break: break-word; }
.results-amount[data-outcome="refund"] { color: var(--good); }
.results-amount[data-outcome="balance"] { color: var(--warn); }
.results-explain { font-size: 18px; color: #bccbe0; max-width: 640px; }

.panel { margin-top: 44px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-xl); padding: 30px 36px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.panel-title { font-family: var(--font-display); font-size: 22px; font-weight: 650; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 10px; }
.breakdown { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; }
.row:first-child { border-top: 0; }
.row dt { font-size: 17px; color: #fff; }
.row dd { margin: 0; font-size: 17px; text-align: right; white-space: nowrap; color: #fff; }
.row.strong dt, .row.strong dd { font-weight: 650; }
.row.level-1 { padding: 5px 0 5px 22px; border-top: 0; }
.row.level-1 dt, .row.level-1 dd { font-size: 15px; color: #aebfd7; }
.row.level-1 + .row.level-0 { margin-top: 6px; }
.state-box { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .22); }
.state-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 8px; flex-wrap: wrap; }
.state-sub { font-size: 14.5px; color: var(--muted-on-dark); }
.state-result { text-align: right; display: grid; gap: 2px; }
.state-result span { font-size: 14.5px; color: #bccbe0; }
.state-result strong { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; }

.download-wrap { margin-top: 28px; display: grid; gap: 10px; justify-items: start; }
.btn-download { width: 100%; max-width: 440px; background: #fff; color: var(--blue-dark); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.btn-download:hover { background: #f1f7ff; box-shadow: 0 12px 32px rgba(0, 0, 0, .38); }
.btn-download::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v9m0 0l-3.5-3.5M10 12l3.5-3.5M4 15.5h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v9m0 0l-3.5-3.5M10 12l3.5-3.5M4 15.5h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.err.on-dark { color: var(--error-on-dark); }

.notes { margin-top: 52px; padding-top: 34px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 8px; }
.notes-title { font-family: var(--font-display); font-size: 18px; font-weight: 650; margin: 12px 0 8px; }
.notes ul { list-style: disc; margin-left: 20px; display: grid; gap: 8px; }
.notes li { font-size: 15px; line-height: 1.55; color: #bccbe0; }
.disclaimer { margin-top: 22px; font-size: 14px; line-height: 1.55; color: var(--muted-on-dark); }

/* ---------- Info sections ---------- */
.info { padding: 96px 24px; background: #fff; }
.info.alt { background: var(--surface); }
.info-inner { max-width: 1160px; margin: 0 auto; }
.info-inner.narrow { max-width: 780px; }
.kicker { font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; max-width: 720px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.how-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 30px; }
.how-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; margin-bottom: 20px; box-shadow: 0 6px 14px rgba(0, 102, 204, .3); }
.how-card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
.how-card p { font-size: 16px; color: var(--ink-80); line-height: 1.55; }
.faq { margin-top: 36px; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; min-height: 56px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-tint); color: var(--blue-dark); font-size: 20px; line-height: 1; font-weight: 500; transition: transform .2s; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 22px 20px; color: var(--ink-80); font-size: 16px; line-height: 1.6; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); padding: 72px 24px; color: #c3d0e4; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: grid; gap: 36px; }
.footer-title { font-family: var(--font-display); font-size: 20px; font-weight: 650; color: #fff; }
.footer-lead { font-size: 15px; color: var(--muted-on-dark); margin: 6px 0 16px; }
.sources { display: grid; gap: 8px 44px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sources li { font-size: 14.5px; line-height: 1.55; }
.sources a { color: #9cc9ff; text-decoration: underline; text-underline-offset: 3px; }
.sources a:hover { color: #fff; }
.fine { font-size: 13px; line-height: 1.6; color: var(--muted-on-dark); max-width: 760px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .workspace-inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rail { position: static; }
  .rail-sub { display: none; }
  .rail-title { font-size: 24px; margin-bottom: 14px; }
  .rail-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .rail-list a { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 6px 16px 6px 8px; min-height: 44px; box-shadow: var(--shadow-sm); }
  .rail-note { margin-top: 14px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .preview { max-width: 440px; transform: none; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 60px; }
  .topbar-inner { padding: 0 16px; }
  .brand span { font-size: 15px; }
  .btn-sm { padding: 8px 14px; font-size: 14px; }
  .hero { padding: 48px 20px 56px; }
  h1 { font-size: 42px; line-height: 1.08; }
  .lead { font-size: 20px; }
  .hero-actions .btn, .btn-ghost { width: 100%; }
  .preview { display: none; }
  .workspace { padding: 36px 16px 56px; }
  .card { padding: 26px 20px; border-radius: 22px; }
  .card h3 { font-size: 23px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .results { padding: 56px 16px; }
  .results-amount { font-size: 64px; }
  .results-headline { font-size: 23px; }
  .panel { padding: 22px 18px; border-radius: 22px; }
  .row { gap: 12px; }
  .row dt, .row dd { font-size: 16px; }
  .row dd { white-space: normal; }
  .row.level-1 { padding-left: 12px; }
  .btn-download, .actions .btn { width: 100%; max-width: none; }
  .actions { flex-direction: column; }
  .info { padding: 56px 20px; }
  .section-title { font-size: 30px; }
  .how-grid { margin-top: 32px; }
  .sources { grid-template-columns: minmax(0, 1fr); }
  .state-result { text-align: left; }
}
@media (max-width: 380px) {
  h1 { font-size: 36px; }
  .results-amount { font-size: 50px; }
  .brand span { display: none; }
}
@media print {
  .topbar, .rail, .actions, .skip-link { display: none !important; }
}
