/* Atlas Febre Amarela — tema público (atlas-v1)
 * Tokens editáveis pelo Customizer chegam como variáveis CSS em :root (injetadas pelo Core).
 * Os valores abaixo são fallbacks idênticos à documentação visual.
 */
:root {
  --color-primary: #0B6B4A; --color-accent: #F1B934; --color-bg: #F4F8F6; --color-mist: #DDF0E7;
  --color-surface: #FFFFFF; --color-text: #10261E; --color-muted: #607168; --color-border: #D6E3DD;
  --color-alert: #A13D30; --color-topline: #10261E; --series-cases: #0E7A55; --series-epizootics: #A66F08;
  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1180px; --radius: 18px; --radius-hero: 28px; --radius-card: 16px; --space: 8px; --density: 1;
  --shadow: 0 14px 40px rgba(10,60,42,.06); --header-position: sticky; --logo-height: 34px;
  --pad: calc(var(--space) * 3 * var(--density));
  --gap: calc(var(--space) * 2.75);
  --tile-0: #EEF4F1; --tile-1: #CFE9DC; --tile-2: #8FCBB0; --tile-3: #3E9A74; --tile-4: #0B6B4A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--color-primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-text); line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--color-mist); padding: 1px 6px; border-radius: 6px; }
pre { overflow: auto; background: var(--color-text); color: #E8F3EE; padding: 18px; border-radius: var(--radius-card); font-size: 13px; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--color-primary); color: #fff; padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip-link:focus { top: 8px; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.section { padding-block: 42px; }
.section-lg { padding-block: 64px; }
.muted { color: var(--color-muted); }
.small { font-size: 13px; }

/* Kicker / eyebrow */
.kicker { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 10px; }

/* ------------------------------------------------------------------ Header */
.topline { background: var(--color-topline); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topline .container { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; }
.topline .update { font-weight: 600; letter-spacing: .02em; text-transform: none; opacity: .85; }
.site-header { position: var(--header-position); top: 0; z-index: 30; background: rgba(244, 248, 246, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--color-border); }
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--color-text); text-decoration: none; font-size: 17px; white-space: nowrap; }
.brand-mark { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary); flex: none; }
.brand-mark::after { content: ""; position: absolute; top: 3px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-primary); }
.brand img { height: var(--logo-height); width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--color-text); text-decoration: none; font-size: 14px; font-weight: 700; }
.main-nav a:hover { background: var(--color-mist); }
.main-nav a[aria-current="page"] { color: var(--color-primary); background: var(--color-mist); }
.header-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--color-border); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--color-text); cursor: pointer; }
.preview-banner { background: var(--color-accent); color: var(--color-text); text-align: center; font-size: 13px; font-weight: 700; padding: 6px; }

/* ----------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 20px; border-radius: 999px; font-weight: 800; font-size: 14px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ Cards */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--pad); box-shadow: var(--shadow); }
.card h2 { font-size: 20px; }
.card-plain { box-shadow: none; }
.card-accent { background: var(--color-mist); border-color: transparent; box-shadow: none; }
.card-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.card-link h3 { font-size: 17px; margin-bottom: 6px; }
.card-link p { color: var(--color-muted); font-size: 14px; margin: 0; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.data-strip { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.stack > * + * { margin-top: var(--gap); }

/* ---------------------------------------------------------------- Hero */
.hero { padding-block: 48px 36px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(36px, 4.6vw, 58px); font-weight: 900; letter-spacing: -.025em; margin-bottom: 18px; }
.hero .lead { font-size: 18px; color: var(--color-muted); max-width: 40ch; margin-bottom: 24px; }
.panorama { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-hero); padding: 26px; box-shadow: var(--shadow); }
.panorama-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.panorama-head h2 { font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.panorama .period { font-size: 12.5px; color: var(--color-muted); margin: 14px 0 0; }

.page-hero { padding-block: 40px 22px; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 900; letter-spacing: -.02em; max-width: 22ch; }
.page-hero .lead { font-size: 18px; color: var(--color-muted); max-width: 68ch; margin-bottom: 0; }

/* ------------------------------------------------------------ Breadcrumbs */
.breadcrumbs { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--color-border); }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--color-text); font-weight: 700; }

/* -------------------------------------------------------- Metric cards */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.metrics.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric { background: #F0F7F3; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: calc(16px * var(--density)) calc(18px * var(--density)); min-width: 0; }
.metric .label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }
.metric .value { display: block; font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--color-text); line-height: 1.15; margin-top: 6px; overflow-wrap: anywhere; }
.metric .note { display: block; font-size: 12px; color: var(--color-muted); margin-top: 4px; }

