/* Atlas Psi: ivory + pine, cartographic. Tokens first, then layout, then components. */
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-stretch: 75% 100%; 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; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-standard-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; 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; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-ext-standard-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-standard-italic.woff2") format("woff2-variations"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --ivory: #F6F2E9;
  --paper: #FFFDF8;
  --ink: #14211B;
  --ink-2: #4A574F;
  --ink-3: #6F7A72;
  --line: #E1D9C8;
  --line-2: #CFC6B3;
  --pine: #1E4D3A;
  --pine-ink: #FFFDF8;
  --pine-soft: #E3ECE4;
  --clay: #B4532F;
  --clay-soft: #F4E3D8;
  --sea: #ECE6D9;
  --land: #DDD5C4;
  --grat: #CFC5B0;
  --r1: #C9DCCB; --r2: #9CC2A6; --r3: #5E957A; --r4: #2F6A51; --r5: #1E4D3A;
  --bubble: #1E4D3A; --bubble-ink: #FFFDF8;
  --shadow: 0 1px 0 rgba(20, 33, 27, .04), 0 12px 32px -18px rgba(20, 33, 27, .35);
  --sans: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --head-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ivory: #0D1511;
  --paper: #142019;
  --ink: #ECE6D8;
  --ink-2: #B9B6A9;
  --ink-3: #8E9188;
  --line: #24332B;
  --line-2: #33473C;
  --pine: #86C3A2;
  --pine-ink: #0D1511;
  --pine-soft: #1A2C23;
  --clay: #E38B62;
  --clay-soft: #2E1F18;
  --sea: #101C16;
  --land: #26342C;
  --grat: #22332A;
  --r1: #2A4537; --r2: #36604A; --r3: #4F8467; --r4: #6EA888; --r5: #9BD3B4;
  --bubble: #ECE6D8; --bubble-ink: #0D1511;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 16px 40px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  font-optical-sizing: auto;
  transition: background-color .3s ease, color .3s ease;
}
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--pine); color: var(--pine-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 10px; }
.wrap { width: min(1320px, 100%); margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30; height: var(--head-h);
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-weight: 680; font-stretch: 88%; font-size: 21px; letter-spacing: -.01em; }
.site-nav { display: flex; gap: 4px; margin-left: 8px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.site-nav a:hover { color: var(--ink); background: var(--pine-soft); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-link { font-size: 14px; font-weight: 560; color: var(--ink-2); text-decoration: none; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-link:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.theme-seg button { width: 32px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 999px; color: var(--ink-3); }
.theme-seg button svg { width: 16px; height: 16px; }
.theme-seg button[aria-pressed="true"] { background: var(--pine); color: var(--pine-ink); }
@media (max-width: 860px) { .site-nav { display: none; } }

/* ---------- explorer (hero) ---------- */
.explorer { --stage-h: min(calc(100svh - var(--head-h) - 40px), 820px); padding-block: 18px 36px; }
.explorer .wrap { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 32px; align-items: start; }
.ex-side { position: relative; padding: 6px 6px 6px 0; }
.ex-side.scroll { max-height: var(--stage-h); overflow: auto; scrollbar-width: thin; }
.ex-map { position: sticky; top: calc(var(--head-h) + 12px); }

.intro .h1 {
  font-weight: 640; font-stretch: 84%; font-size: clamp(2.3rem, 3.9vw, 3.7rem);
  line-height: .98; letter-spacing: -.025em; margin: 18px 0 18px; text-wrap: balance;
}
.intro .lede { font-family: var(--serif); font-size: 19px; line-height: 1.55; color: var(--ink-2); margin: 0 0 24px; max-width: 34em; text-wrap: pretty; }

.search { position: relative; }
.search label { display: block; font-size: 14px; font-weight: 560; margin-bottom: 8px; color: var(--ink-2); }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 56px; padding: 0 16px 0 48px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--paper); font-size: 17px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pine) 18%, transparent); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.suggest li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--pine-soft); }
.suggest .s-main { font-family: var(--serif); font-size: 16.5px; line-height: 1.3; }
.suggest .s-sub { grid-column: 1; font-size: 13px; color: var(--ink-3); }
.suggest .s-kind { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12.5px; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 7px 13px;
  font-size: 14.5px; color: var(--ink-2); transition: background-color .15s, color .15s, border-color .15s;
}
.chip em { font-style: normal; color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--pine-ink); }
.chip[aria-pressed="true"] em { color: inherit; opacity: .75; }

