/* /regional: the regional-names map and chart, in the dark look of the v3 homepage (colours and fonts from public/v3/v3.css) */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin.woff2) format('woff2'); 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; }
@font-face { font-family: 'Karla'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/karla-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Karla'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/karla-latin.woff2) format('woff2'); 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 { --panel: #0b0b0d; --line: #2a2b31; --ink: #eeeef0; --dim: #8f9099; --gold: #f1c56b;
  --names: 'Cormorant Garamond', Georgia, serif; --ui: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
* { box-sizing: border-box; }
html { background: #000; color: var(--ink); font: 16px/1.55 var(--ui); }
body { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: inherit; text-underline-offset: 2px; }
main { max-width: 960px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 20px 48px; }
header a { color: var(--dim); text-decoration: none; font-size: 14px; }
header a:hover { color: var(--ink); }
h1 { font: 500 44px/1.08 var(--names); margin: 14px 0 22px; letter-spacing: -.01em; }
h2 { font: 500 30px/1.15 var(--names); margin: 0 0 12px; }
p { margin: 0 0 14px; max-width: 680px; }

.presets { list-style: none; padding: 0; margin: 0 0 32px; max-width: 680px; }
.presets li { padding: 7px 0; border-top: 1px solid var(--line); color: var(--dim); }
.presets button { margin-left: 6px; padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); }
.presets button:hover { border-color: var(--dim); }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px; margin-bottom: 8px; }
.ctl { width: 240px; text-align: center; }
.ctl .lab { font-size: 12px; color: var(--dim); }
.ctl .val { display: flex; justify-content: center; align-items: center; gap: 14px; }
.ctl output { font: 500 30px/1.2 var(--names); min-width: 70px; font-variant-numeric: lining-nums tabular-nums; }
.ctl .val button { font-size: 11px; color: var(--dim); padding: 4px 6px; }
.ctl .val button:hover { color: var(--ink); }
.ctl .val button:disabled { opacity: .25; cursor: default; }
.ctl .ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); }
input[type=range] { width: 100%; margin: 4px 0 0; accent-color: var(--ink); background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%; background: var(--ink); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 20px; }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); }

.err { color: #ff7d5a; text-align: center; margin: 8px auto; }
#map { position: relative; padding: 0 8%; }
#map svg { display: block; width: 100%; height: auto; }
#map path { stroke: #000; stroke-width: .7; cursor: pointer; transition: opacity .15s; }
#map.focusing path { opacity: .25; }
#map.focusing path.on { opacity: 1; }

/* region boxes: floating over the map on wide screens, one box under it on phones */
.box { background: rgba(11, 11, 13, .9); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--dim)); border-radius: 6px; padding: 5px 8px; font-size: 12px; line-height: 1.35; }
.box b { display: block; font-weight: 500; font-size: 11px; color: var(--c); margin-bottom: 2px; white-space: nowrap; }
.box .nm { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; }
.box .nm:hover span:first-child { text-decoration: underline; text-underline-offset: 2px; }
.box .nm .r { color: var(--dim); font-variant-numeric: tabular-nums; }
.box em { color: var(--dim); font-size: 11px; }
#map .box { position: absolute; width: 132px; }
#panel, .hint { display: none; }

#chartview { margin-top: 44px; }
#find { display: flex; gap: 8px; max-width: 360px; margin-bottom: 10px; }
#q { flex: 1; min-width: 0; font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
#q:focus { outline: none; border-color: var(--dim); }
#find button { padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
#find button:hover { border-color: var(--dim); }
.readout { min-height: 1.55em; color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums; max-width: none; }
.readout b { color: var(--ink); font-weight: 500; }
.readout a { color: var(--dim); white-space: nowrap; }
#chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
#chart text { font: 11px var(--ui); fill: var(--dim); }
#chart .s path { fill: none; stroke-width: 2; stroke-linejoin: round; transition: opacity .15s; }
#chart.focusing .s path { opacity: .15; }
#chart.focusing .s.on path { opacity: 1; stroke-width: 2.6; }
#chart .note { font: italic 500 19px var(--names); fill: var(--dim); }
#legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 8px; font-size: 13px; }
#legend button { display: flex; align-items: center; gap: 6px; color: var(--dim); transition: opacity .15s; }
#legend button i { width: 12px; height: 3px; border-radius: 2px; }
#legend button:hover, #legend button[aria-pressed=true] { color: var(--ink); }
#legend.focusing button:not(.on) { opacity: .35; }
.foot { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); max-width: none; }

@media (max-width: 768px) {
  h1 { font-size: 34px; }
  #map { padding: 0; }
  #map .box { display: none; }
  #panel { display: block; margin-top: 8px; font-size: 15px; padding: 8px 12px; }
  #panel b { font-size: 13px; }
  #panel .nm { padding: 3px 0; }
  .hint { display: block; text-align: center; font-size: 12px; color: var(--dim); margin: 4px auto 0; }
  .ctl { width: 100%; max-width: 320px; }
}
