@font-face {
    font-family: Figtree;
    src: url('fonts/figtree-variable.ttf') format('truetype');
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --font: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --heading: Georgia, 'Times New Roman', serif;
    --wrap: 1240px;
    --gutter: clamp(18px, 3vw, 32px);
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 12px;
    --bg: #F7F6F2;
    --surface: #FFFFFF;
    --surface-2: #EEEFF0;
    --ink: #182534;
    --ink-2: #526173;
    --line: #DCE1E6;
    --line-strong: #B7C2CF;
    --control-line: #788493;
    --primary: #315CD5;
    --primary-hover: #2349B7;
    --primary-ink: #FFFFFF;
    --button-bg: #315CD5;
    --button-line: #315CD5;
    --button-hover: #2349B7;
    --button-ink: #FFFFFF;
    --tint: #EBF0FC;
    --tint-ink: #284BAA;
    --map-fill: #9BB7CF;
    --map-stroke: #F7F6F2;
    --shadow: 0 2px 8px rgb(24 37 52 / 7%);
    --paper-shadow: 0 3px 12px rgb(24 37 52 / 12%);
}

[data-theme='dark'] {
    color-scheme: dark;
    --bg: #111923;
    --surface: #1B2634;
    --surface-2: #223041;
    --ink: #F4F5F7;
    --ink-2: #BCC9D9;
    --line: #354558;
    --line-strong: #586E86;
    --control-line: #8092A8;
    --primary: #89AEFF;
    --primary-hover: #B1CAFF;
    --primary-ink: #111923;
    --button-bg: #315CD5;
    --button-line: #89AEFF;
    --button-hover: #3D6AE7;
    --button-ink: #FFFFFF;
    --tint: #22344E;
    --tint-ink: #A6C3FF;
    --map-fill: #547797;
    --map-stroke: #111923;
    --shadow: 0 2px 8px rgb(0 0 0 / 15%);
    --paper-shadow: 0 3px 12px rgb(0 0 0 / 22%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a, button, input, select, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--heading); font-weight: 700; line-height: 1.15; letter-spacing: -.035em; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 2.65vw, 2rem); }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button, fieldset, figure { margin: 0; }