.more-filters { margin-top: 12px; }
.more-filters summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink-2); padding: 6px 2px; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary svg { width: 14px; height: 14px; transition: transform .2s; }
.more-filters[open] summary svg { transform: rotate(180deg); }
.mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0 4px; }
.mf-grid label { display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.mf-grid select { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--paper); padding: 0 10px; }
.toggle { grid-column: 1 / -1; display: flex !important; grid-template-columns: none; align-items: center; gap: 10px !important; cursor: pointer; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; margin: 0; flex: none; transition: background .2s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); transition: transform .2s; }
.toggle input:checked { background: var(--pine); }
.toggle input:checked::after { transform: translateX(16px); }

.result-line { margin: 18px 0 0; font-size: 15px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.result-line b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--pine); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* pinned APDA card in the hero */
.pinned {
  margin-top: 28px; padding: 18px 18px 18px 16px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px;
}
.pinned .pin-ico { grid-row: 1 / span 3; width: 26px; height: 34px; color: var(--clay); margin-top: 2px; }
.pinned .p-label { font-size: 13px; color: var(--clay); font-weight: 600; }
.pinned h2 { margin: 0; font-family: var(--serif); font-weight: 520; font-size: 21px; line-height: 1.22; }
.pinned p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-2); }
.pinned .p-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 560; text-decoration: none; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 15px; height: 15px; }
.btn-pine { background: var(--pine); color: var(--pine-ink); }
.btn-pine:hover { background: color-mix(in srgb, var(--pine) 86%, var(--ink)); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink-3); }
.btn-clay { background: var(--clay); color: #FFFDF8; }
:root[data-theme="dark"] .btn-clay { color: #0D1511; }

/* ---------- map ---------- */
.stage {
  position: relative; height: var(--stage-h); border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--paper) 70%, var(--ivory)) 0%, var(--ivory) 70%);
  border: 1px solid var(--line);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.stage.flat { touch-action: none; }
#map { width: 100%; height: 100%; display: block; cursor: grab; }
#map.dragging { cursor: grabbing; }
#map .sphere { fill: var(--sea); }
#map .sphere-edge { fill: none; stroke: var(--line-2); stroke-width: 1; }
#map .grat { fill: none; stroke: var(--grat); stroke-width: .7; stroke-dasharray: 1.5 3.5; stroke-linecap: round; }
#map .c { fill: var(--land); stroke: var(--ivory); stroke-width: .5; transition: fill .25s; }
#map .c.b1 { fill: var(--r1); } #map .c.b2 { fill: var(--r2); } #map .c.b3 { fill: var(--r3); } #map .c.b4 { fill: var(--r4); } #map .c.b5 { fill: var(--r5); }
#map .c.lo { fill: url(#hatch); }
#map .c:hover { filter: brightness(.94); }
:root[data-theme="dark"] #map .c:hover { filter: brightness(1.25); }
#map .c.sel { stroke: var(--ink); stroke-width: 1.4; }
#map .bub { cursor: pointer; }
#map .bub circle { fill: var(--bubble); stroke: var(--ivory); stroke-width: 1.5; transition: r .25s; }
#map .bub .ring { fill: none; stroke: var(--bubble); stroke-width: 1.2; stroke-dasharray: 2 2.5; opacity: .8; }
#map .bub text { fill: var(--bubble-ink); font-family: var(--sans); font-weight: 650; font-stretch: 85%; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-variant-numeric: tabular-nums; }
#map .bub.sel circle:not(.ring) { stroke: var(--ink); stroke-width: 3; }
#map .bub:hover circle { stroke-width: 2.5; }
#map .apda { cursor: pointer; }
#map .apda .pin-body { fill: var(--clay); stroke: var(--ivory); stroke-width: 1.4; }
#map .apda .pin-dot { fill: var(--ivory); }
#map .apda .pulse { fill: none; stroke: var(--clay); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; }
#map .apda .tag rect { fill: var(--ink); }
#map .apda .tag text { fill: var(--ivory); font-family: var(--sans); font-weight: 600; font-size: 12px; dominant-baseline: central; }
#map .apda.drop .pin-g { animation: drop .7s cubic-bezier(.2, 1.4, .4, 1) both; transform-box: fill-box; transform-origin: bottom center; }
#map .apda.pre { opacity: 0; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes drop { 0% { transform: translateY(-40px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #map .apda .pulse { animation: none; opacity: 0; } #map .apda.drop .pin-g { animation: none; } }

