/* Vulns (vulns.today) — estilos
   Uma carta náutica à noite: fundo de mar escuro, tinta clara e um marca-texto verde-limão.
   A interface fica em tons neutros; a cor é reservada para os dados (severidade e gráficos).
   O tema claro é a mesma carta impressa em papel. */

:root {
  /* escuro (padrão) */
  --paper: #07090d;
  --surface: #0e131a;
  --surface-2: #161d27;
  --ink: #edebe4;
  --ink-2: #b2b7bb;
  --muted: #7c8692;
  --line: #18202b;
  --line-strong: #2a3644;
  --accent: #c8f031;
  --accent-ink: #0b0f14;
  --accent-text: #c8f031; /* o destaque quando é usado como cor de texto */
  --focus: #6da7ec;
  --grid-dot: rgba(160, 180, 205, 0.16);
  --glow: rgba(200, 240, 49, 0.13);

  /* dados */
  --series: #3987e5;
  --sev-critical: #c94fb5;
  --sev-high: #d43d3d;
  --sev-medium: #c98500;
  --sev-low: #3987e5;
  --sev-none: #898781;
  --sev-unrated: #334150;
  --grid: #1a222d;
  --axis: #2a3644;
  /* rampa sequencial (um matiz): no escuro, mais = mais claro */
  --heat-0: #121922;
  --heat-1: #10305a;
  --heat-2: #184f95;
  --heat-3: #256abf;
  --heat-4: #3987e5;
  --heat-5: #86b6ef;
  --heat-6: #cde2fb;

  /* tipografia do mapa da página inicial (lida também pelo canvas em js/atlas.js) */
  --atlas-number-font: "IBM Plex Sans", system-ui, sans-serif;
  --atlas-number-weight: 700;
  --atlas-label-font: "Instrument Serif", Georgia, serif;
  --atlas-label-weight: 400;
  --atlas-label-style: italic;
  --atlas-label-case: none;
  --atlas-label-tracking: 0em;
  --atlas-label-scale: 1.55;

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 44px);
  --maxw: 1280px;
  --topbar-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 48px -18px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --paper: #f2eee3;
  --surface: #faf8f1;
  --surface-2: #e8e3d5;
  --ink: #121a24;
  --ink-2: #47505a;
  --muted: #646870;
  --line: #d9d3c4;
  --line-strong: #bfb8a6;
  --accent-ink: #121a24;
  --accent-text: #121a24;
  --focus: #2a78d6;
  --grid-dot: rgba(18, 26, 36, 0.13);
  --glow: rgba(200, 240, 49, 0.38);

  --series: #2a78d6;
  --sev-critical: #9b1c6f;
  --sev-high: #d8382f;
  --sev-medium: #e39a00;
  --sev-low: #2a78d6;
  --sev-none: #898781;
  --sev-unrated: #cbc6b8;
  --grid: #e3dfd4;
  --axis: #c3bdae;
  /* no claro, mais = mais escuro */
  --heat-0: #eae6da;
  --heat-1: #cde2fb;
  --heat-2: #9ec5f4;
  --heat-3: #6da7ec;
  --heat-4: #3987e5;
  --heat-5: #1c5cab;
  --heat-6: #0d366b;

  --shadow: 0 1px 2px rgba(18, 26, 36, 0.06), 0 14px 36px -16px rgba(18, 26, 36, 0.25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grão fino por cima de tudo: tira o aspecto chapado do fundo. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .6 0 0 0 0 .6 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1; outline: none; }

.mono { font-family: var(--font-mono); font-size: 0.86em; }
.eyebrow { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.mark { background: var(--accent); color: var(--accent-ink); padding: 0 0.18em; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ───────── Barra superior ───────── */

.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 11px var(--gutter); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark, .boot-mark { width: 26px; height: 26px; flex-shrink: 0; transition: transform 0.7s var(--ease); }
.brand-mark .ring, .boot-mark .ring { fill: var(--ink); }
.brand-mark .found, .boot-mark .found { fill: var(--accent); }
:root[data-theme="light"] .brand-mark .found, :root[data-theme="light"] .boot-mark .found { stroke: var(--ink); stroke-width: 1.3; }
/* Logo: um prompt de terminal (>_) com o cursor na cor de destaque. */
.brand-mark .bm-frame, .boot-mark .bm-frame { fill: none; stroke: var(--ink); stroke-width: 2; }
.brand-mark .bm-prompt, .boot-mark .bm-prompt { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .bm-cursor, .boot-mark .bm-cursor { fill: none; stroke: var(--accent-text); stroke-width: 2.6; stroke-linecap: round; }
.brand:hover .bm-cursor { animation: cursor-blink 0.9s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.brand-tld { color: var(--muted); }
.brand-name { font: 400 24px/1 var(--font-display); letter-spacing: 0.005em; }

.nav { position: relative; display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; z-index: 1; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 14px; white-space: nowrap; transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 500; }
.nav-pill { position: absolute; left: 0; top: 50%; height: 30px; margin-top: -15px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); opacity: 0; pointer-events: none; transition: transform 0.32s var(--ease), width 0.32s var(--ease), opacity 0.2s; }

.topsearch { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px 5px 12px; width: 220px; flex-shrink: 0; transition: border-color 0.2s; }
.topsearch:focus-within { border-color: var(--ink); }
.topsearch svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.topsearch input { border: 0; background: none; outline: none; min-width: 0; flex: 1; font-size: 14px; }
button.topsearch { text-align: left; color: var(--muted); font-size: 14px; cursor: pointer; }
button.topsearch:hover { border-color: var(--ink); color: var(--ink-2); }
.topsearch .ts-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topsearch input::-webkit-search-cancel-button { display: none; }
kbd { font: 500 11px/1 var(--font-mono); padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); background: var(--paper); }

.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 50%; flex-shrink: 0; padding: 0; transition: border-color 0.2s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang-btn { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: 500 11px/1 var(--font-mono); flex-shrink: 0; transition: border-color 0.2s; }
.lang-btn:hover { border-color: var(--ink); }
.lang-btn span { padding: 6px 8px; border-radius: 999px; color: var(--muted); }
.lang-btn span.on { background: var(--ink); color: var(--paper); }

@media (max-width: 1140px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 10px; }
  .nav { order: 5; flex-basis: 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .topsearch { flex: 1; width: auto; margin-left: auto; max-width: 300px; }
  .topsearch kbd { display: none; }
}
/* No celular a busca do topo sai: a página inicial e o explorador já têm a sua. */
@media (max-width: 600px) {
  .topsearch { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; justify-content: center; margin-left: auto; border-radius: 50%; }
  .topsearch .ts-label, .topsearch kbd { display: none; }
  .brand { margin-right: auto; }
}

/* ───────── Carregamento ───────── */

.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); font: 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.boot-mark { width: 44px; height: 44px; }
.boot-mark .bm-cursor { animation: cursor-blink 0.9s steps(1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { max-width: 540px; text-align: center; color: var(--ink); text-transform: none; letter-spacing: 0; font: 15px/1.55 var(--font-sans); display: grid; gap: 10px; justify-items: center; }
.boot-error h2 { font: 400 32px/1.1 var(--font-display); }
.boot-error code { padding: 5px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font: 13px var(--font-mono); }

/* ───────── Efeitos ───────── */

/* Revelação ao rolar. A animação só preenche "para trás": depois dela o elemento
   volta ao estilo normal, e o hover continua funcionando. */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: reveal 0.8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(22px); } }

/* Foco de luz que segue o cursor. */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 70%); }
.spot:hover::before { opacity: 1; }

