/* Civic / editorial. IBM Plex Sans, thin rules, one amber accent. */
/* Fonts are self-hosted (static/fonts/, SIL Open Font License 1.1: the files Google Fonts serves, unmodified). Only the
   latin subset is used by the site's text; IBM Plex Sans is one variable file for weights 400-700. base.html preloads
   both files. */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
  src: url(/static/fonts/ibm-plex-sans-latin-v23.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/libre-caslon-text-700-latin-v5.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ink: #1a1a1a;
  --paper: #fbfaf7;
  --muted: #5c5c5c;
  --rule: #e2dfd8;
  --link: #0b4f8a;
  --accent: #f2b705;
  --soft: #f3f1ec;
  --band: #f1eee8;
  --warn-fg: #5a4300;
  --focus: #946b00;    /* focus ring: at least 4.1:1 on paper, soft and band (WCAG 1.4.11 asks 3:1) */
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecebe6; --paper: #161615; --muted: #a8a69f; --rule: #34332f;
    --link: #8cc0ef; --accent: #f2b705; --soft: #1e1d1b; --band: #1e1d1b; --warn-fg: #f2d77a;
    --focus: #f2b705;  /* at least 9.2:1 on paper, soft and band */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
  font-variant-numeric: tabular-nums;          /* money and day counts line up everywhere */
  border-top: 4px solid var(--accent);
  overflow-wrap: break-word;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Skip link: the first Tab stop on every page, off screen until focused. */
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .6rem 1rem; background: var(--paper);
  color: var(--link); border: 1px solid var(--ink); font-weight: 600; }
.skip-link:focus { top: .5rem; }
main:focus { outline: none; }   /* the skip link's target (tabindex=-1): focus moves there, no ring around the page */

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }
main.wrap { max-width: 56rem; }
main.wrap.wide { max-width: 72rem; }
main p, main li, main dd { max-width: var(--measure); }

h1 { font-size: 1.85rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin: 2rem 0 .75rem; max-width: 24ch; }
@media (min-width: 768px) { h1 { font-size: 2.5rem; margin-top: 3rem; } }
h2 { font-size: 1.3rem; line-height: 1.3; font-weight: 700; margin: 2.75rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .4rem; }
.lede { font-size: 1.12em; color: var(--ink); max-width: var(--measure); margin: 0 0 .5rem; }
.small, .meta { font-size: .875rem; color: var(--muted); }

/* Header: amber square mark + wordmark (+ descriptor on desktop), nav right; on phones nav is its own row. */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; min-height: 64px; }
@media (min-width: 600px) { .site-header .wrap { min-height: 64px; } }
/* Wordmark: Libre Caslon Text 700 (header 22px, footer 20px). Line box and brand height are fixed, so the
   font swap changes only glyph widths. The square sits on the baseline and is raised so its centre is at half the
   x-height of whichever font is showing (ex follows the fallback too). */
.brand { display: inline-flex; align-items: baseline; gap: .6rem; min-height: 44px; padding-top: 11px; color: var(--ink); text-decoration: none; font-size: 22px; }
.brand .word { font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif; font-size: 1em; font-weight: 700; line-height: 1; letter-spacing: 0; }
.brand .mark {
  width: 12px; height: 12px; background: var(--accent); flex: none; align-self: baseline;
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif; font-size: 1em; font-weight: 700;
  transform: translateY(calc(6px - .5ex));
}
.descriptor { display: none; color: var(--muted); font-size: .875rem; }
.main-nav { display: flex; column-gap: 1.5rem; margin-left: auto; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 600; border-bottom: 2px solid transparent; padding-top: 2px; white-space: nowrap;
}
.main-nav a:hover { border-bottom-color: var(--rule); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
@media (min-width: 768px) {
  .descriptor { display: inline; padding-left: 1rem; border-left: 1px solid var(--rule); }
}
@media (max-width: 599px) {
  /* nowrap: a wrapping column's line is as wide as its widest item, which stretched the nav past the screen */
  .site-header .wrap { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding-top: .35rem; }
  .main-nav {
    min-width: 0; margin: 0 -1rem; padding: 0 1rem; border-top: 1px solid var(--rule); column-gap: 1.25rem;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
}
/* Below 375px the menu is wider than the screen: a fade at the right edge shows it scrolls sideways; the extra right
   padding lets the last item scroll clear of the fade. One row, so the header stays as short as it is. */
@media (max-width: 374px) {
  .main-nav {
    padding-right: 2.5rem;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }
}

/* Grid tracks are minmax(0, Nfr), never a bare Nfr: a bare fr track is never narrower than its widest unbreakable
   content (a big figure, a long word at a large phone text size) and would push the page past the screen. */
/* Footer: full-width band, disclaimer, three columns, legal line. */
.site-footer { margin-top: 4.5rem; padding: 2.5rem 0 2rem; background: var(--band); border-top: 1px solid var(--rule); font-size: .95rem; }
.site-footer .disclaimer { border-left: 2px solid var(--accent); padding: .1rem 0 .1rem 1rem; margin: 0 0 2rem; max-width: var(--measure); }
.footer-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 768px) { .footer-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; } }
.footer-cols .small { max-width: 34ch; margin: .5rem 0 0; }
.foot-brand { margin: 0; min-height: 0; padding-top: 0; font-size: 20px; }
.foot-brand .word { line-height: 1; }
.site-footer h2 { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4rem; padding: 0; border: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: flex; align-items: center; min-height: 44px; }
@media (min-width: 768px) { .site-footer li a { min-height: 2.1rem; } }
.site-footer .legal { margin: 1.25rem 0 0; }
/* Phones: a shorter footer. Less spacing, and each link column becomes a wrapping row of links (each still a 44px
   tap target); same links in the same order. */
@media (max-width: 599px) {
  .site-footer { margin-top: 3rem; padding: 1.5rem 0 1.25rem; }
  .site-footer .disclaimer { margin: 0 0 1.25rem; }
  .footer-cols { gap: 1rem; padding: 1rem 0; }
  .site-footer ul { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
  .site-footer li a { display: inline-flex; }
  .site-footer .legal { margin-top: .75rem; }
}

/* ---------------------------------------------------------------- home */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding: 2rem 0 .5rem; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3.5rem; align-items: start; padding-top: 3rem; } }
.hero h1 { margin: 0 0 .9rem; max-width: none; text-wrap: balance; }
.hero .checked { margin: 0 0 1.5rem; }
.finder { margin: 0; }
.finder input {
  font: inherit; font-size: 18px; width: 100%; min-height: 52px; padding: 0 1rem;
  color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 2px;
}
.finder input::placeholder { color: var(--muted); opacity: 1; }
.finder input:focus-visible { outline-offset: 0; }
.finder p { margin: .5rem 0 0; min-height: 1.4em; }

