/* AMR Atlas — shared typography across public sections. */
:root{
  --atlas-font-sans:Inter,"Segoe UI Variable","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  --atlas-font-mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  --atlas-type-body:14px;
  --atlas-type-control:13px;
  --atlas-type-secondary:12px;
  --atlas-type-caption:11px;
  --atlas-type-h1:clamp(28px,2.4vw,34px);
  --atlas-type-h2:20px;
  --atlas-type-h3:16px;
}

html,body{font-family:var(--atlas-font-sans);font-size:var(--atlas-type-body);font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit;font-family:var(--atlas-font-sans)}
code,kbd,pre,.mechanism-code,.mechanism-card-code,.formula{font-family:var(--atlas-font-mono)}

/* Shared navigation and shell */
.site-header,.workspace-header,.topbar,.sidebar,.section-shell{font-family:var(--atlas-font-sans)}
.site-header nav a,.workspace-header nav a,.nav-item,.language-switch button{font-size:var(--atlas-type-control)!important;line-height:1.3;font-weight:600}
.site-header .brand-copy b,.brand strong{font-weight:700}
.site-header .brand-copy small,.brand small{font-size:var(--atlas-type-caption)!important;line-height:1.35}

/* One semantic hierarchy for pages and panels */
.page-heading h1,.reference-hero h1,.mechanism-hero h1,.hero-card h1{font-family:var(--atlas-font-sans)!important;font-size:var(--atlas-type-h1)!important;line-height:1.14!important;letter-spacing:-.025em!important;font-weight:700!important}
.page-heading p,.reference-hero p,.mechanism-hero p,.hero-card p{font-size:var(--atlas-type-body)!important;line-height:1.55!important}
.section-heading h2,.map-heading h2,.reference-list-head h2,.mechanism-list-head h2,.card-heading h2,.section-card h2{font-size:var(--atlas-type-h2)!important;line-height:1.25!important;font-weight:700!important;letter-spacing:-.01em}
.detail-section h3,.mechanism-section h3,.section-card h3{font-size:var(--atlas-type-h3)!important;line-height:1.3!important;font-weight:650!important;letter-spacing:0!important;text-transform:none!important}
.eyebrow,.reference-eyebrow,.mechanism-eyebrow,.detail-kicker,.mechanism-kicker{font-size:var(--atlas-type-caption)!important;line-height:1.35!important;font-weight:700!important;letter-spacing:.08em!important}

/* Controls */
.filters label,.control-grid label,.reference-list-head label{font-size:var(--atlas-type-caption)!important;line-height:1.35}
.filters select,.control-grid select,.control-grid input,.reference-search input,.reference-toolbar select,.reference-toolbar button,.mechanism-search input,.mechanism-toolbar select,.mechanism-toolbar button,.map-switch button,.density-toggle,.export-button,.button,.ghost-button,.map-action,.back-reference{font-size:var(--atlas-type-control)!important;line-height:1.3!important;font-weight:600}

/* Panels, tables and catalog rows */
.metric-label,.metric small,.reference-list-head p,.mechanism-list-head p,.preview-cohort,.preview-note,.period-stamp,.legend,.map-bottom,.reference-version,.reference-note,.mechanism-note,.callout,.muted{font-size:var(--atlas-type-secondary)!important;line-height:1.5}
.analysis-content,.analysis-content table,.catalog-row,.mechanism-row,.detail-description,.detail-text p,.mechanism-description,.term-card p,.country-list,.meta-row{font-size:var(--atlas-type-control)!important;line-height:1.5}
.analysis-content th,.analysis-content td{font-size:var(--atlas-type-control)!important}
.catalog-row .ref-name strong,.mechanism-name strong,.detail-grid strong,.mechanism-link-card strong{font-size:var(--atlas-type-control)!important;line-height:1.4!important}
.catalog-row .ref-name small,.mechanism-name small,.detail-grid span,.mechanism-link-card small,.mechanism-chips span,.chip-list span{font-size:var(--atlas-type-caption)!important;line-height:1.4!important}
.reference-page .catalog-row .ref-code,.mechanism-code,.mechanism-card-code{font-size:var(--atlas-type-caption)!important}

/* Mechanisms used an unusually small independent scale; normalize it to the rest of Atlas. */
.mechanism-status,.mechanism-loading,.mechanism-error,.mechanism-empty p,.mechanism-card-top p,.mechanism-evidence p,.mechanism-evidence strong,.mechanism-map-cta span,.mechanism-note p,.mechanism-note strong{font-size:var(--atlas-type-secondary)!important;line-height:1.5!important}
.mechanism-kpis small,.mechanism-kpis em,.mechanism-counts b,.mechanism-link-card em{font-size:var(--atlas-type-caption)!important;line-height:1.4!important}
.mechanism-card-top h2{font-size:var(--atlas-type-h2)!important;line-height:1.25!important}
.mechanism-empty strong,.mechanism-map-cta strong{font-size:var(--atlas-type-control)!important}

/* Standalone World / Glossary pages */
.section-page{font-family:var(--atlas-font-sans)!important;font-size:var(--atlas-type-body)}
.section-page .hero-card h1{max-width:18ch}
.section-page .hero-card p{max-width:900px}
.section-page .button,.section-page .ghost-button,.section-page .chip-row button{font-size:var(--atlas-type-control)!important;font-weight:600}
.section-page .term-card h3{font-size:var(--atlas-type-h3)!important;font-weight:700}
.section-page .term-card p,.section-page .callout,.section-page .country-list button{font-size:var(--atlas-type-body)!important}
.section-page .meta-row span,.section-page .legend-row,.section-page .trend-column span{font-size:var(--atlas-type-secondary)!important}

/* Development credit */
.atlas-author-footer{margin-top:24px;padding:14px 0 4px;border-top:1px solid rgba(127,145,155,.25);font-size:var(--atlas-type-secondary)!important;line-height:1.5;color:inherit;opacity:.72}
.atlas-author-footer strong,.atlas-author-credit strong{font-weight:650}
.atlas-author-credit{font-size:var(--atlas-type-secondary)!important;line-height:1.4;opacity:.78}
.site-footer .atlas-author-credit{display:block;margin-top:4px}

@media(max-width:760px){
  :root{--atlas-type-body:14px;--atlas-type-control:13px;--atlas-type-secondary:12px;--atlas-type-caption:11px;--atlas-type-h1:28px;--atlas-type-h2:19px;--atlas-type-h3:16px}
}
