:root {
  --ink: #26333a;
  --muted: #647078;
  --bg: #f4f7f2;
  --paper: #ffffff;
  --line: #c9d8cf;
  --blue: #316fa3;
  --green: #5d8a2f;
  --gold: #c07d12;
  --teal: #285f66;
  --shadow: 0 18px 50px rgba(38, 51, 58, 0.14);
}
* { box-sizing: border-box; }
html { color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.proto-banner { background: #fbf3df; border-bottom: 1px solid #e7d6a8; color: #5b4708; padding: 8px clamp(16px, 3vw, 40px); font-size: 0.86rem; line-height: 1.45; }
.proto-banner strong { color: #463702; }
.site-header { position: sticky; top: 0; z-index: 5; display: grid; gap: 9px; padding: 10px clamp(16px, 3vw, 40px) 9px; background: rgba(246, 248, 245, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-bar { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; flex: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); font-size: 0.72rem; letter-spacing: 0; font-weight: 900; }
.header-search { flex: 1 1 auto; max-width: 540px; margin: 0; position: relative; display: block; }
.header-search input { width: 100%; min-height: 40px; padding: 8px 46px 8px 16px; border-radius: 999px; border: 1px solid #b7cac9; background: #fff; }
.header-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 999px; background: var(--ink); color: #fff; border: none; display: inline-flex; align-items: center; justify-content: center; }
.header-search button:hover { background: var(--teal); }
.hdr-search-icon { width: 18px; height: 18px; display: block; }
.menu-toggle { display: none; align-items: center; gap: 8px; min-height: 42px; border-color: var(--line); background: #fff; color: var(--ink); flex: none; margin-left: auto; }
.menu-toggle-icon { width: 16px; height: 12px; display: inline-block; background: linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 10px / 100% 2px no-repeat; }
.site-nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.nav-overview, .nav-lang { align-self: center; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; text-decoration: none; font-size: 0.86rem; font-weight: 800; color: var(--muted); }
.nav-overview[aria-current="page"], .nav-overview:hover, .nav-overview:focus, .nav-lang:hover, .nav-lang:focus { border-color: var(--line); background: #fff; color: var(--ink); outline: none; }
.nav-lang { margin-left: auto; }
.nav-group { display: flex; flex-direction: column; gap: 3px; padding-left: 14px; border-left: 1px solid var(--line); }
.nav-group-label { font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; font-weight: 900; color: #8a5a0c; }
.nav-group-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-group-links a { border: 1px solid transparent; border-radius: 7px; padding: 4px 8px; text-decoration: none; font-size: 0.85rem; color: var(--muted); }
.nav-group-links a:hover, .nav-group-links a:focus { border-color: var(--line); background: #fff; color: var(--ink); outline: none; }
.nav-group-links a[aria-current="page"] { border-color: var(--teal); background: #fff; color: var(--teal); font-weight: 800; }
main { padding-bottom: 48px; }
.hero { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr); align-items: end; gap: clamp(18px, 4vw, 44px); padding: clamp(28px, 5vw, 58px); position: relative; overflow: hidden; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21, 38, 45, 0.88), rgba(21, 38, 45, 0.44) 46%, rgba(244, 247, 242, 0.82)); z-index: -1; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-copy { color: #fff; max-width: 760px; padding-bottom: 38px; text-shadow: 0 2px 18px rgba(0,0,0,0.25); }
.eyebrow { margin: 0 0 8px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: var(--teal); }
.hero .eyebrow { color: #f0cf85; }
h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 5.7rem); line-height: 0.95; letter-spacing: 0; }
h2 { margin: 0 0 10px; font-size: clamp(1.35rem, 3vw, 2.15rem); letter-spacing: 0; }
p { line-height: 1.55; }
.hero-copy p:last-child { max-width: 650px; font-size: 1.12rem; }
.search-console, .panel, .toolbar, .page-title, .source-panel { background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.search-console { padding: 22px; }
.search-console.standalone { margin: 0 clamp(16px, 4vw, 44px) 24px; box-shadow: none; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: 0.9rem; }
input, select { width: 100%; min-height: 44px; border: 1px solid #b7cac9; border-radius: 7px; padding: 10px 12px; color: var(--ink); background: #fff; font: inherit; }
input:focus, select:focus, button:focus, a:focus { outline: 3px solid rgba(240, 180, 41, 0.72); outline-offset: 2px; }
button { min-height: 42px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fff; padding: 9px 13px; font: inherit; font-weight: 800; cursor: pointer; }
button.secondary, .quick-searches button { background: #fff; color: var(--ink); border-color: var(--line); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.quick-searches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.answer-box { min-height: 120px; border: 1px solid #dce6e3; background: #f8fbfa; border-radius: 8px; padding: 14px; }
.answer-box strong { display: block; margin-bottom: 4px; }
.answer-box .meta { color: var(--muted); font-size: 0.9rem; }
.answer-recs { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e2ece8; font-size: 0.9rem; }
.answer-recs a { color: var(--blue); font-weight: 700; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 clamp(16px, 4vw, 44px); border: 1px solid var(--line); background: var(--line); transform: translateY(-22px); }
.stat-strip article { background: #fff; padding: 24px; box-shadow: 0 8px 20px rgba(38, 51, 58, 0.08); }
.stat-strip span { display: block; color: var(--blue); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 900; overflow-wrap: anywhere; }
.stat-strip p { margin: 2px 0 0; color: var(--muted); }
.source-snapshot { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr); gap: clamp(18px, 4vw, 44px); align-items: center; margin: 0 clamp(16px, 4vw, 44px) 30px; padding: clamp(18px, 3vw, 28px); border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,255,255,0.86), rgba(255,255,255,0.38)); }
.source-snapshot p:last-child { max-width: 680px; color: var(--muted); }
.source-snapshot img { width: 100%; max-width: 560px; justify-self: end; border-radius: 8px; box-shadow: 0 14px 34px rgba(38, 51, 58, 0.12); }
.review-path { margin: 0 clamp(16px, 4vw, 44px) 30px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 16px 40px rgba(38, 51, 58, 0.1); }
.review-path .section-heading p:last-child { max-width: 720px; color: var(--muted); }
.review-path-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.review-card { min-width: 0; display: grid; gap: 8px; border: 1px solid #d8e4e0; border-radius: 8px; background: #f8fbfa; padding: 16px; text-decoration: none; overflow-wrap: anywhere; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.review-card:hover, .review-card:focus { border-color: var(--teal); box-shadow: 0 12px 30px rgba(40, 95, 102, 0.16); transform: translateY(-2px); outline: none; }
.review-card span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 900; }
.review-card strong { font-size: 1.08rem; }
.review-card p { margin: 0; color: var(--muted); }
.split-layout, .map-layout, .audit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.section-heading { margin-bottom: 14px; }
.result-list, .catalog-grid, .sample-grid { display: grid; gap: 12px; min-width: 0; }
.result-card, .catalog-card, .sample-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-wrap: anywhere; }
.result-card h3, .catalog-card h3, .sample-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { display: inline-flex; border: 1px solid #c7d5d1; background: #f7faf8; border-radius: 999px; padding: 4px 8px; font-size: 0.82rem; color: var(--muted); }
.panel { padding: 18px; align-self: start; min-width: 0; }
.bar-list { display: grid; gap: 10px; margin: 14px 0 18px; }
.bar-row { display: grid; gap: 5px; }
.bar-row span { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.bar-track { height: 9px; border-radius: 999px; background: #e7efed; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--blue)); }
.text-link { display: inline-flex; font-weight: 800; color: var(--blue); }
.record-preview, .table-section { padding: 0 clamp(16px, 4vw, 44px) 30px; min-width: 0; }
.page-title { margin: 26px clamp(16px, 4vw, 44px) 24px; padding: clamp(20px, 4vw, 34px); box-shadow: none; background: #fff; min-width: 0; }
.page-title h1 { color: var(--ink); font-size: clamp(2.2rem, 5vw, 4.6rem); overflow-wrap: anywhere; }
.page-title p { overflow-wrap: anywhere; }
.page-title p:last-child { max-width: 760px; color: var(--muted); }
.toolbar { margin: 0 clamp(16px, 4vw, 44px) 18px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 220px 220px; gap: 12px; box-shadow: none; }
.count-line { margin: 0 clamp(16px, 4vw, 44px) 12px; color: var(--muted); font-weight: 800; }
.catalog-grid { padding: 0 clamp(16px, 4vw, 44px) 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map-frame { background: #082c3b; min-height: 520px; border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid #0c3f52; }
#sample-map { width: 100%; height: 100%; min-height: 520px; display: block; }
.layer-list { display: grid; gap: 8px; }
.layer-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.layer-item strong { display: flex; justify-content: space-between; gap: 12px; }
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table-wrap table { min-width: 640px; }
th, td { border-bottom: 1px solid #e4ecea; padding: 10px; text-align: left; vertical-align: top; }
th { background: #f2f7f5; color: var(--muted); }
tbody tr:nth-child(even) td { background: rgba(40, 95, 102, 0.035); }
.wide-label { display: block; max-width: 520px; margin-bottom: 12px; }
.tab-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 clamp(16px, 4vw, 44px) 18px; }
.tab-row button[aria-selected="true"] { background: var(--green); border-color: var(--green); }
.record-viewer { margin: 0 clamp(16px, 4vw, 44px); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.audit-grid { align-items: start; }
.qa-status .big { font-size: 2.5rem; font-weight: 900; color: var(--green); }
.check-list { padding-left: 1.2rem; line-height: 1.65; }
.source-panel { margin: 0 clamp(16px, 4vw, 44px); padding: 18px; box-shadow: none; }
.source-links { display: grid; gap: 8px; }
.source-links a { color: var(--blue); font-weight: 700; overflow-wrap: anywhere; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
.story-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 clamp(16px, 4vw, 44px) 22px; border: 1px solid var(--line); background: var(--line); }
.story-summary article { background: #fff; padding: 16px; }
.story-summary span { display: block; color: var(--green); font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; overflow-wrap: anywhere; }
.story-summary span.long-value { color: var(--blue); font-size: clamp(1.18rem, 2.25vw, 1.65rem); line-height: 1.08; }
.story-summary p { margin: 2px 0 0; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0 clamp(16px, 4vw, 44px) 34px; }
.story-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: clamp(16px, 3vw, 24px); box-shadow: 0 12px 34px rgba(19, 47, 60, 0.1); }
.story-card h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.story-sources { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.story-sources li { border: 1px solid #d8e4e0; border-radius: 8px; padding: 12px; background: #f8fbfa; }
.story-sources strong, .story-sources span { display: block; }
.story-sources span { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.story-delivery { border-left: 4px solid var(--gold); padding-left: 12px; color: var(--muted); }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 7px; background: var(--ink); color: #fff; padding: 9px 13px; font-weight: 800; text-decoration: none; }
.ops-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ops-list li { border: 1px solid #d8e4e0; border-radius: 8px; padding: 11px; background: #f8fbfa; }
.ops-list strong, .ops-list span { display: block; }
.ops-list span { color: var(--muted); margin: 3px 0; }
.health-list { display: grid; gap: 11px; }
.health-card { border: 1px solid #d8e4e0; border-radius: 8px; padding: 12px; background: #fff; }
.health-card div:first-child { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.health-card span { color: var(--muted); font-weight: 800; white-space: nowrap; }
.health-card p { margin: 7px 0 0; color: var(--muted); font-size: 0.92rem; }
.brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 clamp(16px, 4vw, 44px) 34px; }
.brief-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 30px rgba(19, 47, 60, 0.08); overflow-wrap: anywhere; }
.brief-card h2 { font-size: clamp(1.22rem, 2vw, 1.65rem); }
.brief-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 16px; }
.brief-meta.stacked { grid-template-columns: 1fr; }
.brief-meta div { min-width: 0; border: 1px solid #d8e4e0; border-radius: 8px; padding: 9px; background: #f8fbfa; }
.brief-meta dt { font-size: 0.74rem; text-transform: uppercase; font-weight: 900; color: var(--muted); }
.brief-meta dd { margin: 3px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.brief-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.detail-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 22px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.api-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 clamp(16px, 4vw, 44px) 34px; }
.api-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 30px rgba(19, 47, 60, 0.08); overflow-wrap: anywhere; }
.api-card h2 { font-size: clamp(1.22rem, 2vw, 1.65rem); }
.code-block { margin: 14px 0; padding: 12px; border-radius: 8px; background: #082c3b; color: #eefaf8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.82rem; line-height: 1.45; }
.code-block code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.quality-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 30px rgba(19, 47, 60, 0.08); }
.quality-card h2 { font-size: clamp(1.22rem, 2vw, 1.65rem); }
.status-pill { display: inline-flex; border: 1px solid #c7d5d1; background: #f7faf8; border-radius: 999px; padding: 3px 8px; font-size: 0.82rem; font-weight: 800; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 24px clamp(16px, 4vw, 44px); color: var(--muted); background: #fff; }
.site-footer a { margin-left: 10px; color: var(--blue); font-weight: 700; }
/* ---- Charts (SJCharts) ---- */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0 clamp(16px, 4vw, 44px) 30px; }
.chart-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 30px rgba(19, 47, 60, 0.08); }
.chart-card.span-2 { grid-column: 1 / -1; }
.sjc-figure { margin: 0; min-width: 0; }
.sjc-title { font-weight: 800; font-size: 1.02rem; margin-bottom: 4px; }
.sjc-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.sjc-source { color: var(--muted); font-size: 0.78rem; margin: 12px 0 0; overflow-wrap: anywhere; }
.sjc-bars { display: grid; gap: 9px; }
.sjc-bar-row { display: grid; grid-template-columns: minmax(84px, 36%) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sjc-bar-label { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sjc-bar-track { height: 14px; border-radius: 999px; background: #e7efed; overflow: hidden; min-width: 0; }
.sjc-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--blue)); }
.sjc-bar-value { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 0.85rem; white-space: nowrap; text-align: right; }
.sjc-bar-value em { display: block; font-style: normal; font-weight: 600; color: var(--muted); font-size: 0.72rem; }
.sjc-svg { width: 100%; height: auto; display: block; }
.sjc-grid { stroke: #e4ece9; stroke-width: 1; }
.sjc-axis { fill: var(--muted); font-size: 11px; font-weight: 600; }
.sjc-area { fill: rgba(49, 111, 163, 0.12); stroke: none; }
.sjc-line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sjc-dot { fill: var(--blue); }
.sjc-donut-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sjc-donut-svg { width: 168px; height: 168px; flex: none; }
.sjc-donut-total { font-weight: 900; font-size: 20px; fill: var(--ink); }
.sjc-donut-unit { fill: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.sjc-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.88rem; min-width: 0; }
.sjc-legend strong { font-variant-numeric: tabular-nums; }
.sjc-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }

/* ---- Interactive vector map ---- */
.sjmap-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 0 clamp(16px, 4vw, 44px) 30px; align-items: start; }
.sjmap-stage { position: relative; background: linear-gradient(160deg, #eef4f1, #e3ecef); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); min-height: 420px; touch-action: none; }
.sjmap-svg { width: 100%; height: auto; display: block; cursor: grab; }
.sjmap-svg.is-panning { cursor: grabbing; }
.sjmap-district { stroke: #fff; stroke-width: 0.6; cursor: pointer; transition: opacity 120ms ease; }
.sjmap-district:hover, .sjmap-district:focus { stroke: var(--ink); stroke-width: 1.4; outline: none; }
.sjmap-neighborhood { fill: none; stroke: rgba(40, 95, 102, 0.30); stroke-width: 0.4; pointer-events: none; }
.sjmap-bikeway { fill: none; stroke: #5d8a2f; stroke-width: 0.7; opacity: 0.65; pointer-events: none; }
.sjmap-pt { stroke: #fff; stroke-width: 1; cursor: pointer; }
.sjmap-pt:hover { stroke: var(--ink); stroke-width: 1.5; }
.sjmap-label { fill: #14323c; font-size: 9px; font-weight: 800; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,0.85); stroke-width: 2.4px; }
.sjmap-controls { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; }
.sjmap-controls button { width: 40px; height: 40px; min-height: 40px; padding: 0; font-size: 1.2rem; background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.sjmap-controls button.wide { width: auto; padding: 0 12px; font-size: 0.8rem; font-weight: 800; }
.sjmap-panel { display: grid; gap: 16px; align-self: start; }
.sjmap-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: var(--shadow); }
.sjmap-card h2 { font-size: 1.1rem; }
.sjmap-toggles { display: grid; gap: 8px; margin: 0; padding: 0; }
.sjmap-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfa; cursor: pointer; font-weight: 700; font-size: 0.9rem; min-height: 40px; }
.sjmap-toggle input { width: auto; min-height: 0; margin: 0; }
.sjmap-toggle .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.sjmap-toggle .dot.line { border-radius: 2px; height: 5px; }
.sjmap-toggle .count { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.sjmap-info { min-height: 64px; }
.sjmap-info .placeholder { color: var(--muted); }
.sjmap-info h3 { margin: 0 0 6px; font-size: 1.05rem; }
.sjmap-choro { display: grid; gap: 6px; margin-top: 10px; }
.sjmap-choro-scale { display: flex; height: 12px; border-radius: 999px; overflow: hidden; }
.sjmap-choro-scale span { flex: 1; }
.sjmap-choro-ends { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }

/* ---- Analytics dashboard ---- */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 clamp(16px, 4vw, 44px) 22px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 8px 20px rgba(38, 51, 58, 0.08); min-width: 0; }
.metric-card .label { color: var(--muted); font-weight: 700; font-size: 0.84rem; }
.metric-card .value { display: block; font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; color: var(--blue); margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-card .delta { font-size: 0.82rem; font-weight: 800; }
.metric-card .delta.up { color: #3c6614; }
.metric-card .delta.flat { color: var(--muted); }
.metric-card.is-illustrative { position: relative; border-top: 3px solid var(--gold); }
.metric-tag { position: absolute; top: 10px; right: 10px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #6f4709; background: #f7eed9; border: 1px solid #e3cfa6; border-radius: 999px; padding: 1px 7px; }
.page-subhead { margin: 0 clamp(16px, 4vw, 44px) 10px; }
.page-subhead .eyebrow { margin: 0; }
.illustrative-note { margin: 0 clamp(16px, 4vw, 44px) 18px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; background: #fbfdfb; color: var(--muted); font-size: 0.9rem; }

/* ---- Quality scorecard ---- */
.score-ring { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.score-badge { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.7rem; color: #fff; flex: none; }
.score-badge.g-a { background: var(--green); }
.score-badge.g-b { background: var(--blue); }
.score-badge.g-c { background: var(--gold); }
.score-badge.g-d { background: #b5651d; }
.score-dims { display: grid; gap: 8px; margin: 14px 0 0; }
.score-dim { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 0.88rem; }
.score-dim .sjc-bar-track { height: 10px; }
.score-dim strong { font-variant-numeric: tabular-nums; }
.related-list { display: grid; gap: 8px; }
.related-list a { display: flex; justify-content: space-between; gap: 10px; border: 1px solid #d8e4e0; border-radius: 8px; padding: 10px 12px; background: #f8fbfa; text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.related-list a:hover, .related-list a:focus { border-color: var(--teal); outline: none; }
.related-list span { color: var(--muted); font-weight: 600; font-size: 0.82rem; white-space: nowrap; }

@media (max-width: 980px) {
  .hero, .source-snapshot, .split-layout, .map-layout, .audit-grid, .ai-grid, .ops-grid, .detail-grid, .quality-grid, .sjmap-layout { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; align-items: stretch; }
  .hero-copy { padding-bottom: 0; }
  .source-snapshot img { justify-self: stretch; max-width: none; }
  .stat-strip, .story-summary, .story-grid { grid-template-columns: repeat(2, 1fr); transform: none; margin-top: 16px; }
  .review-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grid, .brief-grid, .api-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .header-bar { flex-wrap: wrap; }
  .brand { min-width: 0; }
  .brand span { max-width: 220px; line-height: 1.1; }
  .menu-toggle { display: inline-flex; order: 2; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .site-nav { display: none; }
  .site-header.nav-open .site-nav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
  .site-header.nav-open .nav-group { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
  .site-header.nav-open .nav-group-links a { min-height: 36px; align-items: center; display: inline-flex; }
  .nav-lang { margin-left: 0; }
}
@media (max-width: 640px) {
  .hero { padding: 24px 16px; }
  h1 { font-size: 2.45rem; line-height: 1; }
  .search-row, .stat-strip, .catalog-grid, .compact-grid, .story-summary, .story-grid, .brief-grid, .brief-meta, .api-grid { grid-template-columns: 1fr; }
  .review-path-grid { grid-template-columns: 1fr; }
  .map-frame, #sample-map { min-height: 380px; }
  .hero-copy { text-shadow: 0 2px 26px rgba(0,0,0,0.4); }
}

/* ---- Batch-1 polish: tables, hovers, empty states, badges, breadcrumb ---- */
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mini-table th, .mini-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.mini-table th { background: #f2f7f5; color: var(--muted); font-weight: 800; }
.mini-table tbody tr:nth-child(even) td { background: rgba(40, 95, 102, 0.035); }

.catalog-card, .sample-card, .health-card { transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.catalog-card:hover, .catalog-card:focus-within, .sample-card:hover, .sample-card:focus-within { border-color: var(--teal); box-shadow: 0 10px 24px rgba(40, 95, 102, 0.12); }
.health-card:hover { border-color: var(--teal); background: #f8fbfa; }
.table-wrap tbody tr:hover td { background: rgba(40, 95, 102, 0.08); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 36px 24px; min-height: 150px; color: var(--muted); background: #f8fbfa; border: 1px dashed var(--line); border-radius: 8px; }
.empty-state strong { color: var(--ink); font-size: 1.02rem; }

.format-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.dataset-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 16px; }
.dataset-meta .format-row { margin-top: 0; }
.format-chip { display: inline-flex; align-items: center; border: 1px solid #bcd3cd; background: #eef6f3; color: var(--teal); border-radius: 6px; padding: 2px 7px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em; }

.freshness { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 0.78rem; font-weight: 800; border: 1px solid; }
.freshness::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.freshness.fresh { color: #3c6614; border-color: #bcd9a0; background: #eef6e6; }
.freshness.recent { color: #6f4709; border-color: #e3cfa6; background: #f7eed9; }
.freshness.stale { color: #8a4b18; border-color: #e5c2a0; background: #f6e9df; }

.breadcrumb { margin: 22px clamp(16px, 4vw, 44px) -6px; font-size: 0.86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--blue); font-weight: 700; text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus { text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 700; }
.breadcrumb .sep { color: var(--line); }

.sjmap-controls button:focus { outline: 3px solid rgba(240, 180, 41, 0.82); outline-offset: 2px; box-shadow: 0 0 0 3px rgba(40, 95, 102, 0.25), 0 4px 12px rgba(0,0,0,0.14); }
.sjmap-district:focus { stroke: var(--ink); stroke-width: 2.6; outline: none; }
.sjmap-pt:focus { stroke: var(--ink); stroke-width: 2; outline: none; }

/* ---- Batch-2: inline data preview table + data dictionary ---- */
.preview-filter { max-width: 320px; min-height: 40px; margin: 0 0 12px; border-radius: 7px; }
.preview-table th { padding: 0; background: #f2f7f5; white-space: nowrap; }
.th-sort { width: 100%; min-height: 0; background: none; border: 0; border-radius: 0; color: var(--muted); font: inherit; font-weight: 800; padding: 10px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.th-sort:hover { color: var(--ink); background: #e9f1ee; }
.th-arrow::after { content: "\2195"; opacity: 0.4; font-size: 0.85em; }
.preview-table th[aria-sort="ascending"] .th-arrow::after { content: "\25B2"; opacity: 1; }
.preview-table th[aria-sort="descending"] .th-arrow::after { content: "\25BC"; opacity: 1; }
.preview-table td { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-dictionary { border: 0; }
.data-dictionary summary { cursor: pointer; padding: 12px 14px; background: #f8fbfa; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; color: var(--ink); }
.data-dictionary summary:hover { border-color: var(--teal); }
.data-dictionary[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.data-dictionary[open] .table-wrap { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.data-dictionary .mini-table { max-width: 520px; }

/* ---- Batch-3: API query builder ---- */
.qb { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: clamp(16px, 3vw, 22px); box-shadow: 0 10px 30px rgba(19, 47, 60, 0.08); }
.qb-controls { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.qb-controls label { gap: 6px; }
.qb-controls select { min-width: 240px; }
.qb-fields { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.qb-fields legend { font-weight: 800; color: var(--muted); font-size: 0.84rem; padding: 0 6px; }
.qb-fieldlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; max-height: 220px; overflow: auto; }
.qb-field { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 0.86rem; color: var(--ink); }
.qb-field input { width: auto; min-height: 0; margin: 0; }
.qb-field span { color: var(--muted); font-size: 0.74rem; margin-left: auto; }
#qb-url { word-break: break-all; }
.qb-result { margin-top: 14px; }