.map-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.seg { display: inline-flex; padding: 3px; background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); font-weight: 540; }
.seg button[aria-pressed="true"] { background: var(--pine); color: var(--pine-ink); }
.regions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: nowrap; }
.regions button { border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.regions button:hover { color: var(--ink); border-color: var(--line-2); }
.regions button[aria-pressed="true"] { color: var(--pine); border-color: var(--pine); }
.zoom { position: absolute; right: 14px; bottom: 14px; display: grid; gap: 6px; }
.zoom button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.zoom button svg { width: 18px; height: 18px; }
.legend { position: absolute; left: 14px; bottom: 14px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); display: grid; gap: 6px; }
.legend .ramp { display: flex; align-items: center; gap: 4px; }
.legend .ramp i { width: 22px; height: 10px; border-radius: 3px; display: block; }
.legend .ramp span { font-variant-numeric: tabular-nums; }
.legend .lg-apda { display: flex; align-items: center; gap: 6px; }
.legend .lg-apda svg { width: 12px; height: 16px; color: var(--clay); }
.tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); background: var(--ink); color: var(--ivory); padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.35; white-space: nowrap; box-shadow: var(--shadow); }
.tip b { display: block; font-family: var(--serif); font-weight: 560; font-size: 16px; }
.hint { position: absolute; inset: auto 0 72px; margin: auto; width: max-content; max-width: 90%; background: var(--ink); color: var(--ivory); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; opacity: 0; transition: opacity .25s; pointer-events: none; }
.hint.on { opacity: .92; }

