/* 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); }

/* Chave entre debates: dois botões soltos na faixa escura; o atual (Globo) com o dobro da largura */
.dswitch { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; width: min(100%, 30rem); }
.dswitch-opt {
  display: grid; gap: 0.05rem; align-content: center; padding: 0.35rem 0.7rem; text-decoration: none;
  border: 1px solid #4a515b; border-radius: 6px; color: #b4bac2; font: 600 0.68rem/1.15 var(--font-ui);
}
.dswitch-opt small { font: 700 0.6rem/1.1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; }
.dswitch-opt b { font: 800 0.9rem/1.05 "Archivo", var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: #f3f4f5; }
.dswitch-opt:hover { border-color: #f3f4f5; }
.dswitch-globo { border-width: 1.5px; border-color: #f3f4f5; }
.dswitch-globo b { font-size: 1.05rem; }
.dswitch-opt .here { font-style: normal; }
.dswitch-band b { font-size: 0.82rem; }
@media (max-width: 34rem) {
  .dswitch-opt { padding: 0.3rem 0.55rem; }
  .dswitch-opt .here, .dswitch-band span { display: none; }
}
@media (max-width: 34rem) { .dswitch-opt small { letter-spacing: 0.04em; font-size: 0.56rem; } .dswitch-band b { font-size: 0.78rem; } }

/* Botões dos debates com cor própria: o atual em vermelho de "ao vivo", o passado em cinza-ardósia.
   O lugar onde a pessoa está ganha fundo e a marca "você está aqui", sem inverter as cores. */
.dswitch-opt { background: transparent; }
.dswitch-globo { border-color: #f2554b; }
.dswitch-globo small, .dswitch-globo span { color: #ff7a70; }
.dswitch-globo small::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.35em; border-radius: 50%; background: #f2554b; vertical-align: 0.02em; }
.dswitch-band { border-color: #6b7686; opacity: 1; }
.dswitch-band small, .dswitch-band span { color: #aab4c2; }
.dswitch-opt[aria-current="page"] { background: rgb(255 255 255 / 0.1); color: inherit; }
.dswitch-globo[aria-current="page"] { background: rgb(242 85 75 / 0.16); border-color: #f2554b; }
.dswitch-band[aria-current="page"] { border-color: #aab4c2; }
.dswitch-opt[aria-current="page"] b { color: #f3f4f5; }
.dswitch-opt:hover { border-color: #f3f4f5; }
@media (min-width: 34.01rem) { .dswitch { width: min(100%, 36rem); } .dswitch-opt small { white-space: nowrap; } }
.dswitch-band .here { color: #f2c94c; }

/* 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; }
