/* PermitFinch site styles.
   Brand: ink green #1F3B2D, finch yellow #F2B630, deep yellow #B98310 (large text only), paper #FBFAF4.
   Small yellow-ish text uses --gold-text (#8C6209, 5.1:1 on paper). */

@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --ink: #1F3B2D;
  --ink-2: #2D5541;
  --ink-soft: #E7EDE6;
  --yellow: #F2B630;
  --yellow-soft: #FCEFC7;
  --gold: #B98310;
  --gold-text: #8C6209;
  --paper: #FBFAF4;
  --surface: #FFFFFF;
  --text: #1A2620;
  --muted: #4F5E54;
  --rule: #E3E0D2;
  --rule-strong: #CFCBB8;
  --up: #1E6B43;
  --up-bg: #E2F1E7;
  --down: #8A2E14;
  --down-bg: #F7E5DD;
  --chart-bar: #2D5541;
  --chart-peak: #F2B630;
  --chart-peak-edge: #B98310;
  --chart-partial: #A8BBAE;
  --chart-grid: #E6E3D6;
  --chart-text: #56655B;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 59, 45, .06), 0 6px 20px rgba(31, 59, 45, .06);
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-color: rgba(31, 59, 45, .35); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
.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; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: .92em; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---- header ---- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand cta" "nav nav"; align-items: center; gap: 10px 16px; padding-block: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.wordmark span { color: var(--gold); }
.site-nav { grid-area: nav; margin-inline: calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0 var(--gutter) 8px; white-space: nowrap; }
.site-nav a { display: inline-block; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: .97rem; text-decoration: none; color: var(--ink); }
.site-nav a:hover { background: var(--ink-soft); }
.site-nav a.is-active { background: var(--ink-soft); box-shadow: inset 0 -3px 0 var(--yellow); }
.header-row .brand { grid-area: brand; }
.header-cta { grid-area: cta; }
@media (min-width: 960px) {
  .header-row { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav cta"; padding-block: 14px; }
  .site-nav { margin: 0; overflow: visible; }
  .site-nav ul { padding: 0; justify-content: center; }
}

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 2px solid var(--yellow); background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center; box-shadow: 0 1px 0 rgba(31, 59, 45, .25); transition: background-color .15s ease, transform .15s ease; }
.btn:hover { background: #F5C451; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 7px 14px; font-size: .94rem; }
.btn-lg { min-height: 52px; padding: 13px 22px; font-size: 1.06rem; }
.btn-ghost { background: transparent; border-color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--ink-soft); }
.btn-ghost-light { background: transparent; border: 2px solid rgba(251, 250, 244, .7); color: var(--paper); box-shadow: none; }
.btn-ghost-light:hover { background: rgba(251, 250, 244, .1); }

