/* The Rent Cap: design system (prototype). Tokens first; components below. */
:root {
  --paper: #f6f3ea;
  --surface: #fffdf7;
  --surface-2: #efeadd;
  --ink: #142131;
  --ink-2: #4b5768;
  --ink-3: #545f6e;
  --accent-ink: #a83a0b; /* accent for small text: 5.2:1+ on paper, surfaces, and accent-soft */
  --line: #e0d9c8;
  --brand: #1d3b60;
  --brand-ink: #ffffff;
  --accent: #c8460f;
  --accent-soft: #fbe3d6;
  --ok: #2b7149;
  --ok-soft: #dcefe3;
  --warn: #8a5300;
  --warn-soft: #fbefd5;
  --focus: #2f6fe4;
  --shadow: 0 1px 2px rgba(20, 33, 49, .06), 0 8px 24px rgba(20, 33, 49, .08);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e141c; --surface: #151e29; --surface-2: #1b2734; --ink: #edf1f6; --ink-2: #aab5c4; --ink-3: #9aa6b6; --accent-ink: #ff7d45;
    --line: #283546; --brand: #8db2ea; --brand-ink: #0e141c; --accent: #ff7d45; --accent-soft: #3a2117;
    --ok: #63c38c; --ok-soft: #15301f; --warn: #f1b456; --warn-soft: #33270f; --focus: #8db2ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e141c; --surface: #151e29; --surface-2: #1b2734; --ink: #edf1f6; --ink-2: #aab5c4; --ink-3: #9aa6b6; --accent-ink: #ff7d45;
  --line: #283546; --brand: #8db2ea; --brand-ink: #0e141c; --accent: #ff7d45; --accent-soft: #3a2117;
  --ok: #63c38c; --ok-soft: #15301f; --warn: #f1b456; --warn-soft: #33270f; --focus: #8db2ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 84px; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font-ui); text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font: 600 .78rem/1.2 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .9rem; display: inline-flex; gap: .5rem; align-items: center; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36rem; }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font: 650 1.2rem/1 var(--font-display); letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { color: var(--brand-ink); }
.nav .btn-ghost { color: var(--ink); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 999px; padding: .7rem 1.2rem; background: var(--brand); color: var(--brand-ink); font: 650 .95rem/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1.05rem; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: clip; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 60% at 20% 30%, #000 0%, transparent 70%); opacity: .55; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.hero-grid { grid-template-areas: "copy calc" "proof calc"; grid-template-rows: auto 1fr; }
.hero-copy { grid-area: copy; } .hero-grid > .calc { grid-area: calc; } .hero-grid > .proof { grid-area: proof; margin-top: 0; align-self: start; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } .hero-grid { grid-template-areas: "copy" "calc" "proof"; grid-template-rows: auto; } }
@media (max-width: 420px) { .nav { gap: .6rem; } .site-header .brand { font-size: 1.05rem; } }
.hero h1 em { font-style: italic; color: var(--accent); }
.proof { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .7rem; }
.proof li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ink-2); }
.proof svg { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 1px; }
.proof strong { color: var(--ink); }

/* Cards and sections */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }

/* Calculator */
.calc { padding: clamp(1.25rem, 3vw, 2rem); min-height: 560px; }
.calc h2 { font-size: 1.45rem; margin-bottom: .25rem; }
.calc .hint-top { color: var(--ink-3); font-size: .92rem; margin-bottom: 1.25rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label, .field legend { font-weight: 600; font-size: .92rem; }
.field .help { font-size: .82rem; color: var(--ink-3); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
input, select { width: 100%; font: 500 1rem/1.3 var(--font-ui); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .72rem .8rem; min-height: 46px; }
input:hover, select:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 0; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--accent); }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.money input { padding-left: 1.6rem; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); }
.seg { position: relative; }
.seg input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: .65rem .4rem; font-weight: 550; font-size: .92rem; cursor: pointer; border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label { background: var(--brand); color: var(--brand-ink); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: -3px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.conditional { border-left: 3px solid var(--accent-soft); padding-left: .9rem; margin: .25rem 0 1rem; }
details.more { margin: .25rem 0 1.2rem; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--brand); }
details.more[open] summary { margin-bottom: .9rem; }
.error { color: var(--accent); font-size: .85rem; font-weight: 600; }
.small-print { font-size: .8rem; color: var(--ink-3); margin-top: .9rem; }

