/* Vastgoedprijzen — AppJS Stijlhandboek v1.0.
   UI colours come only from the AppJS palette. The --series-* colours are the one
   exception, for charts only; they were validated with the dataviz palette validator
   (light on #FFFFFF and #F4F1EB, dark on #252318). */

@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/DMSerifDisplay-400.woff2) format('woff2'); }
@font-face { font-family: 'DM Serif Display'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/DMSerifDisplay-400i.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/DMMono-400.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/DMMono-500.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/Lato-300.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/Lato-400.woff2) format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/Lato-700.woff2) format('woff2'); }

:root {
  /* AppJS palette */
  --cream: #F4F1EB;
  --cream-deep: #EDEAE2;
  --ink: #1C1A17;
  --ink-mid: #4A4640;
  --ink-faint: #9A9490;
  --amber: #D4580A;
  --amber-dim: #F0E4D8;
  --border-light: #DDD9D0;
  --white: #FFFFFF;
  --dark-section: #252318;
  --dark-border: #3A3730;

  /* Roles (light) */
  --bg: var(--cream);
  --bg-deep: var(--cream-deep);
  --surface: var(--white);
  --text: var(--ink);
  --text-mid: var(--ink-mid);
  --text-faint: var(--ink-faint);
  --border: var(--border-light);
  --note: var(--amber-dim);
  --button-bg: var(--ink);
  --button-text: var(--cream);
  --band: var(--ink); /* the AppJS band; in dark mode a dark section on the Ink page */

  /* Chart series (exception to the closed palette; Amber first) */
  --series-1: #D4580A;
  --series-2: #1F8A70;
  --series-3: #AD8212;
  --series-4: #B4528A;
  --series-5: #3F7F2E;
  --series-6: #5B5BB0;
  --band-alpha: 0.16; /* opacity of the Price range band, chart and legend */

  /* Map scales: mixes of AppJS colours only, validated as ordinal ramps (monotone lightness,
     visible steps, light end ≥ 2:1 against the map surface) separately for light and dark.
     Median price, low → high: */
  --map-p0: #E39069; --map-p1: #D4580A; --map-p2: #98461B; --map-p3: #69371E; --map-p4: #3D271B;
  /* Year-on-year change: falls (big → small), neutral −1 % … +1 %, rises (small → big). */
  --map-c0: #4A4640; --map-c1: #6F6C65; --map-c2: #8F8C85; --map-c3: #BCB9B1;
  --map-c4: #E3936D; --map-c5: #D4580A; --map-c6: #98461B;

  --serif: 'DM Serif Display', Georgia, serif;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'Lato', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* The guide's dark sections: Ink background, Cream text */
    --bg: var(--ink);
    --bg-deep: var(--dark-section);
    --surface: var(--dark-section);
    --text: var(--cream);
    --text-mid: var(--ink-faint);
    --text-faint: var(--ink-faint);
    --border: var(--dark-border);
    --note: var(--dark-section);
    --button-bg: var(--cream);
    --button-text: var(--ink);
    --band: var(--dark-section);

    --series-2: #26A07F;
    --series-3: #B08B22;
    --series-4: #CC67A0;
    --series-5: #5C9A47;
    --series-6: #8282D2;

    /* On the dark map the extremes are the lightest. */
    --map-p0: #984E28; --map-p1: #D4580A; --map-p2: #E2895F; --map-p3: #EBAF92; --map-p4: #F1D4C3;
    --map-c0: #F4F1EB; --map-c1: #C1BEB8; --map-c2: #9B9891; --map-c3: #5F5C55;
    --map-c4: #984E28; --map-c5: #D4580A; --map-c6: #EBAF92;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* the hidden attribute wins over any display value */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
::selection { background: var(--amber); color: var(--white); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top, 0px); }
.nav-in { max-width: 1100px; margin: 0 auto; padding: 0 40px; height: 60px; display: flex; align-items: center; gap: 32px; }
.wordmark { font-family: var(--mono); font-weight: 500; font-size: 16px; letter-spacing: .04em; color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--amber); }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tab { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mid); text-decoration: none; padding: 20px 10px 18px; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--amber); }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--amber); }

