/* Tokens compartilhados: página pública, placar flutuante e console. */
/* Paleta "ficha": papel claro e grafite escuro. Nenhuma cor de partido; veredito = cor + forma. */
:root {
  --bg: #f4f2ec;
  --surface: #fbfaf6;
  --ink: #1b1a17;
  --ink-2: #5e5a52;
  --ink-3: #8b867c;
  --rule: #e0dbcf;
  --focus: #2b59c3;

  --v-true: #1f7a63;
  --v-mixed: #a36f0d;
  --v-false: #c0302a;
  --v-unsup: #2b2925;
  --v-nv: #5f656c;

  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-quote: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316;
    --surface: #1b1d21;
    --ink: #ecebe6;
    --ink-2: #aaa69d;
    --ink-3: #7c786f;
    --rule: #2d2f34;
    --focus: #8fb0ff;
    --v-true: #4bb896;
    --v-mixed: #e2ab3f;
    --v-false: #e5534b;
    --v-unsup: #ecebe6;
    --v-nv: #a3a9b1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121316;
  --surface: #1b1d21;
  --ink: #ecebe6;
  --ink-2: #aaa69d;
  --ink-3: #7c786f;
  --rule: #2d2f34;
  --focus: #8fb0ff;
  --v-true: #4bb896;
  --v-mixed: #e2ab3f;
  --v-false: #e5534b;
  --v-unsup: #ecebe6;
  --v-nv: #a3a9b1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.45;
  font-variation-settings: "wdth" 100;
}
a { color: inherit; text-underline-offset: 0.18em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* Contas do placar: forma e sinal codificam o veredito (ver SHAPE em live.js); cor reforça */
.bead {
  --c: var(--v-nv);
  --bead-fg: var(--surface);
  display: inline-block; width: 0.9em; height: 0.9em; flex: none; vertical-align: -0.12em; color: var(--c);
}
.bead svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bead[data-f="true"] { --c: var(--v-true); }
.bead[data-f="mixed"] { --c: var(--v-mixed); }
.bead[data-f="false"] { --c: var(--v-false); --bead-fg: #fff; }
.bead[data-f="unsup"] { --c: var(--v-unsup); }
.bead[data-f="nv"] { --c: var(--v-nv); }
.bead .b-bg { fill: var(--c); }
.bead .b-ln { fill: none; stroke: var(--c); stroke-width: 1.6; }
.bead .b-fg, .bead .b-x { fill: none; stroke: var(--bead-fg); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.bead .b-dash { stroke: var(--c); stroke-width: 2.1; stroke-linecap: round; }
.bead .b-q { fill: var(--c); font: 800 11px/1 system-ui, sans-serif; }

.verdict-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 700;
  font-variation-settings: "wdth" 88;
  color: var(--chip, var(--ink));
}
.verdict-chip[data-f="true"] { --chip: var(--v-true); }
.verdict-chip[data-f="mixed"] { --chip: var(--v-mixed); }
.verdict-chip[data-f="false"] { --chip: var(--v-false); }
.verdict-chip[data-f="unsup"] { --chip: var(--v-unsup); }
.verdict-chip[data-f="nv"] { --chip: var(--v-nv); }

.live-dot {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--ink-3);
}
.live-dot[data-live="1"] { background: #d23c3c; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Carimbo do veredito (ficha) */
.stamp {
  --c: var(--v-nv);
  display: inline-flex; align-items: center; gap: 0.4em;
  color: var(--c); border: 2px solid var(--c); border-radius: 3px;
  padding: 0.05em 0.5em 0;
  font: 700 0.8rem/1.45 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.stamp[data-f="true"] { --c: var(--v-true); }
.stamp[data-f="mixed"] { --c: var(--v-mixed); }
.stamp[data-f="false"] { --c: var(--v-false); }
.stamp[data-f="unsup"] { --c: var(--v-unsup); }

/* Linhas fixas da ficha: porquê, dado, fontes, busque */
.sheet { display: grid; grid-template-columns: 4.8rem 1fr; gap: 0.3rem 0.75rem; margin: 0; border-top: 1px solid var(--rule); padding-top: 0.5rem; font-size: 0.9rem; line-height: 1.4; }
.sheet dt { color: var(--ink-2); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 0.2rem; }
.sheet dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sheet .key { font-weight: 600; color: var(--ink); font-size: 1.04em; }
.sheet .val { font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--ink) 9%, transparent); padding: 0.05em 0.3em; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sheet .ctx { color: var(--ink-2); font-size: 0.95em; }
.num-hl { text-decoration: underline; text-decoration-thickness: 0.12em; text-underline-offset: 0.16em; text-decoration-color: var(--hl, var(--ink-3)); font-weight: 650; }
[data-f="true"] { --hl: var(--v-true); } [data-f="mixed"] { --hl: var(--v-mixed); } [data-f="false"] { --hl: var(--v-false); }
[data-f="unsup"] { --hl: var(--v-unsup); } [data-f="nv"] { --hl: var(--v-nv); }

.sheet .src { display: flex; flex-wrap: wrap; gap: 0.15rem 0.7rem; }
.sheet .src a::after { content: " ↗"; color: var(--ink-3); }

.gbtn {
  display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap;
  margin-top: 0.7rem; padding: 0.5em 0.85em; width: fit-content; max-width: 100%;
  border: 1.5px solid var(--ink); border-radius: 10px; color: var(--ink); text-decoration: none;
  font-size: 0.92rem; line-height: 1.25;
}
.gbtn:hover { background: var(--ink); color: var(--surface); }
.gbtn svg { width: 1em; height: 1em; flex: none; }
.gbtn-cta { font-weight: 600; }
.gbtn-q { font-family: var(--font-mono); font-size: 0.92em; }
.gq { display: inline-flex; align-items: center; gap: 0.4em; color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; font-family: var(--font-mono); font-size: 0.86em; }
.gq:hover { color: var(--focus); }
.gq svg { width: 1em; height: 1em; flex: none; }

.theme-btn {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--surface); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 1rem; height: 1rem; }

/* Formas agrupadas por tipo */
.string.grouped .grp { display: contents; }
.string.grouped .grp + .grp > :first-child { margin-left: 0.5em; }

/* Barra de distribuição do índice de verdade */
.dist { display: flex; gap: 2px; height: 0.42rem; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, currentColor 12%, transparent); }
.dist span { display: block; flex-basis: 0; min-width: 3px; }
.dist [data-f="true"] { background: var(--v-true); }
.dist [data-f="mixed"] { background: var(--v-mixed); }
.dist [data-f="unsup"] { background: var(--v-unsup); }
.dist [data-f="false"] { background: var(--v-false); }
.dist [data-f="nv"] { background: var(--v-nv); opacity: 0.6; }