/* Result ("receipt") */
.result { margin-top: 1.4rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.result[hidden] { display: none; }
.result-top { padding: 1.25rem 1.25rem 1rem; }
.result-law { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); }
.result-law strong { color: var(--ink); font-size: 1rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font: 650 .74rem/1 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; padding: .38rem .6rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.cap { background: var(--accent-soft); color: var(--accent-ink); }
.big { font: 600 clamp(2.4rem, 2rem + 2vw, 3.2rem)/1 var(--font-display); letter-spacing: -.02em; margin: .9rem 0 .3rem; }
.big small { font: 600 1rem var(--font-ui); color: var(--ink-3); letter-spacing: 0; }
.delta { color: var(--ink-2); }
.delta b { color: var(--ok); }
.gauge { margin: 1.1rem 0 .3rem; }
.gauge-fill.over { background: linear-gradient(90deg, var(--brand), var(--accent)); }
.gauge-track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.gauge-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--accent))); width: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.gauge-cap { position: absolute; top: -7px; bottom: -7px; width: 3px; background: var(--accent); border-radius: 2px; }
.gauge-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); margin-top: .45rem; }
.perf { height: 0; border-top: 2px dashed var(--line); margin: 0 1.25rem; position: relative; }
.perf::before, .perf::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.perf::before { left: -32px; } .perf::after { right: -32px; }
.result-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin: 1rem 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.result-facts div { background: var(--paper); padding: .75rem .8rem; }
.result-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; }
.result-facts dd { margin: .2rem 0 0; font-weight: 650; font-size: 1.05rem; }
@media (max-width: 480px) { .result-facts { grid-template-columns: 1fr; } }
.result-body { padding: 1rem 1.25rem 1.25rem; font-size: .92rem; }
.result-body h3 { font: 650 .8rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 1rem 0 .5rem; }
.result-body ul { margin: 0; padding-left: 1.1rem; }
.result-body li { margin-bottom: .35rem; }
.warnings { background: var(--warn-soft); color: var(--ink); border-radius: var(--radius-sm); padding: .75rem .9rem; margin-top: 1rem; }
.warnings li::marker { color: var(--warn); }
.sources a { word-break: break-word; }
.verified { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--ok); font-weight: 650; white-space: nowrap; }
.verified svg { width: 14px; height: 14px; flex: none; }
.verified.secondary { color: var(--warn); }
.chip { display: inline-block; margin-top: .6rem; font-size: .78rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .6rem; }
.based-on { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--ink-3); }
.timeline { list-style: none; margin: 1rem 1.25rem 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 7px; left: 8px; right: 8px; height: 2px; background: var(--line); }
.timeline li { position: relative; padding-top: 1.4rem; display: grid; gap: .1rem; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--brand); }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.t-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-3); }
.t-date { font-weight: 700; font-size: 1.02rem; }
.t-sub { font-size: .78rem; color: var(--ink-3); }
@media (max-width: 480px) { .timeline { grid-template-columns: 1fr; gap: 1rem; } .timeline::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto; } .timeline li { padding: 0 0 0 1.8rem; } }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 999px; }
.icon-btn svg { width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: auto; min-height: 0; margin: 0; }
.result-top.flush { padding-top: 0; }
.calc.compact { min-height: 0; }
.result-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.result-actions .btn { padding: .6rem 1rem; font-size: .88rem; }

/* Cap cards */
.caps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 960px) { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .caps { grid-template-columns: 1fr; } }
.cap-card { padding: 1.4rem; display: flex; flex-direction: column; gap: .4rem; }
.cap-card .label { font-weight: 650; font-size: .92rem; }
.cap-card .value { font: 600 2.6rem/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); margin: .3rem 0; }
.cap-card .value span { font-size: 1.2rem; color: var(--ink-3); }
.cap-card .scope { color: var(--ink-2); font-size: .9rem; flex: 1; }
.cap-card .period { font-size: .82rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .6rem; display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding-top: 1rem; border-top: 2px solid var(--ink); }
.step::before { counter-increment: step; content: "0" counter(step); font: 600 .9rem var(--font-mono); color: var(--accent); display: block; margin-bottom: .6rem; }
.step p { color: var(--ink-2); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); background: var(--surface-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
td a { font-weight: 650; }
.table-note { color: var(--ink-3); font-size: .88rem; margin-top: .8rem; }

/* FAQ */
.faq { display: grid; gap: .75rem; max-width: 52rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.faq summary { cursor: pointer; font: 600 1.08rem/1.4 var(--font-display); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--font-ui); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: .8rem 0 0; }

/* Trust */
.trust { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } }
.ledger { padding: 1.4rem; font-size: .92rem; }
.ledger-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row b { font-weight: 650; }
.ledger-row span { color: var(--ink-3); font-size: .82rem; }
.ledger-row .verified { grid-row: span 2; align-self: center; }