/* Buttons: sharp corners, UPPERCASE DM Mono */
.btn-outline { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; background: transparent; color: var(--text-mid); border: 1px solid var(--border); cursor: pointer; }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.lang { text-decoration: none; }
.lang .active { color: var(--text); }
.menu { display: none; }
/* Hidden until focused with the keyboard, then shown above the nav. */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; background: var(--button-bg); color: var(--button-text); border: 0; cursor: pointer; }
.skip-link:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }
.btn-primary { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 18px; background: var(--button-bg); color: var(--button-text); border: 0; cursor: pointer; transition: background .2s; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--amber); color: var(--white); }

main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 40px 40px 80px; }

/* Search */
.finder { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 40px 0; }
.search { display: flex; border: 1px solid var(--border); background: var(--surface); }
.search:focus-within { border-color: var(--amber); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 16px; font-family: var(--sans); font-size: 14px; color: var(--text); outline: none; }
.search input::placeholder { color: var(--text-faint); }
.search kbd { font-family: var(--mono); font-size: 10px; color: var(--text-faint); padding: 0 14px; align-self: center; }
.search-panel { position: absolute; left: 40px; right: 40px; z-index: 20; background: var(--surface); border: 1px solid var(--amber); border-top: 0; box-shadow: 4px 4px 0 var(--amber); }
.search-results { list-style: none; max-height: 360px; overflow-y: auto; }
.search-message { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding: 10px 16px; border-top: 1px solid var(--border); }
.search-results[hidden] + .search-message { border-top: 0; }
.search-results li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; cursor: pointer; border-top: 1px solid var(--border); }
.search-results li:first-child { border-top: 0; }
.search-results li[aria-selected="true"], .search-results li:hover { background: var(--bg-deep); }
.search-results li[aria-selected="true"] .result-name { color: var(--amber); }
.result-name { font-size: 14px; color: var(--text); }
.result-name .alias { color: var(--text-faint); }
.result-meta { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; align-self: center; }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 20px; }
.crumbs li + li::before { content: '›'; margin: 0 8px; color: var(--text-faint); }
.crumbs a { color: var(--text-mid); text-decoration: none; }
.crumbs a:hover { color: var(--amber); }
.crumbs [aria-current="page"] { color: var(--text); }

/* Headings */
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.05; }
.lede { font-weight: 300; color: var(--text-mid); line-height: 1.7; margin-top: 12px; max-width: 620px; }
.summary { margin-top: 20px; line-height: 1.7; max-width: 760px; }

/* The AppJS band on Area pages: a dark section with the amber accent bar (AppJS guide). */
.appjs-band { margin-top: 32px; background: var(--band); color: var(--cream); padding: 28px 32px; border-left: 4px solid var(--amber); display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.appjs-band .eyebrow .appjs { font-size: inherit; letter-spacing: inherit; color: var(--cream); }
.appjs-band .band-title { font-family: var(--serif); font-size: 24px; line-height: 1.3; margin-top: 8px; max-width: 620px; }
.appjs-band .band-title em { color: var(--amber); }
.appjs-band .band-text { font-size: 14px; color: var(--ink-faint); margin-top: 8px; max-width: 620px; line-height: 1.6; }
.appjs-band .btn-primary { background: var(--amber); color: var(--white); white-space: nowrap; }
.appjs-band .btn-primary:hover, .appjs-band .btn-primary:focus-visible { background: var(--cream); color: var(--ink); }

/* Stat cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
.card { display: flex; flex-direction: column; align-items: stretch; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface); border: 1px solid var(--border); padding: 20px 22px; transition: border-color .2s, box-shadow .2s; }
.card:hover, .card[aria-pressed="true"] { border-color: var(--amber); box-shadow: 4px 4px 0 var(--amber); }
.card[aria-pressed="true"] .card-label { color: var(--amber); }
.card-label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.card-n { display: block; font-family: var(--serif); font-size: 34px; line-height: 1.2; color: var(--amber); margin: 10px 0 4px; white-space: nowrap; }
.card-n.suppressed, .card-incomplete-n.suppressed { color: var(--text-faint); cursor: help; }
.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; }
.card-delta { font-family: var(--mono); font-size: 12px; color: var(--text); }
.card-delta .up { color: var(--amber); }
.card-delta .down, .card-delta .same { color: var(--text); }
.card-delta .vs { color: var(--text-faint); }
.card-sub { font-size: 12px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.card-incomplete { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-mid); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

.chapter-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.chapter-row .chapter { margin-bottom: 24px; }

/* Controls: segmented buttons and range selects, sharp corners */
.controls { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; border: 1px solid var(--border); }
.seg button { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface); color: var(--text-mid); border: 0; padding: 8px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--button-bg); color: var(--button-text); }
.range { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); display: inline-flex; align-items: center; gap: 8px; }
.range select { appearance: none; -webkit-appearance: none; font-family: var(--mono); font-size: 12px; color: var(--text); border: 1px solid var(--border); border-radius: 0; padding: 6px 28px 6px 8px; cursor: pointer;
  /* Sharp corners need appearance: none; the arrow is drawn back with two gradients. */
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mid) 50%), linear-gradient(135deg, var(--text-mid) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat; }
.range select:hover { border-color: var(--text); }

