/* StructureCost. Every result is a receipt: line items, a ruled total, each figure with its source and date under it. */
@font-face { font-family: "Besley"; src: url(/fonts/besley.woff2?v=2) format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(/fonts/public-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ground: #e6eaec;   /* the counter the slips lie on */
  --paper: #ffffff;
  --ink: #1d2b3e;      /* carbon ink */
  --ink-2: #566275;
  --rule: #c5ced6;
  --pen: #2346a8;      /* what the visitor fills in, and links */
  --save: #13693f;
  --save-bg: #e1f0e7;
  --more: #a3382b;
  --serif: "Besley", Georgia, "Times New Roman", serif;
  --control-h: 46px;   /* every input, select and button */
  --control-border: #8a96a3;
  --control-radius: 4px;
  --focus: 0 0 0 3px rgba(35, 70, 168, .22);
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
a { color: var(--pen); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--ink); }
/* Besley's own figures in headings and large numbers: tabular figures are only for the sans tables */
h1, h2, h3, .fig, .mark, .stamp, .cards strong, .lead h2 { font-variant-numeric: normal; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: .25em 0 .3em; letter-spacing: -.015em; max-width: 22ch; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.12rem; margin: 1.5em 0 .35em; }
main { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
p { margin: 0 0 1em; }
.lede { font-size: 1.12rem; max-width: 60ch; color: #2d3a4c; }
.small { font-size: .86rem; color: var(--ink-2); max-width: 75ch; }
.dim { color: var(--ink-2); }
.n { text-align: right; white-space: nowrap; }
.save { color: var(--save); }
.more { color: var(--more); }

/* header */
.top { display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; padding: 18px 24px; }
.mark { font: 800 1.3rem/1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.mark-year { font: 600 .7rem var(--sans); color: var(--ink-2); margin-left: .5em; vertical-align: .45em; letter-spacing: .02em; }
.nav { display: flex; gap: 4px 22px; flex-wrap: wrap; flex: 1; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 0; }
.nav a:hover { text-decoration: underline; }
.find { position: relative; min-width: 0; }
/* form controls: one system for inputs, selects, checkboxes, radios and buttons */
[aria-invalid=true] { border-color: var(--more) !important; box-shadow: 0 0 0 1px var(--more); }
input:not([type=checkbox]):not([type=radio]), select {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; height: var(--control-h); margin: 0;
  font: 500 16px/1.2 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); background-color: var(--paper);
  border: 1px solid var(--control-border); border-radius: var(--control-radius); padding: 0 14px; }
select { padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d2b3e' stroke-width='1.8'/%3E%3C/svg%3E") right 15px center / 12px 8px no-repeat; }
input::placeholder { color: #8994a1; opacity: 1; }
input:hover, select:hover { border-color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--pen); box-shadow: var(--focus); }
input:disabled, select:disabled, button:disabled { background-color: #eef1f3; color: var(--ink-2); border-color: var(--rule); cursor: not-allowed; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
input[type=checkbox], input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; cursor: pointer;
  background: var(--paper) center / 12px no-repeat; border: 1px solid var(--control-border); border-radius: 3px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked { background-color: var(--pen); border-color: var(--pen);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border-color: var(--pen); box-shadow: inset 0 0 0 5px var(--pen); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: var(--focus); }
input[type=radio]:checked:focus-visible { box-shadow: inset 0 0 0 5px var(--pen), var(--focus); }
.top .find input { width: min(260px, 100%); }
button, .btn { font: 600 16px/1.2 var(--sans); background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: var(--control-radius); padding: 0 22px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; height: var(--control-h); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--focus); }
button:hover, .btn:hover { background: var(--pen); border-color: var(--pen); color: #fff; }
.hits { position: absolute; z-index: 20; top: calc(100% + 4px); left: auto; right: 0; min-width: min(320px, calc(100vw - 48px)); margin: 0; padding: 4px 0; list-style: none; background: var(--paper); border: 1px solid var(--ink); border-radius: 3px; max-height: 70vh; overflow-y: auto; }
.hits li a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); }
.hits li a span { display: block; font-size: 13px; color: var(--ink-2); }
.hits .all a { border-top: 1px dotted var(--rule); font-weight: 600; color: var(--pen); }
.hits li a:hover { background: var(--ground); }
.hits .tip { padding: 8px 12px; font-size: 14px; color: var(--ink-2); }
.hits.static { position: static; max-height: none; min-width: 0; }
.big { display: flex; gap: 8px; max-width: 560px; margin: 1em 0; }
.big input { flex: 1; }
.big button { flex: none; }

/* the citation tag: under a figure, the site it comes from and when */
.cite { display: block; width: fit-content; margin-top: 3px; font: 500 .7rem/1.35 var(--sans); color: var(--ink-2); text-decoration: none; border: 1px solid var(--rule); border-radius: 2px; padding: 0 5px; letter-spacing: .01em; white-space: normal; }
a.cite:hover { color: var(--pen); border-color: var(--pen); }
.notes .cite, .steps .cite, .facts .cite, p .cite { display: inline-block; margin: 0 0 0 4px; vertical-align: 1px; }

/* the one large figure */
.verdict { min-width: 0; }
.fig { font: 800 clamp(3.6rem, 12vw, 7.4rem)/.92 var(--serif); letter-spacing: -.035em; margin: 0 0 .12em; color: var(--ink); }
.fig { white-space: nowrap; }
.pagehead.split .fig { font-size: clamp(3.2rem, 6.4vw, 6rem); }
.fig .per { font: 600 1.05rem var(--sans); letter-spacing: 0; color: var(--ink-2); margin-left: .35em; }
.fig.save { color: var(--save); }
/* calculator figures (view.mjs figSize): sized to the width of their column by length; "a year" drops under the number when the line is full, and always from 10 characters */
.calcwrap .verdict, .hero-out .verdict { container-type: inline-size; }
.calcwrap .verdict .fig { font-size: min(clamp(3.4rem, 12vw, 7.4rem), calc(160cqi / var(--len, 7))); }
.hero-out .verdict .fig { font-size: min(clamp(3.4rem, 6.4vw, 5.8rem), calc(160cqi / var(--len, 7))); }
.verdict .fig { display: flex; flex-wrap: wrap; align-items: baseline; white-space: normal; }
.verdict .fig .num, .verdict .fig .per { white-space: nowrap; }
.verdict .fig .per { margin-left: .4rem; }
.verdict .fig.l .per, .verdict .fig.xl .per { flex-basis: 100%; margin: .3em 0 0 .1em; }
.fig.more { color: var(--more); }
.fig-say { font-size: 1.02rem; max-width: 36ch; margin: 0 0 .5em; }
.fig-more { font-size: .92rem; color: var(--ink-2); max-width: 46ch; }
.verdict .cite { margin-top: 6px; }
.reviewed { font-size: .85rem; color: var(--ink-2); margin: -.4em 0 1em; }

/* the receipt */
.slip { position: relative; background: var(--paper); padding: 18px 22px 30px; margin: 18px 0 8px; overflow-x: auto;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
.slip-head { font-size: .8rem; color: var(--ink-2); text-align: center; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--rule); }
.res { width: 100%; border-collapse: collapse; font-size: .95rem; }
.res th, .res td { padding: 9px 6px; border-bottom: 1px dotted var(--rule); text-align: left; vertical-align: top; }
.res td.n, .res th.n { text-align: right; }
.res thead th { font-size: .78rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.res tbody th { font-weight: 600; }
.res tr.best th, .res tr.best td { background: var(--save-bg); }
.res tr.parts td { padding: 0 6px 4px; }
.res tr:has(+ tr.parts) th, .res tr:has(+ tr.parts) td { border-bottom: 0; }
.res details summary { font-size: .82rem; color: var(--ink-2); cursor: pointer; padding: 4px 0 6px; min-height: 32px; }
.res details[open] summary { color: var(--ink); }
.lines { width: 100%; border-collapse: collapse; font-size: .86rem; margin-bottom: 6px; }
.lines td { padding: 4px 0; border-bottom: 1px dotted var(--rule); }
.lines tr.sum td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 700; }
.res tr.total th, .res tr.total td { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding-top: 10px; }
.stamp { display: inline-block; font: 700 .7rem/1.3 var(--serif); color: var(--save); border: 1.5px solid currentColor; border-radius: 3px; padding: 0 5px; transform: rotate(-4deg); margin-left: 4px; vertical-align: 1px; }
.yours { display: inline-block; font: 600 .7rem/1.3 var(--sans); color: var(--ink-2); border-bottom: 1px solid currentColor; margin-left: 4px; vertical-align: 1px; }
html:not(.drawn) .slip { animation: print .6s steps(12, end) both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { html:not(.drawn) .slip { animation: none; } }

/* page heads: big title left, the figure right */
.pagehead { margin-bottom: 8px; }
.pagehead.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; margin-bottom: 28px; }
.pagehead.split .verdict { padding-bottom: 1em; }
.crumbs { font-size: .84rem; color: var(--ink-2); margin-top: 20px; }
.crumbs a { color: var(--ink-2); }

/* calculators: the inputs as a card across the top; under it the figure and the lead form on the left, the receipt on the right */
.calcwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; align-items: start; margin-top: 28px; }
.calcwrap > .calc { order: -1; margin-bottom: 28px; }
.calcwrap > .calc .fields { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 20px; }
.calcwrap:has(.slip) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto repeat(4, auto) 1fr; }
.calcwrap:has(.slip) > .calc { grid-column: 1 / -1; grid-row: 1; }
.calcwrap:has(.slip) :is(.out, #scenout, #results, #calcout) { display: contents; }
.calcwrap:has(.slip) .slip { grid-column: 2; grid-row: 2 / -1; margin-top: 0; }
.calcwrap:has(.slip) :is(.verdict, .lead, .counts, .small) { grid-column: 1; }
.calcwrap:has(.slip) .lead { margin-top: 18px; }
.calc { border-top: 3px solid var(--ink); padding-top: 14px; }
.hero .ask, .calcwrap > .calc { background: var(--paper); padding: 18px 22px 4px; }
.calc details.more { margin-top: -4px; }
.fields { display: grid; gap: 16px; align-items: start; }
/* one label style: label text, then the control, then any help under it, so controls in a row line up */
.fields label:not(.check) { display: flex; flex-direction: column; gap: 6px; min-width: 0; font: 600 .88rem/1.3 var(--sans); color: var(--ink); }
.fields label:not(.check) > .hint { order: 2; margin-top: -2px; }
/* labels in one row share a height through subgrid, so a label that wraps does not push its control down */
@supports (grid-template-rows: subgrid) {
  .fields label:not(.check) { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; align-content: start; }
  .fields label:not(.check) > :is(input, select) { grid-row: 2; align-self: start; }
  .fields label:not(.check) > .hint { grid-row: 3; margin-top: 0; }
  .fields { row-gap: 0; }
  .fields > label:not(.check) { margin-bottom: 14px; }
  .fields > label.check { margin-bottom: 14px; }
}
.hint { font: 400 .8rem/1.4 var(--sans); color: var(--ink-2); }
label.check { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font: 400 .88rem/1.45 var(--sans); color: var(--ink); margin: 4px 0; cursor: pointer; grid-column: 1 / -1; }
label.check > span { display: inline; }
details.more { margin-top: 14px; color: var(--ink); }
/* every open-and-close section: the same row, + to open, minus when open */
details.more > summary, .counts > summary, .others > summary, .unsure > summary, details.itemized > summary { cursor: pointer; font: 600 .92rem/1.3 var(--sans); color: var(--pen); padding: 12px 0; min-height: var(--control-h); list-style: none; border-bottom: 1px solid var(--rule); }
:is(details.more, .counts, .others, .unsure, details.itemized) > summary::-webkit-details-marker { display: none; }
:is(details.more, .counts, .others, .unsure, details.itemized) > summary::before { content: "+"; display: inline-block; width: 1.1em; font-weight: 700; }
:is(details.more, .counts, .others, .unsure, details.itemized)[open] > summary::before { content: "\2212"; }
details.more > summary .hint { display: block; margin-left: 1.4em; font-weight: 400; }
details.more > .fields { padding-top: 6px; }
.out { min-width: 0; }
.say, .big-say { font-size: 1.05rem; }

/* the lead form: a stub under the receipt */
.lead { background: var(--paper); padding: 20px 22px 22px; margin-top: 14px; border-top: 2px dashed var(--rule); max-width: 760px; }
.lead h2 { margin: 0 0 .5em; font-size: 1.35rem; }
.lead .fields { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.lead .small { margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { color: var(--more); font-size: .92rem; margin: 8px 0 0; }
.msg:empty { display: none; }
.done { font-weight: 600; color: var(--save); }
.counts { margin-top: 18px; font-size: .9rem; }

/* tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); }
.levels, .facts { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .94rem; }
.levels th, .levels td, .facts th, .facts td { padding: 9px 12px; border-bottom: 1px dotted var(--rule); text-align: left; vertical-align: top; }
.levels td.n, .levels th.n { text-align: right; }
.levels thead th, .facts thead th { font-size: .78rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink); background: var(--paper); }
.levels tbody th, .facts tbody th { font-weight: 600; }
.levels tbody th a { color: var(--ink); text-decoration-color: var(--rule); }
.levels tbody th a:hover { color: var(--pen); }
.levels td.low { background: var(--save-bg); font-weight: 700; color: var(--save); }
.facts { min-width: 560px; }
.facts .sub { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-2); }
th.sort { cursor: pointer; user-select: none; }
th.sort[data-dir=asc]::after { content: " \25B2"; font-size: .7em; }
th.sort[data-dir=desc]::after { content: " \25BC"; font-size: .7em; }

/* text */
.notes { padding-left: 1.2em; max-width: 75ch; }
.notes li { margin: 7px 0; }
.steps { padding-left: 1.4em; }
.steps li { margin: 10px 0; max-width: 70ch; }
.steps li::marker { font: 700 1em var(--serif); }
.aside { background: var(--paper); border-left: 3px solid var(--more); padding: 12px 16px; max-width: 75ch; }
.buy, .aside.wide { max-width: 760px; }
.buy { background: var(--paper); padding: 20px 22px; }
.contact > label.wide { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; font: 600 .88rem/1.3 var(--sans); color: var(--ink); }
textarea { display: block; width: 100%; max-width: 100%; min-height: 120px; resize: vertical; margin: 0; padding: 12px 14px;
  font: 500 16px/1.45 var(--sans); color: var(--ink); background-color: var(--paper);
  border: 1px solid var(--control-border); border-radius: var(--control-radius); }
textarea:hover { border-color: var(--ink); }
textarea:focus { outline: none; border-color: var(--pen); box-shadow: var(--focus); }
.links { columns: 3 230px; column-gap: 32px; padding: 0; margin: 0; list-style: none; }
.links li { break-inside: avoid; border-bottom: 1px dotted var(--rule); }
.links a { display: block; padding: 8px 0; text-decoration: none; color: var(--ink); }
.links a:hover { color: var(--pen); text-decoration: underline; }
.faq h3 { margin-top: 1.3em; }
.faq p { max-width: 70ch; }
.others { margin-top: 36px; }
.unsure { margin-top: 28px; font-size: .92rem; }
.statelist { columns: 4 170px; padding: 0; list-style: none; font-size: .95rem; }
.statelist li { padding: 3px 0; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px 32px; }
.cards a { display: block; height: 100%; padding-top: 12px; border-top: 3px solid var(--ink); text-decoration: none; color: var(--ink); }
.cards strong { display: block; font: 700 1.1rem/1.25 var(--serif); margin-bottom: 6px; }
.cards span { font-size: .9rem; color: var(--ink-2); }
.cards a:hover strong { color: var(--pen); text-decoration: underline; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.gloss { columns: 2 380px; column-gap: 56px; margin: 0; }
.gloss > div { break-inside: avoid; padding: 6px 0 10px; }
.gloss dt { font-weight: 700; margin-top: 6px; }
.gloss dd { margin: 2px 0 0; color: var(--ink-2); }
.partners li { margin: 6px 0; }

/* home: two even columns, the question and its inputs on the left, the answer on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; align-items: start; padding-top: 28px; }
.hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 22ch; margin: 0 0 12px; }
.hero-ask, .hero-out { min-width: 0; }
.hero-lede { font-size: .98rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 22px; }
.ask-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.ask .more .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.hero-out { padding-top: 6px; }
.hero-out .fig { font-size: clamp(3.4rem, 6.4vw, 5.8rem); }
.slip.compact { margin-top: 14px; }
.slip.compact > .res thead th { border-bottom-color: var(--rule); }
details.itemized > summary { margin-top: 4px; }
.ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 18px 0 0; font-weight: 600; }

/* content pages (build.mjs article): the text column and a side column beside it; the sections list scrolls away,
   the first action and the accountant offer stay in view down the page */
.article { display: grid; grid-template-columns: minmax(0, 46rem) 320px; justify-content: space-between; gap: 0 56px; }
.article-main .prose { max-width: none; }
.side { padding-top: 8px; }
.side-stick { position: sticky; top: 20px; display: grid; gap: 18px; }
.side-card { background: var(--paper); padding: 18px 20px 20px; border-top: 3px solid var(--ink); }
.side-card h2 { font-size: 1.12rem; margin: 0 0 .45em; }
.side-card p { margin: 0 0 .6em; }
.side-card p:last-child { margin-bottom: 0; }
.side-card.offer { border-top: 2px dashed var(--rule); }
.side-card.toc { margin-bottom: 18px; border-top-width: 1px; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: .9rem; }
.toc li { padding: 3px 0; }
.run .fields { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.run button, .run .btn { width: 100%; margin-top: 14px; }

/* the accountant offer, a band right under the answer (home) or under the figure and receipt (calculators) */
.band { max-width: none; margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; align-items: start; padding: 24px 28px; }
.band > h2, .band > p:not(.lead-low) { grid-column: 1; }
.band > form { grid-column: 2; grid-row: 1 / span 3; }
.band .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.band .fields > label:last-child { grid-column: 1 / -1; }
.calcwrap:has(.slip) { grid-auto-flow: row dense; }
.calcwrap:has(.slip) .lead.band { grid-column: 1 / -1; margin-top: 28px; }
.lead-low { display: none; margin: 0; color: var(--ink-2); grid-column: 1 / -1; }
.home-lead.low .lead-low { display: block; }
.home-lead.low > :not(.lead-low) { display: none; }

/* home: every structure in every state, ranked by the saving */
.rank-say { color: var(--ink-2); max-width: 70ch; }
.matrix th, .matrix td { padding: 10px 12px; }
.matrix .rk { width: 2.4em; color: var(--ink-2); font-size: .82rem; }
.matrix thead th.now, .matrix td.now { background: #f4f6f8; }
.matrix td.low { background: var(--save-bg); color: var(--save); font-weight: 700; }
.matrix td.sv { font-weight: 700; color: var(--save); }
.matrix td.sv.none { color: var(--ink-2); font-weight: 600; }
.matrix:not(.all) tbody tr:nth-child(n+11) { display: none; }
.matrix tr.sel > * { border-bottom: 2px solid var(--ink); }
.rank-more { margin-top: 14px; background: var(--paper); color: var(--ink); }
.rank-more:hover { background: var(--ink); color: #fff; }

/* footer */
.foot { max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; border-top: 3px solid var(--ink); font-size: .85rem; color: var(--ink-2); }
.foot a { color: var(--ink); }
.foot .pro { margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: .78rem; }
.foot .pro a { color: var(--ink-2); }

@media (max-width: 900px) {
  .hero, .pagehead.split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 16px; }
  .hero-out { padding-top: 26px; }
  /* phone and tablet: the answer straight under the inputs, the summary line after it */
  .hero-ask { display: contents; }
  .hero-lede { order: 3; margin: 22px 0 0; font-size: .9rem; }
  .calcwrap:has(.slip) { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .calcwrap:has(.slip) :is(.calc, .slip, .verdict, .lead, .counts, .small) { grid-column: 1; grid-row: auto; }
  .calcwrap:has(.slip) .slip { margin-top: 14px; }
  .calcwrap > .calc { margin: 0 0 22px; }
  .calcwrap > .scen > .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .band > form { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .article { grid-template-columns: minmax(0, 1fr); }
  .side { padding-top: 28px; }
  .side .toc { display: none; }
  .side-stick { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
  .matrix th, .matrix td { padding: 10px 7px; }
  .scen > .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scen > .fields > .wide { grid-column: 1 / -1; }
  .top .find { flex: 1 1 100%; order: 2; }
  .nav { flex: 1 1 100%; order: 3; flex-wrap: nowrap; overflow-x: auto; gap: 20px; font-size: .92rem; white-space: nowrap; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  main { padding: 0 14px 48px; }
  .top { padding: 14px; }
  .foot { padding: 20px 14px 36px; }
  .slip { padding: 14px 10px 26px; }
  .res { font-size: .84rem; }
  .res th, .res td { padding: 8px 3px; }
  .res thead th { font-size: .68rem; }
  .res.diff { font-size: .8rem; }
  .res.diff th, .res.diff td { padding: 7px 2px; }
  /* receipts with figures of $10,000,000 and up (view.mjs tableSize) */
  .res.long, .res.diff.long { font-size: .74rem; }
  .res.xlong, .res.diff.xlong { font-size: .68rem; }
  .res.xlong th, .res.xlong td { padding-left: 1px; padding-right: 1px; }
  .res.long .yours, .res.xlong .yours, .res.long .stamp, .res.xlong .stamp { font-size: .62rem; }
  .levels, .facts { font-size: .8rem; }
  /* fact tables as one block per row: the label across, the values side by side under it, each with its column name */
  .facts { min-width: 0; }
  .facts thead { display: none; }
  .facts, .facts tbody { display: block; }
  .facts tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding: 10px 12px; border-bottom: 1px dotted var(--rule); }
  .facts tr > * { border: 0; padding: 0; }
  .facts tbody th, .facts td:not([data-l]) { grid-column: 1 / -1; }
  .facts td:empty { display: none; }
  .facts td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 600; color: var(--ink-2); }
  .levels th, .levels td { padding: 7px 3px; }
  .scroll .levels { font-size: .74rem; }
  .scroll .levels th, .scroll .levels td { padding: 7px 2px; }
  .levels thead th { font-size: .66rem; }
  .hide-s { display: none; }
  .lead { padding: 16px 14px; }
  .nav { flex-wrap: wrap; overflow: visible; gap: 6px 18px; white-space: normal; }
  .band .fields { grid-template-columns: minmax(0, 1fr); }
  .home-lead .fields { grid-template-columns: minmax(0, 1fr); }
  /* the matrix as one card per state, every structure still shown */
  .matrix thead { display: none; }
  .matrix, .matrix tbody { display: block; }
  .matrix tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px; border-bottom: 1px dotted var(--rule); }
  .matrix:not(.all) tbody tr:nth-child(n+11) { display: none; }
  .matrix tr > * { border: 0; padding: 0; }
  .matrix .rk { display: none; }
  .matrix tbody th { grid-column: 1 / 3; font-size: 1rem; }
  .matrix td.sv { grid-column: 3; grid-row: 1; text-align: right; }
  .matrix td.sv:not(.none)::after { content: " a year"; font-weight: 600; font-size: .8rem; }
  .matrix td[data-l] { text-align: left; padding: 6px 8px; background: var(--ground); border-radius: 3px; font-size: .86rem; }
  .matrix td[data-l]::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 600; color: var(--ink-2); }
  .matrix td.now { box-shadow: inset 0 0 0 1px var(--ink-2); }
  .matrix td.low { background: var(--save-bg); }
  .matrix tr.sel > * { border: 0; }
  .matrix tr.sel { border-bottom: 2px solid var(--ink); }
  #geohint { min-height: 2.8em; }
}