.sample { border: 1px solid var(--ink); padding: 1.5rem 1.5rem 1.25rem; }
@media (min-width: 900px) { .sample { margin-top: .5rem; } }
.sample p { margin: 0; max-width: none; }
.sample-label { font-size: .9rem; font-weight: 600; color: var(--muted); }
.sample-amount { font-size: 3.5rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin: .35rem 0 .25rem !important; }
@media (min-width: 900px) { .sample-amount { font-size: 4.5rem; } }
.sample-note { font-weight: 600; }
.sample-scope { font-size: .9rem; line-height: 1.4; margin: .1rem 0 .25rem !important; }
.sample-src { margin-top: .9rem !important; padding-top: .9rem; border-top: 1px solid var(--rule); }
.sample-more { margin-top: .9rem !important; }
.sample-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
/* Reserved row heights (min-height, in rem): the visitor's-state swap (static/home-geo.js) does not change the panel's
   height at normal text size. They are minimums, never fixed heights: with a larger phone text size the rows grow and
   the text wraps instead of being cut off. 5 rows: label, figure, note, source, link. */
.sample { padding: 1.25rem 1.5rem .5rem; }
.sample-label { line-height: 1.4; min-height: 2.52rem; }          /* .9rem x 1.4 x 2 lines */
/* The figure's line box is the reserved height at normal text size (3.75rem / 3.5rem = 1.0714; 4.75rem / 4.5rem on
   desktop) and a text figure is centred in it, so a number and "Set locally" give the same panel height. */
.sample-amount { display: flex; align-items: center; min-height: 3.75rem; line-height: 1.0714; margin: .25rem 0 0 !important; }
.sample-amount.is-text { font-size: 1.6rem; letter-spacing: -.01em; }
/* A range of city fees ("$60 – $450", build.city_release_fee_range) is smaller so it stays on one line. */
.sample-amount.is-range { font-size: 2.6rem; }
@media (min-width: 900px) {
  .sample-amount { min-height: 4.75rem; line-height: 1.0556; }
  .sample-amount.is-text { font-size: 2rem; }
  .sample-amount.is-range { font-size: 3.2rem; }
}
.sample-note { line-height: 1.5; min-height: 3.2rem; }           /* two lines on phones (the longest note wraps there) */
@media (min-width: 900px) { .sample-note { min-height: 1.6rem; } }
.sample-src { line-height: 1.5; min-height: calc(3.94rem + .75rem + 1px); padding-top: .75rem; margin-top: .75rem !important; }  /* .875rem x 1.5 x 3 */
.sample-more { min-height: 44px; margin-top: .5rem !important; }

.picker h2 { margin-top: 2rem; }
.state-cols { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 2rem; }
@media (min-width: 600px) { .state-cols { columns: 2; } }
@media (min-width: 900px) { .state-cols { columns: 3; } }
@media (min-width: 1200px) { .state-cols { columns: 4; } }
.state-cols li { break-inside: avoid; max-width: none; border-bottom: 1px solid var(--rule); }
.state-cols a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.state-cols a:hover { text-decoration: underline; }
.state-cols .shape { width: 22px; height: 22px; flex: none; margin-right: .6rem; object-fit: contain; }

/* Steps: numbers in a fixed 40px gutter inside the column, on the baseline of the first line. */
ol.steps-v2 { list-style: none; counter-reset: step; margin: 1.25rem 0 0; padding: 0; }
ol.steps-v2 > li {
  counter-increment: step; display: grid; grid-template-columns: minmax(40px, max-content) minmax(0, 1fr); align-items: baseline;
  padding: 0 0 1.25rem; max-width: calc(var(--measure) + 40px);
}
ol.steps-v2 > li::before { content: counter(step); font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--ink); padding-right: .35rem; }
ol.steps-v2 > li > .step-text { grid-column: 2; }
ol.steps-v2 strong { font-weight: 700; }

/* Finder suggestions: a list over the content under the box (no layout shift), as wide as the box; options at least
   44 px tall; the matching letters bold. finder.js sets max-height to the room above the on-screen keyboard. */