/* ---------- country panel ---------- */
.panel[hidden], .intro[hidden] { display: none; }
.panel { animation: panelIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes panelIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
.p-head { position: sticky; top: 0; z-index: 2; background: var(--ivory); padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; color: var(--ink-2); font-size: 14.5px; }
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--ink); }
.p-head h1, .p-head h2 { margin: 4px 0 4px; font-family: var(--serif); font-weight: 480; font-size: clamp(2rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.01em; }
.p-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.p-head .p-share { margin-top: 8px; font-size: 14px; }
.plist { list-style: none; margin: 0; padding: 0; }
.prog { padding: 18px 0 18px 16px; border-bottom: 1px solid var(--line); position: relative; }
.prog::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 3px; background: var(--lv, var(--r3)); }
.prog.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--pine-soft); } 100% { background: transparent; } }
.prog .lv { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.prog .lv strong { color: var(--ink-2); font-weight: 600; }
.prog h3 { margin: 4px 0 2px; font-family: var(--serif); font-weight: 540; font-size: 19.5px; line-height: 1.25; text-wrap: pretty; }
.prog .en { margin: 0 0 4px; font-family: var(--serif); font-style: italic; color: var(--ink-3); font-size: 15px; }
.prog .inst { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.prog dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 10px 0 0; font-size: 14px; }
.prog dt { color: var(--ink-3); }
.prog dd { margin: 0; color: var(--ink); }
.prog details { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.prog summary { cursor: pointer; color: var(--ink-3); }
.prog details p { margin: 6px 0 0; line-height: 1.5; }
.prog .src { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14.5px; font-weight: 560; }
.prog .src svg { width: 14px; height: 14px; }
.prog .src small { color: var(--ink-3); font-weight: 400; }
.prog.featured { background: color-mix(in srgb, var(--clay-soft) 60%, transparent); border-radius: 0 14px 14px 0; border-bottom-color: transparent; margin-bottom: 1px; }
.prog.featured::before { background: var(--clay); top: 0; bottom: 0; }
.prog .feat { color: var(--clay); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.prog .feat svg { width: 10px; height: 13px; }
.prog.lead::before { background: repeating-linear-gradient(180deg, var(--ink-3) 0 3px, transparent 3px 6px); }
.leads-box { margin-top: 18px; }
.leads-box > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 10px 0; }
.empty { font-family: var(--serif); font-size: 17px; color: var(--ink-2); padding: 20px 0; }

/* ---------- APDA section ---------- */
.apda-sec { background: var(--pine); color: var(--pine-ink); padding-block: 72px; position: relative; overflow: hidden; }
:root[data-theme="dark"] .apda-sec { background: #12241B; color: var(--ink); }
.apda-sec .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; position: relative; }
.apda-sec .a-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #F2B79A; }
:root[data-theme="dark"] .apda-sec .a-label { color: var(--clay); }
.apda-sec .a-label svg { width: 12px; height: 16px; }
.apda-sec h2 { font-weight: 640; font-stretch: 84%; font-size: clamp(2.1rem, 3.6vw, 3.3rem); line-height: 1; letter-spacing: -.02em; margin: 14px 0 12px; text-wrap: balance; }
.apda-sec .a-meta { margin: 0; opacity: .78; font-size: 16px; }
.apda-sec blockquote { margin: 28px 0 0; padding: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.35; font-style: italic; max-width: 26em; }
.apda-sec blockquote footer { margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 14px; opacity: .72; }
.a-flag { background: color-mix(in srgb, var(--ivory) 8%, transparent); border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 22px; padding: 24px; }
.a-flag .a-k { font-size: 14px; opacity: .75; margin: 0; }
.a-flag h3 { font-family: var(--serif); font-weight: 520; font-size: 24px; line-height: 1.2; margin: 6px 0 14px; }
.a-flag dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 20px; font-size: 15px; }
.a-flag dt { opacity: .7; }
.a-flag dd { margin: 0; }
.a-flag .btn-line { color: inherit; border-color: color-mix(in srgb, currentColor 40%, transparent); }
.a-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 28px; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); font-size: 15px; }
.a-links a { color: inherit; opacity: .9; }
.a-note { grid-column: 1 / -1; margin: 0; font-size: 13.5px; opacity: .65; max-width: 60em; }
.apda-sec .meridians { position: absolute; right: -120px; top: -80px; width: 520px; height: 520px; opacity: .09; pointer-events: none; color: currentColor; }

