/* Encuadre 29N — sistema visual v2
   Interfaz en tinta; el color pertenece a los partidos. Archivo para la interfaz y los datos,
   Piazzolla cursiva para los marcos. Retícula de 12 columnas, máximo 1280 px. */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --surface-1: #F4F4F6; --surface-2: #EAEAEE;
  --ink-1: #000000; --ink-2: #45454F; --ink-3: #6B6B76;
  --rule: #DCDCE2; --rule-strong: #000000; --hatch: #C9C9D1;
  --accent: #3A22E0; --accent-weak: #EBE9FC;
  --aviso-ink: #7A4A00; --aviso-bg: #FFF4DB; --ok-ink: #1B6B3A;
  --sim-bg: #000000; --sim-ink: #FFFFFF; --sim-ink-2: #C8C8D0;
  --contexto: #CDCDD4; --medios: #8E8E99; --pista: #F1F1F4; --grid: #E4E4EA; --base: #BDBDC6;
  --tint-terr: 14%;
  --carrera: #B4B4BF;
  /* tinta de dato por partido (validada) */
  --c-pp: #1D84CE; --c-psoe: #B90414; --c-vox: #6ACA25; --c-fa: #F34F08; --c-podemos: #7C3779; --c-salf: #CE6196;
  --c-erc: #EFA002; --c-junts: #00C3B2; --c-bildu: #018F7A; --c-pnv: #50B43E; --c-bng: #6BB4E5; --c-cc: #CCB301;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Piazzolla", Georgia, serif;
  --wrap: 1280px;
  --top: 28px;     /* banda de simulación */
  --bar: 52px;     /* barra de control */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111114; --surface-1: #1A1A1F; --surface-2: #24242B;
    --ink-1: #F4F4F6; --ink-2: #B9B9C3; --ink-3: #8E8E9A;
    --rule: #2C2C34; --rule-strong: #F4F4F6; --hatch: #3A3A44;
    --accent: #9B7BFF; --accent-weak: #241F3B;
    --aviso-ink: #F2C46D; --aviso-bg: #2A2110; --ok-ink: #6FCF97;
    --sim-bg: #F4F4F6; --sim-ink: #000000; --sim-ink-2: #45454F;
    --contexto: #46464F; --medios: #7E7E8A; --pista: #222228; --grid: #2A2A31; --base: #4A4A53;
    --tint-terr: 22%;
    --carrera: #5A5A66;
    --c-pp: #1A83DB; --c-psoe: #BE222A; --c-vox: #159B05; --c-fa: #F75702; --c-podemos: #923D96; --c-salf: #CF709C;
    --c-erc: #C88300; --c-junts: #04AAA0; --c-bildu: #0B7D4F; --c-pnv: #48AD44; --c-bng: #15A1D3; --c-cc: #AD9202;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111114; --surface-1: #1A1A1F; --surface-2: #24242B;
  --ink-1: #F4F4F6; --ink-2: #B9B9C3; --ink-3: #8E8E9A;
  --rule: #2C2C34; --rule-strong: #F4F4F6; --hatch: #3A3A44;
  --accent: #9B7BFF; --accent-weak: #241F3B;
  --aviso-ink: #F2C46D; --aviso-bg: #2A2110; --ok-ink: #6FCF97;
  --sim-bg: #F4F4F6; --sim-ink: #000000; --sim-ink-2: #45454F;
  --contexto: #46464F; --medios: #7E7E8A; --pista: #222228; --grid: #2A2A31; --base: #4A4A53;
  --tint-terr: 22%;
  --carrera: #5A5A66;
  --c-pp: #1A83DB; --c-psoe: #BE222A; --c-vox: #159B05; --c-fa: #F75702; --c-podemos: #923D96; --c-salf: #CF709C;
  --c-erc: #C88300; --c-junts: #04AAA0; --c-bildu: #0B7D4F; --c-pnv: #48AD44; --c-bng: #15A1D3; --c-cc: #AD9202;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + var(--bar) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink-1); font: 400 16px/1.5 var(--font-sans); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i2 { color: var(--ink-2); } .i3 { color: var(--ink-3); }