.click-spark { position: fixed; z-index: 90; width: 0; height: 0; pointer-events: none; }
.click-spark i { position: absolute; left: -1px; top: 0; width: 2px; height: 9px; border-radius: 2px; background: var(--accent-text); transform-origin: 50% 0; transform: rotate(var(--a)) translateY(7px); animation: spark 0.5s ease-out forwards; }
@keyframes spark { to { transform: rotate(var(--a)) translateY(28px) scaleY(0.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ───────── Página: estrutura ───────── */

.page { position: relative; z-index: 0; padding: clamp(30px, 5vw, 60px) 0 88px; animation: rise 0.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
/* Malha de pontos atrás do cabeçalho: a mesma textura do mapa. */
.page::before { content: ""; position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none; background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.6px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }

.page-head { margin-bottom: clamp(26px, 4vw, 44px); }
.page-head.compact { margin-bottom: 26px; }
.page-head.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 330px); gap: clamp(24px, 5vw, 64px); align-items: center; }
.page-head h1 { font: 400 clamp(40px, 6vw, 76px)/1 var(--font-display); letter-spacing: -0.015em; margin-top: 12px; text-wrap: balance; overflow-wrap: anywhere; }
.page-head .lede { margin-top: 16px; max-width: 66ch; color: var(--ink-2); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.5; text-wrap: pretty; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: 0.5; }
@media (max-width: 820px) {
  .page-head.with-aside { grid-template-columns: minmax(0, 1fr); }
  .page-head-aside { max-width: 250px; }
}

.atoll-figure { display: grid; gap: 10px; justify-items: center; }
.atoll { position: relative; width: 100%; aspect-ratio: 1; }
.atoll canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.atoll-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; pointer-events: none; }
.atoll-center b { font: 600 clamp(20px, 2.3vw, 30px)/1 var(--font-sans); letter-spacing: -0.02em; }
.atoll-center span { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.atoll-figure figcaption { font: 11px/1.4 var(--font-mono); color: var(--muted); text-align: center; max-width: 30ch; }

.section { margin-top: clamp(48px, 7vw, 96px); }
.page, .home-body { counter-reset: sec; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.section-head h2 { font: 400 clamp(28px, 3.6vw, 42px)/1.05 var(--font-display); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 14px; }
.section-head h2::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--muted); transform: translateY(-0.9em); }
.section-head .more { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.section-note { color: var(--muted); font-size: 14px; margin: -8px 0 20px; max-width: 76ch; }

/* ───────── Botões, chips, campos ───────── */

.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 500; font-size: 14px; text-decoration: none; line-height: 1.2; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
/* Brilho que atravessa o botão no hover. */
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); transition: left 0.55s var(--ease); pointer-events: none; }
.btn:hover::after { left: 120%; }
.btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:root[data-theme="light"] .btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:root[data-theme="light"] .btn.accent { border-color: var(--ink); }
.btn.accent:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn.ghost[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:root[data-theme="light"] .btn.ghost[aria-pressed="true"] { border-color: var(--ink); }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn[aria-pressed="true"] svg.fillable { fill: currentColor; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; text-decoration: none; background: var(--surface); color: var(--ink); line-height: 1.3; transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s; }
a.chip:hover, button.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip .n { font: 500 11.5px var(--font-mono); color: var(--muted); }
.chip .x { font-size: 15px; line-height: 1; opacity: 0.6; }
button.chip:hover .x { opacity: 1; }

.input, .select { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; outline: none; min-width: 0; transition: border-color 0.2s; }
.input:focus, .select:focus { border-color: var(--ink); }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.linkish { border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; white-space: nowrap; }
.linkish:hover { color: var(--ink); }

/* ───────── Severidade e estado ───────── */

.sev { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap; color: var(--ink-2); }
.sev::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sev-color, var(--sev-unrated)); flex-shrink: 0; }
[data-sev="critical"] { --sev-color: var(--sev-critical); }
[data-sev="high"] { --sev-color: var(--sev-high); }
[data-sev="medium"] { --sev-color: var(--sev-medium); }
[data-sev="low"] { --sev-color: var(--sev-low); }
[data-sev="none"] { --sev-color: var(--sev-none); }
[data-sev="unrated"] { --sev-color: var(--line-strong); }
.sev[data-sev="critical"], .sev[data-sev="high"] { color: var(--ink); }
.sev[data-sev="unrated"]::before { background: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.sev[data-sev="critical"]::before { border-radius: 2px; transform: rotate(45deg); }

.tag { display: inline-block; font: 500 11px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 8px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; text-decoration: none; }
a.tag:hover { color: var(--ink); }
.sev-strip { display: flex; gap: 2px; height: 4px; }
.sev-strip i { border-radius: 2px; min-width: 2px; }

/* ───────── Linha de report ───────── */

.report-list { border-top: 1px solid var(--line); }
.report-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 4px 18px; align-items: start; padding: 15px 12px; border-bottom: 1px solid var(--line); position: relative; transition: background 0.2s; }
.report-row::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--sev-color); transform: scaleY(0); transition: transform 0.25s var(--ease); }
.report-row:hover { background: var(--surface); }
.report-row:hover::before { transform: scaleY(1); }
.report-row.is-read .rr-title { color: var(--ink-2); }
.rr-sev { padding-top: 4px; }
.rr-main { min-width: 0; }
.rr-title { font-weight: 500; font-size: 15.5px; line-height: 1.38; text-decoration: none; display: block; overflow-wrap: anywhere; }
.rr-title::after { content: ""; position: absolute; inset: 0; }
.rr-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 5px; font-size: 13px; color: var(--muted); }
.rr-meta a { position: relative; z-index: 1; text-decoration: none; color: var(--ink-2); }
.rr-meta a:hover { text-decoration: underline; color: var(--ink); }
.rr-meta .sep { opacity: 0.45; }
.rr-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 2px; font-variant-numeric: tabular-nums; min-width: 86px; }
.rr-bounty { font-weight: 600; font-size: 14.5px; }
.rr-votes { font: 500 12.5px var(--font-mono); color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.rr-votes svg { width: 10px; height: 10px; fill: currentColor; }
.rr-actions { position: relative; z-index: 1; display: flex; gap: 2px; }
.rr-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; color: var(--muted); padding: 0; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.rr-btn:hover { background: var(--surface-2); color: var(--ink); }
.rr-btn:active { transform: scale(0.86); }
.rr-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rr-btn[aria-pressed="true"] { color: var(--ink); }
.rr-btn[aria-pressed="true"] svg { fill: var(--accent); }
.rr-rank { font: 500 12px/1.8 var(--font-mono); color: var(--muted); letter-spacing: 0.04em; padding-top: 2px; }
.report-row.ranked { grid-template-columns: 26px 96px minmax(0, 1fr) auto auto; }
.rr-readmark { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.rr-readmark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 720px) {
  .report-row, .report-row.ranked { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 8px; }
  .rr-sev { grid-column: 1 / -1; padding-top: 0; }
  .rr-rank { display: none; }
  .rr-nums { flex-direction: row; grid-column: 1; align-items: center; gap: 12px; min-width: 0; justify-content: flex-start; }
  .rr-actions { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
}

/* ───────── Início: o palco ───────── */

/* A faixa é mais alta que a tela; o palco fica preso enquanto a rolagem conduz
   as partículas do número até o mapa. */
.stage-track { position: relative; height: calc((100svh - var(--topbar-h)) * 2.5); }
.stage { position: sticky; top: var(--topbar-h); height: calc(100svh - var(--topbar-h)); overflow: hidden; --intro-o: 1; --atlas-o: 0; background: radial-gradient(ellipse 80% 60% at 50% 38%, var(--glow), transparent 70%); }
.stage-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.6px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, #000 25%, transparent 100%); mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, #000 25%, transparent 100%); }
.stage-field { position: absolute; inset: 0; touch-action: pan-y; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-hover { pointer-events: none; }
.stage-labels { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.isle { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; padding: 3px; text-decoration: none; line-height: 1; transition: opacity 0.25s; }
/* O rótulo das ilhas segue as variáveis --atlas-label-* (o canvas mede o texto com elas). */
.isle em { font-family: var(--atlas-label-font); font-weight: var(--atlas-label-weight); font-style: var(--atlas-label-style); font-size: calc(var(--fs, 14px)); line-height: 1; text-transform: var(--atlas-label-case); letter-spacing: var(--atlas-label-tracking); white-space: nowrap; transition: color 0.2s; }
.isle span { font: 500 9.5px/1 var(--font-mono); letter-spacing: 0.05em; color: var(--muted); font-variant-numeric: tabular-nums; }
.isle:hover em, .isle:focus-visible em { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.isle.dim { opacity: 0.25; }

.stage-intro, .stage-atlas { position: absolute; inset: 0; pointer-events: none; }
.stage-intro { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: clamp(8px, 1.8vh, 20px); padding: clamp(18px, 3.4vh, 40px) var(--gutter) clamp(12px, 2vh, 22px); max-width: calc(var(--maxw) + 120px); margin: 0 auto; opacity: var(--intro-o); }
.stage[data-mode="intro"] .stage-copy, .stage[data-mode="intro"] .stage-scroll { pointer-events: auto; }
.stage-number { min-height: 0; }
.stage-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(18px, 4vw, 56px); align-items: end; }
.stage-copy .stage-title { font: 400 clamp(30px, 4vw, 58px)/1.02 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.stage-copy .stage-title em { font-style: italic; color: var(--accent-text); }
:root[data-theme="light"] .stage-copy .stage-title em { background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 92%, transparent 92%); }
.stage-copy .lede { margin-top: 12px; color: var(--ink-2); max-width: 54ch; font-size: clamp(14.5px, 1.25vw, 17.5px); line-height: 1.5; text-wrap: pretty; }
.hero-search .field { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 5px 5px 18px; min-width: 0; transition: border-color 0.2s, box-shadow 0.2s; }
.hero-search .field:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--glow); }
.hero-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.hero-search .btn svg { stroke: currentColor; }
.hero-search input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; padding: 9px 0; min-width: 0; }
.hero-search input::-webkit-search-cancel-button { display: none; }
.stage-scroll { justify-self: center; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 10px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.stage-scroll:hover { color: var(--ink); }
.stage-scroll svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

.stage-atlas { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: clamp(14px, 2.4vh, 26px) var(--gutter) clamp(10px, 1.8vh, 18px); max-width: calc(var(--maxw) + 120px); margin: 0 auto; opacity: var(--atlas-o); }
.stage[data-mode="atlas"] .plate-find, .stage[data-mode="atlas"] .plate-legend { pointer-events: auto; }
.plate-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 28px; }
.plate-cap p + p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); max-width: 48ch; }
.plate-find { width: min(330px, 42%); flex-shrink: 0; }
.plate-find .field { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color 0.2s, box-shadow 0.2s; }
.plate-find .field:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--glow); }
.plate-find svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.plate-find input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 9px 0; font-size: 14px; }
.plate-find input::-webkit-search-cancel-button { display: none; }
.plate-find-meta { display: flex; justify-content: flex-end; gap: 12px; min-height: 18px; margin-top: 6px; font: 12px var(--font-mono); color: var(--muted); }
.plate-find-meta .linkish { font: inherit; color: var(--ink-2); }
.stage-atlas-slot { min-height: 0; }
.plate-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; font-size: 12.5px; color: var(--ink-2); }
.plate-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.plate-legend > .muted { margin-left: 6px; }
.plate-legend .linkish { font-size: 12px; margin: 0 4px; }
.sev-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border: 1px solid transparent; border-radius: 999px; background: none; font-size: 12.5px; color: var(--ink-2); transition: border-color 0.2s, background 0.2s, opacity 0.2s, color 0.2s; }
.sev-toggle i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; transition: transform 0.2s var(--ease); }
.sev-toggle .n { font: 500 11px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.sev-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.sev-toggle:hover i { transform: scale(1.25); }
.sev-toggle[aria-pressed="true"] { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.sev-toggle[aria-pressed="true"] i { transform: scale(1.3); box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3px var(--ink); }
.sev-toggle.off { opacity: 0.42; }
.sev-toggle.off:hover { opacity: 1; }
.plate-hint { font: 11px var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }

@media (max-width: 860px) {
  .stage-copy { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stage-copy .lede { display: none; }
  .plate-top { flex-direction: column; gap: 10px; }
  .plate-find { width: 100%; }
  .plate-cap p + p, .plate-hint { display: none; }
}

/* ───────── Início: o resto ───────── */

.home-body { padding: clamp(28px, 5vw, 56px) 0 88px; position: relative; z-index: 1; background: var(--paper); border-top: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 18px 20px; border-right: 1px solid var(--line); margin-right: -1px; border-bottom: 1px solid var(--line); margin-bottom: -1px; min-width: 0; }
.stat .label { font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .value { font: 600 clamp(22px, 2.3vw, 32px)/1.15 var(--font-sans); letter-spacing: -0.025em; margin-top: 8px; white-space: nowrap; }
.stat .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 13.5px; color: var(--ink-2); }
.notice strong { color: var(--ink); font-weight: 600; }
.notice code { font: 12.5px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 12px; }
.cat-card { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; min-width: 0; transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s; }
.cat-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.glyph { font: 500 12px/1 var(--font-mono); min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); white-space: nowrap; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.cat-card:hover .glyph { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cat-count { font: 500 13px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-card h3 { font: 400 22px/1.12 var(--font-display); letter-spacing: -0.005em; }
.cat-card p { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; background: none; font-size: 14px; color: var(--ink-2); transition: color 0.2s, background 0.2s, border-color 0.2s; }
.tab:hover { color: var(--ink); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 500; }

.marquee-section .wrap { margin-bottom: 4px; }
.marquee { overflow: hidden; padding: 5px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 70s) linear infinite; }
.marquee-track.reverse { animation-direction: reverse; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 10px; padding-right: 10px; flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; white-space: nowrap; font: 400 clamp(19px, 2vw, 26px)/1.2 var(--font-display); transition: border-color 0.2s, color 0.2s; }
.marquee-item span { font: 500 11.5px var(--font-mono); color: var(--muted); }
.marquee-item:hover { border-color: var(--accent-text); }
.marquee.static { -webkit-mask-image: none; mask-image: none; padding: 5px var(--gutter); }
.marquee.static .marquee-track { animation: none; width: auto; }
.marquee.static .marquee-group { flex-wrap: wrap; }

/* ───────── Listas com barra (ranking) ───────── */

.barlist { display: grid; gap: 2px; }
.barlist-row { display: grid; grid-template-columns: minmax(0, var(--label-w, 42%)) minmax(0, 1fr); gap: 14px; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; transition: background 0.2s; }
a.barlist-row:hover { background: var(--surface-2); }
.barlist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.barlist-bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--series); min-width: 2px; flex-shrink: 1; }
.barlist-val { font: 500 12.5px var(--font-mono); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.barlist-val small { font-size: inherit; font-weight: 400; color: var(--muted); }

/* ───────── Gráficos ───────── */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.chart-card { display: flex; flex-direction: column; gap: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chart-head h3 { font: 400 23px/1.15 var(--font-display); letter-spacing: -0.005em; }
.chart-head p { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 60ch; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }

.chart-holder { min-width: 0; overflow: hidden; }
.chart-svg { max-width: 100%; display: block; overflow: visible; }
.chart-svg text { font: 11.5px var(--font-sans); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-svg .val { fill: var(--ink-2); font-weight: 500; }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .axis { stroke: var(--axis); stroke-width: 1; }
.chart-svg .bar { fill: var(--series); transition: opacity 0.12s; }
.chart-svg .hit { fill: transparent; cursor: default; outline: none; }
.chart-svg g.col:hover .bar, .chart-svg g.col:focus-within .bar { opacity: 0.72; }
.chart-svg .gap-mark { stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; }

.segbar { display: flex; gap: 2px; height: 28px; }
.segbar > div { border-radius: 4px; min-width: 3px; display: flex; align-items: center; padding: 0 8px; font: 600 12px var(--font-sans); color: #fff; overflow: hidden; white-space: nowrap; }
.segbar > div.dark-label { color: #0b0b0b; }
.segbar > div:hover, .segbar > div:focus-visible { filter: brightness(1.1); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.heat { display: grid; gap: 2px; font-size: 12.5px; align-items: center; overflow-x: auto; }
.heat .hl { padding-right: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); text-decoration: none; }
.heat a.hl:hover { color: var(--ink); text-decoration: underline; }
.heat .hh { text-align: center; color: var(--muted); font: 11.5px var(--font-mono); padding-bottom: 4px; }
.heat .hc { height: 26px; min-width: 30px; border-radius: 4px; background: var(--heat-0); outline: none; }
.heat .hc:hover, .heat .hc:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.heat .hc.nodata { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--line-strong) 3px 4px); }
.heat-scale { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.heat-scale .ramp { display: flex; gap: 2px; }
.heat-scale .ramp i { width: 22px; height: 10px; border-radius: 2px; }

.table-wrap { overflow-x: auto; max-height: 320px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); position: sticky; top: 0; background: var(--surface); cursor: default; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data a { text-decoration: none; font-weight: 500; }
table.data a:hover { text-decoration: underline; }
table.data th button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
table.data th button:hover, table.data th[aria-sort] button { color: var(--ink); }
.table-wrap.tall { max-height: none; background: var(--surface); }

.tooltip { position: fixed; z-index: 96; pointer-events: none; background: var(--ink); color: var(--paper); padding: 8px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.35; max-width: 300px; box-shadow: var(--shadow); }
.tooltip b { font-weight: 600; font-size: 13.5px; display: block; margin-bottom: 2px; }

/* ───────── Explorar ───────── */

.explore { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.facets { position: sticky; top: calc(var(--topbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - 28px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scroll-margin-top: calc(var(--topbar-h) + 14px); }
.facet { border-top: 1px solid var(--line); }
.facet:last-child { border-bottom: 1px solid var(--line); }
.facet > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; cursor: pointer; font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); user-select: none; }
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after { content: "+"; font: 400 16px var(--font-mono); color: var(--muted); }
.facet[open] > summary::after { content: "–"; }
.facet > summary .sel { font: 500 11px var(--font-mono); letter-spacing: 0; background: var(--accent); color: var(--accent-ink); padding: 2px 6px; border-radius: 999px; margin-left: 8px; }
.facet-body { padding: 0 0 12px; display: grid; gap: 1px; }
.facet-body.scroll { max-height: 264px; overflow-y: auto; scrollbar-width: thin; }
.opt { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 6px; font-size: 13.5px; cursor: pointer; min-width: 0; transition: background 0.15s; }
.opt:hover { background: var(--surface-2); }
.opt input { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; border: 1.5px solid var(--line-strong); border-radius: 4px; margin: 0; flex-shrink: 0; display: grid; place-content: center; background: var(--surface); transition: background 0.15s, border-color 0.15s; }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
:root[data-theme="light"] .opt input:checked { border-color: var(--ink); }
.opt input:checked::after { content: ""; width: 8px; height: 4px; border: solid var(--accent-ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.opt span.t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .n { font: 11.5px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.zero { opacity: 0.4; }
.facet-filter { margin: 0 0 8px; width: 100%; padding: 7px 10px; font-size: 13px; }

.results-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.results-bar .field { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; min-width: 0; transition: border-color 0.2s, box-shadow 0.2s; }
.results-bar .field:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--glow); }
.results-bar .field svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.results-bar .field input { flex: 1; border: 0; background: none; outline: none; padding: 11px 0; min-width: 0; font-size: 15px; }
.results-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin-bottom: 10px; font-size: 14px; color: var(--ink-2); }
.results-summary strong { color: var(--ink); font-weight: 600; }
.active-filters { margin-bottom: 14px; align-items: center; }
.facets-toggle { display: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h3 { font: 400 30px/1.1 var(--font-display); color: var(--ink); margin-bottom: 8px; }
.sentinel { height: 1px; }
.list-foot { padding: 20px 0; text-align: center; color: var(--muted); font: 12px var(--font-mono); letter-spacing: 0.04em; }
.check-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }

@media (max-width: 960px) {
  .explore { grid-template-columns: minmax(0, 1fr); }
  .facets { position: static; max-height: none; display: none; padding: 0; }
  .facets.open { display: block; }
  .facets-toggle { display: inline-flex; }
}

/* ───────── Página de categoria ───────── */

.guide { display: grid; gap: 12px; }
.guide .card h3 { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.guide .card p { font: 400 clamp(19px, 1.7vw, 23px)/1.36 var(--font-display); color: var(--ink); text-wrap: pretty; }
.guide .card.wide { grid-column: 1 / -1; }
.guide ul { display: grid; gap: 9px; }
.guide li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.5; }
.guide li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
:root[data-theme="light"] .guide li::before { box-shadow: inset 0 0 0 1px var(--ink); }
.guide .refs { display: flex; flex-wrap: wrap; gap: 8px; }

.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.meter { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress .meter { flex: 0 1 220px; min-width: 120px; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s var(--ease); }
:root[data-theme="light"] .meter > i { box-shadow: inset 0 0 0 1px rgba(18, 26, 36, 0.4); }

/* ───────── Gaveta do report ───────── */

.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4, 6, 9, 0.72); animation: fade 0.25s ease-out both; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(740px, 100vw); background: var(--paper); border-left: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide 0.36s var(--ease) both; outline: none; }
@keyframes slide { from { transform: translateX(56px); opacity: 0; } }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-body { overflow-y: auto; padding: 26px clamp(18px, 4vw, 40px) 56px; flex: 1; }
.drawer h2 { font: 400 clamp(28px, 3.8vw, 42px)/1.08 var(--font-display); letter-spacing: -0.01em; margin: 16px 0 0; overflow-wrap: anywhere; text-wrap: balance; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fact { padding: 13px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.fact dt { font: 500 10.5px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fact dd { font-weight: 500; font-size: 14.5px; margin-top: 4px; overflow-wrap: anywhere; }
.fact dd a { text-decoration-thickness: 1px; }
.drawer-section { margin-top: 32px; }
.drawer-section h3 { font: 500 11.5px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.summary-text { font-size: 16px; line-height: 1.65; text-wrap: pretty; white-space: pre-line; }
.summary-src { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.note-area { width: 100%; min-height: 100px; resize: vertical; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 14.5px; line-height: 1.5; outline: none; transition: border-color 0.2s; }
.note-area:focus { border-color: var(--ink); }
.note-status { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 16px; }
.note-quote { padding: 10px 14px 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); white-space: pre-wrap; font-size: 14.5px; }
.mini-list { display: grid; border-top: 1px solid var(--line); }
.mini-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; align-items: baseline; transition: background 0.15s; }
.mini-list a:hover { background: var(--surface); }
.mini-list a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list a span:last-child { font: 12px var(--font-mono); color: var(--muted); white-space: nowrap; }

/* ───────── Sobre ───────── */

.prose { max-width: 70ch; display: grid; gap: 16px; font-size: 16.5px; line-height: 1.65; }
.prose h2 { font: 400 32px/1.1 var(--font-display); margin-top: 26px; }
.prose code { font: 13.5px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; font: 13.5px/1.7 var(--font-mono); }
.prose ul { display: grid; gap: 8px; padding-left: 20px; list-style: square; }

/* ───────── Rodapé ───────── */

.footer { border-top: 1px solid var(--line); margin-top: auto; overflow: hidden; position: relative; z-index: 1; background: var(--paper); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 30px; display: grid; gap: 18px; }
.footer-mark { font: 400 clamp(64px, 15vw, 210px)/0.82 var(--font-display); letter-spacing: -0.03em; color: transparent; -webkit-text-stroke: 1px var(--line-strong); white-space: nowrap; user-select: none; }
.footer-text { display: grid; gap: 6px; font-size: 13px; color: var(--muted); max-width: 80ch; }
.footer-meta { font: 12px var(--font-mono); }

/* ───────── Componentes compartilhados: níveis, rankings, seções, paleta ───────── */

/* Classes de bug em três níveis de importância: destaque, cartões, lista. */
.cat-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .cat-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cat-feature-grid { grid-template-columns: minmax(0, 1fr); } }
.cat-feature { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none; min-width: 0; transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s; }
.cat-feature:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.cf-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cf-rank { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; color: var(--muted); }
.cat-feature h3 { font-size: 20px; line-height: 1.15; }
.cat-feature p { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; margin-top: 6px; }
.cf-count { display: flex; align-items: baseline; gap: 8px; }
.cf-count b { font: 600 clamp(28px, 2.6vw, 38px)/1 var(--font-mono); letter-spacing: -0.03em; }
.cf-count span { font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cf-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.cf-facts dt { font: 500 10px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cf-facts dd { font: 600 14px/1.2 var(--font-mono); margin-top: 4px; }
.cat-feature .sev-strip { height: 6px; }
.spark { width: 100%; height: 26px; display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cat-feature .spark { height: 28px; }
.cat-feature .spark path { stroke: var(--ink-2); }

.cat-grid.compact { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.cat-grid.compact .cat-card { padding: 14px 16px; gap: 10px; grid-template-rows: auto 1fr auto; }
.cat-grid.compact .cat-card p { display: none; }
.cat-grid.compact .cat-card h3 { font-size: 17px; }
.cat-grid.compact .glyph { min-width: 30px; height: 30px; font-size: 11px; }

.tier-label { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tier-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tier-label:first-child { margin-top: 0; }

/* Lista ranqueada: nome, barra proporcional, número. */
.rank-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
@media (max-width: 960px) { .rank-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rank-list { grid-template-columns: minmax(0, 1fr); } }
.rank-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(40px, 72px) auto; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; transition: background 0.15s; }
.rank-list a:hover { background: var(--surface); }
.rank-list .rk { font: 500 10.5px/1 var(--font-mono); color: var(--muted); }
.rank-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.rank-list .bar i { display: block; height: 100%; border-radius: 2px; background: var(--series); }
.rank-list .n { font: 500 12px/1 var(--font-mono); color: var(--ink-2); text-align: right; min-width: 4ch; font-variant-numeric: tabular-nums; }

/* Portas de entrada no topo da página inicial. */
.entry-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.entry-links a { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-decoration: none; transition: border-color 0.2s, background 0.2s; min-width: 0; }
.entry-links a:hover { border-color: var(--accent-text); background: var(--surface); }
.entry-links b { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.entry-links span { font: 500 11px/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-links b i { font-style: normal; color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s; }
.entry-links a:hover b i { color: var(--accent-text); transform: translateX(3px); }
.stage-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; }
.stage-status { display: flex; align-items: center; }
@media (max-width: 560px) { .entry-links a { padding: 8px 10px; } .entry-links span { display: none; } }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--glow); margin-right: 9px; vertical-align: 1px; animation: live 2.2s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px transparent; } }

/* Navegação por seções dentro de uma página longa. */
.subnav { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: clamp(26px, 4vw, 40px) calc(var(--gutter) * -1) 0; padding: 10px var(--gutter); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; transition: background 0.15s, color 0.15s; }
.subnav button:hover { color: var(--ink); }
.subnav button[aria-current="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.subnav .sn-n { font: 500 10.5px/1 var(--font-mono); color: var(--muted); }
.subnav + .section, [data-subsection] { scroll-margin-top: calc(var(--topbar-h) + 70px); }
.head-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font: 500 12px/1.4 var(--font-mono); color: var(--muted); }
.head-meta b { color: var(--ink); font-weight: 600; }

/* Guia de estudo: o que é + impacto em destaque, depois os passos lado a lado. */
.guide-lead { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.guide-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 980px) { .guide-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .guide-lead { grid-template-columns: minmax(0, 1fr); } }
.guide-lead > :only-child { grid-column: 1 / -1; }
.guide .guide-impact { border-left: 3px solid var(--sev-high); }
.guide .guide-impact p { font-size: 15.5px; }
.guide ol.steps { display: grid; gap: 10px; counter-reset: step; }
.guide ol.steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px; padding-left: 0; }
:root .guide ol.steps li::before { content: counter(step, decimal-leading-zero); position: static; width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; font: 500 11px/1.9 var(--font-mono); color: var(--muted); }
.guide-refs .refs { display: flex; flex-wrap: wrap; gap: 8px; }

/* Paleta de comandos. */
.palette-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 9, 0.66); animation: fade 0.2s ease-out both; }
.palette { position: fixed; z-index: 61; left: 50%; top: min(12vh, 120px); transform: translateX(-50%); width: min(660px, calc(100vw - 24px)); max-height: min(72vh, 620px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 80px -20px rgba(0, 0, 0, 0.7); overflow: hidden; animation: pal-in 0.22s var(--ease) both; }
@keyframes pal-in { from { opacity: 0; transform: translate(-50%, -8px) scale(0.985); } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.palette-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; }
.palette-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.palette-group + .palette-group { margin-top: 4px; }
.palette-group-title { padding: 10px 10px 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.palette-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.pi-icon { font: 500 10.5px/1 var(--font-mono); color: var(--muted); text-align: center; padding: 6px 0; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; overflow: hidden; }
.pi-icon[data-sev] { color: var(--ink); border-color: var(--sev-color); }
.pi-text { display: grid; gap: 2px; min-width: 0; }
.pi-label { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-meta { font: 500 12px/1 var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.palette-empty { padding: 26px; text-align: center; color: var(--muted); }
.palette-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 9px 14px; border-top: 1px solid var(--line); font: 500 11px/1 var(--font-mono); color: var(--muted); }
.palette-foot kbd { margin-right: 2px; }
.palette-foot-right { margin-left: auto; }
@media (max-width: 560px) { .palette { top: 8px; max-height: calc(100vh - 16px); } .palette-foot { display: none; } }

/* ───────── Painel da primeira tela ───────── */

.dash-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 48px; align-items: end; margin-bottom: 20px; }
.dash-top h1 { font: 400 clamp(36px, 4.6vw, 64px)/1 var(--font-display); letter-spacing: -0.02em; margin-top: 12px; text-wrap: balance; }
.dash-top h1 em { color: var(--accent-text); }
.dash-top .lede { margin-top: 12px; max-width: 60ch; color: var(--ink-2); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.5; text-wrap: pretty; }
.dash-search { margin: 0; max-width: none; }
.dash-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.dash-quick .muted { margin-right: 4px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.dash-quick .chip { padding: 4px 10px; font-size: 12.5px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 980px) { .dash-top, .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.card.dash-panel { padding: 0; overflow: hidden; }
.dash-col { display: grid; gap: 14px; min-width: 0; }
.dash-panel .feed .feed-row:last-child { border-bottom: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.dash-head h2 { display: flex; align-items: center; gap: 2px; font: 600 15px/1.2 var(--font-sans); letter-spacing: -0.01em; }
.dash-meta { font: 500 11.5px/1.3 var(--font-mono); color: var(--muted); text-align: right; text-decoration: none; }
a.dash-meta:hover { color: var(--ink); }

.feed-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background 0.15s; }
.feed-row:hover { background: var(--surface-2); }
.feed-sev { font: 600 10.5px/1 var(--font-mono); text-align: center; padding: 5px 0; border: 1px solid var(--sev-color); border-radius: 4px; color: var(--ink); white-space: nowrap; }
.feed-main { display: grid; gap: 3px; min-width: 0; }
.feed-title { font-size: 14.5px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { font: 400 12px/1.3 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-side { display: grid; justify-items: end; gap: 3px; font: 500 12px/1.2 var(--font-mono); color: var(--muted); white-space: nowrap; }
.feed-side b { color: var(--ink); font-weight: 600; }
.dash-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 18px; font: 500 12px/1.3 var(--font-mono); }
.dash-foot a { color: var(--ink-2); text-decoration: none; }
.dash-foot a:hover { color: var(--ink); }

.dash-section { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dash-section:last-child { border-bottom: 0; }
.dash-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.dash-label a { color: var(--ink-2); text-decoration: none; letter-spacing: 0.04em; text-transform: none; }
.dash-label a:hover { color: var(--ink); }
.dash-readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.dash-readout span { display: block; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.dash-readout b { display: block; margin-top: 5px; font: 600 clamp(20px, 1.9vw, 26px)/1.1 var(--font-mono); letter-spacing: -0.03em; white-space: nowrap; }
.dash-sevbar { display: flex; gap: 2px; height: 10px; margin-bottom: 10px; }
.dash-sevbar i { border-radius: 2px; min-width: 3px; outline: none; }
.dash-sevbar i:hover, .dash-sevbar i:focus-visible { filter: brightness(1.15); box-shadow: 0 0 0 1px var(--ink); }
.dash-sevlegend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 14px; }
.dash-sevlegend a { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12.5px; color: var(--ink-2); text-decoration: none; min-width: 0; }
.dash-sevlegend a:hover { color: var(--ink); }
.dash-sevlegend i { width: 8px; height: 8px; border-radius: 50%; background: var(--sev-color); flex-shrink: 0; }
.dash-sevlegend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-sevlegend b { margin-left: auto; font: 500 11.5px/1 var(--font-mono); color: var(--muted); }
.dash-panel .rank-list { grid-template-columns: minmax(0, 1fr); }
.dash-panel .rank-list a { padding: 6px 0; font-size: 13.5px; }
.dash-panel .rank-list a:last-child { border-bottom: 0; }
.dash-bars { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.dash-bars i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--series); opacity: 0.8; outline: none; }
.dash-bars i:hover, .dash-bars i:focus-visible { opacity: 1; box-shadow: 0 0 0 1px var(--ink); }
.dash-axis { display: flex; justify-content: space-between; margin-top: 6px; font: 500 10.5px/1 var(--font-mono); color: var(--muted); }
@media (max-width: 560px) {
  .feed-row { grid-template-columns: 44px minmax(0, 1fr); padding: 10px 14px; }
  .feed-side { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: 10px; }
  .dash-head, .dash-section, .dash-foot { padding-left: 14px; padding-right: 14px; }
  .dash-head { flex-wrap: wrap; }
  .dash-meta { text-align: left; }
  .dash-sevlegend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stage-copy { grid-template-columns: minmax(0, 1fr); }

/* ───────── Primeira tela: o acervo inteiro como mapa ───────── */

/* O mapa é o protagonista; o resto são quatro âncoras pequenas nos cantos. */
.hm {
  --hm-intro: 1;
  position: relative;
  height: calc(100svh - var(--topbar-h));
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: clamp(14px, 2.4vh, 26px) var(--gutter) clamp(16px, 2.6vh, 28px);
  overflow: hidden;
  background: radial-gradient(ellipse 62% 58% at 50% 50%, var(--glow), transparent 72%);
}
.hm > .stage-field { position: absolute; inset: 0; }
.hm-top, .hm-bottom { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px 28px; width: 100%; max-width: calc(var(--maxw) + 160px); margin: 0 auto; pointer-events: none; }
.hm-top > *, .hm-bottom > * { pointer-events: auto; }
.hm-map { pointer-events: none; min-height: 0; width: 100%; max-width: calc(var(--maxw) + 160px); margin: 0 auto; }

/* Durante a abertura só o número e o título; abas, legenda e números chegam com o mapa. */
.hm-tabs, .hm-bottom { opacity: calc(1 - var(--hm-intro)); transition: opacity 0.3s; }
.hm[data-state="intro"] :is(.hm-tabs, .hm-bottom) { pointer-events: none; }

.hm-title { font: 400 clamp(22px, 2.3vw, 34px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.hm-title em { color: var(--accent-text); }

.hm-tabs { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); } /* sem desfoque: sobre o mapa animado ele seria refeito a cada quadro */
.hm-tabs::-webkit-scrollbar { display: none; }
.hm-tab { padding: 6px 13px; border: 0; border-radius: 999px; background: none; font-size: 13px; color: var(--ink-2); white-space: nowrap; transition: background 0.25s, color 0.25s; }
.hm-tab:hover { color: var(--ink); }
.hm-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.hm-legend { margin-left: -8px; }
.hm-legend .sev-toggle { font-size: 12px; padding: 3px 8px 3px 6px; }
.hm-stats { font: 500 12px/1.4 var(--font-mono); color: var(--muted); white-space: nowrap; text-align: right; }
.hm-stats b { color: var(--ink); font-weight: 600; }
.hm-stats i { font-style: normal; margin: 0 10px; opacity: 0.5; }

.hm-corner { position: absolute; z-index: 2; width: 13px; height: 13px; pointer-events: none; }
.hm-corner::before, .hm-corner::after { content: ""; position: absolute; background: var(--line-strong); }
.hm-corner::before { left: 6px; top: 0; width: 1px; height: 13px; }
.hm-corner::after { top: 6px; left: 0; width: 13px; height: 1px; }
.hm-corner.tl { top: 10px; left: 10px; }
.hm-corner.tr { top: 10px; right: 10px; }
.hm-corner.bl { bottom: 10px; left: 10px; }
.hm-corner.br { bottom: 10px; right: 10px; }

.hm-skip { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 10px; border: 0; background: none; font: 500 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hm-skip:hover { color: var(--ink); }
.hm-cue { position: absolute; z-index: 3; left: 50%; bottom: 8px; transform: translateX(-50%); display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.hm-cue:hover { color: var(--ink); }
.hm-cue svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: bob 1.8s ease-in-out infinite; }
.hm[data-state="intro"] .hm-cue, .hm[data-state="ready"] .hm-skip { display: none; }

/* Nas colunas e linhas, os rótulos ficam fora das barras e menos marcados. */
.hm:is([data-layout="columns"], [data-layout="rows"]) .isle em { font-family: var(--font-mono); font-style: normal; text-transform: none; letter-spacing: 0; }

@media (max-width: 760px) {
  .hm { height: auto; min-height: calc(100svh - var(--topbar-h)); grid-template-rows: auto minmax(380px, 1fr) auto; }
  .hm-top, .hm-bottom { flex-direction: column; align-items: flex-start; }
  .hm-stats { text-align: left; white-space: normal; }
  .hm-cue { display: none; }
}

.dash-intro { margin-bottom: 16px; }
.dash-intro .section-head { margin-bottom: 12px; }

/* ───────── Agentes (servidor MCP) ───────── */

.nav-agents sup { margin-left: 4px; font: 600 9px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--accent-text); vertical-align: 5px; }
/* Barra em uma linha só (de 1141px para cima): com sete itens, o espaço aperta até ~1320px. */
@media (min-width: 1141px) and (max-width: 1320px) {
  .nav-agents sup { display: none; }
  :root body .topbar .nav a { padding-left: 7px; padding-right: 7px; }
}

/* Bloco de código com botão de copiar */
.code-block { position: relative; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.code-block pre { margin: 0; padding: 30px 16px 14px; overflow-x: auto; font: 13px/1.65 var(--font-mono); color: var(--ink); white-space: pre; }
.code-block code { font: inherit; background: none; padding: 0; }
.code-block.soft-wrap pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.code-block .nw { white-space: nowrap; }
.code-lang { position: absolute; left: 14px; top: 9px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink-2); font: 500 11.5px/1 var(--font-mono); white-space: nowrap; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.copy-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn:hover { color: var(--ink); border-color: var(--ink); }
.copy-btn.done { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.code-block > .copy-btn { position: absolute; right: 8px; top: 6px; z-index: 1; }

/* Página */
.agents .page-head h1 { max-width: 20ch; }
.agent-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.agent-cta .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.agent-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.agent-why .card { display: grid; align-content: start; gap: 10px; }
.agent-why h3 { font: 500 19px/1.25 var(--font-head); letter-spacing: var(--head-track, 0); }
.agent-why .card p:last-child { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.agent-why .eyebrow { color: var(--accent-text); }

.agent-demo { margin: 14px 0 clamp(40px, 6vw, 64px); max-width: 860px; }

.agent-steps { list-style: none; padding: 0; margin: 0 0 clamp(40px, 6vw, 64px); display: grid; gap: 26px; }
.agent-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.agent-step-n { font: 500 13px/1.9 var(--font-mono); color: var(--accent-text); }
.agent-step h3 { font: 500 18px/1.3 var(--font-head); margin-bottom: 8px; }
.agent-step p { color: var(--ink-2); }
.agent-step p code { font: 13px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.agent-tabs { margin-bottom: 12px; }
.agent-where { margin-bottom: 10px; font-size: 14.5px; }
.agent-panel { max-width: 760px; }
.agent-prompts { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; max-width: 760px; }
.agent-prompts li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 14.5px; }
.agent-prompts li span { min-width: 0; }

.agent-tools { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 24px; margin-bottom: 30px; }
.agent-tools dt, .agent-tools dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.agent-tools dt code { font: 500 13px var(--font-mono); color: var(--accent-text); }
.agent-tools dd { color: var(--ink-2); font-size: 14.5px; }
.agent-foot { color: var(--muted); font-size: 13.5px; max-width: 80ch; }

/* Seção na página inicial, logo abaixo do mapa: uma frase, uma linha e o comando */
.agent-show { position: relative; padding: clamp(72px, 11vw, 140px) 0; border-top: 1px solid var(--line); background: radial-gradient(ellipse 50% 70% at 50% 50%, var(--glow), transparent 72%); scroll-margin-top: var(--topbar-h); }
.agent-show-inner { display: grid; justify-items: center; text-align: center; gap: 18px; }
.agent-show .eyebrow { color: var(--accent-text); }
.agent-show h2 { font: 400 clamp(36px, 5.6vw, 76px)/1.02 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; max-width: 16ch; }
.agent-show h2 em { font-style: normal; color: var(--accent-text); }
.agent-show-lede { color: var(--ink-2); font-size: clamp(15.5px, 1.3vw, 18px); line-height: 1.55; max-width: 52ch; text-wrap: pretty; }
.agent-show-cmd { width: min(560px, 100%); margin-top: 10px; text-align: left; }
.agent-show-cmd pre { font-size: 14px; }
.agent-show-more { font-size: 14px; color: var(--muted); }
.agent-show-more a { color: var(--accent-text); text-decoration: none; }
.agent-show-more a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Atalhos para quem quer mais detalhe */
.home-more { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.home-more .eyebrow { margin-bottom: 16px; }
.home-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-doors a { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.home-doors b { display: flex; justify-content: space-between; gap: 10px; font: 500 15px/1.3 var(--font-head); color: var(--ink); }
.home-doors b span { color: var(--accent-text); transition: transform 0.2s; }
.home-doors a > span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.home-doors a:hover { border-color: var(--accent-text); }
.home-doors a:hover b span { transform: translateX(3px); }
@media (max-width: 860px) { .home-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .home-doors { grid-template-columns: minmax(0, 1fr); } }

/* O terminal da demonstração */
.agent-term { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); box-shadow: 0 30px 90px -40px var(--glow), 0 0 0 1px var(--glow); overflow: hidden; font: 13px/1.6 var(--font-mono); }
.agent-term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11.5px; }
.agent-term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.agent-term-bar span { margin-left: 8px; }
.agent-term-body { padding: 18px 20px 20px; display: grid; gap: 5px; }
.tm { opacity: 0; transform: translateY(4px); transition: opacity 0.28s, transform 0.28s; min-width: 0; }
.tm.on { opacity: 1; transform: none; }
.tm .pfx { color: var(--accent-text); }
.tm-user { color: var(--ink); margin-bottom: 8px; font-weight: 500; }
.tm-call { color: var(--ink-2); margin-top: 6px; overflow-wrap: anywhere; }
.tm-call .dot { color: var(--muted); }
.tm-call.run .dot { animation: cursor-blink 0.5s steps(1) infinite; }
.tm-call.done .dot { color: var(--accent-text); }
.tm-call .srv { color: var(--ink); font-weight: 500; }
.tm-out { color: var(--muted); padding-left: 2ch; }
.tm-row { display: grid; grid-template-columns: 8.5ch minmax(0, 1fr) auto; gap: 1.5ch; padding-left: 4ch; color: var(--ink-2); }
.tm-row .id { color: var(--muted); }
.tm-row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row .m { color: var(--ink); }
.tm-answer { color: var(--ink); margin-top: 12px; }
.tm-cite { color: var(--accent-text); padding-left: 2ch; font-size: 12px; overflow-wrap: anywhere; }
.tt-ghost { visibility: hidden; }
.tt-caret { position: relative; }
.tm.typing .tt-caret::after { content: ""; position: absolute; left: 1px; top: 0.2em; width: 0.55em; height: 1.15em; background: var(--accent-text); }

/* Chamada sob o título do mapa */
.hm-head { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.hm-agent { display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: 500 12.5px/1.2 var(--font-mono); color: var(--ink-2); text-decoration: none; opacity: calc(1 - var(--hm-intro)); transition: opacity 0.3s, border-color 0.2s, color 0.2s; }
.hm-agent b { padding: 3px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; }
.hm-agent span { color: var(--accent-text); transition: transform 0.2s; }
.hm-agent:hover { color: var(--ink); border-color: var(--accent-text); }
.hm-agent:hover span { transform: translateX(3px); }
.hm[data-state="intro"] .hm-agent { pointer-events: none; }
:root[data-tech] :is(.hm-agent, .hm-agent b) { border-radius: var(--radius-sm); }

/* No menu, o item dos agentes vem na cor de destaque */
.nav a.nav-agents { color: var(--accent-text); }

@media (max-width: 860px) {
  .agent-why { grid-template-columns: minmax(0, 1fr); }
  .agent-term { font-size: 12px; }
  .agent-term-body { padding: 14px 14px 16px; }
  .tm-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 2ch; }
  .tm-row .id { display: none; }
  .agent-tools { grid-template-columns: minmax(0, 1fr); }
  .agent-tools dt { padding-bottom: 2px; border-bottom: 0; }
  .agent-tools dd { padding-top: 0; }
  .agent-prompts li { align-items: flex-start; }
  .agent-step { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
}

/* ───────── Seletor de versão ───────── */

/* Fica na barra do topo, ao lado do tema: não cobre o conteúdo de nenhuma versão. */
.look-switcher { position: relative; flex-shrink: 0; font-size: 13px; }
:root[data-preview="1"] .look-switcher { display: none; }
.look-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color 0.2s; white-space: nowrap; }
.look-btn:hover, .look-btn[aria-expanded="true"] { border-color: var(--ink); }
.look-btn b { font-weight: 500; font-size: 13px; }
.look-label { display: none; }
.look-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--glow); flex-shrink: 0; }
.look-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); animation: rise 0.2s var(--ease) both; }
@media (max-width: 600px) { .look-btn b { display: none; } .look-btn { padding: 0 12px; } }
.look-menu-head { padding: 6px 8px 8px; font: 500 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.look-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 8px; padding: 9px 8px; border-radius: var(--radius-sm); text-decoration: none; transition: background 0.15s; }
.look-item:hover { background: var(--surface-2); }
.look-item[aria-current="true"] { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.look-num { font: 500 11px/1.6 var(--font-mono); color: var(--muted); }
.look-text { display: grid; gap: 2px; min-width: 0; }
.look-text b { font-weight: 600; font-size: 14px; }
.look-text span { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.look-compare { display: block; margin-top: 4px; padding: 10px 8px 6px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); text-decoration: none; }
.look-compare:hover { color: var(--ink); }

@media print {
  .topbar, .footer, .facets, .rr-actions, .drawer-backdrop, .stage-track, body::before { display: none !important; }
  body { background: #fff; }
}
