/* Static edition of the map's shell; it can render before the application loads. */
:root {
  color-scheme: dark;
  --bg: #0b0d0d;
  --panel: #121615;
  --panel-strong: #181d1b;
  --panel-soft: #1c2422;
  --text: #eef2ec;
  --muted: #b0bcb3;
  --line: rgba(221, 230, 218, .14);
  --accent: #f2b765;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.48; }
.frame { width: min(100%, 1080px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }
.site-header { border-bottom: 1px solid var(--line); background: #0e1211; }
.site-header .frame { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
a { color: var(--text); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand { display: grid; align-content: center; min-height: 44px; line-height: 1.16; text-decoration: none; }
.brand span { font-size: 20px; font-weight: 720; letter-spacing: -.035em; }
.brand small { margin-top: 3px; font-size: 12px; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; min-width: 0; color: var(--muted); font-size: 14px; }
.crumbs a, .crumbs span { display: inline-block; padding-block: 12px; line-height: 20px; }
.crumbs > :not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 9px; transform: skew(-18deg); background: var(--line); }
main { padding-block: 34px max(52px, env(safe-area-inset-bottom)); }
h1, h2, p, figure, ol, ul { margin: 0; }
h1, h2, figcaption { line-height: 1.15; }
h1 { max-width: 25ch; font-size: clamp(29px, 4.1vw, 44px); font-weight: 710; letter-spacing: -.035em; overflow-wrap: break-word; text-wrap: balance; }
.intro > p { margin-top: 7px; color: var(--muted); }
.area-actions, .file-links { display: flex; flex-wrap: wrap; gap: 8px; }
.area-actions { margin-block: 12px 18px; }
.region-picker > summary, .file-links a, .region-filter button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
}
.region-picker > summary:hover, .file-links a:hover, .region-filter button:enabled:hover { background: var(--panel-soft); border-color: var(--accent); }
.overview { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.5fr); gap: 12px; align-items: stretch; }
.latest, figure { padding: clamp(16px, 2.5vw, 26px); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.overview figure .tn-plot svg, .official-context .tn-plot svg { height: 205px; }
.official-context { margin-top: 12px; }
.official-context .tn-trend-note { max-width: 80ch; }
.official-context .tn-trend-note a { white-space: nowrap; }
h2, figcaption { font-size: 18px; letter-spacing: -.02em; font-weight: 640; }
.number, table { font-variant-numeric: tabular-nums; }
.number { margin: 10px 0 5px; font-size: 19px; font-weight: 560; line-height: 1.18; }
.number strong { font-size: clamp(37px, 4.5vw, 54px); font-weight: 670; letter-spacing: -.045em; }
.number.empty { font-size: 26px; }
.comparison { margin-top: 12px; font-size: 15px; }
.context { color: var(--muted); font-size: 14px; line-height: 1.4; }
figcaption { margin-bottom: 12px; }
.support { margin-top: 12px; border-block: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; padding: 8px 2px; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: -3px 3px 0 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
details[open] > summary::after { transform: rotate(225deg); }
.detail-body { padding: 2px 0 18px; overflow-x: auto; }
.detail-body p { max-width: 73ch; color: var(--muted); }
.detail-body p + p { margin-top: 8px; }
table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 15px; }
caption { padding-bottom: 9px; text-align: left; font-size: 14px; color: var(--muted); }
th, td { padding: 8px 5px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child { text-align: left; padding-left: 0; }
thead { color: var(--muted); }
tbody th { font-weight: 480; }
.region-picker { position: relative; scroll-margin-top: 12px; }
.region-menu {
  position: absolute; z-index: 1; top: calc(100% + 5px); inset-inline-start: 0;
  width: min(22rem, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel-strong); box-shadow: 0 8px 24px #0008;
}
.region-filter { margin-bottom: 6px; }
.region-filter > div { display: flex; gap: 8px; }
.region-filter input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--text); background: var(--panel); }
.region-filter input::placeholder { color: var(--muted); }
.region-filter button { cursor: pointer; }
.region-filter button:disabled { color: var(--muted); cursor: default; }
.region-filter [role=status]:not(:empty) { margin-top: 8px; color: var(--muted); font-size: 14px; }
#region-list { list-style: none; padding: 0; max-height: min(35vh, 300px); max-height: min(35svh, 300px); overflow: auto; overscroll-behavior: contain; }
#region-list li + li { border-top: 1px solid var(--line); }
#region-list a { display: flex; align-items: center; min-height: 44px; padding: 6px 4px; text-decoration: none; overflow-wrap: anywhere; }
#region-list a:hover { text-decoration: underline; }
#region-list a:focus-visible { outline-offset: -2px; }
@media (max-width: 760px) {
  .brand { display: none; }
  .site-header .frame { min-height: 46px; }
  main { padding-top: 16px; }
  h1 { max-width: 100%; }
  .overview { grid-template-columns: 1fr; gap: 10px; }
  .comparison { margin-top: 6px; }
  .crumbs > span:nth-child(3), .crumbs > a:nth-child(2)::after { display: none; }
}
@media (max-width: 420px) {
  .crumbs { font-size: 13px; }
  .intro > p { font-size: 15px; }
  .area-actions { margin-block: 10px 12px; }
  .latest, figure { padding: 14px; }
  .overview figure .tn-plot svg, .official-context .tn-plot svg { height: 190px; }
  th, td { padding: 7px 2px; }
}
@media print {
  :root { color-scheme: light; --bg: white; --panel: white; --text: #171b18; --muted: #455048; --line: #c9d0cb; --accent: #745328; --panel-soft: #e8ebe8; }
  .site-header, .area-actions, .file-links { display: none; }
  .overview { break-inside: avoid; }
}
