:root { --ink: #111827; --muted: #4b5563; --line: #d1d5db; --panel: #ffffff; --accent: #b00026; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #f3f4f6; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.layout { display: grid; grid-template-columns: 1fr 380px; height: 100vh; }
.map-wrap { position: relative; min-height: 320px; }
#map { position: absolute; inset: 0; }
.map-title { position: absolute; top: 12px; left: 56px; background: rgba(255,255,255,.92); padding: 8px 14px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.2); max-width: calc(100% - 140px); }
.map-title h1 { margin: 0; font-size: 18px; }
.map-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.panel { background: var(--panel); border-left: 1px solid var(--line); padding: 16px 18px; overflow-y: auto; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 6px; }
.status { color: var(--muted); }
.status.error { color: var(--accent); font-weight: 600; }
.headline .row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.headline .label { color: var(--muted); font-size: 13px; }
.headline .value { font-size: 24px; font-weight: 700; line-height: 1.15; }
.headline .small { color: var(--muted); font-size: 12px; }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li, .legend-outline { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 13px; }
.swatch { width: 18px; height: 14px; border: 1px solid rgba(0,0,0,.25); flex: none; }
.swatch.outline { background: #fff; border: 2px solid #111827; }
.notes { margin: 0; padding-left: 18px; }
.notes li { margin: 6px 0; font-size: 13px; }
.small { font-size: 12px; color: var(--muted); }
.source { margin-top: 18px; }
.noscript { padding: 16px; }
.deck-tooltip { max-width: 300px; }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: 62vh auto; height: auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}
.controls { margin: 0 0 10px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; }
.legend.rings { margin-top: 6px; }
.ring { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #7c3aed; flex: none; }
.ring.thick { border-width: 3px; }
.legend.off, .legend-outline.off { opacity: .4; }
.group { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; }
.group > legend { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0; margin-bottom: 4px; }
.group .toggle { display: flex; margin: 4px 0; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.row-actions button { font: inherit; font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f9fafb; cursor: pointer; }
.row-actions button:hover { background: #eef2f7; }
.family-list { list-style: none; margin: 0; padding: 0; }
.family-list li { margin: 2px 0; }
.family-list label { display: flex; align-items: baseline; gap: 8px; font-size: 13px; cursor: pointer; }
.family-list .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.coverage { margin: 6px 0 12px; }
.fold { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.fold > summary { cursor: pointer; padding: 6px 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fold > summary:hover { color: var(--ink); }
.fold[open] > summary { margin-bottom: 4px; }
.filters-open { position: absolute; top: 12px; right: 12px; z-index: 4; font: inherit; font-weight: 600; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; }
.filters-open:hover { background: #f3f4f6; }
.chip { position: absolute; top: 72px; left: 56px; z-index: 3; margin: 0; max-width: calc(100% - 150px); padding: 4px 12px; border: 1px solid #fdba74; border-radius: 999px; background: #fff7ed; color: #7c2d12; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.drawer { position: absolute; z-index: 6; top: 0; bottom: 0; left: 0; width: min(360px, 100%); padding: 12px 16px 18px; overflow-y: auto; background: #fff; box-shadow: 2px 0 12px rgba(0,0,0,.25);
  visibility: hidden; transform: translateX(-102%); transition: transform .25s ease, visibility 0s linear .25s; }
.drawer.open { visibility: visible; transform: none; transition: transform .25s ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer.open { transition: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.drawer-head h2 { margin: 0; font-size: 17px; }
.drawer-close { font-size: 26px; line-height: 1; padding: 0 8px; border: 0; background: none; cursor: pointer; }
@media (max-width: 800px) { .drawer { width: 100%; } }
/* a shorter side panel: legend classes in two columns, headline values beside their labels */
#legend { column-count: 2; column-gap: 14px; }
#legend li { break-inside: avoid; }
.headline .row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label value" "small value"; column-gap: 10px; align-items: center; }
.headline .label { grid-area: label; }
.headline .small { grid-area: small; }
.headline .value { grid-area: value; text-align: right; }
.tabs { display: flex; gap: 4px; margin: 8px 0 10px; border-bottom: 1px solid var(--line); }
.tab { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: #1d4ed8; }
.suburb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.suburb-tools input { flex: 1 1 140px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.table-wrap { max-height: calc(100vh - 330px); min-height: 160px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
#suburb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
#suburb-table caption { text-align: left; padding: 4px 6px; }
#suburb-table th, #suburb-table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid #eef0f3; }
#suburb-table th:first-child, #suburb-table td:first-child { text-align: left; }
#suburb-table thead th { position: sticky; top: 0; z-index: 1; background: #f9fafb; vertical-align: bottom; }
#suburb-table tfoot td { position: sticky; bottom: 0; background: #f3f4f6; font-weight: 700; }
.sort { font: inherit; font-weight: 600; padding: 0; border: 0; background: none; color: var(--ink); text-align: inherit; cursor: pointer; }
.type-tag { display: block; font-size: 10.5px; color: var(--muted); }
@media (max-width: 800px) { .table-wrap { max-height: 70vh; } }
/* panel footer and the About / 404 pages */
.panel-foot { position: absolute; left: 8px; bottom: 8px; z-index: 3; margin: 0; padding: 4px 10px; max-width: calc(100% - 200px); background: rgba(255,255,255,.92); border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.panel-foot a, .doc a { color: #1d4ed8; }
body.doc-page { height: auto; min-height: 100%; background: #f3f4f6; }
.doc { max-width: 44rem; margin: 0 auto; padding: 20px 20px 48px; background: #fff; min-height: 100vh; }
.doc h1 { font-size: 24px; margin: 12px 0 8px; }
.doc h2 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { max-width: 40rem; }