.finder-box { position: relative; }
.finder-list {
  position: absolute; z-index: 30; top: 100%; left: 0; right: 0; margin: 0; padding: .25rem 0; list-style: none;
  max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; background: var(--paper);
  border: 1px solid var(--ink); border-top: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.finder-list .fo {
  display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .4rem 1rem; max-width: none;
  cursor: pointer; line-height: 1.3;
}
.finder-list .fo[aria-selected="true"], .finder-list .fo:hover { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.finder-list .fo-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.finder-list mark { background: none; color: inherit; font-weight: 700; }
.fo-tag {
  flex: none; font-size: .75rem; font-weight: 600; letter-spacing: .02em; padding: .1rem .4rem; border-radius: 2px;
  border: 1px solid var(--rule); color: var(--muted); white-space: nowrap;
}
.fo-tag.fo-page { border-color: var(--accent); background: var(--accent); color: #1a1a1a; }
.fo-tag.fo-rules { border-color: var(--ink); color: var(--ink); }

/* "Car towed right now?" (home) and the finder's note: the same three steps; the note's are smaller. */
.towed-now .steps-now { margin-top: .75rem; }
.steps-compact > li { padding-bottom: .6rem; grid-template-columns: minmax(28px, max-content) minmax(0, 1fr); }
.steps-compact > li::before { font-size: 1.15rem; }
.finder-help { margin: .75rem 0 0; padding: .85rem 1rem .25rem; background: var(--soft); border-left: 3px solid var(--accent); }
.finder-help p { margin: 0 0 .6rem; min-height: 0; max-width: var(--measure); }
.finder-help .steps-now { margin: 0; }
.finder-help:focus { outline: none; }
.state-cols li.fh-li { column-span: all; border-bottom: 0; padding: .25rem 0 .75rem; }
.state-cols li.fh-li .finder-help { margin-top: 0; }
.state-cols li.fh-li li { border-bottom: 0; }
.state-cols li.fh-li a { display: inline; min-height: 0; font-weight: inherit; text-decoration: underline; }
.state-soon[role="button"] { cursor: pointer; }
.state-soon[role="button"]:hover .soon-name { text-decoration: underline; }

.stats { display: grid; grid-template-columns: minmax(0, 1fr); margin: 1.5rem 0 1rem; padding: 0; border-top: 1px solid var(--rule); }
.stats div { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.stats dt { font-size: .9rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 2.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.stats div { display: flex; flex-direction: column-reverse; }
@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
  .stats div { border-bottom: 0; padding: 1.25rem 1.25rem 1.25rem 0; }
  .stats div + div { border-left: 1px solid var(--rule); padding-left: 1.25rem; }
}

/* ------------------------------------------------- other pages (older rules on the current tokens) */
/* Breadcrumb links are inline with vertical padding: a 44px tap area that does not open a 44px line when it wraps. */
.crumbs { font-size: .85rem; line-height: 1.5; color: var(--muted); margin-top: 1.25rem; padding: .7rem 0; }
.crumbs a { display: inline; padding: .8rem 0; }
.notice { border-left: 2px solid var(--accent); padding: .1rem 0 .1rem 1rem; }
.missing { color: var(--muted); font-style: italic; border-left: 2px solid var(--rule); padding-left: .8rem; }
.cite { display: inline-block; font-size: .8rem; color: var(--muted); }
.cite a { color: var(--muted); }
.cond { display: block; font-size: .85rem; color: var(--muted); }
.tag { font-size: .75rem; border: 1px solid var(--rule); border-radius: 2px; padding: 0 .3rem; color: var(--muted); }

.summary { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: .25rem 0 1rem; }
.summary h2 { border-top: 0; margin-top: .75rem; padding-top: 0; }
.summary dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem 2rem; margin: 0; }
@media (min-width: 640px) { .summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.summary dt { font-size: .85rem; color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.summary dd .cite, .summary dd .cond { font-weight: 400; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .5rem .55rem 0; border-bottom: 1px solid var(--rule); }
th { font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom-color: var(--ink); }
td.amt { font-weight: 600; white-space: nowrap; }
td.amt .cap { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); white-space: normal; }
@media (max-width: 639px) {
  table thead { display: none; }
  table tr { display: block; border-bottom: 1px solid var(--rule); padding: .5rem 0; }
  table td, table th { display: block; border: 0; padding: .15rem 0; }
  table.fees td:first-child { font-weight: 700; }
  td.amt { white-space: normal; }
}

.state-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 2rem; }
.state-list li { border-bottom: 1px solid var(--rule); padding: .55rem 0; }
.state-list li.pending span:first-child { color: var(--muted); }
.steps li { margin-bottom: .5rem; }
.conflicts li { margin-bottom: .6rem; }

/* Calculator */
.calc { border-top: 1px solid var(--ink); padding: .75rem 0; }
.calc fieldset { border: 0; border-top: 1px solid var(--rule); margin: .75rem 0 0; padding: .75rem 0 0; min-width: 0; }
.calc legend { font-weight: 700; padding: 0; }
.calc .opt { display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.calc .fee-row { margin: .35rem 0; }
.calc .row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.calc .row .lbl { flex: 1 1 200px; }
.calc input[type=number] { width: 7.5em; font: inherit; min-height: 44px; padding: .25rem .4rem; border: 1px solid var(--muted); border-radius: 2px; background: var(--paper); color: var(--ink); }
.calc input.qty { width: 5em; }
.calc input[type=datetime-local], .calc select { font: inherit; min-height: 44px; padding: .25rem; border: 1px solid var(--muted); border-radius: 2px; background: var(--paper); color: var(--ink); max-width: 100%; }
.calc .dates { display: grid; gap: .4rem; margin-top: .5rem; }
.calc .dates label { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.calc .note { display: block; font-size: .82rem; color: var(--muted); margin-left: 1.6rem; }
.calc-result { margin-top: 1rem; padding-top: .75rem; border-top: 2px solid var(--ink); }
.calc-result .note { margin-left: 0; }
.calc-result .total { font-size: 1.3rem; margin: .2rem 0; }
.calc-result .max { margin: .2rem 0; }
.calc-result .warn { border-left: 2px solid var(--accent); padding: .1rem 0 .1rem .75rem; color: var(--warn-fg); }
.calc-result .formula { font-size: .9rem; font-family: ui-monospace, Consolas, monospace; word-break: break-word; }

/* Draft preview (build.py --include-drafts only) */
.draft-banner { background: #b00020; color: #fff; font-weight: 700; padding: .75rem 1rem; margin: 1rem 0; border-radius: 2px; }
.tag.draft { background: #b00020; color: #fff; }

/* Upcoming legal change (state page): the one place the amber accent fills an area. */
.upcoming { border-left: 4px solid var(--accent); background: var(--soft); padding: .5rem 1rem; margin: 1.5rem 0; }
.upcoming h2 { border-top: 0; margin-top: .5rem; padding-top: 0; }

/* ---------------------------------------------------------------- state page */
.muted { color: var(--muted); }
.state-head { display: flex; align-items: flex-start; gap: 1rem; margin-top: 1.25rem; }
.state-shape { width: 44px; height: 44px; flex: none; margin-top: .35rem; object-fit: contain; }
@media (min-width: 768px) { .state-shape { width: 56px; height: 56px; margin-top: .6rem; } }
.state-head > div { flex: 1; min-width: 0; }
.state-head h1 { margin: 0 0 .5rem; max-width: 22ch; text-wrap: balance; }
.state-head .meta { margin: 0; max-width: none; }
.meta-note { display: none; }
@media (min-width: 768px) { .meta-note { display: inline; } }
.state-head + .notice { margin: 1.5rem 0; max-width: var(--measure); }

/* Two-column layout from 1100px: content + sticky "On this page" list. Below that, a collapsible list. */
.state-layout { display: block; }
@media (min-width: 1100px) {
  .state-layout { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 4rem; }
  .toc-inline { display: none; }
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }
.toc a:hover { text-decoration: underline; }
.toc-inline { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 0 1rem; }
.toc-inline summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 600; cursor: pointer; list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
/* Sources list: a <details>, closed after load (static/sources.js opens it for a citation link); the h2 sits in the
   summary, so the heading's rule and spacing move to the details. */
.g-sources { margin-top: 2.75rem; border-top: 1px solid var(--rule); }
.g-sources > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding-top: .5rem; cursor: pointer; list-style: none; }
.g-sources > summary::-webkit-details-marker { display: none; }
.g-sources > summary h2 { margin: 0; padding: 0; border: 0; }
.g-sources > summary::after { content: "Show"; font-weight: 400; font-size: .9rem; color: var(--link); text-decoration: underline; text-underline-offset: .18em; }
.g-sources[open] > summary::after { content: "Hide"; }
.toc-inline summary::after { content: "Show"; font-weight: 400; font-size: .9rem; color: var(--link); text-decoration: underline; text-underline-offset: .18em; }
.toc-inline[open] summary::after { content: "Hide"; }
.toc-inline ol { columns: 1; column-gap: 2rem; padding-bottom: .5rem; }
@media (min-width: 600px) { .toc-inline ol { columns: 2; } }
.toc-inline li { break-inside: avoid; border-top: 1px solid var(--rule); }
.toc-side { display: none; }
@media (min-width: 1100px) {
  .toc-side { display: block; position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; padding-top: 1.75rem; font-size: .92rem; }
  .toc-side a { min-height: 2.1rem; border-left: 2px solid var(--rule); padding-left: .75rem; }
  .toc-side a:hover { border-left-color: var(--accent); text-decoration: none; }
}
.toc-title { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.state-body h2[id] { scroll-margin-top: 1rem; }

/* At a glance: figures large, qualifiers small, text values plain. */
.glance h2 { margin-top: 1.5rem; }
.glance-grid { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; border-top: 1px solid var(--ink); }
@media (min-width: 600px) { .glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; } }
.glance-item { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--rule); }
.glance-item dt { font-size: .875rem; font-weight: 600; color: var(--muted); }
.glance-item dd { margin: .2rem 0 0; }
.glance-fig { margin: 0 0 .35rem; line-height: 1.15; }
.fig { font-size: 2rem; font-weight: 700; letter-spacing: -.01em; }
.fig-pre { display: block; font-size: .875rem; color: var(--muted); }
.fig-unit { font-size: 1rem; font-weight: 600; margin-left: .25rem; color: var(--muted); }
.fig-after { display: block; font-size: .95rem; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: .2rem; }
.fig-text { font-size: 1.05rem; font-weight: 600; }
.glance-item .cond { margin-top: .25rem; }
.facts { margin: 1.25rem 0 0; }
.facts > div { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 768px) { .facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; } }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.laws { list-style: none; margin: 0; padding: 0; }
.laws li { padding: .15rem 0; }

/* Fee table: rules only; stacked rows with labels on phones. */
table.fees-v2 th[scope="row"] { font-size: 1rem; font-weight: 700; color: var(--ink); border-bottom-color: var(--rule); width: 26%; }
table.fees-v2 td.amt { font-size: 1.05rem; }
table.fees-v2 .cond-text { display: block; margin-bottom: .3rem; }
@media (max-width: 639px) {
  table.fees-v2 tr { padding: .9rem 0; }
  table.fees-v2 th[scope="row"] { display: block; width: auto; padding: 0 0 .35rem; border: 0; }
  table.fees-v2 td { padding: .2rem 0; }
  table.fees-v2 td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  table.fees-v2 td.amt { font-size: 1.35rem; }
}
.local { max-width: var(--measure); }

.two-up { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2.5rem; }
@media (min-width: 900px) { .two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two-up h3 { margin-top: .5rem; } }

ul.ruled { list-style: none; margin: .5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
ul.ruled > li { padding: .7rem 0; border-bottom: 1px solid var(--rule); }

.key { font-weight: 700; font-size: 1.1rem; margin: 0 0 .5rem; padding-left: .8rem; border-left: 2px solid var(--accent); }
.key-fig { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin: .25rem 0 .5rem; }
.deadline { padding-bottom: .5rem; }
.deadline + .deadline { border-top: 1px solid var(--rule); }
.deadline h3 { margin-top: 1.25rem; }

/* Sources: the number (.src-n, in the markup) in a narrow column that grows only as wide as the number; the title
   and details (.src-body) take the rest of the width. */
ol.sources-v2 { list-style: none; margin: .5rem 0 1rem; padding: 0; font-size: .92rem; }
ol.sources-v2 li { display: grid; grid-template-columns: minmax(3ch, max-content) minmax(0, 1fr); padding: .35rem 0;
  border-bottom: 1px solid var(--rule); max-width: none; }
ol.sources-v2 li:target { background: var(--soft); }
.src-n { color: var(--muted); font-weight: 600; text-align: right; padding-right: .4em; }
.src-body { min-width: 0; }
.src-meta { display: block; color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- calculator (static/calculator.js)
   One tool card (.c3-card) holding the inputs (.c3-form) and the result panel (#receipt, .c3-result); /calculator/
   (all states, data-mode="multi") and every state and city page (data-mode="single"). Uses the site tokens, so light
   and dark mode follow them; text on --paper and --soft is at least 5.9:1, the amber segment carries #1a1a1a (10:1). */
/* Receipt lines, "compare with your bill", notes and print parts (classes shared with the receipt markup) */
.receipt-line { padding: .3rem 0; max-width: none; font-size: .95rem; }
.rl-main { display: flex; align-items: flex-end; gap: .4rem; }
.rl-label { flex: 0 100 auto; min-width: min(9em, 45%); }
.rl-leader { flex: 1 1 1.5rem; min-width: 1rem; border-bottom: 1px dotted var(--muted); margin-bottom: .4em; }
.rl-amt { flex: 0 1 auto; font-weight: 600; text-align: right; }
.rl-compare { display: none; padding: .35rem 0 .2rem; font-size: .88rem; color: var(--muted); }
.rl-compare label { display: inline-flex; align-items: center; gap: .3rem; }
.rl-diff { display: block; }
.is-comparing .rl-compare { display: block; }
.is-comparing .is-above .rl-diff { margin-top: .35rem; padding-left: .6rem; border-left: 2px solid var(--accent); font-weight: 700; color: var(--ink); }
.receipt-compare { margin-top: 1rem; }
.receipt-above { margin: .4rem 0 0; font-weight: 700; }
.receipt-above:empty { display: none; }
.receipt-note, .receipt-notes p { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; max-width: none; }
.receipt-notes { margin-top: 1rem; }
.receipt-print-only { display: none; }
.receipt-rule summary { display: flex; align-items: center; min-height: 44px; color: var(--link); cursor: pointer; font-size: .85rem; text-decoration: underline; text-underline-offset: .18em; }
.receipt-rule p { margin-top: 0; }
.receipt-print { margin-top: .5rem; }
.c3-controls[hidden] { display: none; }   /* a fee's own controls show only while that fee is selected */
body.has-calc-bar { padding-bottom: var(--calc-bar-h, 56px); }
@media (min-width: 900px) { body.has-calc-bar { padding-bottom: 0; } }

.c3-card {
  --c3-field: var(--paper);
  --c3-line: var(--muted);          /* input borders: at least 3:1 against the card */
  --c3-radius: 8px;
  margin: 1.25rem 0 0; padding: 1.25rem 1rem 1.5rem; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 28px rgba(0, 0, 0, .07);
}
@media (prefers-color-scheme: dark) {
  .c3-card { background: var(--soft); box-shadow: none; border-color: #3d3c38; --c3-field: var(--paper); }
}
@media (min-width: 600px) { .c3-card { padding: 1.75rem 1.75rem 2rem; } }
@media (min-width: 900px) { .c3-card { padding: 2rem 2.25rem 2.25rem; } }
.c3-card-head { padding-bottom: 1.1rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--rule); }
.c3-card-head h1 { margin: 0; max-width: none; font-size: 1.6rem; line-height: 1.2; }
@media (min-width: 768px) { .c3-card-head h1 { font-size: 2rem; margin: 0; } }
/* State and city pages: the card is the page's calculator section; its h2 is the card title. */
.c3-card-single { margin: 2.5rem 0 0; }
.c3-card-head h2 { margin: 0; padding: 0; border: 0; max-width: none; font-size: 1.4rem; line-height: 1.25; }
@media (min-width: 768px) { .c3-card-head h2 { font-size: 1.6rem; } }
.c3-help { margin: .45rem 0 0; color: var(--muted); font-size: .98rem; max-width: 60ch; }

/* Layout: phone and tablet one column (the result right after the inputs); desktop inputs left, result right. */
.c3-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
@media (min-width: 900px) {
  .c3-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .c3-side { position: sticky; top: 1rem; }
}

/* Fields */
.c3-q { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
.c3-label { display: block; padding: 0; margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; color: var(--ink); }
.c3-sublabel { display: block; margin: 0 0 .4rem; font-size: .9rem; font-weight: 600; color: var(--muted); }
.c3-hint, .c3-sub { font-size: .875rem; color: var(--muted); margin: -.2rem 0 .6rem; }
.c3-sub { font-weight: 600; margin: 1rem 0 .4rem; }

.calc3 select, .calc3 input[type=number], .calc3 input[type=datetime-local] {
  font: inherit; color: var(--ink); background: var(--c3-field); border: 1px solid var(--c3-line); border-radius: var(--c3-radius);
  min-height: 48px; padding: .4rem .7rem; max-width: 100%;
}
.c3-select { width: 100%; min-height: 56px !important; font-size: 1.15rem !important; font-weight: 600; padding: .5rem .8rem !important; cursor: pointer; }
.calc3 select:hover, .calc3 input:hover { border-color: var(--ink); }

/* Segmented buttons (tow type, vehicle class): real radios, one bordered group, the chosen one filled amber. */
.c3-seg { display: flex; flex-wrap: wrap; border: 1px solid var(--c3-line); border-radius: var(--c3-radius); overflow: hidden; background: var(--c3-field); }
/* Options share the row equally; none is narrower than its longest word (words never break inside), so the group
   wraps to a second row only when they can't fit (large text on a narrow phone). Dividers are shadows: the group's
   border hides the ones on its outer edges. */
.c3-seg-opt { flex: 1 1 0; position: relative; display: flex; box-shadow: -1px 0 0 var(--c3-line), 0 -1px 0 var(--c3-line); }
.c3-seg-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.c3-seg-opt .c3-seg-text { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .35rem .6rem;
  text-align: center; line-height: 1.2; font-weight: 600; color: var(--ink); overflow-wrap: normal; }
.c3-seg-opt:hover .c3-seg-text { background: var(--soft); }
.c3-seg-input:checked + .c3-seg-text { background: var(--accent); color: #1a1a1a; }
.c3-seg-input:focus-visible + .c3-seg-text { outline: 3px solid var(--focus); outline-offset: -5px; }

/* Days: a stepper (- field +) in one bordered box */
.c3-stepper { display: inline-flex; max-width: 100%; align-items: stretch; border: 1px solid var(--c3-line); border-radius: var(--c3-radius); overflow: hidden;
  background: var(--c3-field); }
.c3-step { flex: none; width: 52px; min-height: 52px; padding: 0; font: inherit; font-size: 1.6rem; font-weight: 600; line-height: 1;
  color: var(--ink); background: var(--soft); border: 0; cursor: pointer; }
.c3-step:hover { background: var(--rule); }
.c3-step:focus-visible { outline-offset: -4px; }
.c3-days-cell { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: .3rem; min-width: 0; padding: 0 .9rem;
  border-left: 1px solid var(--c3-line); border-right: 1px solid var(--c3-line); cursor: text; }
.c3-days-cell:focus-within { box-shadow: inset 0 0 0 3px var(--focus); }
.calc3 input.c3-days { width: 1.9ch; flex: none; min-width: 1.9ch; min-height: 50px; border: 0; border-radius: 0; text-align: right;
  font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 .3rem; -moz-appearance: textfield; }
.c3-days::-webkit-outer-spin-button, .c3-days::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.c3-days-unit { color: var(--muted); }
.calc3 input.c3-days:focus-visible { outline: none; }   /* the cell shows the ring */
.c3-dates { margin-top: .6rem; font-size: .95rem; }
.c3-dates summary { display: flex; align-items: center; min-height: 44px; color: var(--link); cursor: pointer; text-decoration: underline;
  text-underline-offset: .18em; }
.c3-dates label { display: grid; gap: .25rem; margin: .5rem 0; font-size: .9rem; font-weight: 600; color: var(--muted); min-width: 0; }
.calc3 .c3-dates input { width: 100%; min-width: 0; max-width: 22rem; }

/* Rate choices (several tow or storage rates): bordered option rows with a radio */
.c3-extras, .c3-choice { list-style: none; margin: 0; padding: 0; }
.c3-choice { display: grid; gap: .5rem; }
.c3-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: 52px; padding: .4rem 0; cursor: pointer; }
.c3-choice .c3-row { padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: var(--c3-radius); background: var(--c3-field); }
.c3-choice .c3-row:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.c3-row input[type=radio] { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--ink); }
.c3-row-label { flex: 1 1 10em; min-width: 0; }
.c3-row-amt { flex: none; margin-left: auto; text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c3-controls { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .5rem 0 .6rem; }
.c3-inline { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.calc3 .c3-money, .calc3 .c3-qty { width: 7em; text-align: right; font-variant-numeric: tabular-nums; }
.c3-schedule { margin-top: .6rem; }
/* Quoted-rate fields: label naming the fee, one-line hint, a $ box (full width on phones, 16rem from 600px). */
.c3-quote { flex: 1 1 100%; min-width: 0; margin-top: .25rem; }
.c3-quote .c3-hint { margin: 0 0 .45rem; }
.c3-money-box { display: flex; align-items: center; width: 100%; max-width: 100%; border: 1px solid var(--c3-line);
  border-radius: var(--c3-radius); background: var(--c3-field); }
@media (min-width: 600px) { .c3-money-box { width: 16rem; } }
.c3-money-box:focus-within { box-shadow: 0 0 0 3px var(--focus); }
.c3-cur { flex: none; padding: 0 .1rem 0 .75rem; color: var(--muted); font-weight: 600; }
.calc3 .c3-money-box .c3-money { flex: 1 1 0; width: 100%; min-width: 0; border: 0; text-align: left; padding-left: .25rem; }
.calc3 .c3-money-box .c3-money:focus-visible { outline: none; }   /* the box shows the ring */
.c3-after { margin-top: 1rem; }
.c3-choice .c3-controls { padding: .25rem .2rem .4rem; }

/* Extras: one switch per fee (yes/no). The checkbox covers the switch; the whole row is its label. */
.c3-q-extras { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.c3-extras > li { border-bottom: 1px solid var(--rule); max-width: none; }
.c3-switch-row { flex-wrap: nowrap; }
.c3-switch-row .c3-row-amt { margin-left: .5rem; }
/* Phones: an extra's amount sits under its label and the switch stays on the right, so a long label keeps the row's
   width instead of sharing it with the amount. */
@media (max-width: 599px) {
  .c3-switch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .1rem; align-items: center; }
  .c3-switch-row .c3-row-label { grid-column: 1; grid-row: 1; }
  .c3-switch-row .c3-row-amt { grid-column: 1; grid-row: 2; margin-left: 0; text-align: left; }
  .c3-switch-row .c3-switch { grid-column: 2; grid-row: 1 / span 2; margin-left: 0; }
}
.c3-switch { position: relative; flex: none; width: 52px; height: 32px; margin-left: .5rem; }
.c3-switch-input { position: absolute; inset: -8px -4px; width: calc(100% + 8px); height: calc(100% + 16px); margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.c3-switch-ui { position: absolute; inset: 0; border: 2px solid var(--c3-line); border-radius: 16px; background: var(--c3-field);
  transition: background-color .15s, border-color .15s; }
.c3-switch-ui::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted);
  transition: transform .15s; }
.c3-switch-input:checked + .c3-switch-ui { background: var(--ink); border-color: var(--ink); }
.c3-switch-input:checked + .c3-switch-ui::after { transform: translateX(20px); background: var(--paper); }
.c3-switch-input:focus-visible + .c3-switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .c3-switch-ui, .c3-switch-ui::after { transition: none; } }
.c3-other .c3-row { cursor: default; }
.c3-other .c3-row-amt { display: inline-flex; align-items: center; gap: .35rem; }

/* Result panel: amber top edge, the heading and the total in a large figure, then the itemized receipt. */
.c3-result { position: relative; padding: 1.25rem 1.1rem 1.1rem; background: var(--soft); border: 1px solid var(--rule);
  border-top: 4px solid var(--accent); border-radius: var(--c3-radius); }
@media (prefers-color-scheme: dark) { .c3-result { background: var(--paper); } }
.c3-result:focus { outline: none; }
.c3-result:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.c3-sum { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.c3-sum-h { margin: 0; padding: 0; border: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.c3-result.is-nomax .c3-sum-h { font-size: 1.2rem; }
.c3-sum-fig { margin: .3rem 0 .15rem; font-size: 2.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink); }
@media (min-width: 900px) { .c3-sum-fig { font-size: 3.25rem; } }
.c3-sum-lbl { margin: .55rem 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.c3-sum-lbl:empty { display: none; }
/* No maximum: no large figure; the capped amount and the uncapped items in one plain line. */
.c3-result.is-nomax .c3-sum-lbl { margin-top: .5rem; font-size: 1rem; font-weight: 400; color: var(--ink); }
/* Before storage (no days entered yet): the line under the figure is plain text; the receipt's storage amount is a
   text button that takes you to the days field. */
.c3-result.is-prestorage .c3-sum-lbl { margin-top: .3rem; font-size: 1rem; font-weight: 400; color: var(--ink); }
.c3-adddays { min-height: 44px; font-size: .95rem; text-align: right; }
.c3-sum-sub { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); max-width: none; }
.c3-receipt-h { margin: 1rem 0 .25rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.c3-lines { list-style: none; margin: 0; padding: 0; }
.c3-lines .receipt-line { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.c3-lines .rl-leader { visibility: hidden; }
.c3-lines .rl-amt { font-variant-numeric: tabular-nums; }
.c3-total { margin-top: .1rem; padding-top: .7rem; border-top: 2px solid var(--ink); }
.c3-total-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 .75rem; margin: 0; font-weight: 700; }
.c3-total-amt { font-size: 1.5rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.c3-note, .c3-local { font-size: .85rem; color: var(--muted); margin: .5rem 0 0; max-width: none; }
.c3-local { margin-top: .9rem; padding: .6rem .75rem; background: var(--paper); border-left: 3px solid var(--accent); color: var(--ink); }
@media (prefers-color-scheme: dark) { .c3-local { background: var(--soft); } }
.c3-textbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font: inherit; font-weight: 600; color: var(--link);
  background: none; border: 0; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.c3-textbtn[aria-expanded="true"]::after { content: "(on)"; margin-left: .35rem; font-weight: 400; color: var(--muted); text-decoration: none; display: inline-block; }

/* Phone bar: slim, at the bottom while the result panel is off screen; tap to scroll to it. */
.c3-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .75rem;
  width: 100%; min-height: 52px; padding: .35rem 1rem; font: inherit; color: var(--paper); background: var(--ink); border: 0;
  border-top: 3px solid var(--accent); text-align: left; cursor: pointer; }
.c3-bar[hidden] { display: none; }
.c3-bar-label { flex: 1 1 8em; min-width: 0; font-size: .85rem; line-height: 1.25; overflow-wrap: anywhere; }
.c3-bar.is-nomax .c3-bar-label { flex-basis: auto; font-size: .95rem; font-weight: 400; }
.c3-bar-amt { flex: none; font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c3-bar-view { flex: 0 1 auto; min-width: 0; margin-left: auto; font-weight: 600; text-decoration: underline; text-underline-offset: .18em; }
.c3-bar:focus-visible { outline: 3px solid var(--paper); outline-offset: -6px; }   /* the bar is --ink: its own text colour contrasts fully in both modes */
@media (min-width: 900px) { .c3-bar { display: none !important; } }

/* Receipt lines: the amount stays on the label's row, right-aligned; the label wraps on the left. The amount column
   has a minimum width (a money figure never squeezes) and at most 40% of the row, so the label keeps at least 60%.
   Below 360px the amount goes under the label (style.css, max-width: 359px). */
.c3-lines .rl-main { align-items: baseline; gap: .5rem; }
.c3-lines .rl-label { flex: 1 1 0; min-width: 0; }
.c3-lines .rl-leader { display: none; }
.c3-lines .rl-amt { flex: 0 1 auto; min-width: min(5.5em, 40%); max-width: 40%; margin-left: auto; overflow-wrap: break-word; }
@media (max-width: 599px) {   /* phones: thinner side padding, so the receipt keeps its width */
  .c3-card { padding-left: .75rem; padding-right: .75rem; }
  .c3-result { padding-left: .75rem; padding-right: .75rem; }
}
@media (max-width: 359px) {
  .c3-lines .rl-main { flex-wrap: wrap; row-gap: .1rem; }
  .c3-lines .rl-label { flex: 1 1 100%; }
  .c3-lines .rl-amt { max-width: none; }
}

/* Reserve about the built height until calculator.js has built the tool (CLS); values measured per width range,
   each the smallest built height in its range (multi: the first state, default answers). Not without JavaScript. */
@media (scripting: enabled) { .calc3[data-mode="multi"]:not(.c3-ready) { min-height: 1860px; } }
@media (scripting: enabled) and (min-width: 360px) { .calc3[data-mode="multi"]:not(.c3-ready) { min-height: 1790px; } }
@media (scripting: enabled) and (min-width: 390px) { .calc3[data-mode="multi"]:not(.c3-ready) { min-height: 1670px; } }
@media (scripting: enabled) and (min-width: 480px) { .calc3[data-mode="multi"]:not(.c3-ready) { min-height: 1510px; } }
@media (scripting: enabled) and (min-width: 900px) { .calc3[data-mode="multi"]:not(.c3-ready) { min-height: 900px; } }
/* State and city pages (one state or city): the smallest built height over all 68 pages in each range. */
@media (scripting: enabled) { .calc3[data-mode="single"]:not(.c3-ready) { min-height: 1440px; } }
@media (scripting: enabled) and (min-width: 360px) { .calc3[data-mode="single"]:not(.c3-ready) { min-height: 1310px; } }
@media (scripting: enabled) and (min-width: 390px) { .calc3[data-mode="single"]:not(.c3-ready) { min-height: 1280px; } }
@media (scripting: enabled) and (min-width: 480px) { .calc3[data-mode="single"]:not(.c3-ready) { min-height: 1160px; } }
@media (scripting: enabled) and (min-width: 900px) { .calc3[data-mode="single"]:not(.c3-ready) { min-height: 740px; } }

/* Phones below 360px (also at 200% text): long labels wrap, amounts and the bar's parts may wrap. */
@media (max-width: 359px) {
  .c3-card { padding: 1rem .75rem 1.25rem; }
  .c3-switch-row { flex-wrap: wrap; }
  .c3-row-amt { flex: 0 1 auto; min-width: 0; white-space: normal; }
  .c3-bar-label { flex-basis: 100%; }
  .c3-bar-view { white-space: normal; }
  .c3-sum-fig { font-size: 2.1rem; }
  .c3-days-cell { padding: 0 .5rem; }
}

@media print {
  body { border: 0; padding: 0 !important; background: #fff; color: #000; }
  body * { visibility: hidden; }
  .c3-result, .c3-result * { visibility: visible; }
  .c3-result { position: absolute; left: 0; top: 0; width: 100%; background: #fff; border: 0; }
  .receipt-print, .receipt-compare .c3-textbtn, .c3-bar { display: none !important; }
  .receipt-print-only { display: block; }
  .receipt-rule > * { display: block; }
  .receipt-sources { font-size: 9pt; padding-left: 1.2rem; }
  .receipt-sources a { color: #000; text-decoration: none; word-break: break-all; }
}

/* ---------------------------------------------------------------- states index (v2) */
.si-counts { margin: 0 0 1.5rem; }
.si-finder { max-width: 32rem; }
.si-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .95rem; }
.si-table thead th { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  text-align: left; vertical-align: bottom; padding: 0 1rem .5rem 0; border-bottom: 1px solid var(--ink); }
.si-table tbody th, .si-table td { text-align: left; vertical-align: middle; padding: .55rem 1rem .55rem 0; border-bottom: 1px solid var(--rule); }
.si-table tbody th { font-weight: 600; font-size: 1rem; color: var(--ink); }
.si-table tbody th a { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; text-decoration: none; }
.si-table tbody th a:hover { text-decoration: underline; }
.si-table .shape { width: 24px; height: 24px; flex: none; object-fit: contain; }
.si-table td strong { font-weight: 700; }
.si-pre { font-size: .8rem; color: var(--muted); }
.si-text { color: var(--muted); }
.si-date { white-space: nowrap; color: var(--muted); font-size: .88rem; }
.si-table tbody tr:hover th, .si-table tbody tr:hover td { background: var(--soft); }
@media (max-width: 899px) {
  .si-table thead { display: none; }
  .si-table, .si-table tbody, .si-table tr { display: block; }
  .si-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; padding: .5rem 0 .75rem; border-bottom: 1px solid var(--rule); }
  .si-table tbody th { grid-column: 1 / -1; border: 0; padding: 0; }
  .si-table td { display: block; border: 0; padding: .25rem 0; }
  .si-table td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .si-table tbody tr:hover th, .si-table tbody tr:hover td { background: none; }
}
.si-none { margin-top: 1rem; }
.si-research { list-style: none; margin: 1rem 0 0; padding: 0; columns: 2; column-gap: 2rem; color: var(--muted); }
@media (min-width: 600px) { .si-research { columns: 3; } }
@media (min-width: 1100px) { .si-research { columns: 4; } }
.si-research li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--rule); max-width: none; }

/* ---------------------------------------------------------------- text pages (v2 prose layout) */
.prose-head { margin: 1.25rem 0 1.5rem; }
.prose-head h1 { margin: 0 0 .4rem; max-width: 24ch; text-wrap: balance; }
.prose-head .meta { margin: 0; }
.prose-layout { display: block; }
@media (min-width: 1100px) {
  .prose-layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 4rem; }
}
.prose { max-width: 68ch; }
.prose > h2 { margin: 2.5rem 0 .75rem; scroll-margin-top: 1rem; }
.prose > h2:first-child { margin-top: .5rem; }
.prose p, .prose li { max-width: 68ch; }
.prose ol:not(.steps-v2), .prose ul { padding-left: 1.4rem; }
.prose ol:not(.steps-v2) li, .prose ul li { margin: .35rem 0; }
.prose .lede { margin-bottom: 1.5rem; }
.prose .stats { margin-top: 0; }
.prose .stats dd { font-size: 1.85rem; white-space: nowrap; }
.contact-email { font-size: 1.15rem; font-weight: 600; }
.contact-email a { display: inline-flex; align-items: center; min-height: 44px; }

/* 404 */
.nf { padding-top: 1.5rem; }
.nf h1 { margin-top: 1rem; }
.nf-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0 0 2rem; }
.nf-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.nf .finder { max-width: 32rem; }
.nf .state-cols { margin-top: .5rem; }

/* ---------------------------------------------------------------- unpublished states ("Soon") */
.state-soon { display: flex; align-items: center; min-height: 44px; color: var(--muted); }
.state-soon .soon-name { min-width: 0; font-size: .95em; }
.state-soon .badge-soon { flex: none; }
.state-cols .shape-muted, .shape-muted { filter: grayscale(1); opacity: .55; }
.soon-name { color: var(--muted); }
.badge-soon { display: inline-block; margin-left: .5rem; padding: .05rem .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; line-height: 1.4; color: var(--muted); border: 1px solid var(--muted); border-radius: 2px; background: none; }
#si-research { margin-top: 1rem; }

/* ---------------------------------------------------------------- guides */
.g-published { margin: 0 0 1.5rem; }
.g-fig { font-weight: 600; font-variant-numeric: tabular-nums; }
.g-text { color: var(--muted); }
.g-cite { font-size: .72em; line-height: 0; margin-left: .1em; }
.g-cite a { text-decoration: none; padding: 0 .1em; }
.g-cite a:hover { text-decoration: underline; }
.prose .g-table { width: 100%; max-width: none; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.g-table thead th { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left;
  vertical-align: bottom; padding: 0 .75rem .5rem 0; border-bottom: 1px solid var(--ink); }
.g-table tbody th, .g-table td { text-align: left; vertical-align: top; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); }
.g-table tbody th { font-weight: 600; white-space: nowrap; }
.g-table tbody th a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 699px) {
  .g-table thead { display: none; }
  .g-table, .g-table tbody, .g-table tr { display: block; }
  .g-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; padding: .4rem 0 .6rem; border-bottom: 1px solid var(--rule); }
  .g-table tbody th { grid-column: 1 / -1; display: block; border: 0; padding: 0; }
  .g-table td { display: block; border: 0; padding: .2rem 0; }
  .g-table td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
}
.prose .g-list { list-style: none; padding: 0; }
.prose .g-list li { margin: 0; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.prose .g-list li a { display: inline-flex; align-items: center; min-height: 44px; }
/* Per-state shortcode lists: one native <details> row per state, closed by default; the summary is the tap target. */
.prose .g-states > li { padding: 0; }
.g-state > summary {
  display: flex; align-items: center; flex-wrap: wrap; column-gap: .4rem; min-height: 48px; padding: .25rem 0;
  cursor: pointer; list-style: none; font-weight: 600;
}
.g-state > summary::-webkit-details-marker { display: none; }
.g-state > summary::after { content: "Show"; margin-left: auto; padding-left: .75rem; font-weight: 400; font-size: .9rem; color: var(--link); text-decoration: underline; text-underline-offset: .18em; }
.g-state[open] > summary::after { content: "Hide"; }
.g-state-count { font-weight: 400; color: var(--muted); }
.g-state-body { padding: 0 0 .75rem; }
.g-state-body p { margin: .25rem 0 .5rem; }
.g-state-body ul { list-style: disc; padding-left: 1.25rem; margin: 0; }
.prose .g-states .g-state-body li { border: 0; padding: .3rem 0; }
/* A short state row (1-2 items, or little text) is shown open: the linked state name, then its items. */
.prose .g-states > li.g-state-open { padding: .6rem 0; }
.g-state-open > p { margin: .25rem 0 0; }
.g-state-open > ul { list-style: disc; padding-left: 1.25rem; margin: .25rem 0 0; }
.prose .g-states .g-state-open li { border: 0; padding: .3rem 0; }
/* Guide cards: /guides/ (2 columns, full page width) and the smaller related-guides / state-page cards. The title
   link's ::after covers the card, so the whole card is clickable through one link. */
.prose.prose-full { max-width: none; }
.g-cards, .prose ul.g-cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.g-cards-sm, .prose ul.g-cards-sm { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1.25rem; margin-top: .75rem; }
@media (max-width: 699px) { .g-cards, .g-cards-sm, .prose ul.g-cards, .prose ul.g-cards-sm { grid-template-columns: minmax(0, 1fr); } }
.g-card, .prose .g-cards li { position: relative; display: flex; flex-direction: column; margin: 0; max-width: none; border: 1px solid var(--rule); background: var(--paper); }
.g-card:hover, .g-card:focus-within { border-color: var(--muted); }
.g-card-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--rule); }
.g-card-body { padding: .9rem 1.1rem 1rem; }
.prose .g-card-title, .g-card-title { border: 0; margin: 0 0 .4rem; padding: 0; font-size: 1.2rem; line-height: 1.3; }
.g-card-link { color: var(--ink); text-decoration: none; }
.g-card-link::after { content: ""; position: absolute; inset: 0; }
.g-card:hover .g-card-link, .g-card-link:focus-visible { text-decoration: underline; }
.g-card-link:focus-visible { outline: none; }
.g-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.g-card-desc { margin: 0 0 .5rem; color: var(--ink); }
.g-card-date { margin: 0; font-size: .85rem; color: var(--muted); }
.g-card-sm .g-card-body { padding: .7rem .85rem .8rem; }
.g-card-sm .g-card-title, .prose .g-card-sm .g-card-title { font-size: 1rem; }
.g-card-sm .g-card-desc { font-size: .9rem; }
/* Phones: small cards (related guides, state-page guides) are compact rows, a 96px thumbnail left of the title; the
   description is left out here, the link and image are the same. Desktop cards are unchanged. */
@media (max-width: 599px) {
  .g-card-sm, .prose .g-cards-sm li.g-card-sm { flex-direction: row; align-items: center; }
  .g-card-sm .g-card-img { width: 96px; flex: none; border-bottom: 0; border-right: 1px solid var(--rule); }
  .g-card-sm .g-card-body { padding: .5rem .75rem; min-width: 0; }
  .g-card-sm .g-card-title, .prose .g-card-sm .g-card-title { margin: 0 0 .2rem; font-size: .98rem; }
  .g-card-sm .g-card-desc { display: none; }
  .g-cards-sm, .prose ul.g-cards-sm { gap: .6rem; }
}
.state-guides .ruled a, .prose ul.ruled a { display: inline-flex; align-items: center; min-height: 44px; }
.prose ul.ruled { padding-left: 0; list-style: none; }
.prose ul.ruled li { margin: 0; padding: .1rem 0; }
/* Guide parts: quick-answer box, generated images, worked example bill, quoted state text. */
.prose .g-quick { margin: 0 0 2rem; padding: 1rem 1.1rem .4rem; background: var(--soft); border-left: 4px solid var(--accent); }
.prose .g-quick > p:first-child { margin-top: 0; }
.g-quick-h { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.g-img { margin: 1.5rem 0 2rem; }
.g-img img { display: block; width: 100%; max-width: 40rem; height: auto; border: 1px solid var(--rule); }
.g-img figcaption, .g-bill figcaption { margin-top: .5rem; max-width: 40rem; }
.g-bill { margin: 1.25rem 0 2rem; max-width: 40rem; }
.g-bill-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.g-bill-table caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
.g-bill-table th, .g-bill-table td { text-align: left; vertical-align: top; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.g-bill-table td { text-align: right; white-space: nowrap; padding-right: 0; }
.g-bill-total th, .g-bill-total td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700 !important; }
.g-quote { font-style: normal; }
.prose .g-body h3 { margin-top: 1.75rem; }
.g-bill-table tr { display: table-row; border: 0; padding: 0; }      /* not the phone-width stacked-table rule */
.g-bill-table th, .g-bill-table td { display: table-cell; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); }
.g-bill-table td { padding-right: 0; }

/* City pages: geo slot on state pages (two lines reserved, so the swap never shifts the layout), city links. */
.geo-local { max-width: var(--measure); min-height: 3.2em; line-height: 1.6; margin: .25rem 0 1rem; font-size: .95rem; color: var(--muted); }
.geo-local[data-geo="city"] { color: var(--ink); }
.local-cities { display: block; font-size: .85rem; margin-top: .25rem; }
/* Phones: long words and URLs (source titles, official addresses, conditions, city links) break rather than widen
   the page. Phones only: on wider screens "anywhere" would change how the fee tables share out their columns. */
@media (max-width: 599px) {
  main, .site-footer { overflow-wrap: anywhere; }
  .g-table tbody th, .si-date, .prose .stats dd { white-space: normal; }
  /* Money and other figures stay whole: "break-word" breaks one only if it alone is wider than the line, and (unlike
     "anywhere") does not let a flex row squeeze it below the width of the number. */
  .rl-amt, .c3-row-amt, .c3-bar-amt, .c3-total-amt, td.amt, .fig, .key-fig, .sample-amount, .stats dd, .g-fig,
  .g-bill-table td { overflow-wrap: break-word; }
}
/* Very narrow phones (280-359px, e.g. a folded phone's cover screen), also at 200% text (tools/phone_layout.py):
   the wordmark may break inside the word rather than run past the screen; a receipt line puts its amount under the
   label (no dotted leader) so the label keeps the full width; the sample figure is smaller (the calculator's own
   narrow-phone rules are in its section). Nothing here applies from 360px up. */
@media (max-width: 359px) {
  .brand { max-width: 100%; }
  .brand .word { min-width: 0; overflow-wrap: anywhere; }
  .rl-main { flex-wrap: wrap; row-gap: 0; }
  .rl-label { flex: 1 1 100%; min-width: 0; }
  .rl-leader { display: none; }
  .rl-amt { margin-left: auto; }
  .sample-amount { font-size: 2.5rem; }
  .sample-amount.is-range { font-size: 2rem; }
  .g-bill-table th, .g-bill-table td { display: block; }   /* a guide's example bill: the amount under its line */
  .g-bill-table th { border-bottom: 0; padding-bottom: 0; }
  .g-bill-total th { border-top: 2px solid var(--ink); }
  .g-bill-total td { border-top: 0; }
}

/* Phase 3a (AdSense readiness) ------------------------------------------------------------------------------- */
/* Byline under the page title (state, city, guide, calculator): the same small meta line, links in the text colour. */
.byline { margin: .25rem 0 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.byline a { color: inherit; }
/* "At a glance" without statewide figures: one sentence instead of a grid of empty cells. */
.glance-none { border-top: 1px solid var(--ink); padding: .9rem 0 .2rem; }
.glance-none p { margin: 0 0 .5rem; max-width: 68ch; }
.cite-refs { display: inline; }
/* /states/ table: an amount links to its official source. */
.si-table td a.si-src { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .18em; }
/* /calculator/: the explanatory text under the calculator, and the no-JavaScript state list. */
.calc-about { margin-top: 2.5rem; }
.calc-about h2 { margin: 2rem 0 .6rem; }
.calc-noscript { margin-top: .75rem; }
.g-sum-note { color: var(--muted); }

/* City link lists: city pages ("Other cities", "Nearby cities"), the /cities/ hub. Columns that wrap; every link is a
   44px tap target. */
ul.city-links { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 0 1.5rem; }
ul.city-links > li { margin: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
ul.city-links a { display: inline-flex; align-items: center; min-height: 44px; }
ul.city-links-dist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
ul.city-links-dist .muted { display: inline-block; }
.prose ul.city-links { padding-left: 0; }
.hub-state h2 { margin-bottom: .25rem; }
