:root {
  --bg: #f2f1ed;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #2b2e35;
  --muted: #555860;
  --rule: #dcdad3;
  --rule-soft: #ebe9e3;
  --red: #b3261e;
  --red-ink: #8f1d12;
  --red-tint: #fbe9e6;
  --focus: #1d5bd8;
  --c-none: #f1f0eb;
  --c-edge: #8a877f;
  --c-clear: #55707f;
  --c-1: #d8644d;
  --c-2: #b8382a;
  --c-3: #8a2014;
  --c-4: #55100a;
  --r: 6px;
  --r-sm: 4px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, "Noto Sans", "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", sans-serif;
  --hi: "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Mangal", var(--sans);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); overflow-wrap: break-word; }
[lang="hi"] { font-family: var(--hi); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--ink); padding: 10px 14px; font-weight: 600; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Header */
.masthead { background: var(--ink); color: #fff; }
.masthead :focus-visible { outline-color: #8cb4ff; }
.masthead-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { color: #fff; text-decoration: none; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-height: 44px; align-content: center; }
.brand:hover { color: #fff; }
.brand-en { font-weight: 700; font-size: 1.35rem; letter-spacing: -.015em; line-height: 1.2; }
.brand-hi { font-size: 1.15rem; color: #c9ccd3; line-height: 1.3; }
.tagline { margin: 0; font-size: .82rem; color: #b6b9c1; }
.masthead nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.masthead nav a { color: #e3e5ea; text-decoration: none; font-size: .95rem; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); }
.masthead nav a:hover { background: var(--ink-2); color: #fff; }
.masthead nav a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 650; }

main { padding: 28px 0 64px; min-height: 60vh; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .45em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: 1.3rem; font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 .9em; max-width: 70ch; }
.dek { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.status { padding: 24px 0; color: var(--muted); }
.loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--ink); }

.notice { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 16px; font-size: .95rem; max-width: none; }
.notice strong { display: block; color: var(--ink); }

.state-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 32px; max-width: 760px; margin: 24px 0; }
.state-box.error { border-color: var(--red); }
.cmd { background: var(--ink); color: #f1f2f4; border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; font: .9rem/1.5 var(--mono); margin: 0 0 1em; white-space: pre-wrap; word-break: break-word; }

/* Breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: #8b8d93; }
.crumbs a { color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
.crumbs span[aria-current] { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-weight: 600; }

/* Figures */
.figures { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.figures li { padding: 16px 20px; border-left: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 2px; margin-left: -1px; }
.figures strong { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figures strong.nr { font-size: 1.1rem; font-weight: 600; color: var(--muted); padding: .4em 0; }
.figures span { font-size: .88rem; color: var(--muted); }
.figures .hot strong { color: var(--red); }
.page-head { margin-bottom: 4px; }
.page-head .figures { margin-bottom: 24px; }

/* Home */
.intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 40px; align-items: center; }
.intro .dek { margin-bottom: 0; }
.intro .notice { margin: 0; }
.home { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "map side" "finder side"; gap: 0 24px; align-items: start; }
.home-map { grid-area: map; }
.home-side { grid-area: side; }
.home-finder { grid-area: finder; }
.home-side { display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; }
.panel-h { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
.panel-foot { margin: 16px 0 0; }
.panel .summary { border: 0; padding: 0; background: none; }

/* Map */
.map-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 16px 12px; }
.map-box { position: relative; }
.map-box svg { display: block; width: 100%; height: auto; max-height: 78vh; overflow: visible; }
.map-box path { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .15s ease, stroke .15s ease; }
.map-box path[tabindex] { cursor: pointer; }
.map-box path[tabindex]:hover, .map-box path[tabindex]:focus { stroke: var(--ink); stroke-width: 2; outline: none; }
.map-box path.f-none { stroke: var(--c-edge); }
.map-box path.f-none:hover { fill: #e6e5df; }
.map-box path.f-clear:hover, .map-box path.f-clear:focus { fill: #46606e; }
.map-box path:focus-visible { stroke: var(--focus); stroke-width: 3; }
.map-box .areas path[tabindex]:hover { paint-order: stroke; }
.map-box .sel-outline { fill: none; stroke: var(--ink); stroke-width: 3; pointer-events: none; }
.map-box .pin, .map-box .lead, .map-box .lead-dot { pointer-events: none; }
.map-box .lead { stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map-box .lead-dot { fill: var(--ink); stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-card .panel-h { margin-bottom: 4px; }
.map-box .pin rect { fill: var(--ink); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map-box .pin text { fill: #fff; font-family: var(--sans); font-weight: 700; text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums; }
.f-none { fill: var(--c-none); }
.f-clear { fill: var(--c-clear); }
.f-1 { fill: var(--c-1); }
.f-2 { fill: var(--c-2); }
.f-3 { fill: var(--c-3); }
.f-4 { fill: var(--c-4); }
.sw { display: inline-block; width: 18px; height: 12px; border-radius: 2px; flex: none; }
.sw.f-none { background: var(--c-none); box-shadow: inset 0 0 0 1px var(--c-edge); }
.sw.f-clear { background: var(--c-clear); }
.sw.f-1 { background: var(--c-1); }
.sw.f-2 { background: var(--c-2); }
.sw.f-3 { background: var(--c-3); }
.sw.f-4 { background: var(--c-4); }
.map-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); font-size: .85rem; line-height: 1.35; white-space: nowrap; box-shadow: 0 4px 14px rgba(22, 24, 29, .25); }
.map-tip strong { display: block; font-size: .95rem; }
.map-tip span { color: #d3d5da; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule-soft); font-size: .85rem; }
.legend-h { margin: 0; font-weight: 650; }
.legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.map-note { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* Category summary */
.summary .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.summary a { text-decoration: none; display: block; border-radius: var(--r-sm); min-height: 44px; }
.summary a:hover { background: #f5f4f0; color: var(--ink); }
.sum-all, .sum-scheme { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px; font-weight: 650; }
.sum-all .n { font-size: 1.2rem; color: var(--red); }
.sum-scheme, .sum-scheme-name { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 4px 0 0; }
.sum-scheme-name { padding: 2px 0 6px; border-top: 1px solid var(--rule-soft); padding-top: 8px; }
.summary a[aria-current="true"] { background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--red); }
.kinds { list-style: none; margin: 0; padding: 0; }
.k-link { padding: 8px 10px; margin: 0 -10px; }
.k-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: .92rem; }
.k-name { font-weight: 500; }
.k-bar { display: block; height: 8px; background: var(--rule-soft); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.k-bar span { display: block; height: 100%; background: var(--red); border-radius: 4px; }
.kind-note { font-size: .9rem; color: var(--muted); }

/* Lists */
.list-layout { display: flex; flex-direction: column; gap: 20px; }
.list-layout .list-side .summary { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 20px; }
.list-layout.wide { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.list-layout.wide .list-side { position: sticky; top: 16px; }
.cases h2 { margin-top: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 4px 0 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.field { display: flex; flex-direction: column; min-width: 0; flex: 1 1 170px; max-width: 280px; }
.field label { font-size: .82rem; font-weight: 650; margin-bottom: 4px; color: var(--ink-2); }
select { font: inherit; font-size: .95rem; min-height: 44px; padding: 6px 36px 6px 10px; border: 1px solid #8b8d93; border-radius: var(--r-sm); color: var(--ink); width: 100%; max-width: 100%; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2316181d' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
select:hover { border-color: var(--ink); }
.active-filters { font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.active-filters a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); }
.results { font-size: .92rem; font-weight: 650; margin: 0 0 12px; padding: 4px 0; max-width: none; scroll-margin-top: 16px; }
.results:focus { outline: none; }
.results:focus-visible { outline: 3px solid var(--focus); }
.pg-of { font-weight: 400; color: var(--muted); }
.empty { border: 1px dashed #a9aaa6; border-radius: var(--r); background: var(--surface); padding: 20px; margin-top: 12px; }
.empty p:last-child { margin-bottom: 0; }

/* Case cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, transform .15s ease; }
.card:hover { border-color: var(--ink); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card a:focus-visible { outline: none; }
.thumb { display: block; aspect-ratio: 4 / 3; background: var(--rule-soft); overflow: hidden; }
.thumb { position: relative; }
.thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.is-loading::before { content: "Loading photo"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--muted); }
.thumb-empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--muted); font-size: .85rem; font-weight: 600;
  background: #ebeae5; }
.thumb-empty span { background: rgba(255, 255, 255, .9); padding: 4px 10px; border-radius: var(--r-sm); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body p { margin: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kind-tag, .review-tag { font-size: .76rem; font-weight: 650; line-height: 1.3; padding: 2px 8px; border-radius: var(--r-sm); }
.kind-tag { color: var(--red-ink); background: var(--red-tint); }
.review-tag { color: var(--ink-2); background: #e9e8e3; }
a.kind-tag { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: .85rem; }
a.kind-tag:hover { background: #f6d6d0; color: var(--red-ink); }
.card-h { font-size: 1.02rem; font-weight: 700; margin: 2px 0 0; line-height: 1.3; }
.card-h a { text-decoration: none; }
.card-h a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card-h a { color: var(--red); }
.card-count { font-size: .9rem; color: var(--muted); }
.card-count strong { font-size: 1.3rem; color: var(--red); font-variant-numeric: tabular-nums; margin-right: 2px; }
.card-place { font-size: .88rem; color: var(--ink-2); }
.card-meta { font-size: .8rem; color: var(--muted); margin-top: auto !important; padding-top: 6px; }
.cards.compact { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cards.compact .card { flex-direction: row; }
.cards.compact .thumb { width: 112px; flex: none; aspect-ratio: auto; min-height: 96px; }
.cards.compact .thumb-empty { font-size: .75rem; padding: 6px; }
.cards.compact .thumb-empty span { padding: 2px 6px; }
.cards.compact .card-body { padding: 10px 12px; gap: 2px; }
.cards.compact .card-meta { display: none; }
.cards.compact .card-count strong { font-size: 1.1rem; }

/* Finder */
.finder { margin-top: 40px; }
.finder-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; margin-bottom: 12px; }
.finder h2 { margin: 0; }
.finder-q { flex: 0 1 320px; }
.finder-q label { display: block; font-size: .82rem; font-weight: 650; margin-bottom: 4px; }
.finder input { width: 100%; font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid #8b8d93; border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.area-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.area-list li[hidden] { display: none; }
.area-list a { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 0 10px; min-height: 52px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; height: 100%; align-content: center; }
.area-list a:hover { border-color: var(--ink); color: var(--ink); }
.a-name { font-weight: 600; line-height: 1.3; }
.area-list .tag { grid-column: 2; color: var(--muted); font-size: .8rem; }
.home .finder { margin-top: 28px; }
.home .area-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.home .map-box svg { max-height: min(70vh, 600px); }
.unchecked { margin-top: 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 0 16px; }
.unchecked summary { min-height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; }
.unchecked summary::-webkit-details-marker { display: none; }
.unchecked summary::after { content: "Show list"; margin-left: auto; font-weight: 500; font-size: .9rem; color: var(--muted); text-decoration: underline; }
.unchecked[open] summary::after { content: "Hide list"; }
.unchecked summary::before { content: ""; width: 18px; height: 12px; border-radius: 2px; background: var(--c-none); box-shadow: inset 0 0 0 1px var(--c-edge); }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.plain-list li[hidden] { display: none; }
.plain-list a { display: inline-flex; align-items: center; min-height: 44px; }
.area-list .tag.has { color: var(--red); font-weight: 700; }

/* Buttons */
button, .btn { font: 600 .95rem var(--sans); padding: 9px 16px; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: var(--r-sm); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; }
button:hover, .btn:hover { background: #f1f0ec; color: var(--ink); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }

/* Area pages */
.area-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.area-map { grid-column: 2; grid-row: 1; position: sticky; top: 16px; }
.area-map > p { margin-top: 12px; }
.area-main { grid-column: 1; grid-row: 1; min-width: 0; }

/* Case page */
.case-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "photo head" "photo side"; grid-template-rows: auto 1fr; gap: 8px 36px; align-items: start; }
.case-head { grid-area: head; }
.case-head h1 { margin-top: 6px; }
.case-head .dek { font-size: 1rem; }
.case-head .figures { margin: 16px 0 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-head .figures li { padding: 12px 14px; }
.case-photo { grid-area: photo; margin: 0; }
.case-side { grid-area: side; }
.case-side .notice { margin-bottom: 20px; }
.case-side .panel-h { margin-top: 0; }
.photo-frame { display: block; background: var(--ink); border-radius: var(--r); overflow: hidden; }
.photo-frame img { display: block; width: 100%; height: auto; max-height: min(78vh, 760px); object-fit: contain; margin: 0 auto; }
.photo-frame.thumb-empty { display: flex; aspect-ratio: 16 / 9; background: #ebeae5; border: 1px solid var(--rule); font-size: .95rem; }
figcaption, .figcap { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.wrong { margin: 0 0 24px; }
.wrong h2 { font-size: 1.15rem; margin: 0 0 10px; }
.reasons { list-style: none; counter-reset: r; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 900px; }
.reasons li { counter-increment: r; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 14px; font-size: .95rem; }
.reasons li::before { content: counter(r); width: 28px; height: 28px; border-radius: 50%; background: var(--red-tint); color: var(--red-ink); font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.offices { margin-top: 12px; font-size: .95rem; }
.offices span { font-weight: 650; margin-right: 6px; }
.offices span::after { content: ":"; }
.portal-find { margin-top: 40px; max-width: 1000px; }
.portal-find h2 { font-size: 1.15rem; margin: 0 0 8px; }
.portal-find h3 { font-size: 1rem; margin: 0 0 6px; }
.path { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.path div { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 6px 12px; }
.path dt { font-size: .8rem; color: var(--muted); }
.path dd { margin: 0; font-weight: 700; }
.more-places { margin: -8px 0 20px; }
.more-places summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.fill-help { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 18px; }
.fill-help p { margin: 0 0 8px; }
.fill-help p:last-child { margin-bottom: 0; }
#fill-bm { cursor: grab; }
.fill-help .steps { margin: 0 0 8px; padding-left: 1.4em; }
.fill-help .steps li { margin-bottom: 4px; }
.nowrap { white-space: nowrap; }
.records { margin-top: 40px; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8f7f4; }
th { font-size: .8rem; font-weight: 700; color: var(--ink-2); background: #f6f5f1; border-bottom: 1px solid var(--rule); }
td.num, th.num { font-variant-numeric: tabular-nums; }
th.num, td.num.r { text-align: right; }
.table-wrap + .pager, .table-wrap { margin-bottom: 20px; }
td.id { font-family: var(--mono); font-size: .86rem; }
textarea { width: 100%; min-height: 320px; font: .88rem/1.5 var(--mono); padding: 12px; border: 1px solid #8b8d93; border-radius: var(--r-sm); background: #fff; color: var(--ink); margin-bottom: 8px; }
.copied { font-size: .9rem; color: var(--muted); align-self: center; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 8px; }
.pager ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.pager a, .pg-step { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font-variant-numeric: tabular-nums; border-radius: var(--r-sm); font-weight: 600; }
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pg-off { color: #5f6168; background: transparent; border-style: dashed; font-weight: 500; }
.pg-gap { min-width: 20px; text-align: center; color: var(--muted); }

/* About */
.prose { max-width: none; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.checks li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 20px; }
.checks h3 { margin: 0 0 6px; }
.checks p { margin-bottom: 6px; }
.check-n { font-weight: 600; font-size: .92rem; margin: 0 !important; }
.tap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: 0 -4px; }

.foot { background: var(--surface); border-top: 1px solid var(--rule); font-size: .88rem; color: var(--muted); padding: 20px 0 28px; }
.foot a { color: var(--muted); display: inline-block; padding: 12px 0; }

@media (max-width: 1080px) {
  .area-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .list-layout.wide { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .intro, .home, .area-grid, .list-layout.wide { grid-template-columns: minmax(0, 1fr); }
  .home { grid-template-areas: "map" "side" "finder"; grid-template-rows: none; gap: 24px; }
  .home .finder { margin-top: 0; }
  .area-map, .area-main { grid-column: 1; grid-row: auto; position: static; }
  .list-layout.wide .list-side { position: static; }
  .case-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "photo" "side"; gap: 16px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  main { padding-top: 20px; }
  .masthead-row { gap: 4px 12px; }
  .masthead nav { width: 100%; margin: 0 -4px; }
  .masthead nav a { padding: 0 10px; }
  .tagline { display: none; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures li { padding: 12px 14px; border-top: 1px solid var(--rule-soft); margin-top: -1px; }
  .case-head .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-head .figures li { padding: 10px; }
  .case-head .figures strong { font-size: 1.5rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards:not(.compact) .card { flex-direction: row; }
  .cards:not(.compact) .thumb { width: 120px; flex: none; aspect-ratio: auto; min-height: 120px; }
  .cards:not(.compact) .card-meta { display: none; }
  .cards .thumb-empty { font-size: .75rem; padding: 6px; }
  .field { max-width: none; flex-basis: 100%; }
  .area-list, .home .area-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-list a { grid-template-columns: minmax(0, 1fr); padding: 8px 10px; }
  .area-list a .sw { display: none; }
  .area-list .tag { grid-column: 1; }
  .legend ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .legend-states { grid-template-columns: minmax(0, 1fr) !important; }
  .pager ul { order: -1; width: 100%; justify-content: center; }
  .pager .pg-step { flex: 1 1 0; }
  .state-box { padding: 20px; }
  .map-card { padding: 10px 10px 8px; }
  th, td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.area-main > .finder:first-child { margin-top: 0; }

/* A portal placeholder (an icon or plain graphic) shown as the evidence image: enlarge it without
   smoothing so it reads as what it is, and say plainly that it is not a photo. */
.thumb.is-placeholder img, .photo-frame.is-placeholder img { object-fit: contain; image-rendering: pixelated; }
.photo-frame.is-placeholder img { width: min(100%, 480px); }
.thumb.is-placeholder .ph-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: rgba(20, 20, 20, 0.78); color: #fff; font-size: 0.85rem; line-height: 1.3; }