.s14 { font-size: 14px; line-height: 20px; } .s13 { font-size: 13px; line-height: 18px; } .s12 { font-size: 12px; line-height: 16px; }
.marco { font-family: var(--font-serif); font-style: italic; font-weight: 450; }
.lnk { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lnk:hover { text-decoration-thickness: 2px; }

/* ---------- Banda de simulación ---------- */
.sim-band { position: sticky; top: 0; z-index: 40; height: var(--top); background: var(--sim-bg); color: var(--sim-ink); }
.sim-band .wrap { height: 100%; display: flex; align-items: center; gap: 24px; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; }
.sim-band strong { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sim-band span { color: var(--sim-ink-2); overflow: hidden; text-overflow: ellipsis; }
.sim-band .der { margin-left: auto; display: flex; gap: 24px; }
.sim-corto { display: none; }

/* ---------- Cabecera ---------- */
.masthead { border-bottom: 1px solid var(--rule); }
.mast { display: flex; align-items: center; gap: 16px; height: 64px; }
.marca { text-decoration: none; display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 26px; line-height: 26px; }
.marca .m1 { font-stretch: 115%; letter-spacing: -.02em; }
.firma { font-size: 13px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }

.marca .m2 { font-stretch: 62%; }
.descriptor { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.nav { margin-left: auto; display: flex; align-items: stretch; height: 100%; gap: 28px; }
.nav > a, .nav > .desplegable > button { display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; height: 100%; position: relative; }
.nav > a[aria-current="page"], .nav > .desplegable[data-actual] > button { color: var(--ink-1); font-weight: 600; }
.nav > a[aria-current="page"]::after, .nav > .desplegable[data-actual] > button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--ink-1); }
.nav > a:hover, .nav .desplegable > button:hover { color: var(--ink-1); }
.nav .sep { width: 1px; height: 20px; background: var(--rule); align-self: center; }
.nav .admin { font-size: 13px; color: var(--ink-3); }
.desplegable { position: relative; display: flex; }
.desplegable > button::before { content: ""; }
.menu-lista { position: absolute; top: 100%; left: -16px; z-index: 50; min-width: 300px; background: var(--bg); border: 1px solid var(--ink-1); padding: 8px 0; display: grid; }
.menu-lista[hidden] { display: none; }
.menu-lista a { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 8px 16px; text-decoration: none; font-size: 14px; }
.menu-lista a:hover { background: var(--surface-1); }
.menu-lista .grupo { padding: 10px 16px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.menu-btn { display: none; margin-left: auto; font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 4px; }

/* ---------- Barra de control (fija) ---------- */
.control { position: sticky; top: var(--top); z-index: 30; background: var(--bg); border-bottom: 2px solid var(--ink-1); }
.control .wrap { height: var(--bar); display: flex; align-items: center; gap: 28px; }
.dia-sel { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.dia-sel b { font-size: 15px; font-weight: 700; }
.dia-sel span { font-size: 13px; color: var(--ink-2); }
.regla { display: flex; align-items: flex-end; gap: 4px; }
.tramo { display: grid; justify-items: center; gap: 4px; width: 30px; padding-top: 2px; }
.tramo .n { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); width: 22px; height: 18px; display: grid; place-items: center; }
.tramo .b { width: 100%; height: 6px; border-bottom: 1px solid var(--rule); }
.tramo.publicada .n { color: var(--ink-1); font-weight: 600; }
.tramo.publicada .b { background: var(--ink-1); border: 0; }
.tramo.pendiente .b { background: var(--pista); border: 1px solid var(--base); }
.tramo.sin_datos .b { border: 1px dashed var(--ink-3); }
.tramo.hoy .n { color: var(--accent); font-weight: 700; }
.tramo.hoy .b { border: 1.5px solid var(--accent); }
.tramo[aria-checked="true"] .n { background: var(--ink-1); color: var(--bg); }
.tramo:disabled { cursor: default; }
.tramo.r { width: 18px; } .tramo.r .b { border: 0; }
.tramo.v { width: 34px; } .tramo.v .n { font-stretch: 62%; font-weight: 800; color: var(--ink-1); width: auto; }
.tramo.v .b { border: 0; width: 2px; height: 10px; background: var(--ink-1); }
.opciones { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.opciones .lab { font-size: 12px; font-weight: 600; color: var(--ink-3); font-stretch: 90%; }
.opciones button { font-size: 14px; color: var(--ink-2); padding: 14px 0 12px; border-bottom: 2px solid transparent; }
.opciones button[aria-pressed="true"] { color: var(--ink-1); font-weight: 600; border-bottom-color: var(--ink-1); }
.opciones button:hover { color: var(--ink-1); }
.control .resaltado { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.control .resaltado button { font-weight: 600; color: var(--ink-1); margin-left: 4px; }
.ctrl-movil { display: none; }
.paso { min-width: 36px; min-height: 44px; font-size: 20px; }
.paso:disabled { color: var(--ink-3); opacity: .5; cursor: default; }
.ctrl-movil select { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-1); background: transparent; border: 0; border-bottom: 2px solid var(--ink-1); border-radius: 0; padding: 10px 18px 8px 0; min-height: 44px; max-width: 108px; flex: none; }

/* ---------- Retícula y secciones ---------- */
main { display: block; min-width: 0; }
main.wrap { padding-top: 48px; padding-bottom: 72px; }
main:focus { outline: none; }
.g12 > * { min-width: 0; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: 1 / -1; }
.seccion { border-top: 2px solid var(--ink-1); padding-top: 16px; margin-top: 64px; }
.seccion:first-child { margin-top: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2, h2.h2 { font-size: 32px; line-height: 36px; font-weight: 800; font-stretch: 85%; letter-spacing: -.02em; }
.sec-head p { font-size: 14px; line-height: 20px; color: var(--ink-2); max-width: 64ch; margin-top: 4px; }
h3.h3 { font-size: 18px; line-height: 24px; font-weight: 650; letter-spacing: -.005em; }
.kicker { font-size: 14px; line-height: 20px; color: var(--ink-2); font-weight: 500; }
.h1 { font-size: 60px; line-height: 60px; font-weight: 800; font-stretch: 85%; letter-spacing: -.03em; margin: 6px 0 14px; }
.entradilla { font-size: 18px; line-height: 27px; color: var(--ink-2); max-width: 60ch; }
.base { font-size: 12px; line-height: 16px; color: var(--ink-2); margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.base a { color: var(--ink-1); }
.cifra { font-size: 60px; line-height: 60px; font-weight: 600; font-stretch: 75%; letter-spacing: -.02em; }
.cifra-m { font-size: 34px; line-height: 38px; font-weight: 600; font-stretch: 75%; letter-spacing: -.01em; }
.etq { font-size: 12px; line-height: 16px; font-weight: 600; font-stretch: 90%; letter-spacing: .01em; color: var(--ink-2); }
.vacio { color: var(--ink-2); font-size: 14px; padding: 12px 0; }
.aviso { font-size: 13px; line-height: 18px; color: var(--aviso-ink); }
.aviso b { font-weight: 600; }
.ok { color: var(--ok-ink); font-weight: 600; }
.sello-sim { display: inline-block; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--ink-1); padding: 2px 6px; background: var(--bg); white-space: nowrap; }

/* marca de agua de simulación (áreas de datos) */
.agua { position: relative; isolation: isolate; }
.agua::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='180'%3E%3Ctext x='20' y='110' transform='rotate(-20 160 90)' font-family='Arial' font-weight='700' font-size='16' letter-spacing='2' fill='%23000' fill-opacity='0.045'%3EDATOS SIMULADOS%3C/text%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .agua::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='180'%3E%3Ctext x='20' y='110' transform='rotate(-20 160 90)' font-family='Arial' font-weight='700' font-size='16' letter-spacing='2' fill='%23fff' fill-opacity='0.06'%3EDATOS SIMULADOS%3C/text%3E%3C/svg%3E"); } }
:root[data-theme="dark"] .agua::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='180'%3E%3Ctext x='20' y='110' transform='rotate(-20 160 90)' font-family='Arial' font-weight='700' font-size='16' letter-spacing='2' fill='%23fff' fill-opacity='0.06'%3EDATOS SIMULADOS%3C/text%3E%3C/svg%3E"); }

/* ---------- Sellos de partido ---------- */
.sello { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 28px; padding: 0 5px; font-size: 12px; font-weight: 750; font-stretch: 80%; letter-spacing: .02em; line-height: 1; white-space: nowrap; background: var(--sf); color: var(--st); position: relative; vertical-align: middle; }
.sello.g { height: 40px; min-width: 40px; padding: 0 10px; font-size: 20px; font-weight: 800; font-stretch: 75%; }
.sello.terr { background: color-mix(in oklab, var(--sf) var(--tint-terr), var(--bg)); color: var(--ink-1); border-left: 4px solid var(--sf); }
.sello.g.terr { border-left-width: 6px; }
.sello.fa { box-shadow: inset 0 -3px 0 #C8E61E; }
.sello.g.fa { box-shadow: inset 0 -4px 0 #C8E61E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sello { outline: 1px solid rgb(255 255 255 / .16); outline-offset: -1px; } }
:root[data-theme="dark"] .sello { outline: 1px solid rgb(255 255 255 / .16); outline-offset: -1px; }
.sello-min { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 600; }
.sello-min i { width: 10px; height: 10px; background: var(--sf); display: inline-block; flex: none; }
.sello-min.terr i { background: linear-gradient(90deg, var(--sf) 0 3px, color-mix(in oklab, var(--sf) 30%, var(--bg)) 3px); }
.sello-min.fa i { background: linear-gradient(135deg, var(--sf) 50%, #C8E61E 50%); }

/* ---------- Portada ---------- */
.dia-cab { align-items: start; padding-bottom: 8px; }
.base-dia { border-left: 1px solid var(--rule); padding-left: 24px; display: grid; gap: 10px; align-content: start; }
.regleta { display: flex; gap: 2px; height: 8px; width: 100%; max-width: 280px; }
.regleta i { display: block; height: 100%; }
.regleta .of { background: var(--ink-1); }
.regleta .me { background: var(--medios); }
.leyenda-origen { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.leyenda-origen span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-origen i { width: 10px; height: 10px; display: inline-block; }
.leyenda-origen .of { background: var(--ink-1); }
.leyenda-origen .me { background: var(--medios); }

.hallazgos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hallazgo { border-top: 1px solid var(--ink-1); padding-top: 12px; display: grid; gap: 8px; align-content: start; }
.hallazgo h3 { font-size: 18px; line-height: 24px; font-weight: 650; }
.hallazgo p { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.hallazgo .lnk { font-size: 14px; font-weight: 600; justify-self: start; }

.presencia { display: grid; }
.pres-fila { display: grid; grid-template-columns: minmax(0, 1fr) 48px 64px 64px; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 14px; }
.pres-fila:first-child { border-top: 1px solid var(--ink-1); }
.pres-fila:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.pres-fila .v { font-weight: 600; text-align: right; }
.pres-fila .d { font-size: 12px; color: var(--ink-2); text-align: right; }
.pres-fila.on { background: var(--surface-1); }

.multiples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.mult { min-width: 0; }
.mult-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--ink-1); padding-top: 8px; height: 44px; }
.mult-head a { font-size: 15px; font-weight: 600; text-decoration: none; }
.mult-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mult-head .v { font-size: 15px; font-weight: 600; white-space: nowrap; }
.mult-head .v span { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.mult.extra { border-top: 1px solid var(--ink-1); padding-top: 8px; display: grid; gap: 10px; align-content: start; }
.leyenda-partidos { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.ley-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.ley-p[aria-pressed="true"] { border-bottom-color: var(--ink-1); }
.ley-p svg { flex: none; }
.ley-p.media { font-weight: 500; color: var(--ink-2); cursor: default; }
.lista-ev { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-ev li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 18px; }
.lista-ev .n { width: 18px; height: 18px; border: 1px solid var(--ink-1); border-radius: 50%; font-size: 10px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.lista-ev button { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.verif { font-size: 12px; color: var(--ink-3); }

/* ---------- Matriz ---------- */
.matriz-wrap { overflow-x: auto; }
.matriz { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1040px; }
.matriz th, .matriz td { padding: 0; vertical-align: top; border-bottom: 1px solid var(--rule); text-align: left; }
.matriz thead th { border-bottom: 1px solid var(--ink-1); padding: 0 12px 10px; font-weight: 400; position: relative; }

.matriz thead th:first-child { width: 210px; padding-left: 0; vertical-align: bottom; }
.col-p { display: table-cell; }
.colp { display: grid; gap: 4px; }
.colp .nombre { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.colp .nombre:hover .lnk-s { text-decoration: underline; }
.colp .meta { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.mini-regleta { display: flex; gap: 2px; height: 4px; width: 100%; }
.mini-regleta i { height: 100%; display: block; }
.mini-regleta .of { background: var(--ink-1); } .mini-regleta .me { background: var(--medios); }
.fila-t { padding: 12px 12px 12px 0 !important; }
.fila-t a { font-size: 15px; font-weight: 600; text-decoration: none; display: block; }
.fila-t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fila-t .m { font-size: 13px; color: var(--ink-2); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.fila-t svg { display: block; margin-top: 6px; }
tr.resaltada > * { background: var(--surface-1); }
.celda { display: grid; gap: 6px; width: 100%; min-height: 104px; padding: 12px; align-content: start; }
.celda:hover, .celda[aria-expanded="true"] { background: var(--surface-1); }
.celda .num { display: flex; align-items: baseline; gap: 6px; }
.celda .num b { font-size: 24px; line-height: 26px; font-weight: 700; font-stretch: 75%; }
.celda .num span { font-size: 12px; color: var(--ink-3); }
.pista { display: block; height: 6px; background: var(--pista); position: relative; border-radius: 0; }
.pista i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0; background: var(--pc); }
.pista.hueca i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pc); }
.celda .marco { font-size: 15px; line-height: 19px; color: var(--ink-1); }
.estado-c { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.estado-c::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-1); flex: none; }
.estado-c.inc::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-1); }
.estado-c.resp::before { border-radius: 0; width: 7px; height: 1.5px; }
.celda.vacia { cursor: default; color: var(--ink-3); font-size: 13px; }
.celda.vacia:hover { background: none; }
.orient { color: var(--ink-3); }
.matriz-nota { display: flex; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-bottom: 14px; align-items: center; }
.matriz-movil { display: none; }
.tabs-tema { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); margin-bottom: 4px; position: sticky; top: calc(var(--top) + var(--bar)); background: var(--bg); z-index: 5; }
.tabs-tema::-webkit-scrollbar { display: none; }
.tabs-tema button { white-space: nowrap; font-size: 14px; color: var(--ink-2); padding: 12px 0 10px; border-bottom: 2px solid transparent; }
.tabs-tema button[aria-pressed="true"] { color: var(--ink-1); font-weight: 600; border-bottom-color: var(--ink-1); }
.mm-fila { display: grid; grid-template-columns: 64px minmax(0, 1fr) 48px; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); width: 100%; }
.mm-fila .pct { text-align: right; font-weight: 600; font-size: 15px; }
.mm-fila .marco { font-size: 15px; line-height: 19px; }
.mm-fila .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.mm-fila .sello { justify-self: start; }
.mm-pie { display: flex; justify-content: space-between; font-size: 14px; padding: 12px 0; }

/* ---------- Gráficos ---------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart text { fill: var(--ink-2); font-family: var(--font-sans); font-size: 11px; }
.chart .t-eje { fill: var(--ink-3); font-size: 11px; }
.chart .t-dia { fill: var(--ink-2); font-size: 11px; }
.chart .t-fut { fill: var(--ink-3); }
.chart .t-lbl { fill: var(--ink-1); font-size: 12px; font-weight: 600; }
.chart .t-val { fill: var(--ink-2); font-weight: 400; }
.chart .t-sim { fill: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.chart .t-hoy { fill: var(--accent); font-size: 11px; font-weight: 700; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--base); stroke-width: 1; }
.chart .b-pend { fill: var(--pista); }
.chart .l-hoy { stroke: var(--accent); stroke-width: 1; }
.chart .cola { fill: url(#trama); }
.chart .cruz { stroke: var(--ink-1); stroke-width: 1; opacity: .35; }
.chart .ev circle { fill: var(--bg); stroke: var(--ink-1); stroke-width: 1; }
.chart .ev text { fill: var(--ink-1); font-size: 10px; font-weight: 700; }
.chart .ev { cursor: pointer; }
.chart .ev:hover circle, .chart .ev:focus circle { fill: var(--ink-1); }
.chart .ev:hover text, .chart .ev:focus text { fill: var(--bg); }
.chart .conector { stroke: var(--base); stroke-width: 1; }
.franja { width: 100%; border-collapse: collapse; table-layout: fixed; }
.franja th { width: 120px; text-align: left; font-weight: 600; font-size: 13px; padding: 4px 8px 4px 0; vertical-align: middle; }
.franja td { padding: 2px 0; height: 36px; }
.franja .fila { display: flex; gap: 2px; height: 32px; }
.franja .tramo-m { background: var(--pista); border-radius: 0; box-shadow: inset 2px 0 0 var(--ink-1); padding: 0 8px 0 10px; display: flex; align-items: center; font-family: var(--font-serif); font-style: italic; font-size: 13px; line-height: 15px; overflow: hidden; min-width: 0; color: var(--ink-1); text-align: left; }
.franja .tramo-m:hover { background: var(--surface-2); }
.franja .tramo-m.orient { background: transparent; box-shadow: inset 0 0 0 1px var(--base), inset 2px 0 0 var(--ink-3); }
.franja .tramo-m.inc::before { content: "+"; font-family: var(--font-sans); font-style: normal; font-weight: 700; margin-right: 6px; }
.franja .hueco { background: transparent; }
.franja .futuro { border-bottom: 1px solid var(--rule); align-self: center; height: 1px; }
.franja .pend { background: var(--pista); border-radius: 0; }
.franja thead th, .franja thead td { height: auto; font-size: 11px; font-weight: 500; color: var(--ink-3); padding-bottom: 6px; }
.franja .dias { display: flex; gap: 2px; }
.franja .dias span { text-align: left; padding-left: 8px; }

.agenda { display: grid; }
.ag-fila { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); width: 100%; }
.ag-fila:first-child { border-top: 1px solid var(--ink-1); }
.ag-fila:hover { background: var(--surface-1); }
.ag-fila .t { font-size: 14px; font-weight: 600; }
.ag-fila .marco { font-size: 14px; line-height: 18px; color: var(--ink-2); display: block; margin-top: 4px; }
.ag-barra { position: relative; height: 18px; }
.ag-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; }
.ag-barra .b { position: absolute; left: 0; top: 4px; height: 10px; background: var(--pc); border-radius: 0; }
.ag-barra .b.hueca { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pc); }
.ag-barra .mt { position: absolute; top: 0; width: 2px; height: 18px; background: var(--ink-1); }
.ag-barra .v { position: absolute; top: 0; font-size: 13px; font-weight: 600; line-height: 18px; white-space: nowrap; }

.medidores { display: grid; }
.med { display: grid; grid-template-columns: 100px minmax(0, 1fr) 210px; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.med .barra { display: flex; gap: 2px; height: 8px; }
.med .barra i { display: block; height: 100%; }
.med .barra .of { background: var(--ink-1); }
.med .barra .me { background: var(--medios); }
.med .txt { color: var(--ink-2); }
.barras-lista { display: grid; gap: 6px; }
.bl { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; }
.bl .b { height: 12px; background: var(--ink-1); border-radius: 0; }
.bl .b.me { background: var(--medios); }
.bl .v { text-align: right; color: var(--ink-2); }

/* ---------- Mensajes y procedencia ---------- */
.msg { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.proc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; line-height: 18px; }
.proc .o { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; min-width: 104px; }
.proc .cod { font-size: 11px; font-weight: 700; font-stretch: 75%; color: var(--ink-2); min-width: 26px; }
.proc .cta { font-weight: 500; }
.proc .sv { font-size: 12px; font-weight: 600; color: var(--aviso-ink); }
.proc time { font-size: 12px; color: var(--ink-3); }
.proc .enl { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.placeholder { border: 1px dashed var(--rule); padding: 10px 12px; font-size: 15px; line-height: 22px; color: var(--ink-3); }
.msg .meta { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.msg .meta .marco { color: var(--ink-1); }
.msg .rep { font-size: 12px; color: var(--ink-3); }

/* ---------- Panel lateral ---------- */
#panel { position: fixed; z-index: 35; right: 0; top: calc(var(--top) + var(--bar) + 2px); bottom: 0; width: 480px; background: var(--bg); border-left: 1px solid var(--ink-1); overflow-y: auto; padding: 20px 24px 48px; display: grid; gap: 22px; align-content: start; }
#panel[hidden] { display: none; }
#panel:focus { outline: none; }
.p-head { display: grid; gap: 8px; }
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.p-top .pasos { display: flex; gap: 14px; font-size: 13px; }
.p-top .pasos button { font-weight: 600; }
.p-top .pasos button:disabled { color: var(--ink-3); cursor: default; }
.cerrar { font-size: 13px; font-weight: 600; min-height: 32px; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; }
.p-head h2 { font-size: 24px; line-height: 30px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-sec { display: grid; gap: 8px; }
.p-sec > h3 { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-3); font-stretch: 90%; border-top: 1px solid var(--rule); padding-top: 12px; }
.marco-g { font-family: var(--font-serif); font-style: italic; font-size: 24px; line-height: 28px; font-weight: 450; }
.def { margin: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; font-size: 14px; line-height: 20px; }
.def dt { color: var(--ink-3); }
.def dd { margin: 0; }
.otros-marcos { display: grid; gap: 6px; font-size: 14px; }
.otros-marcos details summary { cursor: pointer; }
.subtabs-msg { display: flex; gap: 16px; border-bottom: 1px solid var(--rule); }
.subtabs-msg button { font-size: 13px; color: var(--ink-2); padding: 8px 0 6px; border-bottom: 2px solid transparent; }
.subtabs-msg button[aria-pressed="true"] { color: var(--ink-1); font-weight: 600; border-bottom-color: var(--ink-1); }
.recuadro { border-top: 1px solid var(--ink-1); padding-top: 10px; font-size: 13px; line-height: 18px; color: var(--ink-2); display: grid; gap: 4px; }
.recuadro b { color: var(--ink-1); font-weight: 600; }

/* ---------- Tooltip ---------- */
#tip { position: fixed; z-index: 60; pointer-events: none; background: var(--bg); color: var(--ink-1); border: 1px solid var(--ink-1); padding: 10px 12px; font-size: 12px; line-height: 16px; max-width: 300px; min-width: 200px; }
#tip[hidden] { display: none; }
#tip .t1 { color: var(--ink-2); }
#tip .tv { font-size: 17px; font-weight: 600; line-height: 22px; margin-top: 2px; }
#tip .tv span { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 6px; }
#tip hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 0; }
#tip .tr { display: grid; grid-template-columns: 16px 40px 1fr auto; gap: 6px; align-items: center; }
#tip .tr .vv { text-align: right; font-weight: 600; }
#tip .tr.o { color: var(--ink-3); }
#tip .pie { color: var(--ink-2); margin-top: 4px; }

/* ---------- Tablas ---------- */
.tabla-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.t thead th { font-size: 12px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink-1); white-space: nowrap; font-stretch: 90%; }
table.t td.n, table.t th.n { text-align: right; }
table.t tr.grupo th { padding-top: 18px; border-bottom: 1px solid var(--ink-1); }
.ver-tabla { font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; margin-top: 12px; }

/* ---------- Prosa ---------- */
.prosa { max-width: 68ch; display: grid; gap: 12px; font-size: 16px; line-height: 24px; }
.prosa h3 { font-size: 18px; line-height: 24px; font-weight: 650; margin-top: 16px; }
.dl-reglas { margin: 0; display: grid; gap: 14px; }
.dl-reglas dt { font-weight: 650; font-size: 15px; }
.dl-reglas dd { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.prop { font-size: 12px; font-weight: 600; color: var(--aviso-ink); margin-left: 6px; }
.parametros { position: sticky; top: calc(var(--top) + var(--bar) + 24px); border-top: 1px solid var(--ink-1); padding-top: 12px; display: grid; gap: 6px; font-size: 14px; align-content: start; }
.parametros div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }

/* ---------- Administración ---------- */
.adm-banda { border-left: 3px solid var(--ink-1); padding: 4px 0 4px 14px; font-size: 14px; line-height: 20px; color: var(--ink-2); margin-bottom: 20px; }
.adm-banda b { color: var(--ink-1); }
.subtabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; overflow-x: auto; }
.subtabs button { font-size: 14px; color: var(--ink-2); padding: 10px 0 8px; border-bottom: 2px solid transparent; white-space: nowrap; }
.subtabs button[aria-selected="true"] { color: var(--ink-1); font-weight: 600; border-bottom-color: var(--ink-1); }
.filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.campo { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.campo input, .campo select, .campo textarea { font: inherit; font-size: 14px; font-weight: 400; color: var(--ink-1); background: var(--bg); border: 1px solid var(--base); border-radius: 2px; padding: 7px 8px; }
.campo textarea { resize: vertical; min-height: 64px; }
.campo.linea { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink-1); font-size: 14px; }
.form { display: grid; gap: 14px; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; font-weight: 400; color: var(--ink-1); }
.checks label { display: inline-flex; gap: 6px; align-items: center; }
fieldset { border: 1px solid var(--rule); border-radius: 2px; padding: 8px 10px; margin: 0; }
legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.btn { border: 1px solid var(--ink-1); border-radius: 2px; padding: 7px 14px; font-size: 14px; font-weight: 600; min-height: 36px; }
.btn:hover:not(:disabled) { background: var(--surface-1); }
.btn.p { background: var(--ink-1); color: var(--bg); }
.btn.p:hover:not(:disabled) { opacity: .88; background: var(--ink-1); }
.btn.sm { padding: 4px 10px; font-size: 13px; min-height: 30px; }
.btn.f { border-color: var(--base); font-weight: 500; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.estado { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 0; white-space: nowrap; }
.estado.borrador { color: var(--ink-3); }
.estado.revisado, .estado.revision { color: var(--ink-2); }
.estado.publicado, .estado.publicada { color: var(--ink-1); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.estado.pendiente { color: var(--aviso-ink); }
.errores { color: var(--aviso-ink); background: var(--aviso-bg); padding: 10px 12px; font-size: 13px; display: grid; gap: 3px; }
pre.cod { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-1); padding: 10px; overflow-x: auto; margin: 0; }
.paginacion { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink-1); color: var(--bg); padding: 10px 16px; font-size: 14px; z-index: 70; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }

footer.pie { border-top: 2px solid var(--ink-1); padding-top: 16px; padding-bottom: 40px; font-size: 13px; line-height: 18px; color: var(--ink-2); display: grid; gap: 6px; }
footer.pie b { color: var(--ink-1); }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
  .descriptor { display: none; }
  .tramo { width: 26px; }
}
@media (max-width: 1179px) {
  .wrap { padding: 0 24px; }
  .regla, .control .resaltado { display: none; }
  .multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #panel { width: 420px; }
}
@media (max-width: 1023px) {
  .c3, .c4, .c5, .c7, .c8, .c9 { grid-column: 1 / -1; }
  .base-dia { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 24px; }
  .presencia { margin-top: 40px; }
  .orden-movil { display: flex; flex-direction: column; }
}
@media (max-width: 860px) {
  :root { --bar: 52px; }
  .nav { display: none; }
  .nav.abierto { display: grid; position: fixed; inset: calc(var(--top) + 52px) 0 0 0; background: var(--bg); z-index: 60; padding: 16px 24px; gap: 0; align-content: start; height: auto; }
  .nav.abierto > a, .nav.abierto .desplegable > button { height: 52px; font-size: 18px; border-bottom: 1px solid var(--rule); color: var(--ink-1); }
  .nav.abierto .sep { display: none; }
  .nav.abierto .desplegable { display: grid; }
  .nav.abierto .menu-lista { position: static; border: 0; min-width: 0; padding: 0 0 8px 12px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .mast { height: 52px; }
  .marca { font-size: 21px; line-height: 21px; }
  .opciones.desk { display: none; }
  .ctrl-movil { display: flex; align-items: center; gap: 6px; width: 100%; }
  .ctrl-movil .dia-m { flex: 1; min-width: 0; text-align: center; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; }
  .ctrl-movil .dia-m span { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); line-height: 14px; }
  .dia-sel { display: none; }
  .control .wrap { gap: 8px; }
  .matriz-wrap, .matriz-nota .solo-desk { display: none; }
  .matriz-movil { display: block; }
  .hallazgos { grid-template-columns: 1fr; }
  #panel { left: 0; width: auto; top: var(--top); border-left: 0; padding: 16px 16px 40px; z-index: 45; }
  .sim-largo, .sim-band .der { display: none; }
  .sim-corto { display: inline; }
  .h1 { font-size: 34px; line-height: 38px; }
  main.wrap { padding-top: 24px; }
  .cifra { font-size: 48px; line-height: 48px; }
  .seccion { margin-top: 48px; }
  .sec-head h2, h2.h2 { font-size: 21px; line-height: 26px; }
  .multiples { grid-template-columns: 1fr; gap: 28px; }
  main { display: flex; flex-direction: column; }
  main > #evolucion { order: 1; } main > .pie-vista { order: 2; }
  .med { grid-template-columns: 80px minmax(0, 1fr); }
  .med .txt { grid-column: 1 / -1; }
  .fila2 { grid-template-columns: 1fr; }
  .franja th { width: 76px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .ag-fila { grid-template-columns: 110px minmax(0, 1fr); }
  .bl { grid-template-columns: 100px minmax(0, 1fr) 36px; }
  .proc .enl { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .sim-band { position: static; } .control, #panel { position: static; } }

.cifra .de { font-size: 21px; line-height: 1; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--ink-2); margin-left: 8px; }
.cod-cta { display: inline-flex; gap: 6px; align-items: baseline; }
.cod-cta .cod { font-size: 11px; font-weight: 700; font-stretch: 75%; color: var(--ink-2); min-width: 32px; }

/* ---------- v3: mesa de datos ---------- */
.hero { padding-bottom: 8px; }
.hero-h1 { font-size: 72px; line-height: 72px; font-weight: 800; font-stretch: 85%; letter-spacing: -.022em; margin: 10px 0 18px; text-wrap: balance; }
.hero-sub { font-size: 20px; line-height: 30px; color: var(--ink-2); max-width: 58ch; }
.hero-nota { font-size: 12px; line-height: 16px; color: var(--ink-3); margin-top: 12px; }
.lider { border-left: 1px solid var(--rule); padding-left: 24px; display: grid; gap: 6px; align-content: start; margin-top: 30px; }
.lider-num { font-size: 120px; line-height: 104px; font-weight: 700; font-stretch: 65%; letter-spacing: -.04em; color: var(--accent); }
.qc { margin-top: 56px; border-top: 2px solid var(--ink-1); padding-top: 14px; }
.qc-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.qc-titulo h2 { font-size: 32px; line-height: 36px; font-weight: 800; font-stretch: 85%; letter-spacing: -.02em; }
.qc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.qc-col { padding: 4px 24px 8px; border-left: 1px solid var(--rule); display: grid; gap: 8px; align-content: start; }
.qc-col:first-child { padding-left: 0; border-left: 0; }
.qc-et { font-size: 13px; font-weight: 700; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 6px; }
.qc-et svg { flex: none; }
.qc-col .qc-num { font-size: 64px; line-height: 60px; font-weight: 700; font-stretch: 65%; letter-spacing: -.03em; }
.qc-col h3 { font-size: 22px; line-height: 26px; font-weight: 800; font-stretch: 85%; letter-spacing: -.01em; }
.qc-col p { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.qc-col .lnk { font-size: 14px; font-weight: 700; justify-self: start; }
.qc-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.qc-lista button { display: grid; gap: 2px; width: 100%; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 19px; }
.qc-lista button:hover { background: var(--surface-1); }
.qc-lista .cab { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.qc-lista .marco { color: var(--ink-2); }
.qc-lista .marco b { color: var(--ink-1); font-weight: 450; }
.qc-ed { margin-top: 22px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.qc-ed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qc-ed li { font-size: 15px; line-height: 21px; }
.qc-ed li b { font-weight: 700; }
.qc-ed .lnk { font-size: 13px; font-weight: 600; margin-left: 8px; }
.carrera-sec { margin-top: 64px; }
.chart .c-val { fill: var(--ink-1); font-size: 15px; font-weight: 700; }
.chart .c-lbl { fill: var(--ink-2); font-size: 14px; font-weight: 500; }
.chart .c-del { fill: var(--ink-3); font-size: 12px; }
.chart .c-foco .c-val, .chart .c-dst .c-val { fill: var(--accent); font-size: 32px; font-stretch: 70%; }
.chart .c-foco .c-lbl, .chart .c-dst .c-lbl { fill: var(--ink-1); font-size: 18px; font-weight: 800; }
.chart .c-dst .c-val { font-size: 18px; }
.chart .c-dst .c-lbl { font-size: 14px; }
.chart .c-pt { fill: var(--accent); font-size: 12px; font-weight: 700; }
.chart .c-lab:hover .c-lbl { text-decoration: underline; }
.banda-oscura { --bg: #0B0B10; --ink-1: #F4F4F6; --ink-2: #B9B9C3; --ink-3: #8E8E9A; --rule: #2A2A33; --surface-1: #17171D; --pista: #24242C;
  --c-pp: #1A83DB; --c-psoe: #BE222A; --c-vox: #159B05; --c-fa: #F75702; --c-podemos: #923D96; --c-salf: #CF709C; --c-erc: #C88300; --c-junts: #04AAA0; --c-bildu: #0B7D4F; --c-pnv: #48AD44; --c-bng: #15A1D3; --c-cc: #AD9202;
  background: var(--bg); color: var(--ink-1); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); padding: 48px 0 56px; margin-top: 72px; }
.banda-oscura .sec-head p { color: var(--ink-2); }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pcard { background: var(--surface-1); display: grid; grid-template-rows: auto 1fr auto; text-decoration: none; color: inherit; min-width: 0; outline-offset: 3px; }
.pcard:hover { background: #1E1E26; }
.pcard-top { background: var(--sf); color: var(--st); padding: 14px 16px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pcard-top b { font-size: 34px; line-height: 32px; font-weight: 800; font-stretch: 72%; letter-spacing: -.01em; }
.pcard-top span { font-size: 13px; font-weight: 700; text-align: right; }
.pcard.fa .pcard-top { box-shadow: inset 0 -5px 0 #C8E61E; }
.pcard-body { padding: 16px; display: grid; gap: 8px; align-content: start; }
.pcard .et { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pcard .tema { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pcard .tema b { font-size: 24px; line-height: 28px; font-weight: 800; font-stretch: 85%; letter-spacing: -.01em; }
.pcard .tema span { font-size: 44px; line-height: 40px; font-weight: 700; font-stretch: 65%; }
.pcard .marco { font-size: 18px; line-height: 23px; color: var(--ink-1); }
.pcard .mini { display: grid; gap: 7px; margin-top: 8px; }
.pcard .mb { display: grid; grid-template-columns: 104px minmax(0, 1fr) 34px; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-2); }
.pcard .mb i { display: block; height: 6px; background: var(--pc); }
.pcard .mb .v { text-align: right; }
.pcard-pie { font-size: 12px; color: var(--ink-3); padding: 0 16px 14px; display: flex; justify-content: space-between; gap: 8px; }
.colp .bloque { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; background: var(--sf); color: var(--st); padding: 8px 10px; text-decoration: none; }
.colp .bloque b { font-size: 22px; line-height: 24px; font-weight: 800; font-stretch: 72%; }
.colp .bloque span { font-size: 12px; font-weight: 700; }
.colp .bloque.fa { box-shadow: inset 0 -4px 0 #C8E61E; }
.colp .bloque:hover { outline: 2px solid var(--ink-1); outline-offset: 1px; }
.estado-c.emg::before { border-radius: 0; background: var(--accent); }
.badge-emg { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); padding: 0 5px; margin-left: 6px; font-style: normal; font-family: var(--font-sans); vertical-align: 2px; }
.ajustes-btn { margin-left: auto; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--ink-1); padding: 7px 12px; white-space: nowrap; }
.ajustes-btn span { color: var(--ink-2); font-weight: 500; }
.ajustes { position: absolute; right: 32px; top: calc(100% + 2px); z-index: 45; background: var(--bg); border: 1px solid var(--ink-1); padding: 16px 18px; display: grid; gap: 14px; width: 360px; }
.ajustes[hidden] { display: none; }
.ajustes .opciones { white-space: normal; flex-wrap: wrap; gap: 4px 14px; }
.ajustes .opciones button { padding: 6px 0 4px; }
.ajustes p { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.control { position: sticky; }
.control .wrap { position: relative; }
.temas-tabs { display: flex; gap: 22px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin: 4px 0 8px; }
.temas-tabs a { font-size: 15px; text-decoration: none; color: var(--ink-2); padding: 10px 0 8px; border-bottom: 3px solid transparent; display: inline-flex; gap: 6px; align-items: baseline; }
.temas-tabs a span { font-size: 12px; color: var(--ink-3); }
.temas-tabs a[aria-current="page"] { color: var(--ink-1); font-weight: 700; border-bottom-color: var(--ink-1); }
.partidos-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.partidos-tabs a { text-decoration: none; opacity: .55; }
.partidos-tabs a[aria-current="page"], .partidos-tabs a:hover { opacity: 1; }
.disputa { width: 100%; border-collapse: collapse; }
.disputa th, .disputa td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 21px; }
.disputa thead th { font-size: 12px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--ink-1); padding-top: 0; }
.disputa .pc { width: 210px; padding-right: 0; }
.disputa .mc { width: 27%; font-weight: 400; }
.disputa .mc .marco { font-size: 19px; line-height: 24px; display: block; }
.disputa .mc .s12 { display: block; margin-top: 6px; }
.disputa tr.fila-d { cursor: pointer; }
.disputa tr.fila-d:hover > * { background: var(--surface-1); }
.disputa .vacio-d { color: var(--ink-3); font-style: italic; }
.disputa-movil { display: none; }
.dm { border-top: 1px solid var(--ink-1); padding: 12px 0 16px; display: grid; gap: 8px; width: 100%; }
.dm .marco { font-size: 19px; line-height: 24px; }
.dm dl { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; font-size: 14px; line-height: 19px; }
.dm dt { color: var(--ink-3); } .dm dd { margin: 0; }
.cmp-ctrl { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-bottom: 18px; }
.cmp-ctrl select { font: inherit; font-size: 15px; font-weight: 700; border: 0; border-bottom: 2px solid var(--ink-1); background: transparent; color: var(--ink-1); padding: 6px 18px 6px 0; }
.cmp-ctrl .vs { font-size: 15px; color: var(--ink-3); padding-bottom: 8px; }
.cmp-lista { list-style: none; margin: 0; padding: 0; }
.cmp-lista li button { display: grid; gap: 3px; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 19px; }
.cmp-lista li button:hover { background: var(--surface-1); }
.cmp-lista .cab { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.ficha-banda { background: color-mix(in oklab, var(--sf) 12%, var(--bg)); box-shadow: 0 0 0 100vmax color-mix(in oklab, var(--sf) 12%, var(--bg)); clip-path: inset(0 -100vmax); margin-top: -48px; padding: 32px 0 28px; border-bottom: 4px solid var(--sf); }
@media (max-width: 1023px) {
  .lider { border-left: 0; padding-left: 0; margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-h1 { font-size: 42px; line-height: 44px; }
  .qc-col .qc-num { font-size: 52px; line-height: 50px; }
  .hero-sub { font-size: 17px; line-height: 26px; }
  .lider-num { font-size: 88px; line-height: 80px; }
  .qc-grid { grid-template-columns: 1fr; }
  .qc-col { padding: 14px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .qc-col:first-child { border-top: 0; }
  .qc-ed { grid-template-columns: 1fr; gap: 8px; }
  .pcards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; }
  .pcard { flex: 0 0 82%; scroll-snap-align: start; }
  .disputa { display: none; }
  .disputa-movil { display: block; }
  .ajustes { right: 16px; left: 16px; width: auto; }
  .ajustes-btn { padding: 7px 8px; }
  .ficha-banda { margin-top: -24px; padding: 20px 0; }
  .temas-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .temas-tabs a { white-space: nowrap; }
  .firma { font-size: 11px; line-height: 14px; }
}
@media (max-width: 860px) {
  .chart .c-val { font-size: 13px; } .chart .c-lbl { font-size: 12px; }
  .chart .c-foco .c-val { font-size: 24px; } .chart .c-foco .c-lbl { font-size: 14px; }
  .chart .c-dst .c-val { font-size: 14px; } .chart .c-dst .c-lbl { font-size: 12px; }
}

.marcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; }
.disputa .mc .marcs .s12 { display: inline; margin-top: 0; }

.disputa-lead { font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -0.01em; max-width: 920px; margin: 4px 0 24px; }
.disputa tbody th.mc .s12 { display: block; margin-top: 8px; }
.dq { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; width: 100%; text-align: left; padding: 6px 0; border-top: 1px solid var(--rule); }
.dq:first-child { border-top: 0; padding-top: 0; }
.dq:hover .dq-n, .dq:focus-visible .dq-n { text-decoration: underline; }
.dq-n { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dq-n small { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.dq .marcs { grid-column: 1 / -1; margin-top: 2px; }
.dm-q { display: grid; gap: 0; border-top: 1px solid var(--rule); padding-top: 8px; }
@media (max-width: 760px) { .disputa-lead { font-size: 18px; line-height: 25px; } }

/* datos reales */
.agua::before { display: none !important; }
.msg .resumen { font-size: 15px; line-height: 21px; margin: 8px 0 6px; }
.msg a.enl { font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tramo.prov .b { background: repeating-linear-gradient(90deg, var(--ink-1) 0 4px, transparent 4px 7px); border: 0; }
.tramo.prov .n { color: var(--ink-1); }
.prov-aviso { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 6px; }

/* marca Polity: wordmark en Fraunces ExtraBold, Forest con punto Signal (Crema sobre oscuro) */
:root { --polity-forest: #1A2E1E; --polity-crema: #F0EDE4; --polity-signal: #5DCAA5; }
a.polity { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-variation-settings: 'opsz' 144; letter-spacing: -.01em; color: var(--polity-forest); text-decoration: none; font-size: 1.08em; }
a.polity i { font-style: normal; color: var(--polity-signal); }
a.polity:hover, a.polity:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--polity-signal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a.polity { color: var(--polity-crema); } }
:root[data-theme="dark"] a.polity { color: var(--polity-crema); }
