/* ==========================================================================
   Tema «Experiencia 3D» para todo el sitio (html.x3)
   Noche electoral en profundidad: cielo azul noche que cae hacia tinta, paneles
   de vidrio con canto de luz, inclinación en perspectiva y un único acento dorado.
   Solo presentación: no cambia textos, estructura del pre-render, metadatos
   ni la reserva de espacio de los huecos de publicidad.
   ========================================================================== */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2?v=584534a-b06660f2") format("woff2"); font-weight: 100 900; font-display: optional; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono.woff2?v=584534a-b06660f2") format("woff2"); font-weight: 100 900; font-display: optional; }

html.x3 {
  --sky-0: #05080f;
  --sky-1: #080d19;
  --sky-2: #0d1528;
  --sky-3: #14203b;
  --gold: #f2c35b;            /* único acento: oro cálido (no coincide con ningún partido grande) */
  --gold-2: #d9a63a;
  --gold-ink: #1b1405;
  --edge: rgba(176, 198, 255, 0.11);
  --edge-2: rgba(176, 198, 255, 0.2);
  --glass: rgba(16, 25, 46, 0.62);
  --glass-hi: rgba(255, 255, 255, 0.05);
  --bg: var(--sky-1);
  --surface: #0e1629;
  --sunken: #0a1121;
  --ink: #e8ecf4;
  --ink-2: #b3bccd;
  --muted: #8a94a9;
  --line: #1b2740;
  --line-2: #2a3858;
  --accent: var(--gold);
  --focus: var(--gold);
  --radius: 14px;
  --font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hemi-gap: #0d1427;
  --out: cubic-bezier(0.23, 1, 0.32, 1);
  --inout: cubic-bezier(0.77, 0, 0.175, 1);
  --drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 28px 56px -32px rgba(2, 5, 14, 0.9);
  color-scheme: dark;
  background: var(--sky-1);
}