/* ---- breadcrumbs ---- */
.breadcrumbs { padding-top: 14px; font-size: .9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: var(--rule-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---- hero ---- */
.hero { padding-block: 28px 36px; }
.hero-compact { padding-block: 22px 30px; }
/* Single-column grids use minmax(0, 1fr): an implicit auto track grows to its widest child's min-content
   width (a table, a long word), which makes the whole page scroll sideways on a phone. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-home .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 56px; } .hero-home { padding-block: 48px 56px; } }
.eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 12px; font-weight: 600; }
.eyebrow a { color: inherit; }
.lede { font-size: clamp(1.06rem, 1rem + .35vw, 1.22rem); max-width: 62ch; color: var(--text); }
.hl { background: linear-gradient(180deg, transparent 60%, rgba(242, 182, 48, .55) 60%, rgba(242, 182, 48, .55) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: 2px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.data-note { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.hero-art { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hero-art-note { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; }
.stats-inline { margin-top: 28px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stat dt { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-big { background: var(--ink); border-color: var(--ink); }
.stat-big dt { color: #C9D6CC; }
.stat-big .stat-value { color: var(--yellow); }
.stat-big .stat-note { color: #DCE5DE; }
.stat-note { flex-basis: 100%; font-size: .86rem; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: minmax(0, 1fr); } .stat dd { gap: 4px 8px; } }

.chip { display: inline-block; font-family: var(--font-body); font-size: .78rem; font-weight: 700; line-height: 1.3; padding: 3px 8px; border-radius: 999px; background: var(--ink-soft); color: var(--ink); white-space: nowrap; }
.chip-up { background: var(--up-bg); color: var(--up); }
.chip-down { background: var(--down-bg); color: var(--down); }
.chip-flat, .chip-muted { background: #EEEBDF; color: var(--muted); }
.stat-big .chip { background: rgba(251, 250, 244, .14); color: var(--paper); }

/* ---- sections ---- */
.section { padding-block: 36px; }
.section-head { max-width: 70ch; margin-bottom: 20px; }
.section-head p { color: var(--muted); }
.section-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.section-head-row h2, .section-head-row p { margin: 0; }
.band { background: var(--ink-soft); border-block: 1px solid #D6E0D6; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } .split-list { align-items: center; } }
.split > .section { padding-block: 36px; }
.more-link { margin-top: 18px; font-weight: 600; }
.empty-note { color: var(--muted); font-style: italic; }
.table-note { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.disclaimer { font-size: .85rem; color: var(--muted); padding-bottom: 28px; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose h4 { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; margin: 1.3em 0 .4em; }
.prose li { margin-bottom: .35rem; }
.summary { margin-top: 22px; }
.summary p { font-size: 1.06rem; }

/* ---- jump nav / pills ---- */
.jump-nav { overflow-x: auto; scrollbar-width: thin; }
.jump-nav ul, .pill-list { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.jump-nav ul { padding-block: 4px 10px; white-space: nowrap; }
.pill-list { flex-wrap: wrap; }
.jump-nav a, .pill-list a { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 7px 13px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; font-size: .93rem; }
.jump-nav a:hover, .pill-list a:hover { border-color: var(--ink); }

/* ---- metro cards ---- */
.metro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.metro-card-link { display: grid; gap: 6px; height: 100%; padding: 16px 16px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.metro-card-link:hover { border-color: var(--ink); transform: translateY(-1px); }
.metro-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.metro-card-state { color: var(--muted); font-weight: 600; }
.metro-card-count { font-size: .95rem; }
.metro-card-count strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.metro-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .86rem; color: var(--muted); }
.metro-card-spark { display: block; margin-top: 4px; }

/* ---- charts ---- */
.chart-card { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 16px 12px; }
.chart-card figcaption { display: grid; gap: 2px; margin-bottom: 10px; }
.chart-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.chart-sub { font-size: .88rem; color: var(--muted); }
.chart-body { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-wide { display: none; }
.chart-narrow { display: block; }
@media (min-width: 640px) { .chart-wide { display: block; } .chart-narrow { display: none; } }
.chart-season, .chart-kinds { max-width: 520px; }
.chart-svg .bar { fill: var(--chart-bar); }
.chart-svg .bar-peak { fill: var(--chart-peak); stroke: var(--chart-peak-edge); stroke-width: 1; }
.chart-svg .bar-partial { fill: var(--chart-partial); }
.chart-svg .bar:hover { opacity: .85; }
.chart-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.chart-baseline { stroke: var(--rule-strong); stroke-width: 1.5; }
.chart-axis, .chart-xlabel, .chart-xsub, .chart-kind-label, .chart-kind-value { fill: var(--chart-text); font-family: var(--font-body); font-size: 11px; }
.chart-xsub { font-weight: 700; fill: var(--ink); }
.chart-kind-label { font-size: 13px; fill: var(--text); font-weight: 600; }
.chart-kind-value { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.kind-track { fill: #F0EDE2; }
.kind-fill { fill: var(--chart-bar); }
.kind-pool_spa { fill: var(--chart-peak); }
.kind-prefab { fill: #6E8F7C; }
.kind-spa { fill: #C9A24B; }
.sparkline { display: block; width: 132px; height: 36px; }
.spark-line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: rgba(242, 182, 48, .28); }
.spark-dot { fill: var(--gold); }
.chart-data { margin-top: 8px; font-size: .92rem; }
.chart-data summary, .more-rows summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 8px 0; min-height: 40px; }
.chart-data .table-wrap { max-height: 320px; overflow-y: auto; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); margin: 10px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--font-mono); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #FAF8EF; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FCFBF5; }
.num { text-align: right; white-space: nowrap; }
.rank-table td:first-child { color: var(--muted); }
.sample-table td { white-space: nowrap; }

/* ---- ticket (masked sample row) ---- */
.ticket { position: relative; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.ticket::after { content: ""; position: absolute; top: 0; right: 0; width: 28px; height: 28px; background: linear-gradient(225deg, var(--paper) 50%, var(--yellow-soft) 50%); border-bottom-left-radius: 6px; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px dashed var(--rule-strong); padding-right: 24px; }
.ticket-head .eyebrow { margin: 0; }
.ticket-stamp { font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--down); border: 2px solid currentColor; border-radius: 6px; padding: 2px 7px; transform: rotate(-4deg); }
.ticket-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.ticket-fields .wide { grid-column: 1 / -1; }
.ticket-fields dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ticket-fields dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ticket-fields .redacted { color: var(--muted); font-weight: 500; font-style: italic; }
.sample-link { font-size: .95rem; font-weight: 600; margin: 0; }

/* ---- steps, audiences, cards ---- */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; counter-reset: none; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps-long { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.steps li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.steps h3 { margin: 10px 0 6px; }
.steps p { margin: 0; color: var(--text); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: var(--font-display); font-weight: 800; }
.audience-grid, .card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.audience-card, .content-card { display: grid; gap: 6px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.audience-card:hover, .content-card:hover { border-color: var(--ink); }
.audience-name, .content-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.content-card-summary { color: var(--text); }
.content-card-meta { font-size: .85rem; color: var(--muted); }

/* ---- pricing ---- */
.price-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: 24px; box-shadow: 6px 6px 0 var(--yellow); }
@media (min-width: 900px) { .price-card { grid-template-columns: 1.1fr 1fr auto; align-items: center; } .price-card-wide { grid-template-columns: 1fr 1.4fr; } }
.price-card h2 { margin-bottom: .3em; }
.price { margin: 0 0 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.price-amount { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 2rem + 3vw, 4rem); line-height: 1; color: var(--ink); }
.price-unit { color: var(--muted); font-weight: 600; }
.price-actions { display: grid; gap: 10px; }
.list-title { font-weight: 700; margin-bottom: 6px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%231F3B2D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.state-h { margin: 26px 0 10px; font-size: 1.2rem; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pick-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.pick-name { display: grid; gap: 2px; }
.pick-name a { font-weight: 700; font-size: 1.05rem; }
.pick-name .muted { font-size: .88rem; }

/* ---- list fields, coverage ---- */
.field-list { columns: 2 200px; column-gap: 24px; padding-left: 1.1rem; margin: 0 0 22px; }
.field-list li { break-inside: avoid; margin-bottom: 4px; }
.coverage-list, .source-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.coverage-list li { display: grid; gap: 2px; padding: 10px 12px 10px 38px; position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.coverage-list li::before { content: ""; position: absolute; left: 12px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--up); }
.coverage-list li.warn::before { background: var(--gold); }
.coverage-name { font-weight: 700; color: var(--ink); }
.coverage-meta { font-size: .88rem; color: var(--muted); }
.source-list li { padding-left: 0; }
.status { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-ok { background: var(--up-bg); color: var(--up); }
.status-warn { background: var(--yellow-soft); color: var(--gold-text); }

/* ---- FAQ ---- */
.faq-list { display: grid; gap: 8px; max-width: 80ch; }
.faq-item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 0 16px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-text); }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item summary h3 { display: inline; font-size: 1.05rem; margin: 0; }
.faq-item p { margin: 0 0 14px; }

/* ---- CTA band ---- */
.cta-band { background: var(--ink); color: var(--paper); margin-top: 28px; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(242, 182, 48, .12); }
.cta-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 40px; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.4fr auto; align-items: center; gap: 40px; } }
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #DCE5DE; margin: 0; max-width: 60ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band :focus-visible, .site-footer :focus-visible, .stat-big :focus-visible { outline-color: var(--yellow); }

/* ---- articles ---- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 8px 36px; }
@media (min-width: 960px) { .article-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } .article-aside { position: sticky; top: 16px; align-self: start; } }
.article-body { font-size: 1.08rem; }
/* content.render_item wraps every Markdown table in .table-wrap, so wide tables scroll inside the article */
.article-body .table-wrap { margin: 1rem 0; }
.article-body > table { display: block; overflow-x: auto; margin: 1rem 0; background: var(--surface); border: 1px solid var(--rule); }
.article-body pre { background: #F2F0E6; padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .9rem; }
.article-body code { font-family: var(--font-mono); font-size: .92em; }
.article-body blockquote { margin: 1rem 0; padding: 4px 18px; border-left: 4px solid var(--yellow); color: var(--muted); }
.metro-links { list-style: none; padding: 0; display: grid; gap: 6px; }
.metro-links a { font-weight: 700; }
.toc { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; font-size: .94rem; }
.toc-title, .aside-cta-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toc .toc-l3 { padding-left: 14px; }
.aside-cta { background: var(--yellow-soft); border: 1px solid #F0DA97; border-radius: var(--radius); padding: 16px; }
.aside-cta p { font-size: .95rem; }

/* ---- contact, 404 ---- */
.contact-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 28px; box-shadow: 5px 5px 0 var(--yellow); max-width: 560px; }
.contact-label { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; }
.contact-email { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 1rem + 1.4vw, 1.8rem); margin: 4px 0 0; overflow-wrap: anywhere; }
.not-found { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
@media (min-width: 720px) { .not-found { grid-template-columns: auto 1fr; gap: 36px; } }
.not-found-mark { width: 96px; height: 96px; }
.hero-404 { padding-block: 48px; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #DCE5DE; margin-top: 0; font-size: .95rem; }
.cta-band + .site-footer, .cta-band ~ .site-footer { border-top: 1px solid rgba(251, 250, 244, .12); }
.footer-grid { display: grid; gap: 28px; padding-block: 40px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.footer-brand { display: grid; gap: 12px; align-content: start; grid-column: 1 / -1; max-width: 420px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } .footer-brand { grid-column: auto; } }
.brand-light .wordmark { color: var(--paper); }
.brand-light .wordmark span { color: var(--yellow); }
.brand-light .brand-mark { background: var(--paper); border-radius: 50%; padding: 2px; }
.footer-brand p { margin: 0; }
.footer-brand .brand { justify-self: start; }
.footer-brand .btn { justify-self: start; }
.footer-h { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin: 0 0 10px; font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-col a { color: var(--paper); text-decoration: none; display: inline-block; padding: 5px 0; }
.footer-col a:hover { text-decoration: underline; }
.footer-base { border-top: 1px solid rgba(251, 250, 244, .14); padding-block: 18px 28px; font-size: .85rem; color: #BFCDC3; }
.footer-base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cta-band, .jump-nav { display: none; }
  body { background: #fff; }
}
