/* Layout: form column beside an earnings-statement result, stacking on phones. Greenbar ledger striping is the one subject detail. */
:root {
  --bg: #f1f5f0;
  --surface: #ffffff;
  --ink: #15221b;
  --muted: #566a5e;
  --accent: #1d6a49;
  --accent-ink: #ffffff;
  --bar: #e5efe7;
  --line: #cfdbd1;
  --focus: #0b57d0;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1612; --surface: #15211a; --ink: #e5eee8; --muted: #9bb0a3;
    --accent: #5cc08f; --accent-ink: #0e1612; --bar: #1b2a22; --line: #2a3b31; --focus: #8ab4f8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1612; --surface: #15211a; --ink: #e5eee8; --muted: #9bb0a3;
  --accent: #5cc08f; --accent-ink: #0e1612; --bar: #1b2a22; --line: #2a3b31; --focus: #8ab4f8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  padding-block: 32px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
h1, h2 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 700; }
.lede { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }
.grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 780px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.form { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field[hidden] { display: none; }
.field > label, .field > .lbl, legend {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.input, select {
  width: 100%; font: 500 1rem var(--mono); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; min-height: 44px;
}
select { font-family: var(--body); font-weight: 400; }
.money { position: relative; }
.money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--muted); }
.money .input { padding-left: 26px; }
.pct { position: relative; }
.pct span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); color: var(--muted); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  text-align: center; padding: 10px 6px; min-height: 44px; font-size: 0.95rem; cursor: pointer;
  background: var(--bg); color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; display: flex; align-items: center; justify-content: center;
}
.seg input + label { border-left: 1px solid var(--line); }
.seg input:first-of-type + label { border-left: 0; }
.seg input:checked + label { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + label, .input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.stub { overflow: hidden; }
.stub-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px;
  background: var(--accent); color: var(--accent-ink); font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.net { padding: 22px 20px 8px; }
.net .label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.net .figure { font: 500 clamp(2.4rem, 8vw, 3.6rem) var(--mono); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 20px 20px; }
.chip { font-size: 0.85rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.chip b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 20px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
td.n { font-family: var(--mono); font-size: 0.95rem; }
tbody tr:nth-child(odd) { background: var(--bar); }
tr.total td { font-weight: 700; border-top: 2px solid var(--accent); background: transparent; }
tr.current td { font-weight: 600; }
tr.current td:first-child::before { content: "\25B8\00a0"; color: var(--accent); }
.section { padding: 20px 0 4px; display: flex; flex-direction: column; gap: 12px; }
.section h2 { padding: 0 20px; }
.notes { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.notes p, .notes ul { margin: 0; }
.notes ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 4px; }
details { padding: 0 20px 20px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details table th, details table td { padding: 8px 12px; }
details td { white-space: normal; text-align: left; vertical-align: top; }
details td.n { white-space: nowrap; }
.brackets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 640px) { .brackets { grid-template-columns: minmax(0, 1fr); } }
.brackets h3, .states-h { font: 600 0.9rem var(--body); margin: 0 0 6px; }
.brackets td { text-align: right; }
.brackets td:first-child { text-align: left; }
@media (prefers-reduced-motion: no-preference) { .net .figure { transition: color .2s; } }

.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { font: 700 1.1rem var(--display); color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a, .foot a, .prose a, .states-grid a, details a, .crumb a { color: var(--accent); }
.nav a { text-decoration: none; font-weight: 600; }
.nav a:hover, .foot a:hover { text-decoration: underline; }
.foot { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 8px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.crumb { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; }
.prose { padding: 24px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.prose h2 { margin-top: 10px; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.prose ul.states-grid, .states-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; list-style: none; padding: 0 !important; margin: 0; flex-direction: initial; gap: 6px 16px; }
.states-grid li span { color: var(--muted); font-size: 0.85rem; }
.faq details { border-top: 1px solid var(--line); padding: 0; }
.faq summary { padding: 14px 0; }
.faq details p { padding-bottom: 14px; margin: 0; }
.updated { font-size: 0.85rem; color: var(--muted); margin: 0; }
.rank { font-weight: 600; }
td a { color: var(--accent); }