/* ---------- colores fijos de la hoja base: siempre la versión nocturna ---------- */
html.x3 .pill.hot { background: rgba(242, 195, 91, 0.14); color: var(--gold); border-color: rgba(242, 195, 91, 0.35); }
html.x3 .ok, html.x3 .up { color: #74d495; }
html.x3 .ko, html.x3 .down { color: #f59a90; }
html.x3 em { color: var(--gold); }
html.x3 .tag.poll { background: rgba(242, 195, 91, 0.12); color: var(--gold); border-color: rgba(242, 195, 91, 0.3); }
html.x3 .prose .todo { background: rgba(242, 195, 91, 0.16); color: var(--gold); }
html.x3 .veda { background: linear-gradient(180deg, rgba(242, 195, 91, 0.1), rgba(242, 195, 91, 0.04)); border: 1px solid rgba(242, 195, 91, 0.35); color: #f6dfa6; }
html.x3 .dv-err { color: #ff8a80; }
html.x3 .dv-input[aria-invalid="true"] { border-color: #ff8a80; }
html.x3 .chart .dot, html.x3 .ec-chart .dot { opacity: 0.32; }
html.x3 .ev-page { --c-plazo: #f0a35e; --c-campana: #f17ab8; --c-votacion: #7aa7f5; --c-debate: #b3a1f7; --c-exterior: #5fd0c3; --c-correo: #7fd08a; --c-inst: #a9a79f; --c-auton: #e0b85c; }
html.x3 .pg-badge.wait { background: #33280f; color: #f1cb73; border-color: #54431b; }
html.x3 .pg-badge.ok { background: #16301f; color: #8fdca5; border-color: #24502f; }
html.x3 .pg-page mark { background: rgba(242, 195, 91, 0.28); color: var(--ink); }
html.x3 input, html.x3 select, html.x3 textarea { color-scheme: dark; }

/* ---------- base ---------- */
html.x3 body {
  font-family: var(--font); font-size: 15.5px; line-height: 1.55; background: transparent; color: var(--ink);
  overflow-x: clip; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "ss01" 1;
}
html.x3 ::selection { background: var(--gold); color: var(--gold-ink); }
html.x3 a { text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(232, 236, 244, 0.35); }
html.x3 a:hover { text-decoration-color: var(--gold); }
html.x3 :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
html.x3 .num, html.x3 .bar-val, html.x3 .polls td, html.x3 .facts b, html.x3 .pact-result .big { font-variant-numeric: tabular-nums; }

/* Atmósfera fija: cielo nocturno con horizonte azul y polvo de estrellas (capa fija, no repinta al hacer scroll) */
html.x3 body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(220, 230, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 27% 62%, rgba(220, 230, 255, 0.35), transparent 60%),
    radial-gradient(1.2px 1.2px at 44% 9%, rgba(255, 236, 200, 0.5), transparent 60%),
    radial-gradient(1px 1px at 58% 41%, rgba(220, 230, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 71% 15%, rgba(220, 230, 255, 0.45), transparent 60%),
    radial-gradient(1.3px 1.3px at 86% 33%, rgba(220, 230, 255, 0.5), transparent 60%),
    radial-gradient(1px 1px at 93% 71%, rgba(220, 230, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 6% 83%, rgba(220, 230, 255, 0.3), transparent 60%),
    radial-gradient(1px 1px at 37% 88%, rgba(255, 236, 200, 0.28), transparent 60%),
    radial-gradient(1px 1px at 64% 76%, rgba(220, 230, 255, 0.25), transparent 60%),
    radial-gradient(120% 70% at 50% -10%, rgba(38, 66, 128, 0.55), transparent 62%),
    radial-gradient(80% 50% at 100% 0%, rgba(30, 56, 112, 0.35), transparent 70%),
    linear-gradient(180deg, var(--sky-2) 0%, var(--sky-1) 46%, var(--sky-0) 100%);
}

/* ---------- tipografía ---------- */
html.x3 h1, html.x3 h2, html.x3 h3 { font-family: var(--font); color: var(--ink); }
html.x3 h1 { font-size: clamp(32px, 3.5vw, 54px); line-height: 1.04; font-weight: 620; letter-spacing: -0.035em; margin: 0; max-width: 22ch; text-wrap: balance; }
html.x3 h2 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
html.x3 h3 { font-weight: 600; letter-spacing: -0.012em; }
html.x3 .lede { color: var(--ink-2); font-size: clamp(16px, 1.15vw, 18px); line-height: 1.6; max-width: 62ch; margin-top: 18px; }
html.x3 .lede a, html.x3 .lede b { color: var(--ink); }
html.x3 .sub { color: var(--muted); font-size: 13px; }
html.x3 .crumbs, html.x3 .tag, html.x3 .updated, html.x3 .countdown .lbl, html.x3 .facts div, html.x3 .polls th,
html.x3 .ad-lbl, html.x3 .tl-date, html.x3 .rcard .meta, html.x3 .chip .n, html.x3 .asof { font-family: var(--mono); letter-spacing: 0.01em; }
html.x3 .crumbs { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
html.x3 .crumbs a { color: var(--ink-2); text-decoration: none; }
html.x3 .crumbs a:hover { color: var(--gold); }
html.x3 .pill { font: 500 11.5px/1.2 var(--mono); padding: 4px 10px; background: rgba(255, 255, 255, 0.05); color: var(--ink-2); border: 1px solid var(--edge); }

/* ---------- cabecera: barra de vidrio ---------- */
html.x3 .top {
  background: rgba(8, 13, 25, 0.62); border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}
/* El logotipo trae tinta oscura: un halo de luz muy suave lo despega del cielo */
html.x3 .brand { position: relative; }
/* Logo en versión para fondo oscuro (logo-dark-*.webp): sin placa, directamente sobre el azul de la cabecera */
html.x3 .brand img, html.x3 .foot-brand img { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35)); }
html.x3 .tabs { gap: 2px; }
html.x3 .tabs a { position: relative; font: 500 14px/1 var(--font); letter-spacing: -0.005em; color: var(--ink-2); padding: 10px 11px; border-radius: 10px; transition: color 160ms ease, background-color 160ms ease; }
html.x3 .tabs a[aria-current="page"] { background: rgba(255, 255, 255, 0.06); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
html.x3 .tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gold); }
@media (hover: hover) and (pointer: fine) { html.x3 .tabs a:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); } }
html.x3 .menu-btn { border: 1px solid var(--edge-2); background: rgba(255, 255, 255, 0.04); color: var(--ink); border-radius: 12px; }
html.x3 .menu-btn[aria-expanded="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
html.x3 .updated { font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) {
  html.x3 .tabs { background: rgba(8, 13, 25, 0.96); border-bottom: 1px solid var(--edge); box-shadow: 0 30px 60px -20px rgba(2, 5, 14, 0.9); }
  html.x3 .tabs a { font-size: 16px; }
  html.x3 .tabs a[aria-current="page"]::after { left: 14px; right: auto; width: 18px; bottom: 6px; }
}

/* Ficha de cuenta atrás de la cabecera (theme.js) */
.x3-clock {
  display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex: none; text-decoration: none; color: var(--ink);
  padding: 7px 12px 7px 8px; border-radius: 999px; border: 1px solid var(--edge-2); background: rgba(255, 255, 255, 0.04);
  font: 500 12.5px/1 var(--mono); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: transform 160ms var(--out), border-color 160ms ease;
}
.x3-clock span { padding: 4px 7px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 650; }
.x3-clock b { font-weight: 500; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .x3-clock:hover { border-color: rgba(242, 195, 91, 0.5); } }
.x3-clock:active { transform: scale(0.97); }
html.x3 .x3-clock ~ .updated { display: none; }
@media (max-width: 1380px) { .x3-clock { display: none; } }

/* ---------- escenario de cabecera de cada página ---------- */
html.x3 { --x3-main-pt: 44px; }
html.x3 main.wrap { position: relative; padding-top: var(--x3-main-pt); }
/* Luz de horizonte detrás del titular y filo dorado de cierre (pseudo-elemento: no altera el DOM) */
html.x3 main.wrap::before {
  content: ""; position: absolute; z-index: -2; pointer-events: none; top: 0; left: calc(50% - 50vw); width: 100vw; height: var(--x3-stage, 0px);
  background:
    linear-gradient(90deg, transparent 8%, rgba(242, 195, 91, 0.5) 50%, transparent 92%) bottom / 100% 1px no-repeat,
    radial-gradient(50% 90% at 78% 100%, rgba(64, 104, 196, 0.24), transparent 70%),
    radial-gradient(30% 60% at 70% 100%, rgba(242, 195, 91, 0.08), transparent 70%);
}
/* Suelo en perspectiva bajo el horizonte: rejilla tenue que se pierde hacia el fondo */
html.x3 main.wrap::after {
  content: ""; position: absolute; z-index: -2; pointer-events: none; left: calc(50% - 50vw); width: 100vw; height: 220px;
  top: 0; translate: 0 calc(var(--x3-stage, 0px) - 220px);
  background:
    repeating-linear-gradient(90deg, rgba(150, 180, 255, 0.11) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(150, 180, 255, 0.09) 0 1px, transparent 1px 34px);
  transform: perspective(380px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(70% 120% at 72% 100%, #000 10%, transparent 70%); mask-image: radial-gradient(70% 120% at 72% 100%, #000 10%, transparent 70%);
}
body.lx main.wrap::before, body.lx main.wrap::after { display: none; }

/* Palabra o cifra de la sección en relieve (theme.js: elemento decorativo fuera de #view, con paralaje) */
.x3-mark {
  position: absolute; z-index: -1; right: max(20px, calc(50vw - 590px)); top: 0; pointer-events: none; user-select: none;
  perspective: 900px; will-change: transform;
}
.x3-mark::before {
  content: attr(data-mark) / ""; display: block; white-space: nowrap;
  font: 700 clamp(110px, calc(48vw / var(--mlen, 3)), 290px)/0.8 var(--font); letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(176, 198, 255, 0.2);
  background: linear-gradient(180deg, rgba(176, 198, 255, 0.07), rgba(176, 198, 255, 0) 80%); -webkit-background-clip: text; background-clip: text;
  transform: rotateY(-26deg) rotateX(10deg); transform-origin: 100% 100%;
  animation: x3-rise 1100ms var(--out) both;
}
@keyframes x3-rise { from { opacity: 0; transform: rotateY(-48deg) rotateX(16deg) translateZ(-80px); } }
body.lx .x3-mark { display: none; }

html.x3 .hero { align-items: end; }
html.x3 .countdown {
  text-align: left; padding: 14px 18px 16px; border-radius: 18px; border: 1px solid var(--edge-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)), var(--glass); box-shadow: var(--shadow);
}
html.x3 .countdown .big { font: 300 64px/0.9 var(--mono); letter-spacing: -0.06em; color: var(--gold); }
html.x3 .countdown .lbl { font-size: 11.5px; color: var(--ink-2); }

/* Hechos clave: cifras sobre una línea de horizonte */
html.x3 .facts { gap: 0; margin-top: 26px; width: fit-content; max-width: 100%; border-radius: 16px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.025); }
html.x3 .facts > div { padding: 14px 22px; border-right: 1px solid var(--edge); font-size: 11.5px; color: var(--muted); }
html.x3 .facts > div:last-child { border-right: 0; }
html.x3 .facts b { font: 400 30px/1 var(--mono); letter-spacing: -0.04em; color: var(--ink); margin-bottom: 6px; }

/* ---------- secciones numeradas ---------- */
html.x3 #view { counter-reset: x3-sec; }
html.x3 .section { margin-top: clamp(44px, 7vh, 80px); }
html.x3 .section-head { margin-bottom: 18px; align-items: end; }
html.x3 .section-head h2::before, html.x3 #view > h2.section::before {
  counter-increment: x3-sec; content: counter(x3-sec, decimal-leading-zero) / "";
  display: inline-grid; place-items: center; vertical-align: 0.18em; margin-right: 12px; min-width: 34px; height: 22px; padding: 0 6px;
  border-radius: 999px; border: 1px solid rgba(242, 195, 91, 0.4); color: var(--gold); font: 500 11px/1 var(--mono); letter-spacing: 0;
}

/* ---------- superficies: vidrio con canto de luz ---------- */
html.x3 .card, html.x3 .rcard, html.x3 .tbl-wrap, html.x3 .pcard, html.x3 .pc,
html.x3 .hl-card, html.x3 .ec-card, html.x3 .pg-card, html.x3 .stat, html.x3 .seo-acc, html.x3 .news, html.x3 .g-facts, html.x3 .pg-sec, html.x3 .pg-results li, html.x3 .dv-faq details, html.x3 .dv-steps li {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--glass);
  border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
}
html.x3 .tbl-wrap { background: var(--surface); }
html.x3 .card { padding: 20px 22px; }
html.x3 .card-head { border-bottom: 1px solid var(--edge); padding-bottom: 12px; margin-bottom: 16px; }
html.x3 .card-head h2 { font-size: clamp(18px, 1.5vw, 22px); }

/* Piezas enlazables: inclinación en perspectiva que sigue al puntero (theme.js) y foco de luz */
html.x3 .rcard, html.x3 .pcard, html.x3 a.pc, html.x3 .pg-card, html.x3 .ec-card, html.x3 .lx-tile { position: relative; transform-style: preserve-3d; transition: border-color 200ms ease, background-color 200ms ease; }
html.x3 .rcard::after, html.x3 .pcard::after, html.x3 a.pc::after, html.x3 .pg-card::after, html.x3 .ec-card::after, html.x3 .lx-tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(242, 195, 91, 0.11), transparent 45%);
  transition: opacity 240ms ease;
}
@media (hover: hover) and (pointer: fine) {
  html.x3 .rcard:hover, html.x3 .pcard:hover, html.x3 a.pc:hover, html.x3 .pg-card:hover, html.x3 .ec-card:hover { border-color: var(--edge-2); }
  html.x3 .rcard:hover::after, html.x3 .pcard:hover::after, html.x3 a.pc:hover::after, html.x3 .pg-card:hover::after, html.x3 .ec-card:hover::after, html.x3 .lx-tile:hover::after { opacity: 1; }
}
html.x3 .rcard:active, html.x3 .pcard:active, html.x3 a.pc:active { scale: 0.985; }
html.x3 .rcard h2, html.x3 .rcard h3 { font-size: 19px; letter-spacing: -0.02em; }
html.x3 .rcard .when b { color: var(--gold); }
html.x3 .mini, html.x3 .parl { background: rgba(255, 255, 255, 0.04); }

/* ---------- controles ---------- */
html.x3 .filters { padding: 8px; gap: 8px; border-radius: 18px; border: 1px solid var(--edge); background: rgba(14, 22, 41, 0.7); box-shadow: var(--shadow); }
html.x3 .filters .sep { background: var(--edge); }
html.x3 .ctl, html.x3 .chip, html.x3 .region-select a, html.x3 .presets button, html.x3 .legal-nav a {
  font: 500 13px/1.1 var(--font); border: 1px solid var(--edge-2); background: rgba(255, 255, 255, 0.035); color: var(--ink);
  border-radius: 10px; min-height: 36px; padding: 8px 12px; transition: transform 140ms var(--out), border-color 160ms ease, background-color 160ms ease;
}
html.x3 .chip, html.x3 .region-select a, html.x3 .presets button, html.x3 .legal-nav a { border-radius: 999px; }
html.x3 .seg { border: 1px solid var(--edge-2); background: rgba(255, 255, 255, 0.03); border-radius: 12px; padding: 3px; gap: 2px; }
html.x3 .seg button { border: 0 !important; border-radius: 9px; color: var(--ink-2); padding: 7px 12px; font: 500 13px/1 var(--font); transition: background-color 180ms ease, color 180ms ease; }
html.x3 .seg button[aria-pressed="true"], html.x3 .chip[aria-pressed="true"], html.x3 .legal-nav a[aria-current],
html.x3 .region-select a[aria-current="true"], html.x3 .region-select a[aria-current="page"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
html.x3 .chip[aria-pressed="true"] .n { color: var(--gold-ink); opacity: 0.75; }
@media (hover: hover) and (pointer: fine) {
  html.x3 .ctl:hover, html.x3 .chip:not([aria-pressed="true"]):hover, html.x3 .region-select a:not([aria-current]):hover, html.x3 .presets button:hover, html.x3 .legal-nav a:not([aria-current]):hover { border-color: rgba(242, 195, 91, 0.5); background: rgba(255, 255, 255, 0.06); }
  html.x3 .seg button:not([aria-pressed="true"]):hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
}
html.x3 .ctl:active, html.x3 .chip:active, html.x3 .seg button:active, html.x3 .region-select a:active, html.x3 .presets button:active, html.x3 .legal-nav a:active { transform: scale(0.97); }
html.x3 .reset { color: var(--ink-2); }
html.x3 .dd-panel, html.x3 .tip {
  background: rgba(14, 22, 41, 0.94); border: 1px solid var(--edge-2); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 60px -20px rgba(2, 5, 14, 0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
html.x3 .dd-panel { transform-origin: 0 0; animation: x3-pop 180ms var(--out); }
@keyframes x3-pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
html.x3 .dd-panel label:hover { background: rgba(255, 255, 255, 0.05); }
html.x3 .dd-actions { border-bottom: 1px solid var(--edge); }
html.x3 .dd-actions button { color: var(--gold); }
html.x3 .tip h4 { color: var(--muted); font-family: var(--mono); font-weight: 500; }

/* ---------- datos ---------- */
html.x3 .bar-row .name { font-weight: 550; }
html.x3 .bar-track { background: rgba(255, 255, 255, 0.035); border-radius: 0 6px 6px 0; }
html.x3 .bar-fill { border-radius: 0 6px 6px 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); transform-origin: 0 50%; }
html.x3 .x3-in .bar-fill { animation: x3-grow 900ms var(--out) both; animation-delay: calc(120ms + var(--k, 0) * 40ms); }
@keyframes x3-grow { from { transform: scaleX(0.02); } }
html.x3 .bar-val b { font: 500 16px/1 var(--mono); letter-spacing: -0.03em; }
html.x3 .maj { border-left: 1px dashed var(--gold); }
html.x3 .maj span { font-family: var(--mono); color: var(--gold); }
html.x3 .pact-result .big { font: 300 54px/0.95 var(--mono); letter-spacing: -0.05em; }
html.x3 .hemi .h-center { fill: var(--ink); font-family: var(--mono); font-weight: 400; letter-spacing: -0.04em; }
html.x3 .hemi .h-num { font-family: var(--mono); font-weight: 500; }
html.x3 .x3-in .hemi { animation: x3-tilt 1100ms var(--out) both; transform-origin: 50% 100%; }
@keyframes x3-tilt { from { opacity: 0; transform: perspective(900px) rotateX(38deg) scale(0.94); } }
html.x3 .bloc b { font-family: var(--mono); font-weight: 500; }
html.x3 .chart .grid line { stroke: rgba(176, 198, 255, 0.08); }
html.x3 .chart .axis text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
html.x3 .chart .line { stroke-width: 2.4; }
html.x3 .chart .line[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: x3-draw 1500ms var(--inout) forwards; }
@keyframes x3-draw { to { stroke-dashoffset: 0; } }
html.x3 .chart .xhair { stroke: var(--gold); }

/* Tablas de sondeos */
html.x3 .polls th { background: #111a30; color: var(--muted); font-weight: 500; font-size: 11px; border-bottom: 1px solid var(--edge-2); }
html.x3 .polls th, html.x3 .polls td { border-bottom-color: rgba(176, 198, 255, 0.07); }
html.x3 .polls td { font-family: var(--mono); font-size: 12.5px; }
html.x3 .polls td.firm { font: 550 13.5px/1.25 var(--font); }
html.x3 .polls td.firm small { font-family: var(--mono); font-size: 11px; }
html.x3 .polls td.lead1 { color: var(--gold); }
html.x3 .polls tbody tr:hover td { background: #121c34; }
html.x3 .first-col { background: var(--surface); }
html.x3 .polls tr.elec td { background: #0b1222; color: var(--ink-2); font-style: normal; }
html.x3 .polls td.na { color: #33415f; }
html.x3 .more {
  font: 500 13px/1 var(--font); color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--edge-2);
  border-radius: 999px; padding: 13px 22px; transition: transform 140ms var(--out), border-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { html.x3 .more:hover { border-color: var(--gold); } }
html.x3 .more:active { transform: scale(0.97); }

/* ---------- noticias ---------- */
html.x3 .news { padding: 16px 18px 18px; }
html.x3 .news h3 { font-size: 17px; line-height: 1.32; font-weight: 580; letter-spacing: -0.015em; }
html.x3 .news h3 a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { html.x3 .news h3 a:hover { color: var(--gold); } }
html.x3 .n-meta { font-size: 12px; font-family: var(--mono); color: var(--muted); }
html.x3 .n-meta b { color: var(--ink-2); font-weight: 500; }
html.x3 .n-src { font-family: var(--mono); font-size: 12px; color: var(--muted); }
html.x3 .news-day h2 { font-size: clamp(22px, 2.2vw, 30px); padding-bottom: 10px; border-bottom: 1px solid var(--edge); }
html.x3 .news-day h2 .sub { font-family: var(--mono); font-size: 12px; }

/* ---------- líneas de tiempo ---------- */
html.x3 .timeline { border-left: 1px solid transparent; border-image: linear-gradient(180deg, rgba(242, 195, 91, 0.7), rgba(176, 198, 255, 0.12) 60%, transparent) 1; }
html.x3 .tl-item::before { width: 11px; height: 11px; left: -6px; top: 6px; background: var(--sky-1); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(242, 195, 91, 0.1); }
html.x3 .tl-item.past::before { border-color: var(--line-2); box-shadow: none; }
html.x3 .tl-date { font-size: 12.5px; color: var(--gold); font-weight: 500; }

/* ---------- guías: listas que se apilan al hacer scroll (sticky stacking) ---------- */
html.x3 #view > h2.section { margin-top: clamp(48px, 7vh, 72px) !important; font-size: clamp(21px, 1.9vw, 27px); }
html.x3 .g-steps { counter-reset: g; }
html.x3 .g-steps li, html.x3 .g-dates li {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)), #0f182d;
  border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow);
}
html.x3 .g-steps li { padding: 18px 20px 18px 62px; margin: 0 0 12px; }
html.x3 .g-steps li::before { left: 18px; top: 17px; width: 28px; height: 28px; background: var(--gold); color: var(--gold-ink); font: 600 13px/1 var(--mono); }
html.x3 .g-dates { border-left: 0; margin-left: 0; }
html.x3 .g-dates li { padding: 16px 20px 16px 44px; margin: 0 0 12px; }
html.x3 .g-dates li::before { left: 18px; top: 22px; width: 10px; height: 10px; background: var(--gold); border: 0; box-shadow: 0 0 0 4px rgba(242, 195, 91, 0.14); }
html.x3 .g-dates li b, html.x3 .g-steps li b { color: var(--ink); }
@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  html.x3 .g-steps li, html.x3 .g-dates li { position: sticky; top: calc(104px + var(--i, 0) * 14px); }
  html.x3 .g-steps li:nth-child(1), html.x3 .g-dates li:nth-child(1) { --i: 0; }
  html.x3 .g-steps li:nth-child(2), html.x3 .g-dates li:nth-child(2) { --i: 1; }
  html.x3 .g-steps li:nth-child(3), html.x3 .g-dates li:nth-child(3) { --i: 2; }
  html.x3 .g-steps li:nth-child(4), html.x3 .g-dates li:nth-child(4) { --i: 3; }
  html.x3 .g-steps li:nth-child(5), html.x3 .g-dates li:nth-child(5) { --i: 4; }
  html.x3 .g-steps li:nth-child(n+6), html.x3 .g-dates li:nth-child(n+6) { --i: 5; }
  html.x3 .g-steps li:not(:last-child), html.x3 .g-dates li:not(:last-child) { margin-bottom: 48px; }
}
html.x3 .g-callout { border-left: 2px solid var(--gold); background: rgba(242, 195, 91, 0.06); }
html.x3 .g-facts { padding: 16px 20px; }

/* ---------- textos largos (guías, legal, fuentes) ---------- */
html.x3 .prose { font-size: 16.5px; line-height: 1.7; }
html.x3 .prose p, html.x3 .prose li { color: var(--ink-2); }
html.x3 .prose h2 { margin-top: 2em; font-size: clamp(21px, 1.9vw, 27px); }
html.x3 .prose h2::before { content: ""; display: block; width: 36px; height: 2px; margin-bottom: 14px; border-radius: 2px; background: var(--gold); }
html.x3 .prose h3 { margin-top: 1.5em; font-size: 16px; }
html.x3 .prose a { color: var(--ink); }
html.x3 .prose strong, html.x3 .prose b { color: var(--ink); font-weight: 600; }
html.x3 .prose table { border-collapse: separate; border-spacing: 0; width: 100%; border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--surface); }
html.x3 .prose th { background: #111a30; color: var(--muted); font: 500 11.5px/1.3 var(--mono); text-align: left; padding: 10px 12px; }
html.x3 .prose td { border-top: 1px solid var(--edge); padding: 10px 12px; }
html.x3 .prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-radius: 14px; border: 1px solid rgba(242, 195, 91, 0.3); background: rgba(242, 195, 91, 0.06); color: var(--ink); }

/* ---------- preguntas frecuentes y «Más información» ---------- */
html.x3 .seo-acc > summary { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; transition: background-color 160ms ease; }
html.x3 .seo-acc > summary:hover { background: rgba(255, 255, 255, 0.03); }
html.x3 .seo-acc > summary::before { background: var(--gold); color: var(--gold-ink); font-family: var(--mono); }
html.x3 .seo-acc[open] > summary { border-bottom: 1px solid var(--edge); }
html.x3 .seo-acc h2 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
html.x3 .seo-acc .seo-intro p:first-child { background: rgba(242, 195, 91, 0.06); border-left: 2px solid var(--gold); color: var(--ink); }
html.x3 .faq-item { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--edge); border-radius: 12px; }
html.x3 .faq-item[open] { border-color: var(--edge-2); background: rgba(255, 255, 255, 0.04); }
html.x3 .faq-item > summary:hover { color: var(--gold); }
html.x3 .seo-acc > summary::after, html.x3 .faq-item > summary::after { border-color: var(--muted); transition: transform 220ms var(--out); }
html.x3 .seo-acc .related li a { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--edge); border-radius: 12px; transition: border-color 160ms ease, background-color 160ms ease; }
html.x3 .seo-acc .related li a:hover { border-color: rgba(242, 195, 91, 0.45); background: rgba(255, 255, 255, 0.045); }
html.x3 .seo-acc .related li a:hover::after { color: var(--gold); }
html.x3 .seo-acc .related li a:active { transform: scale(0.98); }

/* ---------- publicidad: misma reserva de espacio; solo cambia la etiqueta ---------- */
html.x3 .ad-lbl { color: var(--muted); font-size: 10.5px; }

/* ---------- diálogo de encuesta ---------- */
html.x3 dialog.poll-dlg {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), rgba(13, 20, 38, 0.97);
  color: var(--ink); border: 1px solid var(--edge-2); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 60px 120px -30px rgba(2, 5, 14, 0.95);
}
html.x3 dialog.poll-dlg[open] { animation: x3-dlg 260ms var(--out); }
html.x3 dialog.poll-dlg::backdrop { background: rgba(4, 7, 15, 0.62); backdrop-filter: blur(6px); }
@keyframes x3-dlg { from { opacity: 0; transform: perspective(1200px) translateY(14px) rotateX(6deg) scale(0.97); } }
html.x3 .ficha { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--edge); }

