/* FECCI 2026 · Painel — tokens extraídos do Manual dos Expositores */
:root {
  --brand-orange: #ED4A01;
  --brand-orange-2: #F1722E;
  --brand-amber: #F69520;
  --brand-cyan: #17B0C3;
  --brand-teal: #125C5C;
  --brand-blue: #0E4E8A;
  --brand-cream: #FCF2E3;
  --brand-ink: #1E1E1E;

  --bg: #FCF2E3;
  --surface: #FFFBF4;
  --surface-2: #F6E9D4;
  --line: #E8D9C1;
  --ink: #1E1E1E;
  --ink-2: #4A4A4A;
  --ink-3: #7A7268;
  --accent: #D9480A;
  --accent-soft: #FBD9C4;
  --focus: #0E4E8A;
  --shadow: 0 1px 2px rgba(18, 92, 92, .08), 0 8px 24px -12px rgba(18, 92, 92, .25);

  --cat-kids: #0B8FA3;
  --cat-junior: #4E6FD8;
  --cat-jovem: #D9480A;

  --seq-0: #F7E6D0;
  --seq-1: #A93300;
  --map-empty: #EFE1CB;
  --map-stroke: #FFFBF4;

  --hero-bg: #17B0C3;
  --hero-ink: #FCF2E3;

  --r: 18px;
  --r-sm: 10px;
  --font: "Century Gothic", "CenturyGothic", "Questrial", system-ui, sans-serif;
  --font-head: "Century Gothic", "CenturyGothic", "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #072E2E; --surface: #0B3B3B; --surface-2: #104848; --line: #1A5656;
    --ink: #FCF2E3; --ink-2: #CFE3DF; --ink-3: #8FB3AE; --accent: #F05A14; --accent-soft: #3A3A26; --focus: #FFB36B;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
    --cat-kids: #16A3B5; --cat-junior: #6F8CF0; --cat-jovem: #F05A14;
    --seq-0: #164F4F; --seq-1: #FFB066; --map-empty: #0F4343; --map-stroke: #0B3B3B;
    --hero-bg: #0F6F7C; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #072E2E; --surface: #0B3B3B; --surface-2: #104848; --line: #1A5656;
  --ink: #FCF2E3; --ink-2: #CFE3DF; --ink-3: #8FB3AE; --accent: #F05A14; --accent-soft: #3A3A26; --focus: #FFB36B;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.6);
  --cat-kids: #16A3B5; --cat-junior: #6F8CF0; --cat-jovem: #F05A14;
  --seq-0: #164F4F; --seq-1: #FFB066; --map-empty: #0F4343; --map-stroke: #0B3B3B;
  --hero-bg: #0F6F7C; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--surface); padding: 8px 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--hero-bg); color: var(--hero-ink);
  min-height: 340px; isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.08));
}
.hero-metro { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-metro .ghost { fill: none; stroke: rgba(18, 92, 92, .28); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.hero-metro .line { fill: none; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.hero-metro .stop { stroke-width: 4; }
.hero-metro .train { filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.hero-inner {
  max-width: 1320px; margin: 0 auto; padding: 40px 24px 28px; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 24px; min-height: 340px;
}
.hero-text { padding-bottom: 18px; animation: rise .9s var(--ease) both; }
.hero-logo { width: 130px; height: auto; display: block; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1; font-weight: 700; color: var(--brand-cream); text-shadow: 0 2px 0 rgba(0,0,0,.06); }
.hero h1 span { color: #FFF; }
.hero-pill {
  display: inline-block; margin: 16px 0 10px; padding: 8px 20px; border-radius: 999px;
  background: var(--brand-orange); color: #FFF; font-weight: 700; font-family: var(--font-head);
  letter-spacing: .02em; font-size: clamp(.82rem, 1.6vw, 1.05rem); box-shadow: 0 6px 16px -8px rgba(0,0,0,.4);
}
.hero-sub { margin: 0; font-weight: 600; opacity: .95; letter-spacing: .03em; text-transform: uppercase; font-size: .82rem; }
.hero-mascot {
  width: clamp(150px, 22vw, 290px); height: auto; align-self: flex-end; margin-bottom: -28px;
  transform-origin: 50% 90%; animation: float 5s ease-in-out infinite, pop .9s var(--ease) both .15s;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.18));
}
.theme-toggle {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.18); color: #FFF; cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px); transition: transform .3s var(--ease), background .3s;
}
.theme-toggle:hover { transform: rotate(-20deg) scale(1.06); background: rgba(255,255,255,.3); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .moon { display: none; fill: currentColor; stroke: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

@keyframes float { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: -2deg; } }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Filter bar ---------- */
.filterbar {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.filterbar.stuck { box-shadow: 0 10px 30px -18px rgba(0,0,0,.45); }
.fb-row { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 14px; height: 40px; flex: 1 1 240px; max-width: 340px;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; height: 100%; }
.fb-dims {
  display: flex; gap: 6px; flex-wrap: nowrap; flex: 1 1 300px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px;
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.fb-dims::-webkit-scrollbar { display: none; }
.fb-dims .dim-btn { flex: none; }
.dim-btn {
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--ink-2);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.dim-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.dim-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.dim-btn .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #FFF; font-size: .72rem; display: inline-grid; place-items: center; font-weight: 700; }
.dim-btn .n[hidden] { display: none; }
.dim-btn .caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; opacity: .6; }
.fb-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fb-count { font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.fb-count b { color: var(--ink); font-family: var(--font-head); font-size: 1rem; }
.btn {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: .86rem;
  background: var(--accent); color: #FFF; transition: transform .2s var(--ease), filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--ink); }
.chips { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: flex; gap: 6px; flex-wrap: wrap; }
.chips:not(:empty) { padding-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 12px; border-radius: 999px;
  background: var(--brand-teal); color: #FFF; font-size: .8rem; animation: chipIn .35s var(--ease) both;
}
.chip small { opacity: .75; }
.chip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #FFF; cursor: pointer; line-height: 1; }
.chip button:hover { background: rgba(255,255,255,.4); }
@keyframes chipIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* Popover */
.pop {
  position: fixed; z-index: 60; width: min(340px, calc(100vw - 32px)); max-height: min(460px, 70vh);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.45);
  display: flex; flex-direction: column; overflow: hidden; transform-origin: top left;
  animation: popIn .22s var(--ease) both;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.pop-h { padding: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; }
.pop-h input { flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; outline: none; }
.pop-h input:focus { border-color: var(--accent); }
.pop-list { overflow: auto; padding: 6px; }
.opt {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 7px 8px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font-size: .88rem; position: relative;
}
.opt:hover { background: var(--surface-2); }
.opt .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--ink-3); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.opt[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.opt[aria-checked="true"] .box::after { content: ""; width: 5px; height: 9px; border: solid #FFF; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -1px; }
.opt .cnt { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: .8rem; }
.opt .bar { position: absolute; left: 36px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); opacity: .35; }
.opt.zero { opacity: .45; }
.pop-f { padding: 8px 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; }
.range-box { padding: 14px 16px; display: grid; gap: 10px; }
.range-box .vals { display: flex; justify-content: space-between; font-weight: 700; font-family: var(--font-head); }
.dual { position: relative; height: 28px; }
.dual input { position: absolute; inset: 0; width: 100%; pointer-events: none; appearance: none; background: none; }
.dual input::-webkit-slider-thumb { pointer-events: auto; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: grab; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: grab; }
.dual .track { position: absolute; top: 12px; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.dual .fill { position: absolute; top: 12px; height: 4px; border-radius: 4px; background: var(--accent); }

/* ---------- Layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 24px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi {
  background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  border: 1px solid var(--line); animation: rise .7s var(--ease) both; transition: transform .3s var(--ease);
}
.kpi:hover { transform: translateY(-3px); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--k, var(--accent)); }
.kpi .v { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-2); font-size: .84rem; }
.kpi .d { font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
.kpi .spark { position: absolute; right: 12px; top: 14px; opacity: .9; }

.insights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.insight {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  background: var(--brand-teal); color: var(--brand-cream); position: relative; overflow: hidden;
}
.insight:nth-child(2) { background: var(--brand-orange); color: #FFF; }
.insight:nth-child(3) { background: var(--brand-blue); }
.insight:nth-child(4) { background: #0F7C8A; }
.insight .ico { flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 700; }
.insight p { margin: 0; font-size: .88rem; line-height: 1.4; }
.insight b { font-family: var(--font-head); font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px; min-width: 0; position: relative;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h2 { font-size: 1.12rem; font-weight: 700; }
.card-sub { margin: 2px 0 0; color: var(--ink-3); font-size: .8rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: .8rem; color: var(--ink-2); transition: background .25s var(--ease), color .25s; }
.seg button[aria-selected="true"] { background: var(--accent); color: #FFF; }
.seg.small button { padding: 4px 10px; font-size: .76rem; }

/* ---------- Maps ---------- */
.map-wrap { position: relative; }
.map { width: 100%; display: block; touch-action: none; }
#mapPR { height: 520px; cursor: grab; }
#mapPR:active { cursor: grabbing; }
.map-br { height: 330px; }
.map path.area { stroke: var(--map-stroke); stroke-width: .6; vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity .3s; }
.map path.area:hover { stroke: var(--ink); stroke-width: 1.4; }
.map path.area.sel { stroke: var(--ink); stroke-width: 2.2; }
.map.has-sel path.area:not(.sel) { opacity: .45; }
.map .outline { fill: none; stroke: var(--ink-3); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .bubble { fill: var(--brand-cyan); fill-opacity: .55; stroke: var(--surface); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .city-label { font-size: 11px; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; pointer-events: none; font-weight: 700; }
.map-br path.area.zero { fill: var(--map-empty); }
.map-br path.flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.map-tools { position: absolute; right: 8px; top: 8px; display: grid; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: 1.1rem; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s;
}
.icon-btn:hover { transform: scale(1.08); border-color: var(--accent); }
.icon-btn.toggle[aria-pressed="true"] { background: var(--accent); color: #FFF; border-color: var(--accent); }
.legend-seq { position: absolute; left: 8px; bottom: 8px; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 8px 10px; border-radius: 10px; font-size: .74rem; color: var(--ink-2); backdrop-filter: blur(6px); }
.legend-seq .ramp { width: 160px; height: 10px; border-radius: 5px; margin: 4px 0 2px; }
.legend-seq .ticks { display: flex; justify-content: space-between; }
.uf-list { display: grid; gap: 4px; margin-top: 8px; }
.uf-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 0; background: var(--surface-2); cursor: pointer; text-align: left; font-size: .86rem; transition: background .2s, transform .2s var(--ease); }
.uf-row:hover { transform: translateX(3px); }
.uf-row.sel { background: var(--accent); color: #FFF; }
.uf-row b { font-variant-numeric: tabular-nums; }

/* ---------- Charts ---------- */
.chart { position: relative; min-height: 120px; }
.chart.scroll { max-height: 470px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 4px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .row { cursor: pointer; }
.chart .row .hit { fill: transparent; }
.chart .row:hover .hit { fill: var(--surface-2); }
.chart .row .lbl { font-size: 12.5px; fill: var(--ink); }
.chart .row .val { font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 700; }
.chart.dim .row:not(.sel) .seg-r, .chart.dim .row:not(.sel) .lbl { opacity: .35; }
.chart .row.sel .lbl { font-weight: 700; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; }
.chart .axis path, .chart .axis line { stroke: var(--line); }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 3; }
.chart .grid path { display: none; }
.legend-cat { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin: -2px 0 8px; }
.legend-cat span { display: inline-flex; align-items: center; gap: 6px; }
.legend-cat i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.cat-cards { display: grid; gap: 10px; }
.cat-card {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  border: 2px solid transparent; background: var(--surface-2); cursor: pointer; text-align: left; transition: transform .25s var(--ease), border-color .25s, opacity .25s;
}
.cat-card:hover { transform: translateY(-2px); }
.cat-card.sel { border-color: var(--cc); }
.cat-card.dim { opacity: .45; }
.cat-card .ring { width: 56px; height: 56px; }
.cat-card h3 { font-size: 1rem; }
.cat-card p { margin: 0; font-size: .78rem; color: var(--ink-3); }
.cat-card .big { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.heat .cell { cursor: pointer; transition: opacity .2s; stroke: var(--surface); stroke-width: 2; }
.heat .cell:hover { stroke: var(--ink); }
.heat text { font-size: 11px; fill: var(--ink-2); }
.heat .cell-v { font-size: 10.5px; pointer-events: none; font-weight: 700; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 860px; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 10px 12px; font-family: var(--font-head); font-weight: 600; font-size: .8rem; cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th::after { content: " ↕"; opacity: .3; }
.tbl th.asc::after { content: " ↑"; opacity: 1; color: var(--accent); }
.tbl th.desc::after { content: " ↓"; opacity: 1; color: var(--accent); }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr { cursor: pointer; transition: background .15s; animation: rowIn .4s var(--ease) both; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td:first-child { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.tbl td.proj { font-weight: 600; max-width: 380px; }
.tbl mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; white-space: nowrap; }
.tag i { width: 9px; height: 9px; border-radius: 50%; }
.pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 12px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); }
.pager button { min-width: 34px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.pager button[aria-current="page"] { background: var(--accent); color: #FFF; border-color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: default; }
.empty { display: grid; place-items: center; text-align: center; padding: 28px; color: var(--ink-3); gap: 8px; }
.empty img { width: 110px; animation: float 4s ease-in-out infinite; }

/* ---------- Relatório ---------- */
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rel { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.rel h3 { font-size: .92rem; margin-bottom: 6px; }
.rel table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.rel td { padding: 3px 0; }
.rel td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; width: 64px; }
.rel th { text-align: right; font-size: .72rem; color: var(--ink-3); font-weight: 400; }
.rel th:first-child { text-align: left; }
.ok { color: #1E8E3E; font-weight: 700; }
.diff { color: var(--accent); font-weight: 700; }
:root[data-theme="dark"] .ok { color: #6BD48A; }
.rel .note { font-size: .76rem; color: var(--ink-3); margin: 8px 0 0; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.drawer::before { content: ""; position: absolute; inset: 0; background: rgba(4, 30, 30, .45); opacity: 0; transition: opacity .35s; }
.drawer.open { pointer-events: auto; }
.drawer.open::before { opacity: 1; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); padding: 28px 24px;
  overflow-y: auto; transform: translateX(100%); transition: transform .45s var(--ease); box-shadow: -20px 0 40px -20px rgba(0,0,0,.4);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-close { position: absolute; right: 16px; top: 16px; font-size: 1.4rem; }
.drawer h2 { font-size: 1.3rem; line-height: 1.25; margin: 10px 0 14px; padding-right: 40px; }
.drawer .badge { display: inline-block; padding: 4px 12px; border-radius: 999px; color: #FFF; font-weight: 700; font-size: .78rem; }
.drawer dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: .88rem; margin: 0 0 18px; }
.drawer dt { color: var(--ink-3); }
.drawer dd { margin: 0; }
.drawer .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer .mascot { width: 120px; display: block; margin: 20px auto 0; animation: float 5s ease-in-out infinite; }
.drawer .themes { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer .themes span { background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: .78rem; }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--bg); padding: 10px 12px; border-radius: 10px;
  font-size: .82rem; max-width: 280px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}
.tooltip.on { opacity: 1; transform: none; }
.tooltip h4 { margin: 0 0 4px; font-size: .9rem; font-family: var(--font-head); }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .tt-row i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.tooltip .tt-muted { opacity: .7; font-size: .76rem; margin-top: 4px; }

/* ---------- Footer ---------- */
.foot { max-width: 1320px; margin: 10px auto 0; padding: 0 24px 0; }
.foot-notes { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; }
.foot-notes img { width: 90px; height: auto; flex: none; }
.foot-notes h3 { font-size: .95rem; margin-bottom: 4px; }
.foot-notes p { margin: 0; font-size: .82rem; color: var(--ink-2); }
.foot-band { display: flex; align-items: center; gap: 3.2%; background: #FFF; border-radius: var(--r) var(--r) 0 0; margin-top: 20px; padding: 20px 28px; }
/* flex proporcional à razão largura/altura: as duas metades da régua mantêm a mesma altura */
.foot-logos { display: block; min-width: 0; width: 100%; height: auto; }
.foot-logos.a { flex: 10.326 1 0; }
.foot-logos.b { flex: 10.978 1 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .insights { grid-template-columns: repeat(2, 1fr); }
  .span-4, .span-5, .span-7 { grid-column: span 6; }
  .span-8 { grid-column: span 12; }
  #cardBR { grid-column: span 12; }
  .cat-wrap { grid-column: span 12; }
  .cat-wrap .cat-cards { grid-template-columns: repeat(3, 1fr); }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .cat-wrap .cat-cards { grid-template-columns: 1fr; }
  main { padding: 16px; }
  .fb-row, .chips { padding-left: 16px; padding-right: 16px; }
  .hero-inner { padding: 28px 16px 20px; min-height: 280px; }
  .hero { min-height: 280px; }
  .hero-mascot { position: absolute; right: -20px; bottom: 0; width: 140px; opacity: .9; }
  .hero-text { max-width: 70%; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .insights { grid-template-columns: 1fr; }
  .grid > .card { grid-column: span 12; }
  #mapPR { height: 380px; }
  .search { max-width: none; flex-basis: 100%; }
  .fb-dims { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .dim-btn { flex: none; }
  .rel-grid { grid-template-columns: 1fr; }
  .foot { padding: 0 16px; }
  .foot-notes { flex-direction: column; align-items: flex-start; }
  .foot-band { flex-direction: column; gap: 14px; padding: 16px; }
  .foot-logos.a, .foot-logos.b { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .filterbar, .theme-toggle, .map-tools, .pager, .drawer { display: none; }
  .reveal { opacity: 1; transform: none; }
}
