@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Manrope;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --surface: #fffefa;
  --text: #222822;
  --muted: #59635b;
  --line: #dedfd4;
  --accent: #b15432;
  --accent-light: #fbebdd;
  --map-bg: #f1f0e9;
  --state-on: #dc706b;
  --state-mixed: #f2b3ae;
  --state-reported: #fbe1de;
  --state-off: #c3e3c9;
  --city-on: #cc3235;
  --city-off: #13803d;
  --state-unknown: #dddcd3;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sans: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 500 15px/1.5 var(--sans); }
button, select, input { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid #9a462a; outline-offset: 3px; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  z-index: 3;
  padding: 12px 20px;
  background: var(--surface);
}

.icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container { width: min(100% - 88px, 1360px); margin-inline: auto; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; font-size: 24px; font-weight: 800; letter-spacing: -.075em; }
.brand img { display: block; flex-shrink: 0; }
.brand-tld { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: clamp(5px, 2vw, 23px); }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: #efefe7; }
.main-nav .icon { width: 16px; height: 16px; }

.atlas { width: calc(100% - max(44px, (100% - 1360px) / 2)); padding-block: 35px 48px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(282px, 31%); gap: 38px; align-items: end; margin-bottom: 27px; }
h1, h2, p { margin-top: 0; }
.intro h1 { margin: 0; font-size: clamp(21px, 3vw, 47px); font-weight: 800; letter-spacing: -.073em; line-height: .96; }
.period { color: var(--accent); }
.intro-copy { max-width: 560px; margin: 17px 0 0; color: var(--muted); font-size: clamp(13px, 1.32vw, 16px); line-height: 1.6; }
.overview { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.overview > div { display: flex; flex-direction: column; gap: 3px; padding-block: 12px 10px; }
.overview > :not(.overview-time) dd { order: -1; }
.overview > div + div:not(.overview-time) { padding-left: 17px; border-left: 1px solid var(--line); }
.overview dt { color: var(--muted); font-size: 11px; font-weight: 750; }
.overview dd { margin: 0; font-weight: 800; }
.overview > :not(.overview-time) dd { font-size: clamp(29px, 3.2vw, 49px); font-variant-numeric: tabular-nums; letter-spacing: -.08em; line-height: 1; }
.overview > .overview-time { grid-column: 1 / -1; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; padding-block: 9px 0; border-top: 1px solid var(--line); }
.overview-time .icon { width: 15px; height: 15px; margin-right: 3px; color: var(--accent); }
.overview-time dd { font: 500 11px/1.3 var(--mono); white-space: nowrap; }

.atlas-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: stretch; }
.surface { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px #242b2110; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 17px; }
.map-heading { min-height: 63px; }
.panel-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.panel-title h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.title-icon { width: 19px; height: 19px; color: var(--accent); }
.select-frame { position: relative; }
.select-frame select { width: 166px; max-width: 100%; appearance: none; padding: 8px 32px 8px 11px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 750; }
.select-frame .icon { position: absolute; top: 50%; right: 9px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; }
.map-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1000 / 555;
  background-color: var(--map-bg);
  background-image: radial-gradient(circle, #aaa99c5c .7px, transparent .9px);
  background-size: 15px 15px;
  border-block: 1px solid var(--line);
}
.map-art { display: block; width: 100%; height: 100%; user-select: none; }
.map-art.can-pan { cursor: grab; touch-action: none; }
.map-art.dragging, .map-art.dragging * { cursor: grabbing; }
.map-message, .district-message, .directory-message { color: var(--muted); font-size: 13px; }
.map-message { position: absolute; top: 50%; left: 50%; margin: 0; padding: 9px 14px; transform: translate(-50%, -50%); text-align: center; background: var(--surface); border-radius: 6px; }
.district-shape { fill: var(--district-fill, var(--state-unknown)); stroke: #f7f5eb; stroke-width: .8px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.district-object { cursor: pointer; }
.district-object:hover .district-shape, .district-object:focus-visible .district-shape, .district-object.is-selected .district-shape { stroke: #6f5741; stroke-width: 1px; }
.district-object.is-muted { opacity: .38; }
.district-object.is-muted:hover, .district-object.is-muted:focus-visible { opacity: .88; }
.state-on { --district-fill: var(--state-on); }
.state-mixed { --district-fill: var(--state-mixed); }
.state-reported { --district-fill: var(--state-reported); }
.state-off { --district-fill: var(--state-off); }
.state-unknown { --district-fill: var(--state-unknown); }
.district-label { fill: #302f28; stroke: #f7f1df; stroke-width: 2.5px; paint-order: stroke; font-family: var(--mono); font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.district-label.is-muted { opacity: .62; }
.map-pin { cursor: pointer; }
.map-pin circle { fill: var(--pin-color, white); stroke: #343d33; stroke-width: 1px; paint-order: stroke; }
.map-pin .pin-hit { fill: transparent; stroke: none; }
.map-pin:hover .pin-dot, .map-pin:focus-visible .pin-dot, .map-pin.is-selected .pin-dot { stroke: #282e29; stroke-width: 2px; paint-order: normal; }
.map-pin .pin-label { visibility: hidden; fill: #262820; stroke: #fff9ec; stroke-width: 2.6px; paint-order: stroke; font-family: var(--sans); font-size: 12px; font-weight: 800; pointer-events: none; }
.map-pin.show-label .pin-label, .map-pin:hover .pin-label { visibility: visible; }
.pin-on { --pin-color: var(--city-on); }
.pin-off { --pin-color: var(--city-off); }
.map-tools { position: absolute; display: flex; flex-direction: column; right: 11px; bottom: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 1px 4px #2228220e; }
.icon-button { display: grid; width: 35px; height: 35px; padding: 0; place-items: center; border: 0; color: var(--text); background: transparent; }
.icon-button:enabled:hover { background: #edece3; }
.icon-button:disabled { opacity: .4; }
.icon-button:focus-visible { outline-offset: -2px; }
.map-tools .icon-button + .icon-button { border-top: 1px solid var(--line); }
.map-legend { display: flex; gap: 7px 17px; align-items: center; flex-wrap: wrap; padding: 13px 15px; color: var(--muted); font-size: 11px; font-weight: 750; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; flex: 0 0 auto; width: 11px; height: 11px; border: 1px solid #252b201c; border-radius: 3px; }
.swatch-on { background: var(--state-on); }
.swatch-mixed { background: var(--state-mixed); }
.swatch-reported { background: var(--state-reported); }
.swatch-off { background: var(--state-off); }
.swatch-unknown { background: var(--state-unknown); }
.swatch-pin { width: 8px; height: 8px; border: 1.3px solid #343d33; border-radius: 50%; background: var(--pin-color, white); }

.directory { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.directory-heading { min-height: 61px; }
.counter { display: inline-block; min-width: 33px; padding: 3px 6px; border-radius: 5px; color: var(--muted); background: #efefe7; text-align: center; font: 500 12px/1.4 var(--mono); }
.search-frame { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0 13px 9px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); }
.search-frame:focus-within { outline: 2px solid #9a462a; outline-offset: 1px; }
.search-frame > .icon { width: 17px; height: 17px; }
.search-frame input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-frame input::placeholder { color: var(--muted); }
.search-frame input::-webkit-search-cancel-button { display: none; }
.search-frame .icon-button { width: 26px; height: 28px; }
.search-frame .icon-button .icon { width: 16px; height: 16px; }
.directory-body { grid-row: 4; min-height: 0; max-height: 320px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b5baac transparent; }
.directory-message { padding: 8px 16px 16px; margin: 0; }
.city-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); column-gap: 14px; padding: 0 13px; margin: 0; list-style: none; }
.city-list li + li { border-top: 1px solid #eeeee6; }
.city-button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 6px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.city-button:hover, .city-button[aria-pressed="true"] { background: #f0f0e8; }
.city-button:focus-visible { outline-offset: -1px; }
.city-button .icon { width: 15px; height: 15px; color: var(--muted); }
.city-button > .icon:first-child { color: var(--accent); }
.city-button span, .city-name, .city-region { display: block; min-width: 0; }
.city-name { font-size: 13px; font-weight: 800; }
.city-region { color: var(--muted); font-size: 10.5px; }
.city-detail { position: relative; padding: 10px 12px; margin: 0 13px 7px; border: 1px solid #e8cdbb; border-radius: 6px; background: var(--accent-light); }
.city-detail h3 { margin: 0 28px 1px 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.city-detail p { margin: 0 0 6px; color: #5b5147; font-size: 11px; }
.city-detail .city-detail-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 11px; font-weight: 800; }
.city-detail-link .icon { width: 14px; height: 14px; }
.city-detail .icon-button { position: absolute; right: 3px; top: 4px; width: 30px; height: 30px; border-radius: 4px; }
.directory-link { grid-row: 5; display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; text-decoration: none; }
.directory-link:hover { color: var(--accent); }
.directory-link .icon { width: 16px; height: 16px; color: var(--accent); }

.monitoring { margin-top: 16px; padding-bottom: 15px; }
.monitoring .panel-top { padding-bottom: 8px; }
.monitoring-copy { display: flex; align-items: flex-start; gap: 7px; margin: 0 17px 12px; color: var(--muted); font-size: 12px; }
.monitoring-copy .icon { width: 16px; height: 16px; color: var(--accent); }
.district-message { margin: 5px 17px 0; }
.district-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-inline: 16px; }
.district-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 63px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); text-align: left; }
.district-card:hover, .district-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); }
.district-card strong { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.district-card small { color: var(--muted); font-size: 10px; }
.district-card .swatch { background: var(--district-fill, var(--state-unknown)); }
.reset-filter { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 750; white-space: nowrap; }
.reset-filter .icon { width: 15px; height: 15px; }

.site-footer { color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 15px; min-height: 67px; padding-block: 12px; }
.footer-brand { color: var(--text); font-size: 19px; font-weight: 800; letter-spacing: -.07em; }
.footer-inner a { margin-inline-start: auto; font-weight: 750; text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }
.footer-inner .icon { width: 14px; height: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-inline-start: auto; }
.footer-links a { margin-inline-start: 0; }
.prose { padding-block: 36px 56px; }
.prose h1 { margin-bottom: 16px; font-size: clamp(38px, 6vw, 72px); font-weight: 800; line-height: 1.05; letter-spacing: -.07em; }
.prose h2 { margin-top: 32px; font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.prose p { max-width: 75ch; }
.prose a:hover { color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; text-align: left; }
.prose :is(td, th) { padding: 9px; border-bottom: 1px solid var(--line); }

@media (max-width: 1050px) {
  .container.atlas { width: calc(100% - 26px); }
  .container { width: min(100% - 52px, 1360px); }
  .atlas-grid { gap: 12px; }
  .intro { gap: 25px; }
}

@media (max-width: 780px) {
  .container.atlas { width: calc(100% - 17px); }
  .container { width: calc(100% - 34px); }
  .topbar-inner { min-height: 62px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .intro h1 { font-size: clamp(21.5px, 4.7vw, 37px); }
  .overview { grid-template-columns: repeat(2, 1fr) minmax(0, 1.45fr); }
  .overview > .overview-time { grid-column: auto; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-start; padding: 12px 0 8px 13px; border-top: 0; border-left: 1px solid var(--line); }
  .atlas-grid { grid-template-columns: minmax(0, 1fr); }
  .map-stage { height: clamp(260px, 63vw, 465px); }
  .district-label { font-size: 19px; }
  .directory-body { max-height: 265px; contain: none; }
  .district-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .container.atlas { width: calc(100% - 12px); }
  .container { width: calc(100% - 24px); }
  .atlas { padding-block-start: 23px; }
  .topbar-inner { gap: 8px; }
  .brand { gap: 7px; font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .main-nav { gap: 1px; }
  .main-nav a { padding-inline: 6px; font-size: 12px; }
  .main-nav .icon { display: none; }
  .overview > div + div:not(.overview-time) { padding-left: 9px; }
  .overview > .overview-time { padding-left: 8px; }
  .overview dt, .overview-time dd { font-size: 10px; }
  .overview-time .icon { display: none; }
  .map-heading, .panel-top { padding-inline: 11px; }
  .select-frame select { width: 144px; }
  .map-stage { height: clamp(235px, 65vw, 310px); }
  .map-tools { right: 7px; bottom: 7px; }
  .map-legend { padding-inline: 11px; }
  .footer-links { margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

#map-capitals { pointer-events: none; }
#map-capitals circle { fill: #554b45; }
#map-capitals text { font: 11px var(--sans); fill: #302f28; paint-order: stroke; stroke: #fff8ef; stroke-width: 2.5px; }
