/* Arara · estudo de Furnas. Mesma identidade do globo: Bricolage Grotesque nos títulos, IBM Plex no texto,
   fundo escuro azulado, azul-água como destaque e as três cores da arara. Plex também fica local, de reserva. */
@font-face { font-family: "Plex Mono"; src: url(../fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(../fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(../fonts/plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(../fonts/plex-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(../fonts/plex-sans-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(../fonts/plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #04060c;
  --bg-2: #0a101a;
  --bg-3: #101826;
  --rule: #1a2531;
  --rule-2: #2b3b4a;
  --ink: #e9eef2;
  --ink-2: #a8b6c1;
  --ink-3: #6e7f8c;
  --water: #3b8fd9;
  --water-2: #2b78c0;
  --water-new: #4fb6ee;
  --ochre: #f4b63f;            /* amarelo da arara: vento, alertas */
  --ochre-2: #f7c566;
  --macaw-red: #e5482d;
  --macaw-yellow: #f4b63f;
  --macaw-blue: #3b8fd9;
  --accent: #4fb6ee;           /* azul-água, o mesmo do globo */
  --accent-dim: rgba(79, 182, 238, .14);
  --serif: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --bar-h: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mono, .label, .kicker, code, pre { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.02em; margin: 0; font-optical-sizing: auto; }
h1 { font-size: clamp(34px, 5.4vw, 72px); line-height: 1.04; max-width: 15ch; font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; margin-bottom: .7em; max-width: 22ch; }
p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-2); }
p b, li b, dd b { color: var(--ink); font-weight: 600; }

.kicker {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 18px; display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--accent); }

/* ---------- barra ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 1000;
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: rgba(4, 6, 12, .92); border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 22px/1 var(--serif); letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.brand .mark { width: 32px; height: auto; display: block; }
.brand span { color: var(--accent); }
.instrument { font: 400 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--rule-2); padding-left: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { margin-left: auto; display: flex; gap: 8px; }

.btn {
  font: 500 13px/1 var(--sans); letter-spacing: 0; text-transform: none; text-decoration: none;
  height: 36px; padding: 0 14px; border: 1px solid rgba(160, 196, 214, .16); background: rgba(10, 16, 26, .9); color: var(--ink);
  cursor: pointer; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn:hover { border-color: rgba(244, 182, 63, .5); }
.btn-accent { background: var(--macaw-yellow); color: #1a1205; border-color: transparent; font-weight: 600; }
.btn-accent:hover { background: var(--macaw-yellow); filter: brightness(1.06); border-color: transparent; }

/* ---------- mapas ---------- */
.map { background: #070b12; position: relative; isolation: isolate; }
.leaflet-container { background: #070b12; font: 13px/1.4 var(--mono); outline: none; }
.leaflet-control-attribution {
  background: rgba(7, 11, 18, .8) !important; color: var(--ink-3) !important; font: 13px/1.4 var(--mono);
  padding: 2px 6px !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-control-scale-line {
  background: rgba(7, 11, 18, .82); border-color: var(--ink-2); color: var(--ink); font: 13px/1.3 var(--mono);
  padding: 1px 6px;
}
.leaflet-bar { border: 1px solid var(--rule-2) !important; border-radius: 2px !important; box-shadow: none !important; }
.leaflet-bar a { background: var(--bg-2) !important; color: var(--ink) !important; border-color: var(--rule-2) !important; border-radius: 0 !important; font: 400 16px/26px var(--mono) !important; }
.leaflet-bar a:hover { background: var(--bg-3) !important; }
.map-credit { font: 13px/1.5 var(--mono); color: var(--ink-3); margin: 8px 0 0; max-width: none; letter-spacing: .02em; }
.leaflet-image-layer.fade { transition: opacity .6s ease; }
.coords {
  position: absolute; right: 8px; top: 8px; z-index: 500; pointer-events: none;
  font: 13px/1.3 var(--mono); color: var(--ink-2); letter-spacing: .04em;
  background: rgba(7, 11, 18, .75); padding: 4px 6px; border: 1px solid var(--rule);
}
.map-label {
  font: 500 13px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 6px #000;
}
.map-label::before { content: ""; display: inline-block; width: 5px; height: 5px; border: 1px solid var(--accent); margin-right: 6px; vertical-align: 1px; }

/* ---------- abertura ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero-map { position: absolute; inset: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 400;
  background:
    linear-gradient(90deg, rgba(4,6,12,.94) 0%, rgba(4,6,12,.78) 34%, rgba(4,6,12,0) 62%),
    linear-gradient(0deg, rgba(4,6,12,1) 0%, rgba(4,6,12,0) 22%);
}
.sweep { position: absolute; inset: 0; z-index: 450; pointer-events: none; }
.veil { position: absolute; inset: 0; background: #070b12; }
.sweep.go .veil { animation: unveil 2.1s cubic-bezier(.45,.05,.4,1) .1s forwards; }
.beam {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--accent);
  box-shadow: 0 0 12px 1px rgba(79,182,238,.65), 0 -40px 60px -20px rgba(79,182,238,.10);
  opacity: 0;
}
.sweep.go .beam { animation: beam 2.1s cubic-bezier(.45,.05,.4,1) .1s forwards; }
@keyframes unveil { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }
@keyframes beam { 0% { top: 0; opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.hero-text {
  position: absolute; z-index: 500; left: var(--gutter); bottom: clamp(70px, 12vh, 130px);
  max-width: min(720px, 62vw);
}
.hero-text .dek { font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-2); margin-top: 22px; max-width: 54ch; }
.hero-text > * { opacity: 0; transform: translateY(10px); animation: rise .8s ease forwards; }
.hero-text .kicker { animation-delay: 1.4s; }
.hero-text h1 { animation-delay: 1.6s; }
.hero-text .dek { animation-delay: 1.9s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-meta {
  position: absolute; z-index: 500; right: var(--gutter); top: calc(var(--bar-h) + 18px);
  font-size: 13px; line-height: 1.7; color: var(--ink-2); text-align: right; letter-spacing: .05em;
  text-transform: uppercase; background: rgba(7, 11, 18, .78); border: 1px solid var(--rule); padding: 8px 10px;
}
.hero-meta b { color: var(--accent); font-weight: 500; }
.hero-cap { position: absolute; z-index: 500; right: var(--gutter); bottom: 30px; background: rgba(7, 11, 18, .78); padding: 4px 8px; font-size: 13px; color: var(--ink-3); margin: 0; max-width: 62ch; text-align: right; }
.scroll-cue {
  position: absolute; z-index: 500; left: var(--gutter); bottom: 24px; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.scroll-cue i { width: 1px; height: 26px; background: var(--rule-2); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -10px; width: 1px; height: 10px; background: var(--accent); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { to { top: 26px; } }

/* ---------- seções ---------- */
.sec { padding: clamp(80px, 12vh, 140px) 0; border-top: 1px solid var(--rule); }
.wrap { padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.wrap.wide { max-width: 1440px; }
.grid-2 {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px);
  padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; align-items: start;
}
.grid-2.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.col-fig { margin: 0; position: sticky; top: calc(var(--bar-h) + 24px); }
.map.tall { height: min(78vh, 760px); border: 1px solid var(--rule); }
figcaption.mono { font-size: 13px; color: var(--ink-3); margin-top: 13px; letter-spacing: .03em; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 36px; }
.cols-3 p { font-size: 15.5px; }
.lede { font-size: 19px; color: var(--ink); max-width: 60ch; }
.aside { font-size: 14px; color: var(--ink-3); }
.note { font-size: 13px; color: var(--ink-3); margin-top: 13px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* diagrama */
.diagram { margin: 6px 0 22px; max-width: 460px; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.diagram text { font-family: var(--mono); fill: var(--ink-3); letter-spacing: .02em; }
.dia-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; font: 13px/1.4 var(--mono); color: var(--ink-3); text-align: center; }
.diagram .pulse { stroke-dasharray: 4 5; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -18; } }

/* legenda de classes */
.legend-classes { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 26px; }
.legend-classes button {
  display: grid; grid-template-columns: 18px 1fr; column-gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-left: 2px solid transparent; color: var(--ink); padding: 9px 10px; cursor: pointer;
  font: 15px/1.35 var(--sans);
}
.legend-classes button span { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.legend-classes button:hover, .legend-classes button.on { background: var(--bg-2); border-left-color: var(--accent); }
.sw { display: inline-block; width: 14px; height: 14px; margin-top: 3px; border: 1px solid rgba(255,255,255,.15); }
.sw-water { background: #050a0d; }
.sw-volume { background: #c9e04a; }
.sw-field { background: #8a68c9; }
.sw-dried { background: var(--ochre); }
.sw-new { background: var(--water-new); }
.sw-net { background: transparent; border-color: var(--ink-3); }
.probe {
  font-size: 13px; color: var(--ink-2); border: 1px solid var(--rule); border-top: 0; padding: 8px 13px; min-height: 34px;
  background: var(--bg-2); letter-spacing: .03em;
}
.probe.static { border-top: 1px solid var(--rule); clear: both; }
#map-hero .coords { display: none; }
.nocase { text-transform: none; }
.probe b { color: var(--ink); font-weight: 500; }
.probe em { font-style: normal; color: var(--accent); }

/* ---------- linha do tempo ---------- */
.tl { display: flex; border: 1px solid var(--rule); }
.tl-map { height: min(80vh, 820px); width: min(100%, calc(min(80vh, 820px) * 1.2)); flex: 0 1 auto; }
.tl-panel { flex: 1 1 320px; min-width: 300px; border-left: 1px solid var(--rule); padding: 22px; display: flex; flex-direction: column; gap: 16px; background: var(--bg-2); }
.tl-date { font-size: 22px; color: var(--ink); letter-spacing: .02em; }
.tl-flag { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); min-height: 16px; display: flex; gap: 8px; align-items: center; }
.tl-flag.on { color: var(--ochre-2); }
.tl-flag.on::before { content: ""; border: 5px solid transparent; border-bottom: 8px solid var(--ochre); border-top: 0; }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; border-top: 1px solid var(--rule); padding-top: 14px; }
.readout .label { width: 100%; }
.big { font: 400 clamp(44px, 4.4vw, 60px)/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.unit { font: 14px var(--mono); color: var(--ink-3); }
.mini { display: grid; grid-template-columns: 1fr auto; gap: 7px 13px; margin: 0; font-size: 13px; border-top: 1px solid var(--rule); padding-top: 14px; }
.mini dt { color: var(--ink-3); }
.mini dd { margin: 0; color: var(--ink); text-align: right; }
.check { display: flex; gap: 13px; align-items: center; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; margin: 6px 0 16px; }
.check input { appearance: none; width: 14px; height: 14px; border: 1px solid var(--ink-3); margin: 0; display: grid; place-content: center; cursor: pointer; }
.check input:checked { border-color: var(--accent); }
.check input:checked::after { content: ""; width: 8px; height: 8px; background: var(--accent); }
.tl-panel .check { margin-top: auto; }

.ruler-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 18px; }
.play { min-width: 104px; justify-content: center; height: 40px; }
.ico-play { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.play.on .ico-play { width: 8px; height: 10px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.ruler svg { width: 100%; height: 76px; display: block; overflow: visible; }
.ruler text { font: 13px var(--mono); fill: var(--ink-3); letter-spacing: .05em; }
.ruler .axis { stroke: var(--rule-2); }
.ruler .minor { stroke: var(--rule-2); }
.ruler .major { stroke: var(--ink-3); }
.ruler .pass { cursor: pointer; }
.ruler .pass rect.hit { fill: transparent; }
.ruler .pass line { stroke: var(--ink-2); stroke-width: 2; transition: stroke .3s; }
.ruler .pass:hover line { stroke: var(--ink); }
.ruler .pass.on line { stroke: var(--accent); }
.ruler .pass .lbl { opacity: 0; transition: opacity .3s; fill: var(--accent); }
.ruler .pass.on .lbl { opacity: 1; }
.ruler .flag { fill: var(--ochre); }
.ruler .cursor { fill: var(--accent); transition: transform .6s cubic-bezier(.4,0,.2,1); }
.ruler-legend { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin: 4px 0 0 124px; flex-wrap: wrap; letter-spacing: .04em; }
.ruler-legend .tri { border: 4px solid transparent; border-bottom: 7px solid var(--ochre); border-top: 0; }
.ruler-legend .tick { width: 2px; height: 12px; background: var(--ink-2); margin-left: 14px; }

/* ---------- antes x depois ---------- */
.swipe { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; z-index: 600; }
.swipe::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--accent); }
.swipe-handle {
  position: absolute; top: 50%; left: -17px; width: 34px; height: 34px; margin-top: -17px; background: var(--bg);
  border: 1px solid var(--accent); cursor: ew-resize; padding: 0; touch-action: none;
}
.swipe-handle::before, .swipe-handle::after { content: ""; position: absolute; top: 12px; border: 5px solid transparent; }
.swipe-handle::before { left: 4px; border-right: 6px solid var(--accent); border-left: 0; }
.swipe-handle::after { right: 4px; border-left: 6px solid var(--accent); border-right: 0; }
.swipe-tag { position: absolute; top: 13px; font-size: 13px; letter-spacing: .06em; color: var(--ink); background: rgba(7,11,18,.82); padding: 4px 7px; white-space: nowrap; border: 1px solid var(--rule); }
.swipe-tag.l { right: 10px; }
.swipe-tag.r { left: 10px; }
.chg-stats { display: grid; gap: 8px; margin: 4px 0 22px; font: 14px var(--mono); color: var(--ink); }
.chg-stats > div { display: flex; align-items: center; gap: 10px; }
.chg-stats .sw { margin: 0; }
.chg-stats .label { margin-left: 4px; }

/* ---------- prova ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink-3); border-bottom: 1px solid var(--rule); margin: 40px 0 48px; }
.stat { padding: 26px 28px 22px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--rule); }
.stat-v { display: block; font: 700 clamp(52px, 6.4vw, 92px)/1 var(--serif); color: var(--ink); letter-spacing: -.02em; margin-bottom: 13px; }
.stat-v small { font: 400 15px var(--mono); color: var(--ink-3); letter-spacing: 0; margin-left: 8px; }
.stat:first-child .stat-v { color: var(--accent); }
.stat p { font-size: 14.5px; margin: 0; }
.charts { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
.chart { margin: 0; }
.chart-title { font: 500 15px var(--sans); color: var(--ink); margin-bottom: 8px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); margin-bottom: 13px; letter-spacing: .03em; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; }
.k-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.k-hollow { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ochre); }
.k-line { width: 18px; height: 2px; background: var(--ink-2); }
.k-dash { width: 18px; height: 0; border-top: 2px dashed var(--accent); }
.k-band { width: 18px; height: 10px; background: rgba(168, 182, 193, .14); }
.svg-host svg { width: 100%; height: auto; display: block; overflow: visible; }
.svg-host text { font: 13px var(--mono); fill: var(--ink-3); }
.svg-host .grid line { stroke: var(--rule); }
.svg-host .axis-x line, .svg-host .base { stroke: var(--rule-2); }
.svg-host .dlabel { fill: var(--ink-2); font-size: 13px; }
.svg-host .dlabel.flag { fill: var(--ochre-2); }
.svg-host .pt { transition: opacity .4s, transform .4s; }
.svg-host .hot { cursor: pointer; fill: transparent; }
.svg-host .xhair { stroke: var(--ink-3); stroke-dasharray: 2 3; }
.honest { border-left: 2px solid var(--accent); padding-left: 18px; margin: 46px 0 26px; color: var(--ink); max-width: 72ch; font-size: 16px; }
.honest b { color: var(--accent); }
.tooltip {
  position: fixed; z-index: 2000; pointer-events: none; background: var(--bg); border: 1px solid var(--rule-2);
  font-size: 13px; line-height: 1.6; padding: 8px 13px; color: var(--ink-2); opacity: 0; transition: opacity .15s; min-width: 180px;
}
.tooltip.on { opacity: 1; }
.tooltip b { color: var(--ink); font-weight: 500; }
.tooltip .f { color: var(--ochre-2); }
.tooltip .row { display: flex; justify-content: space-between; gap: 16px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { border-collapse: collapse; font: 13px var(--mono); min-width: 640px; width: 100%; }
th, td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
th { color: var(--ink-3); font-weight: 400; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }
th:first-child, td:first-child { text-align: left; }
tr.flag td { color: var(--ochre-2); }

/* ---------- polarizações ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: rgba(10, 16, 26, .9); border: 1px solid rgba(160, 196, 214, .16); border-radius: 10px; margin: 4px 0 22px; flex-wrap: wrap; }
.seg button {
  font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  background: none; border: 0; padding: 11px 18px; cursor: pointer;
}
.seg button { border-radius: 7px; border: 0; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { color: var(--accent); background: var(--accent-dim); }
.pol-text { display: none; color: var(--ink); font-size: 17px; }
.pol-text.on { display: block; animation: rise .5s ease both; }

/* ---------- fator humano ---------- */
.evidence { display: grid; grid-template-columns: 150px 1fr; gap: 0; margin: 28px 0 0; border-top: 1px solid var(--rule); font-size: 15px; }
.evidence dt, .evidence dd { padding: 12px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.evidence dt { font: 13px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.evidence dd { color: var(--ink-2); }
.evidence dt:first-of-type, .evidence dt:first-of-type + dd { color: var(--accent); }
.gauge { max-width: 560px; }
.gauge .lvl { stroke: var(--water); }

/* ---------- limitações, reuso, fontes ---------- */
.limits, .inputs { padding: 0; margin: 0; list-style: none; counter-reset: n; max-width: 80ch; }
.limits li, .inputs li {
  counter-increment: n; display: grid; grid-template-columns: 48px 1fr; padding: 16px 0; border-top: 1px solid var(--rule);
  color: var(--ink-2);
}
.limits li::before, .inputs li::before { content: counter(n, decimal-leading-zero); font: 13px/1.9 var(--mono); color: var(--ink-3); grid-row: span 2; }
.limits li:last-child, .inputs li:last-child { border-bottom: 1px solid var(--rule); }
.code {
  background: #070b12; border: 1px solid var(--rule); border-left: 2px solid var(--accent); padding: 20px 22px; margin: 30px 0 22px;
  font-size: 13px; line-height: 1.75; color: var(--ink); overflow-x: auto; max-width: 860px;
}
.code .c { color: var(--ink-3); }
.code #code-limiar { color: var(--accent); }
.link { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(79,182,238,.4); }
.link:hover { border-bottom-color: var(--accent); }
.placeholder { font-size: 13px; color: var(--ochre-2); margin-left: 8px; }
.sources { display: grid; grid-template-columns: 200px 1fr; margin: 0 0 30px; border-top: 1px solid var(--rule); }
.sources dt, .sources dd { padding: 16px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.sources dt { font: 13px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sources dd { color: var(--ink-2); font-size: 15px; min-width: 0; }
.scenes { list-style: none; padding: 0; margin: 13px 0 0; font-size: 13px; color: var(--ink-3); }
.scenes li { padding: 3px 0; overflow-wrap: anywhere; }
.scenes li span { color: var(--ink-2); margin-right: 10px; }
.placeholder-team { color: var(--ochre-2) !important; font-family: var(--mono); font-size: 13px !important; }
#sources { padding-bottom: 100px; }

/* ---------- explorar ---------- */
.explore { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.explore[hidden] { display: none; }
.ex-map { height: 100%; }
.ex-panel { border-left: 1px solid var(--rule); padding: 18px 20px; overflow-y: auto; background: var(--bg-2); }
.ex-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ex-head h2 { font-size: 26px; margin: 0; }
.ex-panel fieldset { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: 14px 0 6px; }
.ex-panel legend { padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.ex-panel .seg { margin: 0; clear: both; }
.ex-panel .seg button { padding: 9px 14px; }
.ex-panel .check { margin: 8px 0; clear: both; }
.ex-dates { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; clear: both; }
.ex-dates button { font: 13px var(--mono); background: none; border: 1px solid var(--rule-2); color: var(--ink-2); padding: 7px 0; cursor: pointer; position: relative; }
.ex-dates button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.ex-dates button.flag::after { content: ""; position: absolute; top: 3px; right: 3px; border: 3px solid transparent; border-bottom: 5px solid var(--ochre); border-top: 0; }
.ex-dates button:disabled { opacity: .3; cursor: default; }
.range { display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; margin: 13px 0; clear: both; }
.range input { accent-color: var(--accent); width: 100%; }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .instrument { display: none; }
  .grid-2, .grid-2.flip { grid-template-columns: minmax(0, 1fr); }
  .grid-2.flip .col-fig { order: 2; }
  .col-fig { position: static; }
  .map.tall { height: auto; aspect-ratio: 1.05 / 1; min-height: 0; }
  .cols-3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tl { flex-direction: column; }
  .tl-map { width: 100%; height: auto; aspect-ratio: 1.05 / 1; }
  .tl-panel { min-width: 0; flex: none; border-left: 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 16px; }
  .tl-panel .tl-date, .tl-panel .tl-flag { grid-column: span 1; }
  .tl-panel .readout, .tl-panel .mini { grid-column: span 2; }
  .tl-panel .check { grid-column: span 2; margin: 0; }
  .ruler-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ruler-legend { margin-left: 0; flex-wrap: wrap; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .charts { grid-template-columns: minmax(0, 1fr); }
  /* hero: mapa em cima, texto embaixo sobre fundo liso (nada de texto sobre a imagem) */
  .hero { height: auto; min-height: 0; padding-top: var(--bar-h); display: flex; flex-direction: column; }
  .hero-map { position: relative; inset: auto; height: 50svh; min-height: 300px; flex: none; }
  .sweep { inset: var(--bar-h) 0 auto 0; height: 50svh; min-height: 300px; }
  .hero::after { inset: var(--bar-h) 0 auto 0; height: 50svh; min-height: 300px; background: linear-gradient(0deg, rgba(4,6,12,1) 0%, rgba(4,6,12,0) 22%); }
  .hero-text { position: relative; inset: auto; max-width: none; padding: 8px var(--gutter) 0; }
  .hero-meta { top: calc(var(--bar-h) + 10px); right: 10px; font-size: 13px; line-height: 1.5; }
  .scroll-cue { position: relative; left: auto; bottom: auto; margin: 26px var(--gutter) 34px; }
  .hero-cap, #map-hero .leaflet-control-attribution, #map-hero .leaflet-control-scale { display: none; }
  .sources, .evidence { grid-template-columns: minmax(0, 1fr); }
  .sources dt, .evidence dt { border-bottom: 0; padding-bottom: 0; }
  .explore { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52% 48%; }
  .ex-panel { padding: 14px var(--gutter); }
  .ex-dates button { padding: 9px 0; }
  .ex-panel { border-left: 0; border-top: 1px solid var(--rule); }
  .bar { gap: 10px; }

  .btn { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sweep { display: none; }
  .hero-text > * { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}


/* ---------- arredondado e vidro, como no globo ---------- */
.col-fig .map, .tl, .swipe-map, .code, .tooltip, .table-wrap { border-radius: var(--radius); overflow: hidden; }
.tl, .code, .tooltip { border: 1px solid rgba(160, 196, 214, .16); }
.leaflet-bar, .leaflet-bar a:first-child, .leaflet-bar a:last-child { border-radius: 9px !important; }
.leaflet-control-scale-line, .coords { border-radius: 6px; }
.back-globe { text-decoration: none; }