button, input, select { border-radius: var(--r-sm); }
fieldset { min-width: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.muted, .coord { color: var(--ink-2); }
.lead { max-width: 58ch; color: var(--ink-2); font-size: 1.125rem; line-height: 1.6; }
.textlink, .section-link, .back-link { color: var(--primary); font-weight: 600; }
.section-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .9375rem; text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); background: var(--surface-2); }
.btn-primary { border-color: var(--button-line); background: var(--button-bg); color: var(--button-ink); }
.btn-primary:hover { border-color: var(--button-line); background: var(--button-hover); }
.btn:active, .icon-btn:active, .menu-btn:active { transform: translateY(1px); }
.field { width: 100%; min-height: 46px; border: 1px solid var(--control-line); padding: 10px 12px; background: var(--surface); border-radius: var(--r-sm); font-size: 1rem; }
.field::placeholder, .search-row input::placeholder { color: var(--ink-2); opacity: 1; }
.flabel { display: block; padding: 0; margin-bottom: 8px; font-size: .9375rem; font-weight: 650; }
.hint { font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.hint a, .note a, .source a, .body a:not(.btn) { color: var(--primary); }

.site-head { position: relative; z-index: 30; border-bottom: 1px solid var(--line); background: var(--bg); }
.head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 68px; padding-block: 10px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-size: clamp(1.35rem, 2.1vw, 1.65rem); font-weight: 850; line-height: 1; letter-spacing: -.065em; text-decoration: none; }
.head-row > .wordmark { margin-right: auto; max-width: calc(100% - 142px); overflow-wrap: anywhere; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; order: 4; padding-bottom: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: 6px; color: var(--ink); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current='page'] { color: var(--primary); text-decoration: underline; text-underline-offset: .5em; font-weight: 650; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid transparent; background: transparent; color: var(--primary); border-radius: var(--r-sm); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg, .menu-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
[data-theme='dark'] .theme-btn .sun { display: none; }
[data-theme='dark'] .theme-btn .moon { display: block; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding-inline: 10px; border: 1px solid var(--control-line); background: var(--surface); font-size: .875rem; font-weight: 600; }
.menu-btn:hover { border-color: var(--ink); }
.nav-enhanced .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; padding: 10px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.nav-enhanced .nav.open { display: flex; }
.nav-enhanced .nav a { min-height: 48px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 20px; padding-block: 30px 24px; }
.hero-copy { min-width: 0; }
.hero h1 { max-width: 18ch; }
.hero .lead { margin-top: 14px; color: var(--ink); }
.search { width: 100%; margin-top: 24px; max-width: 590px; }
.search label:not(.sr-only) { display: block; margin-bottom: 9px; font-size: .9375rem; font-weight: 650; }
.search-row { display: flex; align-items: center; gap: 5px; min-height: 52px; padding: 4px; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface); }
.search-row > svg { width: 20px; height: 20px; margin-left: 10px; flex-shrink: 0; color: var(--ink-2); }
.search-row input { width: 100%; flex: 1; min-width: 0; min-height: 44px; padding: 8px 5px; border: 0; background: transparent; font-size: .9375rem; }
.search-row input:focus { outline: none; }
.search-row:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; }
.search-row .btn { flex-shrink: 0; padding-inline: 17px; border-radius: 5px; font-size: .9375rem; }
.search .hint { margin-top: 8px; }
.hero-map { display: flex; align-items: center; justify-content: center; height: 160px; min-width: 0; }
.hero-map .atlas-map { width: 100%; height: 100%; }
.atlas-land { fill: var(--map-fill); stroke: var(--map-stroke); stroke-width: .6; stroke-linejoin: round; }
.subject-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subject-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 0 8px; }
.subject-nav > a, .more-subjects > summary { display: flex; align-items: center; justify-content: flex-start; min-height: 46px; padding: 9px 6px; font-size: .875rem; text-decoration: none; }
.subject-nav > a:hover, .more-subjects > summary:hover { color: var(--primary); background: var(--surface-2); }
.more-subjects { position: relative; grid-column: 1 / -1; }
.more-subjects > summary { gap: 7px; list-style: none; }
.more-subjects > summary::-webkit-details-marker { display: none; }
.more-subjects > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.more-subjects[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.subject-extra { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; gap: 3px; width: min(22rem, calc(100vw - 36px)); padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.subject-extra a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 10px; border-radius: 5px; text-decoration: none; font-size: .9375rem; }
.subject-extra a:hover { background: var(--tint); color: var(--primary); }
.subject-extra small { color: var(--ink-2); font-size: .8125rem; }

.home-content { padding-block: 24px 28px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.section-head > div { min-width: 0; }
.section-head p { max-width: 58ch; margin-top: 8px; color: var(--ink-2); }
.section { padding-block: 38px; }
.section-follow { padding-top: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.grid > * { min-width: 0; }
.resource-card-wrap { display: flex; min-width: 0; }
.card { display: flex; flex-direction: column; gap: 5px; width: 100%; min-width: 0; padding: 10px 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; transition: border-color .15s; }
.card:hover { border-color: var(--primary); }
.card > *:not(.sheet) { padding-inline: 3px; }
.card .sheet { margin-bottom: 6px; }
.card h3 { font-size: 1.125rem; }
.card-type { color: var(--tint-ink); font-size: .875rem; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; padding-top: 3px; margin-top: auto; color: var(--ink-2); font-size: .8125rem; }
.sheet { position: relative; display: grid; place-items: center; aspect-ratio: 800 / 560; min-width: 0; overflow: hidden; border: 1px solid #C9D2DD; border-radius: 3px; background: #FFFFFF; color-scheme: light; }
.sheet img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.sheet-msg { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 14px; background: #F0F3F7; color: #3B4B5F; font-size: .875rem; line-height: 1.45; text-align: center; }
.sheet.preview-error img { visibility: hidden; }
.home-continents { margin-top: 28px; }
.conts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cont { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-align: center; text-decoration: none; }
.cont:hover { border-color: var(--primary); }
.continent-map { display: grid; place-items: center; width: 100%; height: 96px; min-width: 0; }
.continent-map .atlas-map { width: 100%; height: 100%; }
.continent-map .atlas-land { fill: var(--map-fill); stroke: none; }
[data-theme='dark'] .continent-map .atlas-land { fill: #89AEFF; }
.cont strong { font-size: .875rem; font-weight: 600; line-height: 1.3; }
.pack-feature { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.pack-sheets { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px 5px; }
.pack-sheet { flex: 1 1 0; min-width: 0; box-shadow: var(--paper-shadow); }
.pack-sheet:nth-child(1) { transform: rotate(-5deg); }
.pack-sheet:nth-child(3) { transform: rotate(4deg); }
.pack-copy { min-width: 0; }
.pack-copy h2 { font-size: clamp(1.45rem, 2.3vw, 1.85rem); }
.pack-copy p { margin-top: 9px; color: var(--ink-2); }
.pack-copy .btn { margin-top: 17px; }

.page-head { padding-block: 32px 24px; }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.125rem); }
.page-head .lead { margin-top: 12px; }
.page-head .intro-more { max-width: 62ch; margin-top: 10px; color: var(--ink-2); line-height: 1.6; }
.crumbs { display: flex; flex-wrap: wrap; gap: 3px 8px; padding: 0; margin: 0 0 16px; list-style: none; color: var(--ink-2); font-size: .875rem; }
.crumbs li { min-width: 0; overflow-wrap: anywhere; }
.crumbs li + li::before { content: '›'; margin-right: 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.crumbs li[aria-current] { align-content: center; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.lib { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 4px 56px; }
.lib > section { min-width: 0; }
.filters-toggle { justify-self: start; }
.filters { display: flex; flex-direction: column; gap: 22px; align-self: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.filters.enhanced:not(.open) { display: none; }
.filters fieldset { border: 0; padding: 0; }
.filters legend { display: block; padding: 0; margin-bottom: 8px; font-size: .9375rem; font-weight: 650; }
.radio-list { display: grid; gap: 2px; }
.radio-list label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px; border-radius: 5px; font-size: .875rem; line-height: 1.4; cursor: pointer; }
.radio-list label:hover { background: var(--surface-2); }
.radio-list label:has(input:checked) { background: var(--tint); color: var(--tint-ink); font-weight: 600; }
.radio-list input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.level { display: inline-flex; align-items: center; gap: 7px; }
.scale { display: inline-flex; flex-shrink: 0; gap: 3px; }
.scale i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--control-line); }
.scale[data-level='1'] i:nth-child(-n+1), .scale[data-level='2'] i:nth-child(-n+2), .scale[data-level='3'] i:nth-child(-n+3) { background: var(--primary); }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.filter-actions .btn { width: 100%; }
.filter-actions > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-size: .875rem; font-weight: 600; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 44px; margin-bottom: 16px; }
.results-bar p { color: var(--ink-2); }
.results-bar strong { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--tint); color: var(--tint-ink); font-size: .875rem; font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.chip:hover { border-color: var(--primary); }
.chip svg { flex: none; width: 14px; height: 14px; }
.clear-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; color: var(--primary); font-size: .875rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; margin-top: 30px; }
.pager a, .pager [aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface); font-weight: 600; text-decoration: none; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager [aria-current='page'] { background: var(--button-bg); color: var(--button-ink); border-color: var(--button-line); }
.pager .gap { padding-inline: 3px; color: var(--ink-2); }
.state { display: grid; justify-items: center; gap: 14px; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; }
.state h2, .state h3 { font-size: 1.5rem; }
.state p { max-width: 50ch; color: var(--ink-2); }

.resource-crumbs { padding-top: 22px; }
.resource-crumbs .crumbs { margin-bottom: 0; }
.res { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 28px; padding-block: 18px 48px; }
.res-preview { min-width: 0; }
.neat { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.neat > .sheet { box-shadow: var(--paper-shadow); }
.res-preview figcaption { margin-top: 12px; color: var(--ink-2); font-size: .875rem; text-align: center; }
.res-body { min-width: 0; }
.res-type { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; margin-bottom: 8px; color: var(--primary); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.res-type:hover { text-decoration: underline; }
.res h1 { font-size: clamp(2rem, 3.2vw, 2.65rem); }
.res .lead { margin-top: 14px; font-size: 1.0625rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding-block: 16px; border-block: 1px solid var(--line); }
.facts > div { min-width: 0; }
.facts dt { color: var(--ink-2); font-size: .8125rem; }
.facts dd { margin: 5px 0 0; font-size: .9375rem; font-weight: 650; overflow-wrap: anywhere; }
.facts dd a { color: var(--primary); }
.dl { display: grid; gap: 18px; padding: 20px; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.dl h2 { margin-bottom: 6px; font-size: 1.5rem; }
.download-options { display: grid; gap: 18px; }
.download-options fieldset { padding: 0; border: 0; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px; border: 1px solid var(--control-line); border-radius: 6px; color: var(--ink-2); font-size: .9375rem; font-weight: 600; line-height: 1.3; text-align: center; }
.seg input:checked + span { background: var(--tint); color: var(--tint-ink); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.seg input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 3px; }
.download-options fieldset .hint { margin-top: 8px; }
.download-primary { width: 100%; min-height: 62px; flex-direction: column; gap: 3px; }
.download-primary small { font-size: .8125rem; font-weight: 400; }
.download-list { display: grid; gap: 10px; }
.download-link { display: grid; gap: 5px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--control-line); border-radius: var(--r-sm); text-decoration: none; }
.download-link:hover { border-color: var(--primary); background: var(--tint); }
.download-label { font-weight: 650; }
.download-description { color: var(--ink-2); font-size: .875rem; }
.prose-block { margin-top: 30px; }
.prose-block h2 { margin-bottom: 12px; font-size: 1.55rem; }
.prose-block p { color: var(--ink-2); }
.steps { display: grid; gap: 12px; padding-left: 24px; margin: 0; }
.steps li { padding-left: 4px; }
.steps li::marker { color: var(--primary); font-weight: 700; }
.ticks, .contents-list { display: grid; gap: 8px; padding-left: 23px; margin: 0; }
.ticks li::marker, .contents-list li::marker { color: var(--primary); }
.source { display: grid; gap: 9px; padding: 18px; margin-top: 30px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: .875rem; overflow-wrap: anywhere; }
.source strong { color: var(--ink); }
.source-links { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.data-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table caption { padding: 12px 14px; background: var(--surface-2); font-weight: 600; text-align: left; }
.data-table th, .data-table td { min-width: 6rem; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; overflow-wrap: break-word; }
.data-table th { font-weight: 650; background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: 0; }
.related-section { border-top: 1px solid var(--line); }

.country-content { padding-block: 8px 56px; }
.idx-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.index-search { display: flex; flex: 1 1 320px; align-items: end; gap: 8px; }
.index-search > div { flex: 1; min-width: 0; }
.idx-tools label { display: block; margin-bottom: 8px; font-size: .9375rem; font-weight: 650; }
.jump { display: flex; flex-wrap: wrap; gap: 5px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 6px; font-size: .875rem; font-weight: 600; text-decoration: none; }
.jump a:hover { background: var(--tint); color: var(--primary); }
.jump small { margin-left: 6px; color: var(--ink-2); font-weight: 400; }
.query-note { margin-top: 20px; color: var(--ink-2); }
.country-empty { margin-top: 28px; }
.cont-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.cont-sec h2 { font-size: 1.75rem; }
.cont-sec .muted { display: block; margin-top: 5px; font-size: .875rem; }
.cont-sec .side > a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--primary); font-size: .875rem; font-weight: 600; }
.clist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; list-style: none; padding: 0; margin: 0; }
.clist li { min-width: 0; }
.clist a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); line-height: 1.4; text-decoration: none; }
.clist a:hover { border-color: var(--primary); }
.clist a span:first-child { min-width: 0; overflow-wrap: anywhere; }
.clist a span:last-child { flex: none; color: var(--ink-2); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.country-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 20px; }
.country-head .count { justify-self: start; padding: 14px 20px; border-left: 1px solid var(--line-strong); color: var(--primary); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.country-head .count small { display: block; margin-top: 7px; color: var(--ink-2); font-size: .875rem; font-weight: 400; }
.country-content .grid { margin-top: 16px; }
.note { max-width: 84ch; padding: 18px; margin-top: 30px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: .9375rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; }

.guides-content { padding-block: 8px 56px; }
.toc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.toc a { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; }
.toc a:hover { border-color: var(--primary); }
.toc .num { color: var(--ink-2); font-size: .875rem; }
.toc .num b { margin-left: 3px; color: var(--primary); font-weight: 650; }
.toc h2 { font-size: 1.5rem; }
.toc p { color: var(--ink-2); font-size: .9375rem; }
.toc .go { margin-top: auto; padding-top: 6px; color: var(--primary); font-size: .9375rem; font-weight: 600; }
.article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 32px 64px; }
.article aside { align-self: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.article aside h2 { margin-bottom: 10px; font-family: var(--font); font-size: .9375rem; font-weight: 650; letter-spacing: 0; }
.article aside ol { display: grid; gap: 3px; list-style: none; padding: 0; margin: 0; font-size: .9375rem; }
.article aside a { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 44px; padding: 8px; border-radius: 5px; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.article aside a:hover { background: var(--surface-2); color: var(--primary); }
.article aside .back-link { display: inline-flex; padding-inline: 0; margin-top: 16px; color: var(--primary); }
.article .body { min-width: 0; max-width: 68ch; }
.body h1 { font-size: clamp(2rem, 4vw, 3.125rem); }
.body h2 { margin: 30px 0 12px; font-size: 1.65rem; }
.body p { margin-bottom: 14px; overflow-wrap: anywhere; }
.body > .lead { margin-top: 18px; }
.body section { scroll-margin-top: 24px; }
.body .btn { margin-top: 20px; }
.page-article { max-width: 860px; padding-block: 36px 64px; }
.page-article .body { max-width: 68ch; }
.lost { display: grid; justify-items: start; gap: 20px; padding-block: 48px 64px; }
.lost .search { width: 100%; margin-top: 4px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.site-foot { padding-block: 16px 20px; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.site-foot .wordmark { font-size: 1.1875rem; letter-spacing: -.055em; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); font-size: .8125rem; text-decoration: none; }
.foot-links a:hover { color: var(--primary); text-decoration: underline; }
.foot-bottom { padding-top: 8px; color: var(--ink-2); font-size: .75rem; }
.foot-tagline { margin-bottom: 4px; font-size: .8125rem; }

@media (min-width: 580px) {
    .grid, .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .conts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subject-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .more-subjects { grid-column: auto; }
    .subject-nav > a, .more-subjects > summary { justify-content: center; }
    .clist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .country-head { grid-template-columns: minmax(0, 1fr) auto; }
    .country-head .count { justify-self: end; }
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pack-feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
    .hero-map { height: 220px; }
}

@media (min-width: 761px) {
    .head-row { flex-wrap: nowrap; gap: 18px; padding-block: 0; }
    .head-row > .wordmark { max-width: 35%; }
    .nav, .nav-enhanced .nav { display: flex; position: static; width: auto; order: 0; flex-direction: row; flex-wrap: nowrap; margin-left: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .nav a, .nav-enhanced .nav a { min-height: 44px; padding-inline: 10px; white-space: nowrap; }
    .menu-btn, .nav-enhanced .menu-btn { display: none; }
    .hero { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 24px; padding-block: 30px; }
    .hero-map { height: auto; aspect-ratio: 960 / 440; }
    .hero .lead { font-size: 1.0625rem; }
    .hero-search { margin-top: 22px; }
    .subject-nav { display: flex; justify-content: space-between; gap: 4px; }
    .subject-nav > a, .more-subjects > summary { min-height: 48px; padding-inline: 8px; font-size: .8125rem; }
    .home-content { padding-top: 26px; }
    .cont-sec { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
    .cont-sec .clist { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
    .foot-links { justify-content: end; }
}

@media (min-width: 960px) {
    .grid, .toc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .conts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .hero { min-height: 320px; gap: 32px; }
    .hero-map { width: calc(100% + 12px); max-width: calc(100% + 12px); margin-left: -12px; }
    .hero h1 { max-width: 18ch; }
    .hero .lead { max-width: 48ch; }
    .subject-nav > a, .more-subjects > summary { padding-inline: 12px; font-size: .875rem; }
    .pack-feature { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 32px; padding: 20px 30px 20px 22px; }
    .pack-sheets { gap: 10px; }
    .pack-copy .btn { margin-top: 16px; }
    .lib { grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding-bottom: 72px; }
    .filters, .filters.enhanced:not(.open) { display: flex; position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow-y: auto; scrollbar-gutter: stable; }
    .filters-toggle { display: none; }
    .lib .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .res { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: 38px; padding-block: 24px 64px; }
    .res-preview { position: sticky; top: 24px; }
    .article { grid-template-columns: 225px minmax(0, 1fr); gap: 54px; padding-block: 42px 72px; }
    .article aside { position: sticky; top: 24px; padding: 0; border: 0; background: transparent; }
}

@media (min-width: 1180px) {
    .lib .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nav a, .nav-enhanced .nav a { padding-inline: 14px; }
    .hero .lead { font-size: 1.125rem; }
}

@media (max-width: 420px) {
    .head-row { gap: 6px; }
    .wordmark { font-size: 1.3rem; }
    .menu-btn { gap: 5px; padding-inline: 8px; }
    .search-row { gap: 2px; }
    .search-row > svg { width: 17px; height: 17px; margin-left: 7px; }
    .search-row input { padding-inline: 3px; font-size: .8125rem; }
    .search-row .btn { padding-inline: 12px; font-size: .875rem; }
    .index-search { flex-wrap: wrap; }
    .index-search > div { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .btn, .icon-btn, .menu-btn, .field, .seg span { border: 1px solid ButtonText; }
    .seg input:checked + span { outline: 2px solid Highlight; }
    .scale i { forced-color-adjust: none; }
    .atlas-land { fill: CanvasText; stroke: Canvas; }
}

/* Country map gallery and facts */
.map-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 8px 0 28px; }
.map-figure { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.map-image { display: block; overflow: hidden; border: 1px solid #C9D2DD; border-radius: 3px; background: #FFFFFF; aspect-ratio: 800 / 560; }
.map-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.map-figure figcaption { padding: 10px 2px 2px; }
.map-figure h3 { font-size: 1.0625rem; }
.map-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--ink-2); font-size: .875rem; }
.map-downloads a { color: var(--primary); font-weight: 650; }
.country-facts { margin: 0 0 32px; }
.country-facts .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.country-facts .facts-wide { grid-column: 1 / -1; }
.country-facts .facts dd a { font-weight: 600; }
.section-title { margin-top: 8px; font-size: 1.5rem; }
@media (min-width: 760px) {
    .map-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .map-main { grid-column: 1 / -1; }
    .country-facts .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.region-list { margin: 0 0 32px; }
.region-list .clist { margin-top: 12px; }
/* Boundary data pages */
.data-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 8px 0 28px; }
.data-layer { margin-bottom: 22px; }
.data-layer h3 { font-size: 1.125rem; }
.data-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.data-links small { margin-left: 6px; color: var(--ink-2); font-weight: 400; }
.data-preview { margin: 0; }
.data-preview figcaption { margin-top: 8px; }
.data-section { margin-bottom: 28px; }
.data-section p { max-width: 70ch; margin-top: 10px; }
.code { overflow-x: auto; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: .875rem; line-height: 1.5; }
.data-callout { margin: 0 0 24px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.data-callout a { color: var(--primary); font-weight: 650; }
@media (min-width: 900px) { .data-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
/* Map maker */
.mm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 8px 0 32px; }
.mm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mm-title { flex: 1 1 240px; }
.mm-title input, .mm-search input, .mm-swatch input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-stage { overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #dcebf3; }
.mm-stage svg { display: block; width: 100%; height: auto; }
.mm-region { cursor: pointer; transition: opacity .12s; }
.mm-region:hover { opacity: .78; }
.mm-status { min-height: 1.5em; margin-top: 8px; }
.mm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; color: var(--ink-2); font-size: .9375rem; }
.mm-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.mm-legend-swatch, .mm-chip { display: inline-block; width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgb(0 0 0 / 15%); }
.mm-h { font-size: 1.125rem; }
.mm-palette { display: grid; gap: 8px; margin: 12px 0 16px; }
.mm-swatch { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px; border-radius: var(--r-sm); }
.mm-swatch.is-active { outline: 2px solid var(--primary); }
.mm-chip { width: 36px; height: 36px; cursor: pointer; }
.mm-listbox summary { cursor: pointer; font-weight: 650; }
.mm-search { display: block; margin: 10px 0; }
.mm-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.mm-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 8px; font-size: .9375rem; }
.mm-row select { min-height: 36px; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
@media (min-width: 1000px) { .mm { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
/* Map quiz and lists */
.quiz { margin: 8px 0 32px; }
.quiz-panel { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.quiz-ask { font-size: 1.375rem; }
.quiz-ask strong { color: var(--primary); }
.quiz-feedback { min-height: 1.5em; margin: 6px 0 10px; font-weight: 600; }
.quiz-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.quiz-key .mm-legend-swatch { width: 14px; height: 14px; margin-left: 8px; }
.list-table td, .list-table th { white-space: normal; }
.list-table td a { color: var(--primary); font-weight: 600; }