/* City page */
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 1.2rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.keyfacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.8rem 0 0; }
.keyfacts div { background: var(--surface); padding: 1rem 1.1rem; }
.keyfacts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.keyfacts dd { margin: .3rem 0 0; font: 600 1.5rem/1.15 var(--font-display); }
.keyfacts dd small { display: block; font: 500 .82rem var(--font-ui); color: var(--ink-3); margin-top: .25rem; }
@media (max-width: 640px) { .keyfacts { grid-template-columns: 1fr; } }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.6rem; }
.prose p, .prose li { color: var(--ink-2); }
.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.4rem 0; }
.callout p:last-child { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 3rem; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 88px; }

/* Footer */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 78%, transparent); padding: 3.5rem 0 2rem; margin-top: 0; font-size: .92rem; }
:root[data-theme="dark"] .site-footer { background: #090d13; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #090d13; } }
.site-footer a { color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer h3 { font: 700 .75rem/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .82rem; max-width: 60rem; }

/* Print: the result card is what landlords keep */
@media print {
  body.has-result main > section:not(:has(.result:not([hidden]))), body.has-result .hero-copy, body.has-result .proof, body.has-result .calc > h2, body.has-result .calc > .hint-top, body.has-result .two-col > .prose, body.has-result .crumbs { display: none !important; }
  body.has-result .hero, body.has-result .section { padding: 0; }
  body.has-result .calc, body.has-result .card { border: 0; padding: 0; min-height: 0; }
  .timeline li.now::before { box-shadow: none; }
  .site-header, .site-footer, .hero::before, .calc form, .result-actions, .nav, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .card, .result { box-shadow: none; border-color: #999; }
  a { color: #000; }
  .sources a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* City directory and generated city pages */
.city-tools { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.city-tools input[type="search"] { max-width: 320px; background: var(--surface); }
.seg-inline { display: inline-grid; grid-auto-flow: column; grid-auto-columns: max-content; }
.seg-inline label { padding: .6rem 1rem; }
.city-table { max-height: 560px; overflow-y: auto; }
.city-table thead th { position: sticky; top: 0; z-index: 1; }
.city-table td small { color: var(--ink-3); font-size: .78rem; }
.pill.muted { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.hero-city { padding-bottom: 2rem; }
.hero-city .wrap { display: block; }
.section-tight { padding-top: 1rem; }
.brand-footer svg { width: 28px; height: 28px; color: var(--accent); }
.footer-tag { margin-top: 1rem; max-width: 22rem; }

/* Contrast: small accent text uses the darker accent-ink */
.step::before, .error { color: var(--accent-ink); }
.expired { color: var(--warn); font-weight: 600; }

/* City directory as cards on narrow screens: city and cap first, then status, period, law */
@media (max-width: 640px) {
  .city-table { max-height: none; overflow: visible; border: 0; background: transparent; }
  .city-table table, .city-table tbody { display: block; }
  .city-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .city-table tr { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: .9rem 1rem; margin-bottom: .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .city-table tr[hidden] { display: none; }
  .city-table td { padding: 0; border: 0; }
  .city-table td[data-label="Jurisdiction"] { font-size: 1.02rem; }
  .city-table td[data-label="Cap"] { text-align: right; font-weight: 700; }
  .city-table td[data-label="Status"] { grid-column: 1; }
  .city-table td[data-label="Period"] { grid-column: 2; text-align: right; font-size: .82rem; color: var(--ink-2); }
  .city-table td[data-label="Law"] { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-2); }
}