/* ---------- pie: borde del planeta ---------- */
html.x3 .foot { position: relative; background: linear-gradient(180deg, rgba(10, 16, 30, 0.6), var(--sky-0) 60%); border-top: 0; margin-top: 56px; color: var(--ink-2); }
html.x3 .foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 180px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 5%, rgba(242, 195, 91, 0.55) 50%, transparent 95%) top / 100% 1px no-repeat,
    radial-gradient(60% 180px at 50% 0%, rgba(64, 104, 196, 0.22), transparent 75%);
}
html.x3 .foot-indep { color: var(--ink); }
html.x3 .foot-col h2 { font: 500 11.5px/1 var(--mono); letter-spacing: 0.08em; color: var(--gold); }
html.x3 .foot-col a { color: var(--ink-2); transition: color 160ms ease; }
html.x3 .foot-col a:hover { color: var(--ink); }
html.x3 .foot-bottom { border-top: 1px solid var(--edge); font-family: var(--mono); font-size: 11.5px; }

/* ---------- transición entre páginas: un barrido de luz por el horizonte (theme.js) ---------- */
.x3-warp { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 30; pointer-events: none; background: linear-gradient(90deg, transparent, var(--gold) 40%, #fff3d6 50%, var(--gold) 60%, transparent); transform: scaleX(0); opacity: 0; transform-origin: 0 50%; }
.x3-warp.go { animation: x3-warp 620ms var(--drawer) both; }
@keyframes x3-warp { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
html.x3 #view.x3-enter { animation: x3-enter 520ms var(--out) both; }
@keyframes x3-enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- apariciones al entrar en pantalla: suben desde el fondo con un leve giro ---------- */
html.x3 .x3-rv { opacity: 0; transform: perspective(1400px) translate3d(0, 28px, 0) rotateX(7deg); transform-origin: 50% 0; }
html.x3 .x3-rv.x3-in { opacity: 1; transform: none; transition: opacity 640ms var(--out), transform 900ms var(--out); transition-delay: calc(var(--k, 0) * 60ms); }

html.x3 .skeleton div { background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); background-size: 200% 100%; border: 1px solid var(--edge); border-radius: 14px; }

@media (max-width: 760px) {
  html.x3 h1 { font-size: clamp(29px, 8.4vw, 38px); }
  html.x3 { --x3-main-pt: 28px; }
  html.x3 main.wrap::after { height: 140px; top: 0; translate: 0 calc(var(--x3-stage, 0px) - 140px); }
  .x3-mark::before { font-size: calc(96vw / var(--mlen, 3)); -webkit-text-stroke-color: rgba(176, 198, 255, 0.14); }
  html.x3 .countdown .big { font-size: 48px; }
  html.x3 .facts > div { padding: 12px 14px; }
  html.x3 .facts b { font-size: 24px; }
  html.x3 .g-steps li { padding-left: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html.x3 .x3-rv { opacity: 1; transform: none; }
  html.x3 .x3-in .bar-fill, html.x3 .x3-in .hemi, html.x3 .chart .line[pathLength], .x3-mark::before,
  html.x3 dialog.poll-dlg[open], html.x3 .dd-panel, .x3-warp.go, html.x3 #view.x3-enter { animation: none; }
  html.x3 .chart .line[pathLength] { stroke-dashoffset: 0; }
  .x3-mark { transform: none !important; }
}
@media print { html.x3 body::before, html.x3 main.wrap::before, html.x3 main.wrap::after, html.x3 .foot::before, .x3-warp, .x3-mark { display: none; } }

/* ---------- ajustes por vista ---------- */
html.x3 .dv-input { font: 500 22px/1 var(--mono); letter-spacing: 0.14em; min-height: 54px; border-radius: 14px; border: 1px solid var(--edge-2); background: rgba(5, 8, 15, 0.6); color: var(--ink); }
html.x3 .dv-input:focus-visible { border-color: var(--gold); }
html.x3 .dv-btn { min-height: 54px; border-radius: 14px; background: var(--gold); color: var(--gold-ink); border: 1px solid var(--gold); font: 600 15px/1 var(--font); transition: transform 140ms var(--out), background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { html.x3 .dv-btn:hover { background: #f6d07a; opacity: 1; } }
html.x3 .dv-btn:active { transform: scale(0.97); }
html.x3 .card:has(> .dv-form), html.x3 .card:has(.dv-input) { border-color: rgba(242, 195, 91, 0.3); background: radial-gradient(80% 120% at 100% 0%, rgba(242, 195, 91, 0.08), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)), var(--glass); }
html.x3 .dv-steps li::before { background: var(--gold); color: var(--gold-ink); }
html.x3 .dv-dates { border-color: var(--edge); border-radius: 14px; }
html.x3 .ev-list .tl-item.next { background: rgba(242, 195, 91, 0.06); border-color: rgba(242, 195, 91, 0.3); border-radius: 14px; }
html.x3 .ev-list .tl-item.next::before { background: var(--gold); border-color: var(--gold); }
html.x3 .hl-tbl tfoot th, html.x3 .hl-tbl tfoot td { background: #0b1222; }
html.x3 .pg-nums div { background: rgba(255, 255, 255, 0.04); }
html.x3 .dh-bar { background: var(--gold); }
html.x3 .dh-x { background: rgba(255, 255, 255, 0.04); border-color: var(--edge-2); color: var(--ink-2); }

/* La leyenda del hemiciclo se retira cuando los escaños empiezan a moverse (--lx-t lo pone landing.js) */
html.x3 .lx-viz { opacity: calc(1 - var(--lx-t, 0)); translate: 0 calc(var(--lx-t, 0) * 16px); }
html.x3 .lx-stage:not([data-state="0"]) .lx-viz { pointer-events: none; }
html.x3 .lx-viz { animation-fill-mode: backwards; }

/* ==========================================================================
   Móvil: revisión completa (≤ 760 px)
   ========================================================================== */
/* Ningún adorno (rejillas en perspectiva, estrellas, cifras de fondo) puede ensanchar la página */
html.x3, html.x3 body { overflow-x: clip; }

/* Tablas anchas: sombra en el borde que indica que se pueden desplazar en horizontal */
html.x3 .tbl-wrap {
  background:
    linear-gradient(90deg, var(--surface) 30%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(270deg, var(--surface) 30%, transparent) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.55), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.55), transparent) right / 14px 100% no-repeat scroll,
    var(--surface);
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  /* Texto mínimo legible */
  html.x3 .polls th, html.x3 .polls td small, html.x3 .polls td .s, html.x3 .lx-meta span, html.x3 .delta,
  html.x3 .bar-val small, html.x3 .n-meta, html.x3 .crumbs, html.x3 .facts div, html.x3 .ad-lbl,
  html.x3 .legend button, html.x3 .chip .n { font-size: 12px; }
  html.x3 .sub { font-size: 12.5px; }
  html.x3 small, html.x3 .polls td.firm small, html.x3 .polls td small, html.x3 .kind, html.x3 .lx-path-176 em,
  html.x3 .lx-path-head span em, html.x3 .polls em { font-size: max(12px, 0.8em); }

  /* Enlaces sueltos (fuentes, etiquetas, «leer en…», listas de enlaces): zona táctil cómoda sin cambiar el texto */
  html.x3 .n-src, html.x3 .news .tag, html.x3 a.tag, html.x3 .section-head a.sub, html.x3 a.sub,
  html.x3 .ev-links a, html.x3 .tl-names a, html.x3 .hl-note a, html.x3 .dv-dates a, html.x3 .dv-res summary {
    display: inline-flex; align-items: center; min-height: 36px; padding-block: 6px;
  }
  html.x3 .tl-names { line-height: 2.2; }
  html.x3 .prose ul li, html.x3 #view section > ul li, html.x3 .ev-foot li { padding-block: 5px; }
  html.x3 .seo-acc .related li a { min-height: 48px; }

  /* Objetivos táctiles de al menos 40 px */
  html.x3 .seg button, html.x3 .ctl, html.x3 .chip, html.x3 .presets button, html.x3 .region-select a,
  html.x3 .filters .reset, html.x3 .legend button, html.x3 .more, html.x3 .ev-chips button, html.x3 .ev-chips a,
  html.x3 .legal-nav a, html.x3 .lx-legend li { min-height: 40px; }
  html.x3 .seg button { padding-inline: 12px; }
  html.x3 .legend button { padding: 6px 8px; }
  html.x3 .filters { gap: 8px; }
  html.x3 .filters .seg { flex: 1 1 100%; display: flex; }
  html.x3 .filters .seg button { flex: 1 1 auto; }

  /* Pie: logo proporcionado, enlaces con aire para el dedo */
  html.x3 .foot-brand img { height: 84px; margin: 0 0 6px; }
  html.x3 .foot-grid { gap: 28px 20px; }
  html.x3 .foot-col { gap: 0; }
  html.x3 .foot-col h2 { margin-bottom: 6px; }
  html.x3 .foot-col a { display: block; padding: 9px 0; line-height: 1.3; }

  /* Bloque de preguntas frecuentes: sin tanto hueco por encima */
  html.x3 .seo-extra { margin-top: 32px; }
}
@media (max-width: 420px) {
  /* Selectores de periodo en una sola línea */
  html.x3 .seg button { padding-inline: 8px; white-space: nowrap; font-size: 13px; }
}

/* Multiplex: plegado mientras Google no sirva anuncios (antes de la aprobación reserva ~1.600 px vacíos).
   Mantiene el ancho, así AdSense puede rellenarlo; al marcarse «filled» se despliega. Está al final de la
   página y se pide al acercarse, por lo que el despliegue ocurre fuera de pantalla (sin CLS visible). */
html.x3 .ad-multiplex:not(:has(ins[data-ad-status="filled"])) { height: 0; margin-block: 0; overflow: hidden; }

/* ---------- Ficha de encuesta (diálogo) en móvil: hoja a pantalla completa que nunca se sale del ancho ---------- */
html.x3 .dlg-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
html.x3 .dlg-grid > * { min-width: 0; }
html.x3 .poll-dlg .hemi { width: 100%; height: auto; max-width: 100%; }
html.x3 .poll-dlg .src-btn, html.x3 .poll-dlg .share { white-space: normal; text-align: center; height: auto; min-height: 44px; line-height: 1.3; }
@media (max-width: 760px) {
  html.x3 .poll-dlg {
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; inset: 0;
    border-radius: 0; border: 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  }
  html.x3 dialog.poll-dlg[open] { animation: x3-sheet 280ms var(--out); }
  html.x3 .dlg-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  html.x3 .dlg-close { position: sticky; top: 0; float: right; z-index: 2; margin: -4px -4px 0 8px; }
  html.x3 .dlg-close .ctl { width: 44px; height: 44px; border-radius: 50%; background: rgba(13, 20, 38, 0.9); backdrop-filter: blur(8px); }
  html.x3 .dlg-title { font-size: 22px; line-height: 1.15; padding-right: 8px; }
  html.x3 .dlg-title span { display: block; font-size: 16px; margin-top: 2px; }
  /* Tabla de partidos: cabe en la pantalla; si no, se desplaza dentro de su caja */
  html.x3 .dlg-tbl { display: block; width: 100%; overflow-x: auto; font-size: 13px; }
  html.x3 .dlg-tbl th, html.x3 .dlg-tbl td { padding: 8px 6px; }
  html.x3 .dlg-tbl th { white-space: normal; line-height: 1.2; }
  html.x3 .dlg-tbl td.l { white-space: normal; }
  html.x3 .poll-dlg .blocs, html.x3 .poll-dlg .mini-legend { flex-wrap: wrap; }
  html.x3 .ficha { padding: 14px; }
  html.x3 .ficha dl { grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
  html.x3 .ficha dd { overflow-wrap: anywhere; }
  html.x3 .ficha .ctl { display: flex; justify-content: center; width: 100%; margin-top: 8px; }
}
@keyframes x3-sheet { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html.x3 dialog.poll-dlg[open] { animation: none; } }
