/* StateTaxLab — modern fintech style (after countrytaxcalc.com): Inter UI, Newsreader article headings,
   off-white page with a faint grid, large rounded white cards with soft shadows, indigo→violet accent,
   monospace eyebrows, pill controls, light "key facts" tiles, uppercase table headers. */
:root {
  --ink: #0f172a;
  --ink-1: #1f2937;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e5e7eb;
  --line-2: #eef2f7;
  --bg: #fafbfc;
  --tile: #f8fafc;
  --indigo: #5b6cf0;
  --violet: #7c4dcc;
  --grad: linear-gradient(135deg, #5b6cf0 0%, #7c4dcc 100%);
  --link: #4f46e5;
  --green: #10b981;
  --green-ink: #047857;
  --amber: #f59e0b;
  --navy: #0f172a;
  --radius: 12px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 40px rgba(15, 23, 42, .07);
  --sans: Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: Newsreader, 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.7 var(--sans); color: var(--ink-1); background: var(--bg); }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid rgba(91, 108, 240, .35); outline-offset: 2px; border-radius: 6px; }

.m-src { display: contents; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 8; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 19px/1 var(--sans); letter-spacing: -.02em; }
.brand svg { width: 32px; height: 32px; }
.brand b { font-weight: 500; color: var(--ink-2); }
.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: #f1f5f9; color: var(--ink); }
.nav a[aria-current='page'] { color: var(--link); font-weight: 600; }
.nl-short { display: none; }
.cta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: var(--grad); color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 10px 16px; border-radius: 10px; white-space: nowrap; box-shadow: 0 6px 18px rgba(91, 108, 240, .28); }
.cta:hover { color: #fff; filter: brightness(1.05); }

/* Page head over a faint grid */
main > .wrap:first-child { position: relative; }
main::before { content: ''; position: absolute; left: 0; right: 0; top: 64px; height: 560px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, .045) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(to bottom, #000 0%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%); }
.page-head { padding: 40px 0 26px; max-width: 900px; }
.crumbs { font-size: 13.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--link); }
.eyebrow { margin: 0 0 12px; font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
h1 { font: 800 clamp(34px, 5vw, 58px)/1.04 var(--sans); letter-spacing: -.035em; color: var(--ink); margin: 0 0 16px; }
h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2, h3 { color: var(--ink); }
.lede { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; max-width: 760px; }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.meta > span[aria-hidden] { display: none; }
.meta, .meta a { color: var(--ink-2); }
.meta { gap: 10px; }
.meta { align-items: center; }
.meta::before { content: none; }

/* Calculator card */
.tool-band { padding: 4px 0 28px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.calc-in, .calc-out { padding: 26px 28px; }
.calc-in { display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--line-2); }
.calc-out { background: linear-gradient(180deg, #fbfbff 0%, #fff 60%); }
.calc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.calc-head > span:first-child { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--mono); color: var(--green-ink); background: #ecfdf5; padding: 7px 11px; border-radius: 999px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.in-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.in-top > label.field { flex: 1 1 200px; }
.in-top > .field:not(label) { flex-direction: row; align-items: center; gap: 12px; }
.grid1 { display: grid; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2[hidden], .grid1[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lbl { font-size: 15px; font-weight: 600; color: var(--ink-1); }
.field small { color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.input { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: #d6dae1; }
.input:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(91, 108, 240, .14); }
.input input, .input select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 17px/1.2 var(--sans); color: var(--ink); padding: 13px 14px; font-variant-numeric: tabular-nums; }
.input select { cursor: pointer; appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.input.money > span:first-child { padding-left: 14px; color: var(--ink-4); font-weight: 600; }
.input.money input { padding-left: 4px; }
.input.suffix > span { padding-right: 14px; color: var(--ink-4); font-size: 14px; }

/* Pill tabs */
.seg { display: inline-flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 999px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(91, 108, 240, .28); }
.seg input:focus-visible + span { outline: 3px solid rgba(91, 108, 240, .35); }
.mode-seg { display: flex; }
.mode-seg label { flex: 1; text-align: center; }

/* Filing status — selectable cards */
.status-cards { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-cards legend { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.scard { position: relative; cursor: pointer; }
.scard input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scard span { display: flex; flex-direction: column; gap: 1px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 13px; height: 100%; transition: border-color .15s, background .15s; }
.scard strong { font-size: 14.5px; font-weight: 600; color: var(--ink-1); }
.scard small { font-size: 12.5px; color: var(--ink-3); }
.scard input:checked + span { border-color: var(--indigo); background: #f5f6ff; }
.scard input:checked + span strong { color: var(--link); }
.scard input:focus-visible + span { outline: 3px solid rgba(91, 108, 240, .35); }

details.more { border-top: 1px dashed var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--link); font-size: 15px; }
details.more .grid2 { margin-top: 14px; }
.aside-note { margin: 0; font-size: 14px; color: var(--ink-3); }

/* Result */
.hero-card { padding: 0 0 18px; }
.hero-label { margin: 0; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.hero-num { margin: 8px 0 6px; font: 800 clamp(42px, 5vw, 58px)/1 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0 0 14px; font-size: 14px; color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--tile); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.tile span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.tile strong { font: 600 24px/1.3 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.tile small { font-size: 12.5px; color: var(--ink-3); }
.notice { margin-top: 14px; background: #fef3c7; border: 1px solid #fde68a; border-left: 4px solid var(--amber); color: #78350f; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.notice p { margin: 3px 0; }
.breakdown { display: grid; grid-template-columns: 124px 1fr; gap: 20px; align-items: center; margin-top: 18px; }
.donut-wrap { position: relative; width: 124px; height: 124px; }
.donut { width: 100%; height: 100%; }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-mid span { font: 800 22px/1 var(--sans); color: var(--green-ink); }
.donut-mid small { font-size: 11px; color: var(--ink-3); }
.btable { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.btable th { text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.btable th:not(:first-child), .btable td:not(:first-child) { text-align: right; }
.btable td { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.btable td:nth-child(3) { color: var(--ink-3); font-size: 13px; width: 58px; }
.btable i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 9px; vertical-align: 0; }
.btable tr.gross td { font-weight: 600; }
.btable tr.gross i { border: 1.5px solid var(--ink-4); }
.btable tr.net td { font-weight: 800; color: var(--green-ink); border-bottom: 0; font-size: 15.5px; }
.how-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; color: var(--ink-1); border-bottom: 1px dashed var(--ink-4); line-height: 1.3; }
.how-btn:hover { color: var(--link); border-bottom-color: var(--link); }
.how-btn:focus-visible { outline: 3px solid rgba(91, 108, 240, .35); }
.chev { display: none; }
.how-row td { background: var(--tile); font-size: 13.5px; color: var(--ink-2); text-align: left !important; padding: 10px 12px !important; border-radius: 8px; }
.how-row p { margin: 2px 0; }
.how-row .src { color: var(--ink-3); font-size: 12.5px; }
.howto { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.btn { font: 600 13.5px/1 var(--sans); color: var(--ink-1); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 13px; cursor: pointer; }
.btn:hover { border-color: var(--indigo); color: var(--link); }
.btn:first-child { background: var(--grad); color: #fff; border-color: transparent; }
.btn.ghost { color: var(--ink-3); }
.steps { margin: 16px 0 0; padding-left: 20px; font-size: 14.5px; color: var(--ink-2); }
.steps li { margin: 7px 0; }
.steps b { color: var(--ink); }
.bars { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bar { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.bar-rate { font-weight: 700; color: var(--ink); }
.bar-track { height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.bar.empty { opacity: .45; }
.bar-val { color: var(--ink-2); }

/* Mobile sticky result */
.mini-result { display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6; align-items: center; justify-content: space-between; gap: 10px; background: var(--grad); color: #fff; padding: 11px 16px; border-radius: 14px; text-decoration: none; box-shadow: 0 10px 30px rgba(15, 23, 42, .3); transition: transform .2s, opacity .2s; }
.mini-result span { font: 500 11.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #e0e7ff; }
.mini-result strong { font: 800 20px/1 var(--sans); font-variant-numeric: tabular-nums; }
.mini-result em { font-style: normal; font-size: 13px; font-weight: 600; color: #fff; }
.mini-result.away { transform: translateY(130%); opacity: 0; pointer-events: none; }

/* Facts card */
.facts { margin: 8px 0 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03); }
.facts h2 { margin: 0 0 16px; font: 500 28px/1.2 var(--serif); letter-spacing: -.01em; }
.facts h2::before { content: 'At a glance'; display: block; margin-bottom: 6px; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.facts dl { margin: 0; }
.facts dl > div { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.facts dl > div:last-child { border-bottom: 0; }
.facts dt { font-weight: 600; color: var(--ink-1); }
.facts dd { margin: 0; color: var(--ink-2); }

/* Article: each section is a card */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; margin-top: 28px; }
.article-wrap:not(:has(.toc)) { grid-template-columns: minmax(0, 1fr); }
.toc { order: 2; position: sticky; top: 88px; align-self: start; font-size: 14.5px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc p { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 6px 10px; margin: 0 -10px; color: var(--ink-2); text-decoration: none; border-radius: 8px; }
.toc a:hover { background: #f5f6ff; color: var(--link); }
.prose { max-width: none; }
.prose section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 30px 18px; margin-bottom: 16px; }
.prose h2 { font: 500 28px/1.25 var(--serif); letter-spacing: -.01em; margin: 0 0 10px; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 32px 22px; margin: 0 0 8px; }
.prose.doc h2 { margin: 26px 0 8px; }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap[hidden] { display: none; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.dtable caption { text-align: left; font: 500 18px/1.3 var(--serif); color: var(--ink); padding: 12px 14px 8px; }
.dtable th { text-align: left; padding: 10px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--tile); border-bottom: 1px solid var(--line); }
.dtable td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover td { background: #fafaff; }
.table-note { font-size: 13px; color: var(--ink-3); }
.state-list { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.state-list li { margin: 0 !important; display: flex; }
.state-list a { flex: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: #fff; }
.state-list a > svg { grid-row: 1 / 3; margin-top: 2px; }
.state-list a:hover { border-color: var(--indigo); }
.state-list strong { font-weight: 600; color: var(--ink); line-height: 1.3; }
.state-list a > span { grid-column: 2; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }

/* FAQ, related, disclaimer */
.block { margin-top: 28px; }
.block > h2 { font: 500 30px/1.2 var(--serif); margin: 0 0 14px; letter-spacing: -.01em; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.faq details[open] { border-color: #c7cdf9; }
.faq summary { cursor: pointer; padding: 15px 44px 15px 20px; font-weight: 600; font-size: 16px; list-style: none; position: relative; color: var(--ink); }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 12px; font-size: 22px; font-weight: 400; color: var(--indigo); }
.faq details[open] summary::after { content: '–'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details > div { padding: 0 20px 16px; color: var(--ink-2); }
.links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
/* Whole card is the link: art on the left (fixed box), name above description on the right; every card in the grid has the same height. */
.links a { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-content: center; height: 100%; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.links a:hover { border-color: var(--indigo); }
.links .rel-art { grid-row: 1 / 3; grid-column: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eef0fe; }
.links strong { grid-column: 2; grid-row: 1; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.links a:hover strong { color: var(--link); }
.links .rel-desc { grid-column: 2; grid-row: 2; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.rel-shape { display: block; width: 32px; height: 28px; }
.rel-shape path { fill: #dfe3fd; stroke: var(--indigo); stroke-width: 1.3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.disclaimer { margin: 28px 0 0; font-size: 13.5px; color: var(--ink-3); background: var(--tile); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 18px; }

/* Footer */
.site-footer { margin-top: 56px; background: var(--ink); color: #94a3b8; padding: 44px 0 28px; font-size: 14.5px; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr; gap: 32px; }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: #cbd5e1; }
.foot-brand p { max-width: 340px; }
.foot-h { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #cbd5e1; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.site-footer li a { color: #94a3b8; text-decoration: none; }
.site-footer li a:hover { color: #fff; }
.foot-note { grid-column: 1 / -1; font-size: 13px; color: #64748b; border-top: 1px solid #1e293b; padding-top: 16px; margin: 0; }

/* Icons */
.ico { width: 22px; height: 22px; color: var(--indigo); flex: none; }
.ico-lg { width: 26px; height: 26px; }

/* Charts and figures */
.chart, .stub { margin: 18px 0 20px; }
.chart svg { width: 100%; height: auto; display: block; font: 12px var(--sans); fill: var(--ink-3); }
.chart .grid { stroke: var(--line-2); }
.chart .axis { stroke: var(--line); }
.chart .line { fill: none; stroke: var(--indigo); stroke-width: 2.6; }
.chart .area { fill: #eef0fe; stroke: none; }
.chart .dot { fill: var(--violet); }
.chart .lab { fill: var(--ink); font-weight: 700; font-size: 12.5px; }
.chart .lab.prem { fill: var(--green-ink); }
.chart .seg-reg { fill: #e2e8f0; }
.chart .seg-prem { fill: var(--green); }
.chart .inbar { font-weight: 700; font-size: 14px; fill: var(--ink); }
.chart .seg-prem + text + text { fill: #fff; }
figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.stub svg { width: 100%; max-width: 520px; height: auto; display: block; font: 14px var(--sans); filter: drop-shadow(0 8px 24px rgba(15, 23, 42, .08)); }
.stub .paper { fill: #fff; stroke: var(--line); }
.stub .h { font: 600 17px var(--serif); fill: var(--ink); }
.stub .t { fill: var(--ink-1); }
.stub .c { fill: var(--ink-3); font: 500 10.5px var(--mono); letter-spacing: .06em; }
.stub .n { fill: var(--ink-1); font-variant-numeric: tabular-nums; }
.stub .b { font-weight: 700; }
.stub .rule { stroke: var(--line-2); }
.stub .netbg { fill: #ecfdf5; }
.stub .net { fill: var(--green-ink); }

/* Maps and state art */
.facts-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.facts-map { margin: 0; }
.usmap { width: 100%; height: auto; display: block; }
.usmap .st { fill: #e8ebf2; stroke: #fff; stroke-width: 1; }
.usmap .st.live { fill: #c7cdf9; }
.usmap a:hover .st.live, .usmap a:focus .st.live { fill: var(--indigo); }
.usmap .st.on { fill: var(--violet); }
.facts-map figcaption a { white-space: nowrap; }
.home-map { margin: 8px auto 18px; max-width: 720px; }
.home-map figcaption { text-align: center; }
.usmap .ml { pointer-events: none; }
.usmap .map-labels a .ml { pointer-events: auto; cursor: pointer; }
.usmap a:hover .ml.live, .usmap a:focus .ml.live { fill: #fff; }
.usmap .map-labels a:hover .ml.live { fill: var(--indigo); }
.usmap text.ml { font: 600 11px/1 var(--sans, Inter, system-ui, sans-serif); fill: #7a8299; text-anchor: middle; letter-spacing: .02em; }
.usmap .ml.sm { font-size: 8.5px; }
.usmap .ml.live { fill: #3730a3; }
.usmap .ml-line { stroke: #b8bfd0; stroke-width: .8; }
.page-head.has-art { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 36px; align-items: center; max-width: none; }
.state-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 18px 14px; text-align: center; }
.head-shape { width: 100%; height: 120px; display: block; }
.head-shape path { fill: #dfe3fd; stroke: var(--indigo); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sc-name { margin: 10px 0 8px; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.state-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.state-card dl > div { background: var(--tile); border-radius: 10px; padding: 7px 6px; }
.state-card dt { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; }
.state-card dd { margin: 2px 0 0; font: 600 18px/1.2 var(--serif); color: var(--ink); }

/* Key facts tiles */
.keynums { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.keynums li { display: flex; flex-direction: column-reverse; gap: 6px; background: var(--tile); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; position: relative; }
.keynums .ico { position: absolute; right: 12px; top: 12px; width: 20px; height: 20px; opacity: .75; }
.keynums strong { font: 600 26px/1.15 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.keynums span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); line-height: 1.4; padding-right: 22px; }
main > .wrap > .keynums:first-child { margin-top: 8px; }

/* Waffle */
.waffle { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; margin: 4px 0 20px; padding: 18px; background: var(--tile); border: 1px solid var(--line-2); border-radius: 12px; }
.waffle svg { width: 100%; height: auto; }
.waffle-h { font: 500 19px/1.3 var(--serif); color: var(--ink); margin: 0 0 10px; }
.waffle ul { list-style: none; padding: 0 !important; margin: 0; }
.waffle li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.waffle li i { width: 12px; height: 12px; border-radius: 3px; }
.waffle li strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.waffle-note { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }

/* State bars */
.sbars { margin: 22px 0; }
.sbar { display: grid; grid-template-columns: 130px 1fr 90px; gap: 12px; align-items: center; padding: 5px 0; font-variant-numeric: tabular-nums; }
.sbar a { text-decoration: none; font-weight: 600; color: var(--ink-1); }
.sbar-track { height: 12px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.sbar-track span { display: block; height: 100%; background: #c7cdf9; border-radius: 999px; }
.sbar.on .sbar-track span { background: var(--grad); }
.sbar.on a { color: var(--link); }
.sbar strong { text-align: right; color: var(--ink); }

/* Paycheck flow */
.flow { list-style: none; padding: 0 !important; margin: 8px 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow li { position: relative; margin: 0 !important; padding: 16px; background: var(--tile); border: 1px solid var(--line-2); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.flow li:last-child { background: #ecfdf5; border-color: #a7f3d0; }
.flow li:not(:last-child)::after { content: '→'; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; color: var(--ink-3); z-index: 1; }
.flow strong { color: var(--ink); }
.flow span { font-size: 13px; color: var(--ink-3); line-height: 1.4; }

/* Home tool tiles */
.tools-grid-wrap { margin-top: 28px; }
.tools-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tools-grid a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tools-grid a:hover { border-color: #c7cdf9; box-shadow: var(--shadow); transform: translateY(-2px); }
.tg-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eef0fe; margin-bottom: 8px; }
.tg-ico .ico { width: 24px; height: 24px; }
.tools-grid strong { font-size: 16.5px; }
.tools-grid span:not(.tg-ico) { font-size: 14px; color: var(--ink-3); }
/* Whole card is the link: one small arrow after the name instead of a repeated "Open calculator" line. */
.tools-grid strong::after { content: " →"; color: var(--link); font-weight: 600; opacity: .55; transition: opacity .15s; }
.tools-grid a:hover strong::after { opacity: 1; }
.tools-grid a { align-items: center; text-align: center; }
.tg-art { display: block; margin-bottom: 8px; }
.tg-art .tg-ico { margin-bottom: 0; }
.tools-grid--states { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tools-grid--states a { padding: 12px 12px 11px; }
.tools-grid--states strong { font-size: 15px; }
.tools-grid--states span:not(.tg-ico) { font-size: 13px; }
@media (min-width: 640px) { .tools-grid--states { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 1000px) { .tools-grid--states { grid-template-columns: repeat(6, minmax(0, 1fr)); } .tools-grid--states a { padding: 16px 16px 14px; } }
.tg-shape { display: block; width: 52px; height: 42px; margin: 0 auto; }
.tg-shape path { fill: #dfe3fd; stroke: var(--indigo); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tools-grid a:hover .tg-shape path { fill: #cfd5fc; }

/* Responsive */
@media (max-width: 1000px) { .cta { display: none; } }
@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .article-wrap { grid-template-columns: minmax(0, 1fr); } /* minmax(0,…) so wide tables scroll inside their box instead of widening the page */
  .toc { display: none; }
  .facts-grid { grid-template-columns: 1fr; }
  .facts-map { max-width: 360px; }
}
@media (max-width: 760px) {
  .keynums { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li::after { display: none; }
  .waffle { grid-template-columns: 1fr; }
  .waffle svg { max-width: 220px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  /* Phone: logo row + one scrollable nav row with short labels; not sticky (the result bar at the bottom already is). */
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; gap: 0; padding-top: 10px; min-height: 0; }
  .nav { width: calc(100% + 20px); flex-wrap: nowrap; gap: 0; margin: 2px -10px 4px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .nl-full { display: none; }
  .nl-short { display: inline; }
  .page-head { padding: 24px 0 18px; }
  .page-head.has-art { display: block; }
  .head-art { display: none; }
  .calc-head > span:first-child { font-size: 11px; }
  .live { font-size: 11px; padding: 6px 9px; }
  .lede { font-size: 16.5px; }
  .calc { border-radius: 18px; }
  .calc-in, .calc-out { padding: 20px 16px; }
  .grid2 { gap: 12px; }
  .breakdown { grid-template-columns: 1fr; justify-items: center; }
  .btable { justify-self: stretch; }
  .facts { padding: 18px; }
  .facts dl > div { grid-template-columns: 1fr; gap: 2px; }
  .prose section { padding: 18px; }
  .prose.doc { padding: 6px 18px 16px; }
  .sbar { grid-template-columns: 96px 1fr 74px; font-size: 14px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .mini-result { display: flex; }
  body:has(.mini-result) .site-footer { padding-bottom: 84px; }
  .m-src { display: none; }
}
@media print {
  .site-header, .site-footer, .actions, .calc-in, .faq, .block, .toc, .mini-result, .cta { display: none !important; }
  .calc { display: block; border: 0; box-shadow: none; }
  .hero-num { color: #000 !important; -webkit-text-fill-color: #000; }
}
/* Phones: the map is ~350px wide, so 51 labels are unreadable. Keep only states that have a calculator, larger. */
@media (max-width: 639px) {
  .usmap text.ml:not(.live), .usmap .ml-line, .usmap .map-labels { display: none; }
  .usmap text.ml.live { font-size: 22px; }
}
/* Phones: one card per row, so equal heights only add empty space. */
@media (max-width: 639px) { .links { grid-auto-rows: auto; } }
/* Hourly-to-salary table: both money columns are results, so neither is muted. */
.btable.conv { width: 100%; margin: 6px 0 14px; }
.btable.conv td:nth-child(2), .btable.conv td:nth-child(3) { text-align: right; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.btable.conv td:nth-child(3) { font-weight: 600; color: var(--green-ink); width: auto; }
.btable.conv th:nth-child(2), .btable.conv th:nth-child(3) { text-align: right; white-space: nowrap; }
.dtable tr.total td { font-weight: 600; background: var(--tile); }
/* Small state-page map: only states with a calculator are labelled, large enough to read at ~300px wide. */
.usmap.labeled-live text.ml { font-size: 30px; font-weight: 700; }
.usmap.labeled-live text.ml.on { fill: #fff; }
.usmap.labeled-live .ml-line { stroke-width: 1.5; }
@media (max-width: 639px) { .usmap.labeled-live text.ml.live { font-size: 30px; } .usmap.labeled-live .map-labels, .usmap.labeled-live .ml-line { display: inline; } }