/* Chart */
.chart-box { background: var(--surface); border: 1px solid var(--border); padding: 20px; height: 380px; position: relative; }
.chart-box .status { padding: 40px 0; line-height: 1.7; }
.chart-note { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.legend { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-top: 10px; display: flex; gap: 8px 20px; flex-wrap: wrap; }
.key { display: inline-block; width: 18px; vertical-align: middle; margin-right: 6px; }
.key.line { height: 2px; background: var(--series-1); }
.key.slot-1 { background: var(--series-1); } .key.slot-2 { background: var(--series-2); } .key.slot-3 { background: var(--series-3); }
.key.slot-4 { background: var(--series-4); } .key.slot-5 { background: var(--series-5); } .key.slot-6 { background: var(--series-6); }
.key.band { height: 10px; background: var(--series-1); opacity: var(--band-alpha); }
.key.dashed { height: 0; border-top: 2px dashed var(--series-1); }

ul.legend { list-style: none; }
.controls-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.controls-row .controls { margin-bottom: 0; }

/* Comparison: Series chips and the add-a-Series row */
.series-picker { margin-top: 32px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); padding: 6px 6px 6px 12px; font-size: 13px; }
.chip .key { margin-right: 0; }
.chip-note { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--text-faint); }
.chip-remove { font-family: var(--mono); font-size: 14px; line-height: 1; background: transparent; color: var(--text-mid); border: 1px solid transparent; padding: 4px 8px; cursor: pointer; }
.chip-remove:hover, .chip-remove:focus-visible { border-color: var(--amber); color: var(--amber); }
.add-series { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.add-search { position: relative; flex: 1; min-width: 260px; }
.add-search .search-panel { left: 0; right: 0; }
.message { font-size: 13px; color: var(--text-mid); margin-top: 8px; min-height: 1.5em; }
/* Ranking */
.ranking-pickers { margin-top: 32px; }
table.ranking td.rank { text-align: left; color: var(--text-faint); width: 3em; }
table.ranking th:nth-child(2) { text-align: left; } /* Area names, after the rank */
table.ranking tbody th a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
table.ranking tbody th a:hover, table.ranking tbody th a:focus-visible { color: var(--amber); border-bottom-color: var(--amber); }
table.ranking tr.unranked th a { color: var(--text-mid); }
.sort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sort:hover, th[aria-sort="ascending"] .sort, th[aria-sort="descending"] .sort { color: var(--amber); }

/* Map */
.map-controls { margin-top: 32px; }
.map-section { margin-top: 8px; }
.map-box { position: relative; background: var(--surface); border: 1px solid var(--border); padding: 16px; }
.map-box svg { display: block; width: 100%; height: auto; }
.municipalities path { fill: var(--fill); stroke: var(--surface); stroke-width: 0.6; cursor: pointer; }
.municipalities path:hover { stroke: var(--text); stroke-width: 1.6; }
.province-borders { fill: none; stroke: var(--text-mid); stroke-width: 1.1; pointer-events: none; }
/* One colour per class, used by the map shapes (fill) and the legend swatches (background). */
.m-p0 { --fill: var(--map-p0); } .m-p1 { --fill: var(--map-p1); } .m-p2 { --fill: var(--map-p2); } .m-p3 { --fill: var(--map-p3); } .m-p4 { --fill: var(--map-p4); }
.m-c0 { --fill: var(--map-c0); } .m-c1 { --fill: var(--map-c1); } .m-c2 { --fill: var(--map-c2); } .m-c3 { --fill: var(--map-c3); }
.m-c4 { --fill: var(--map-c4); } .m-c5 { --fill: var(--map-c5); } .m-c6 { --fill: var(--map-c6); }
.m-no-comparison { --fill: var(--bg-deep); }
.municipalities .m-none { fill: url(#hatch); }
.hatch-bg { fill: var(--bg-deep); }
.hatch-line { stroke: var(--text-faint); stroke-width: 1.5; }
.map-tooltip { position: absolute; z-index: 5; pointer-events: none; display: flex; flex-direction: column; gap: 2px; background: var(--text); color: var(--bg); font-family: var(--mono); font-size: 11px; padding: 10px 12px; white-space: nowrap; }
.map-tooltip strong { font-weight: 500; }
.map-tooltip em { font-style: normal; color: var(--text-faint); margin-top: 4px; }
.map-tooltip .up { color: var(--amber); }
.map-legend { margin-top: 12px; }
.legend-title { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-right: 6px; border: 1px solid var(--border); background: var(--fill); }
.swatch.m-none { background: repeating-linear-gradient(45deg, var(--bg-deep) 0 3px, var(--text-faint) 3px 4.5px); }
.map-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.map-footer .btn-outline { text-decoration: none; display: inline-block; }
.attribution { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--text-faint); }

/* Growth figures */
.growth { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.stat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); padding: 20px 22px; min-width: 220px; }

/* Table */
/* position: relative keeps the absolutely positioned .sr-only cells inside the scroll box. */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { font-family: var(--mono); text-align: right; padding: 9px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); padding-top: 12px; padding-bottom: 12px; }
th:first-child { text-align: left; }
tbody th { font-weight: 400; color: var(--text); }
td { color: var(--text); font-variant-numeric: tabular-nums; }
td.muted { color: var(--text-faint); }
td.up { color: var(--amber); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover th, tbody tr:hover td { background: var(--bg-deep); }
tr.incomplete th, tr.incomplete td { font-style: italic; color: var(--text-mid); }
.tag { font-family: var(--mono); font-size: 9px; font-style: normal; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--amber); color: var(--amber); margin-left: 8px; }

