/* AMR Atlas: editorial identity. Loaded last on every entry point.
   Interface tokens are separate from AST, AWaRe, map and scientific colours. */
:root,html:root body,html:root body[class],html:root body[data-workspace]{
 --atlas-font-sans:"PT Sans","Segoe UI",Arial,sans-serif;
 --atlas-font-serif:"PT Serif",Georgia,"Times New Roman",serif;
 --atlas-font-mono:Consolas,"Liberation Mono",monospace;
 --atlas-paper:#f6f3ed;--atlas-surface:#fff;--atlas-ink:#252c3b;
 --atlas-secondary:#586170;--atlas-rule:#d8d4cf;--atlas-wash:#edf0f4;
 --atlas-burgundy:#86384e;--atlas-burgundy-dark:#68283c;--atlas-tint:#f3e9ed;
 --atlas-copper:#95552f;--atlas-focus:#345a89;
 --atlas-ui-bg:var(--atlas-paper);--atlas-ui-panel:var(--atlas-surface);
 --atlas-ui-panel-soft:#f7f5f1;--atlas-ui-line:var(--atlas-rule);
 --atlas-ui-text:var(--atlas-ink);--atlas-ui-muted:var(--atlas-secondary);
 --atlas-ui-accent:var(--atlas-burgundy);--atlas-ui-accent-soft:var(--atlas-tint);
 --atlas-ui-shadow:none;--atlas-ui-radius:8px;
 --workspace-line:var(--atlas-rule);--workspace-accent:var(--atlas-burgundy);
 --atlas-bg:var(--atlas-paper);--atlas-panel:#fff;--atlas-panel-2:#f7f5f1;
 --atlas-line:var(--atlas-rule);--atlas-text:var(--atlas-ink);--atlas-muted:var(--atlas-secondary);
 --atlas-accent:var(--atlas-burgundy);--atlas-blue:var(--atlas-focus);
 --bg:var(--atlas-paper);--panel:#fff;--line:var(--atlas-rule);--line-2:#e8e4df;
 --ink:var(--atlas-ink);--text:var(--atlas-ink);--muted:var(--atlas-secondary);
 --teal:var(--atlas-burgundy);--blue:var(--atlas-burgundy);--blue-2:var(--atlas-burgundy-dark);
 --shadow:0 2px 9px #252c3b08;
 --atlas-type-body:16px;--atlas-type-control:14px;--atlas-type-secondary:13px;--atlas-type-caption:12px;
}
html{color-scheme:light;scroll-padding-top:130px}
html:root body{margin:0;background:var(--atlas-paper)!important;color:var(--atlas-ink)!important;font-family:var(--atlas-font-sans)!important;font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
/* Some older sections use complete font shorthands; keep the family consistent. */
html:root body :is(header,nav,main,section,article,aside,footer,div,p,span,a,button,label,input,select,textarea,summary,table,th,td,small,strong,b,li,dt,dd,h3,h4){font-family:var(--atlas-font-sans)!important}
html:root body :is(code,pre,kbd,.formula,.ref-code,.mechanism-code){font-family:var(--atlas-font-mono)!important}
html:root body h1,html:root body :is(.page-heading,.reference-hero,.mechanism-hero,.hero-card,.wiki-hero,.national-hero) h1,
html:root body .wiki-article h1{font-family:var(--atlas-font-serif)!important;font-weight:700!important;letter-spacing:-.025em!important;line-height:1.2!important;color:var(--atlas-ink)!important}
html:root body h2{font-family:var(--atlas-font-sans)!important;letter-spacing:-.015em}
html:root body :is(.wiki-group-title,.publication-card,.publication-detail,.wiki-article,.national-panel) h2{font-family:var(--atlas-font-serif)!important}
html:root body :is(button,input,select,textarea){font-size:14px}
html:root body :is(input,select,textarea){accent-color:var(--atlas-burgundy)}
html:root body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--atlas-focus)!important;outline-offset:3px!important}
html:root body ::selection{background:#e6d1d9;color:#252c3b}
html:root body :is(.page-heading,.reference-hero,.mechanism-hero,.hero-card) p{color:var(--atlas-secondary)!important;font-size:16px!important;line-height:1.65!important}

/* The shared navigation uses stronger selectors to match its legacy contract. */
html:root body header.site-header.atlas-header{background:#fff!important;border-bottom:1px solid var(--atlas-rule)!important;box-shadow:0 3px 0 #86384e!important;font-family:var(--atlas-font-sans)!important;color:var(--atlas-ink)!important}
html:root body header.site-header.atlas-header .brand-copy b{font-family:var(--atlas-font-serif)!important;font-size:22px!important;color:var(--atlas-ink)!important;letter-spacing:-.6px!important}
html:root body header.site-header.atlas-header .brand-copy b span{font-family:var(--atlas-font-serif)!important}
html:root body header.site-header.atlas-header .brand-copy small{color:var(--atlas-secondary)!important;font-size:10px!important}
html:root body header.site-header.atlas-header nav a{font-size:14px!important;color:var(--atlas-secondary)!important;border-radius:4px!important}
html:root body header.site-header.atlas-header nav a:hover{background:var(--atlas-wash)!important;color:var(--atlas-ink)!important}
html:root body header.site-header.atlas-header nav a[aria-current="page"]{color:var(--atlas-burgundy)!important;background:var(--atlas-tint)!important;box-shadow:inset 0 -2px var(--atlas-burgundy)!important}
html:root body header.site-header.atlas-header .language-switch{border-color:var(--atlas-rule)!important;border-radius:5px!important}
html:root body header.site-header.atlas-header .language-switch button{font-size:12px!important;color:var(--atlas-secondary)!important;border-radius:3px!important}
html:root body header.site-header.atlas-header .language-switch button[aria-pressed="true"]{background:var(--atlas-ink)!important;color:white!important}

/* Paper surfaces and text for the public catalogues and workspaces. */
html:root body :is(.hero-card,.section-card,.metric,.region-preview,.analytics-workspace,.reference-main,.mechanism-layout,.reference-toolbar,.mechanism-toolbar,.reference-kpis article,.mechanism-kpis article,.reference-version,.publication-card,.publication-detail,.publication-empty,.glossary-index,.glossary-intro,.term-card,.national-panel,.admin-card){border-color:var(--atlas-rule)!important;box-shadow:none!important;border-radius:8px!important}
html:root body :is(.eyebrow,.reference-eyebrow,.mechanism-eyebrow,.detail-kicker,.mechanism-kicker,.wiki-eyebrow,.wiki-stats,.national-hero>span){color:var(--atlas-burgundy)!important}
html:root body :is(.detail-description,.mechanism-description,.reference-note,.mechanism-note,.mechanism-map-cta,.term-detail,.glossary-stat-note>div,.national-note,.calc-result,.formula){background:#f0f1f3!important;border-color:#d8dce2!important;color:var(--atlas-secondary)!important}
html:root body :is(.reference-note strong,.mechanism-note strong,.mechanism-map-cta strong,.term-detail b){color:var(--atlas-ink)!important}
html:root body :is(.reference-tabs button,.chip-row button,.ghost-button,.clear-filters,.reference-toolbar select,.mechanism-toolbar select,.mechanism-toolbar button){border-color:var(--atlas-rule)!important;background:#fff!important;color:var(--atlas-secondary)!important}
html:root body :is(.reference-tabs button.active,.chip-row button.active,.catalog-row.active,.mechanism-row.active,.country-list button.active,.density-toggle[aria-pressed="true"]){color:var(--atlas-burgundy)!important;background:var(--atlas-tint)!important;border-color:#be8b9b!important;box-shadow:inset 3px 0 var(--atlas-burgundy)!important}
html:root body :is(.catalog-row:hover,.mechanism-row:hover,.country-list button:hover){background:#f7f2f3!important}
html:root body :is(.ref-code,.mechanism-code,.term-badge,.reference-kpis article>span,.mechanism-kpis article>span,.detail-empty>span,.mechanism-empty>span){background:var(--atlas-wash)!important;color:#3e526c!important}
html:root body :is(.reference-search,.mechanism-search){background:white!important;border-color:var(--atlas-rule)!important}
html:root body :is(.filters,.control-grid,.reference-toolbar,.mechanism-toolbar,.publication-toolbar,.admin-main,.national,.wiki-shell) :is(input,select,textarea){color:var(--atlas-ink)!important;border-color:#b9bdc5!important;background:white!important}
html:root body :is(.button,.primary-action,.map-action,.primary,.apply,#wiki-search button,.admin-main button,.admin-main .download-template,.national form>button,.whonet-wizard fieldset>button){background:var(--atlas-burgundy)!important;color:#fff!important;border-color:var(--atlas-burgundy)!important;box-shadow:none!important;border-radius:5px!important}
html:root body :is(.button,.primary-action,.map-action,.primary,.apply,#wiki-search button,.national form>button,.whonet-wizard fieldset>button):hover{background:var(--atlas-burgundy-dark)!important}
html:root body :is(.analysis-tabs [aria-selected="true"],.back-link,.wiki-breadcrumb a,.publication-card a,.publication-detail a,.sources a,.term-sources a,.wiki-article a,.national a,.admin-main a){color:var(--atlas-burgundy)!important}
html:root body .analysis-tabs [aria-selected="true"]{border-bottom-color:var(--atlas-burgundy)!important}
html:root body :is(.analysis-toolbar,.analysis-content thead,.national th,.wiki-article thead th,.wiki-article caption){background:var(--atlas-wash)!important;color:#39465c!important}
html:root body :is(.analysis-content,.national,.wiki-article,.admin-main) :is(th,td){font-size:14px!important;border-color:#e0deda!important}
html:root body :is(.analysis-content,.national,.wiki-article,.admin-main) th{font-size:13px!important}
html:root body :is(.metric.accent,.metric.accent>strong){background:#f0e9ed!important;border-color:#d9bcc6!important;color:var(--atlas-burgundy)!important}
html:root body .metric-label svg{color:#65748c!important}
html:root body :is(.national-stats strong,.reference-kpis strong,.mechanism-kpis strong){color:var(--atlas-ink)!important;font-variant-numeric:tabular-nums}

/* Map chrome changes; data fills, S/I/R, legends and illustrations do not. */
html:root body .map-card{background:#202b3d!important;border-color:#34435a!important}
html:root body .map-stage{background:radial-gradient(ellipse at 40% 40%,#34455b70,transparent 70%),#202b3d!important}
html:root body .map-stage:after{box-shadow:inset 0 0 25px 10px #202b3d80!important}
html:root body .map-heading :is(.eyebrow,p){color:#bac8db!important}
html:root body .map-heading h2{color:#fff!important}
html:root body .map-switch button{color:#d4dce7!important}
html:root body .map-switch [aria-pressed="true"]{background:#43526a!important;color:#fff!important}
html:root body .has-map-statistics>.region-statistics{background:#f7f6f3!important;color:var(--atlas-ink)!important;border-color:#d6d4d1!important}
html:root body .data-mode-switch button[aria-pressed="true"]{background:var(--atlas-ink);color:white}
html:root body :is(.data-mode-switch a,.wiki-shell a,.admin-main summary){color:var(--atlas-burgundy)!important}
html:root body :is(.world-controls,.country-panel,.amr-mode-panel){background:#f4f1ed!important;border-color:var(--atlas-rule)!important}
html:root body .amr-mode-switch{background:var(--atlas-wash)!important;border-color:var(--atlas-rule)!important}
html:root body .amr-mode-switch button{color:var(--atlas-secondary)!important}
html:root body .amr-mode-switch button.active{background:var(--atlas-burgundy)!important;color:white!important}
html:root body #country-pagination button{background:white!important;color:var(--atlas-burgundy)!important;border-color:var(--atlas-rule)!important}

/* Wiki and research receive the same editorial masthead. */
html:root body :is(.wiki-hero,.national-hero){background:#eeebe6!important;border:1px solid var(--atlas-rule)!important;border-left:4px solid var(--atlas-burgundy)!important;border-radius:3px!important;padding:28px 32px}
html:root body :is(.wiki-hero,.national-hero) h1{font-size:clamp(30px,3.5vw,44px)!important}
html:root body .wiki-hero:after{color:#dcd3d4;font-family:var(--atlas-font-serif)}
html:root body :is(.wiki-language-note,.wiki-sidebar-note,.wiki-result-bar,.wiki-group>p,.wiki-meta,.wiki-card p,.wiki-small,.wiki-footer,.wiki-article .wiki-lead,.wiki-toc strong,.national footer,.national-stats span){color:var(--atlas-secondary)!important}
html:root body :is(.wiki-card,.wiki-article,#wiki-search,.wiki-empty,.wiki-table-scroll,.national-table,.national-stats>div,.national-filter-box){border-color:var(--atlas-rule)!important;border-radius:7px!important}
html:root body .wiki-card{padding:24px;border-top:2px solid #c5cbd3!important}
html:root body .wiki-card:hover{border-top-color:var(--atlas-burgundy)!important}
html:root body .wiki-card h3 a{color:var(--atlas-ink)!important;font-weight:700}
html:root body .wiki-card p{font-size:15px;line-height:1.65}
html:root body .wiki-article{font-size:17px}
html:root body .wiki-article p{line-height:1.8}
html:root body :is(.wiki-categories>a,.wiki-toc a){color:#43516a!important}
html:root body .wiki-categories>a[aria-current]{background:var(--atlas-tint)!important;color:var(--atlas-burgundy)!important}
html:root body :is(.wiki-categories>a:hover,.wiki-toc){background:#eeeae6}
html:root body .wiki-toc a{border-color:#d6c7ce}
html:root body .wiki-toc a:hover{border-color:var(--atlas-burgundy);color:var(--atlas-burgundy)!important}
html:root body :is(.wiki-tags span,.wiki-group-title>span,.publication-badge){color:#46536a!important;background:var(--atlas-wash)!important}
html:root body :is(.wiki-tags span,.wiki-meta,.wiki-footer,.wiki-small){font-size:12px}
html:root body .national{color:var(--atlas-ink);font-size:16px}
html:root body .national button{border-color:#c2bdc2;color:var(--atlas-ink)}
html:root body .national button:hover{background:var(--atlas-tint)}
html:root body .national-tabs [aria-selected="true"]{background:var(--atlas-burgundy)!important;color:#fff!important;border-color:var(--atlas-burgundy)!important}
html:root body .national-file{background:#f3f0ed;border-color:#b7a6af}
html:root body .national-filter-box{background:#f7f5f1}
html:root body .national label{font-size:13px}
html:root body .national-note{font-size:14px}
html:root body .whonet-result{border-top-color:var(--atlas-burgundy)}
html:root body .admin-main .secondary{background:white!important;color:var(--atlas-ink)!important;border-color:var(--atlas-rule)!important}
html:root body .admin-labs button{color:var(--atlas-ink)!important;background:#f7f5f1!important;border-color:var(--atlas-rule)!important}
html:root body .admin-labs button[aria-pressed="true"]{color:var(--atlas-burgundy)!important;background:var(--atlas-tint)!important;border-color:#be8b9b!important}
html:root body :is(.admin-main p,.admin-main label,.admin-intro){color:var(--atlas-secondary)}
html:root body .admin-main summary{color:var(--atlas-burgundy)}
html:root body :is(.admin-main label,.admin-main button,.admin-main input,.admin-main select){font-size:14px}
html:root body .publication-card{border-top:2px solid #c5cbd3!important}
html:root body .publication-card h2{font-size:23px}
html:root body .term-definition{font-size:16px;line-height:1.7}
html:root body .term-sources a{background:#f5f1f3;border-color:#ddd1d7}
html:root body .glossary-index a:hover{color:var(--atlas-burgundy);background:var(--atlas-tint)}
/* Photographic covers remain dark: paper-text rules must not override them. */
html:root body :is(.science-hero,.science-illustrated) h1{color:#fff!important}
html:root body :is(.science-hero,.science-illustrated) :is(p,.eyebrow){color:#e4eaf3!important}
html:root body .hero-card.science-illustrated>p{max-width:60%!important}
html:root body :is(.reference-content,.mechanism-content) :is(a,summary){color:var(--atlas-burgundy)}
html:root body :is(.mechanism-stages,.mechanism-legend dl){background:#f0f1f3;border-color:#d8dce2}
html:root body :is(.atlas-pwa-tools,.atlas-pwa-dialog,.atlas-offline){font-family:var(--atlas-font-sans)!important;color:var(--atlas-ink)}
html:root body .atlas-pwa-tools button{background:var(--atlas-ink);color:white;border-color:var(--atlas-ink)}
html:root body .atlas-pwa-dialog button{background:var(--atlas-burgundy);color:white}
html:root body :is(.atlas-pwa-tools,.atlas-pwa-dialog){border-color:var(--atlas-rule);border-radius:7px}
html:root body .atlas-pwa-tools button:hover{background:#3f4b60}
html:root body .atlas-pwa-dialog button:hover{background:var(--atlas-burgundy-dark)}
html:root body .atlas-pwa-dialog a{color:var(--atlas-burgundy)}
html:root body .atlas-offline :is(a,button){color:var(--atlas-burgundy);border-color:var(--atlas-rule);border-radius:5px}
/* Responsive type stays readable without changing the established layouts. */
@media(max-width:760px){
 html:root body .hero-card.science-illustrated>p{max-width:100%!important}
 html:root body :is(input,select,textarea){font-size:16px!important}
 html:root body :is(.wiki-hero,.national-hero){padding:23px}
 html:root body .wiki-article{font-size:16px}
 html:root body header.site-header.atlas-header nav a{font-size:13px!important}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{
 html:root body :is(.science-hero,.science-illustrated) :is(h1,p,.eyebrow){color:#000!important}
 html:root body{background:#fff!important;color:#000!important}
 html:root body :is(.wiki-article,.national-panel){border:0!important}
}