/* -------------------------------------------------- Status pill / badge */
.status-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--color-mist); color: var(--color-primary); font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); }
.status-pill.pending { background: #FFF4D6; color: #6B4B00; }
.status-pill.pending::before { background: var(--color-accent); }
.badge { display: inline-block; background: var(--color-mist); color: var(--color-text); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* ---------------------------------------------------------- Source box */
.source-box { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: var(--radius-card); padding: calc(18px * var(--density)) calc(22px * var(--density)); font-size: 14px; }
.source-box h2 { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 10px; }
.source-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 10px; }
.source-box dt { color: var(--color-muted); }
.source-box dd { margin: 0; font-weight: 600; }
.source-box ul { margin: 0 0 10px; padding-left: 18px; }
.source-box .note { color: var(--color-muted); font-size: 13px; margin: 0 0 8px; }

/* -------------------------------------------------------------- Callout */
.callout { background: var(--color-mist); border-radius: var(--radius-card); padding: calc(20px * var(--density)) calc(22px * var(--density)); }
.callout .kicker { margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }
.notice { border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); background: var(--color-surface); border-radius: var(--radius-card); padding: 16px 20px; margin-bottom: var(--gap); }
.notice strong { display: block; margin-bottom: 4px; }
.notice.error { border-left-color: var(--color-alert); }

/* ----------------------------------------------------------------- Table */
.table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: calc(20px * var(--density)) calc(22px * var(--density)); }
.table-card h2 { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 12px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--color-muted); padding: calc(10px * var(--density)) 10px; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
td { padding: calc(10px * var(--density)) 10px; border-bottom: 1px solid #EBF2EE; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #F7FBF9; }
td.num, th.num { text-align: right; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
caption { caption-side: bottom; text-align: left; color: var(--color-muted); font-size: 13px; padding-top: 10px; }
.table-scroll { max-height: 560px; overflow: auto; }

/* ------------------------------------------------------------ Chart panel */
.chart-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: calc(20px * var(--density)) calc(22px * var(--density)); }
.chart-panel h2 { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 4px; }
.chart-panel .chart-sub { font-size: 13px; color: var(--color-muted); margin-bottom: 8px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: #E6EEEA; stroke-width: 1; }
.chart .axis-text { fill: var(--color-muted); font-size: 11px; font-family: var(--font-body); }
.chart .value-text { fill: var(--color-text); font-size: 12px; font-weight: 800; font-family: var(--font-body); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; opacity: .1; }
.chart .dot { stroke: var(--color-surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover + .hover-dot, .chart .hover-dot.on { opacity: 1; }
.chart .hover-dot { opacity: 0; transition: opacity .1s; stroke: var(--color-surface); stroke-width: 2; pointer-events: none; }
.chart .crosshair { stroke: var(--color-border); stroke-width: 1; opacity: 0; pointer-events: none; }
.chart .crosshair.on { opacity: 1; }
.series-cases { stroke: var(--series-cases); fill: var(--series-cases); }
.series-epizootics { stroke: var(--series-epizootics); fill: var(--series-epizootics); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--color-muted); margin: 4px 0 8px; }
.chart-legend .key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.chart-multiple + .chart-multiple { margin-top: 14px; padding-top: 12px; border-top: 1px solid #EBF2EE; }
.chart-tooltip { position: absolute; pointer-events: none; background: var(--color-text); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -120%); z-index: 5; }
.chart-data summary { cursor: pointer; font-size: 13px; color: var(--color-muted); margin-top: 8px; }
.chart-empty { color: var(--color-muted); font-size: 14px; padding: 24px 0; }

/* -------------------------------------------------------------- Map panel */
.map-panel { background: var(--color-mist); border: 1px solid var(--color-border); border-radius: var(--radius); padding: calc(20px * var(--density)); position: relative; overflow: hidden; }
.map-panel h2 { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: 10px; }
.map-panel .watermark { position: absolute; right: 18px; bottom: 6px; font-size: clamp(34px, 6vw, 64px); font-weight: 900; color: rgba(11, 107, 74, .08); letter-spacing: .04em; pointer-events: none; }
.tilemap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; max-width: 380px; margin: 0 auto; position: relative; z-index: 1; }
.tile { position: relative; aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; font-size: 11px; font-weight: 800; color: var(--color-text); background: var(--tile-0); border: 1px solid rgba(16, 38, 30, .06); line-height: 1.1; }
.tile small { font-size: 9.5px; font-weight: 700; opacity: .85; font-variant-numeric: tabular-nums; }
.tile.l1 { background: var(--tile-1); } .tile.l2 { background: var(--tile-2); }
.tile.l3 { background: var(--tile-3); color: #fff; } .tile.l4 { background: var(--tile-4); color: #fff; }
.tile.has-data::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-surface); }
.tile:hover { outline: 2px solid var(--color-text); outline-offset: 1px; }
.map-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--color-muted); margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.map-legend .sw { width: 18px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(16, 38, 30, .08); }
.map-note { font-size: 12px; color: var(--color-muted); margin: 10px 0 0; position: relative; z-index: 1; }