.note { margin-top: 16px; font-size: 13px; color: var(--text-mid); background: var(--note); border: 1px solid var(--border); padding: 12px 16px; line-height: 1.6; }
.note b { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); font-weight: 500; margin-right: 8px; }

/* Programmatic focus target after navigation; not interactive, so no focus ring. */
h1[tabindex="-1"]:focus { outline: none; }
.chapter { display: flex; align-items: center; gap: 16px; margin: 64px 0 24px; }
.chapter-line { width: 1px; height: 40px; background: var(--amber); flex-shrink: 0; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }

/* Child Areas */
.child-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.child-list a { display: block; background: var(--surface); border: 1px solid var(--border); padding: 12px 16px; color: var(--text); text-decoration: none; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.child-list a::after { content: ' →'; color: var(--amber); }
.child-list a:hover, .child-list a:focus-visible { border-color: var(--amber); box-shadow: 4px 4px 0 var(--amber); }


.status { max-width: 1100px; width: 100%; margin: 0 auto; padding: 0 40px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--text-faint); }
.status:not(:empty) { padding-top: 80px; }

/* Footer */
.footer { border-top: 3px solid var(--amber); margin-top: 40px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-in { max-width: 1100px; margin: 0 auto; padding: 28px 40px 40px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); line-height: 1.8; }
.footer-brand { text-align: right; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.footer-brand:hover .appjs, .footer-brand:focus-visible .appjs { text-decoration: underline; }
.appjs { font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: .04em; text-transform: none; }
.appjs span { color: var(--amber); margin-left: -0.03em; }

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .nav-in { padding: 0 20px; gap: 16px; }
  main { padding: 28px 20px 60px; }
  .status { padding: 0 20px; }
  .finder { padding: 24px 20px 0; }
  .search-panel { left: 20px; right: 20px; }
  .search kbd { display: none; }
  .footer-in { padding: 24px 20px 32px; }
  h1 { font-size: 40px; }
  .chart-box { height: 280px; padding: 12px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .menu { display: inline-block; }
  .tabs { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0 20px 8px; z-index: 30; }
  .tabs.open { display: flex; }
  .tab { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .tab[aria-current="page"] { border-bottom-color: var(--amber); }
  .nav-in { position: relative; justify-content: space-between; }
  .footer-brand { text-align: left; }
  .crumbs a { display: inline-block; padding: 6px 0; } /* ≥ 24 px tall touch targets */
  .crumbs ol { gap: 0; }
  .search-results li { flex-direction: column; gap: 2px; }
  .result-meta { align-self: flex-start; }
}