/* Compartilhar */
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.35em 0.75em;
  border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 600 0.82rem/1.2 var(--font-ui); cursor: pointer; white-space: nowrap;
}
.share-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-btn svg { width: 1.05em; height: 1.05em; flex: none; }
.share-btn[data-done] { border-color: var(--v-true); color: var(--v-true); }

/* Abas dos debates, no topo do conteúdo (fora da faixa): o passado (Band) à esquerda e menor,
   o atual (Globo) com o dobro da largura e o vermelho de "ao vivo". Onde a pessoa está: borda forte, fundo e
   "você está aqui". */
:root { --tab-globo: #c0302a; --tab-band: #5b6b80; --tab-aqui: #9a6a0c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tab-globo: #ff7a70; --tab-band: #aab4c2; --tab-aqui: #f2c94c; } }
:root[data-theme="dark"] { --tab-globo: #ff7a70; --tab-band: #aab4c2; --tab-aqui: #f2c94c; }
.dswitch { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; }
.dswitch-opt {
  display: grid; gap: 0.1rem; align-content: center; padding: 0.45rem 0.8rem; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink-2);
  font: 600 0.74rem/1.2 var(--font-ui);
}
.dswitch-opt small { font: 700 0.62rem/1.1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; }
.dswitch-opt b { font: 800 0.95rem/1.05 "Archivo", var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.dswitch-opt .here { font-style: normal; color: var(--tab-aqui); }
.dswitch-globo small, .dswitch-globo span { color: var(--tab-globo); }
.dswitch-globo small::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.35em; border-radius: 50%; background: var(--tab-globo); vertical-align: 0.02em; }
.dswitch-band small, .dswitch-band span { color: var(--tab-band); }
.dswitch-opt:hover { border-color: var(--ink-3); }
.dswitch-opt[aria-current="page"] { border-width: 2px; padding: calc(0.45rem - 1px) calc(0.8rem - 1px); background: var(--surface); }
.dswitch-globo[aria-current="page"] { border-color: var(--tab-globo); }
.dswitch-band[aria-current="page"] { border-color: var(--tab-band); }
@media (max-width: 34rem) {
  .dswitch-opt { padding: 0.4rem 0.6rem; }
  .dswitch-opt .here, .dswitch-band span { display: none; }
}

/* Bloco de sugestões do Google (Grounding): tamanho fixo, conteúdo intocado */
.g-suggest { display: block; width: 100%; height: 3.6rem; margin-top: 0.6rem; border: 0; background: transparent; color-scheme: normal; }