/* ---------------------------------------------------------------- Filters */
.filters { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto; gap: 16px; align-items: end; }
.filters label { display: block; }
.filters .kicker { margin-bottom: 6px; }
.filters select { width: 100%; font: inherit; font-weight: 700; color: var(--color-text); background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 12px; min-height: 44px; }
.selection-note { font-size: 14px; color: var(--color-muted); margin: 12px 0 0; }

/* ------------------------------------------------------------ Quick access */
.quick-card .kicker { margin-bottom: 8px; }

/* ------------------------------------------------------------- Steps list */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px 22px 20px 64px; position: relative; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 22px; top: 22px; font-size: 11px; font-weight: 800; color: var(--color-primary); }
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { color: var(--color-muted); margin: 0; font-size: 14px; }

/* ------------------------------------------------------------------ Prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: 26px; margin-top: 1.4em; }
.prose h3 { font-size: 20px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--color-accent); background: var(--color-surface); border-radius: 0 12px 12px 0; }
.prose table { margin: 1em 0; }
.review-box { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; }
.review-box .icon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: #fff; display: grid; place-items: center; font-weight: 900; }

/* ----------------------------------------------------------- Link lists */
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); text-decoration: none; font-size: 14px; font-weight: 700; }
.link-list a:hover { border-color: var(--color-primary); }
.dir-list { columns: 3 220px; column-gap: 28px; list-style: none; padding: 0; margin: 0; font-size: 14px; }
.dir-list li { break-inside: avoid; padding: 3px 0; }
.dir-list .no-data { color: var(--color-muted); }
.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }

/* ----------------------------------------------------------- People cards */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }
.person { display: flex; gap: 16px; align-items: flex-start; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--color-mist); display: grid; place-items: center; font-weight: 900; font-size: 22px; color: var(--color-primary); }
.person h3 { font-size: 17px; margin-bottom: 2px; }
.person .role { color: var(--color-muted); font-size: 13px; margin-bottom: 8px; }
.org { display: flex; gap: 18px; align-items: center; }
.org img { max-height: 56px; width: auto; }

/* ---------------------------------------------------------------- Footer */
.site-footer { margin-top: 64px; padding-block: 40px 28px; }
.footer-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 30px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-brand strong { font-size: 17px; display: block; margin-bottom: 8px; }
.footer-brand p { color: var(--color-muted); font-size: 14px; }
.footer-col h2 { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--color-muted); text-decoration: none; font-size: 13.5px; }
.footer-col a:hover { color: var(--color-primary); text-decoration: underline; }
.footer-sources { font-size: 12.5px; color: var(--color-muted); margin-top: 22px; }
.disclaimer { border-top: 1px solid var(--color-border); margin-top: 24px; padding-top: 20px; font-size: 13px; color: var(--color-text); }
.disclaimer strong { font-weight: 800; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 12.5px; color: var(--color-muted); }
.footer-bottom .legal { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-bottom a { color: var(--color-muted); }
.footer-attribution { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--color-muted); text-decoration: none; }
.footer-attribution img { height: 22px; width: auto; max-width: 120px; object-fit: contain; }
.footer-attribution:hover strong { color: var(--color-primary); }

/* ------------------------------------------------------------ Responsivo */
@media (max-width: 900px) {
  .hero-grid, .data-strip, .split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 12px 20px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .nav-toggle { display: inline-block; }
  .site-header .container { position: relative; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { position: sticky; }
}
@media (max-width: 620px) {
  .container { width: calc(100% - 24px); }
  .grid-2, .grid-3, .grid-4, .metrics, .metrics.two { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-cta { display: none; }
  .hero { padding-block: 28px 20px; }
  .panorama { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-card { padding: 22px; }
  .filters { grid-template-columns: 1fr; }
  .steps li { padding-left: 52px; }
  .steps li::before { left: 16px; }
  .footer-attribution { margin-left: 0; }
  .topline .update { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .topline, .nav-toggle, .btn, .filters { display: none !important; }
  body { background: #fff; }
  .card, .table-card, .chart-panel, .footer-card { box-shadow: none; }
}
@media (forced-colors: active) {
  .tile.has-data::after { forced-color-adjust: none; background: Highlight; }
}

/* Menu mobile sem JavaScript (âncora #main-nav) */
@media (max-width: 900px) { .main-nav:target { display: block; } }
.table-card tbody th, .chart-data tbody th { font-size: 14px; text-transform: none; letter-spacing: 0; color: inherit; font-weight: 600; border-bottom: 1px solid #EBF2EE; white-space: normal; }
.table-card tbody tr:last-child th { border-bottom: 0; }

.panorama .metric .value { font-size: clamp(22px, 2.2vw, 28px); }
@media (max-width: 620px) {
  .metrics.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart .axis-text { font-size: 18px; }
  .chart .value-text { font-size: 19px; }
  .table-card tbody th { white-space: nowrap; }
  .hero h1 { font-size: 38px; }
}
@media (max-width: 620px) {
  .chart.wide .axis-text { font-size: 30px; }
  .chart.wide .value-text { font-size: 30px; }
}
.metric.is-text .value { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.25; }