/* ---------- directory ---------- */
.dir { padding-block: 80px 40px; }
.sec-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: end; margin-bottom: 28px; }
.sec-head h2 { margin: 0; font-weight: 640; font-stretch: 84%; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -.02em; }
.sec-head p { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--ink-2); grid-column: 1; max-width: 40em; }
.sec-head .result-line { grid-column: 2; grid-row: 1 / span 2; margin: 0; justify-content: flex-end; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 36px; padding: 0; list-style: none; }
.jump a { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 14px; }
.jump a:hover { border-color: var(--pine); color: var(--pine); }
.jump a span { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: 4px; }
.region { margin-top: 48px; }
.region > h3 { font-weight: 600; font-stretch: 90%; font-size: 15px; color: var(--ink-3); margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.ctry { display: grid; grid-template-columns: minmax(180px, 3fr) 9fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ctry > h4 { margin: 0; font-family: var(--serif); font-weight: 480; font-size: 26px; line-height: 1.1; }
.ctry > h4 a { color: var(--ink); text-decoration: none; }
.ctry > h4 a:hover { color: var(--pine); }
.ctry > h4 small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; padding: 10px 12px; margin-inline: -12px; border-radius: 12px; }
.row:hover { background: var(--paper); }
.row a.r-name { font-family: var(--serif); font-size: 17.5px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.row a.r-name:hover { color: var(--pine); text-decoration: underline; }
.row .r-inst { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.row .r-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.row .r-meta b { display: block; color: var(--ink-2); font-weight: 560; }
.row.featured { background: color-mix(in srgb, var(--clay-soft) 60%, transparent); }
.row.featured .r-inst::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); margin-right: 7px; vertical-align: 1px; }
.dir-empty { font-family: var(--serif); font-size: 19px; color: var(--ink-2); padding: 24px 0; }

/* ---------- method ---------- */
.method { padding-block: 64px 80px; border-top: 1px solid var(--line); }
.method .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 8px; }
.method h3 { margin: 0 0 8px; font-weight: 620; font-stretch: 90%; font-size: 19px; }
.method p, .method li { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.method p { margin: 0 0 12px; }
.method ul { margin: 0; padding-left: 18px; }
.cta-box { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 26px 28px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.cta-box p { margin: 0; font-family: var(--serif); font-size: 18px; flex: 1 1 320px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 36px 48px; font-size: 14px; color: var(--ink-3); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
.site-foot .brand b { font-size: 17px; }
.site-foot .brand svg { width: 26px; height: 26px; }
.site-foot a { color: var(--ink-2); }
.site-foot .f-dedic { flex: 1 1 360px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .explorer .wrap { grid-template-columns: 1fr; gap: 20px; }
  .explorer { --stage-h: min(78vw, 560px); }
  .ex-side, .ex-side.scroll { max-height: none; overflow: visible; padding: 0; display: contents; }
  .intro { display: contents; }
  .intro[hidden] { display: none; }
  .intro .h1 { order: 1; margin: 8px 0 0; }
  .intro .lede { order: 2; margin: 0; }
  .ex-map { order: 3; position: relative; top: 0; }
  .search { order: 4; }
  .chips { order: 5; margin-top: -6px; }
  .more-filters { order: 6; margin-top: -12px; }
  .result-line#result { order: 7; margin-top: -8px; }
  .panel { order: 8; scroll-margin-top: calc(var(--head-h) + 8px); }
  .pinned-wrap { order: 9; }
  .pinned { margin-top: 0; }
  .regions button:nth-child(n+4) { display: none; }
  .apda-sec .wrap { grid-template-columns: 1fr; gap: 32px; }
  .method .cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .explorer { --stage-h: 108vw; padding-top: 6px; }
  .explorer .wrap { gap: 16px; }
  .intro .h1 { font-size: 2.15rem; }
  .intro .lede { font-size: 16.5px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .search label { font-size: 13.5px; }
  .stage { border-radius: 22px; }
  .intro .h1 { margin-top: 10px; }
  .regions { display: none; }
  .legend { font-size: 11.5px; padding: 8px 10px; }
  .legend .lg-apda { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .result-line { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .ctry { grid-template-columns: 1fr; gap: 10px; }
  .row { grid-template-columns: 1fr; }
  .row .r-meta { grid-column: 1; grid-row: auto; text-align: left; white-space: normal; }
  .row .r-meta b { display: inline; margin-right: 8px; }
  .mf-grid { grid-template-columns: 1fr; }
  .head-tools .lang-link { padding: 6px 9px; }
  .brand b { font-size: 19px; }
}
@media print { .site-head, .ex-map, .pinned-wrap, .search, .chips, .more-filters { display: none; } }
