/* Legislatura XVI · legislatura16.es
   Paleta neutral: tinta, papel y un amarillo de subrayador. Ningún color de partido
   en la interfaz; los colores de partido solo aparecen en los datos electorales. */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #edeae3;
  --ink: #15171a;
  --ink-2: #464b53;
  --muted: #737a84;
  --line: #dcd8cf;
  --accent: #0b5d6b;
  --accent-soft: #dcecef;
  --mark: #ffd84d;
  --mark-ink: #15171a;
  --ok: #2f6b3a;   --ok-soft: #e1eee2;
  --run: #2b5c8a;  --run-soft: #e0eaf4;
  --part: #a15c00; --part-soft: #f7ead6;
  --bad: #b3122e;  --bad-soft: #f6dfe2;
  --pend: #5f6670; --pend-soft: #ebe8e1;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #1a1d20; --surface-2: #24282c; --ink: #eef0f2; --ink-2: #c3c8ce;
    --muted: #8d949c; --line: #343a40; --accent: #5fc3d1; --accent-soft: #15313a; --mark: #e8c033;
    --ok: #7cc28a; --ok-soft: #1b2e1f; --run: #7fb0e0; --run-soft: #18283a; --part: #e3a14a; --part-soft: #3a2a14;
    --bad: #ef5a6f; --bad-soft: #3b1a1f; --pend: #a3aab2; --pend-soft: #26292d; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #1a1d20; --surface-2: #24282c; --ink: #eef0f2; --ink-2: #c3c8ce;
  --muted: #8d949c; --line: #343a40; --accent: #5fc3d1; --accent-soft: #15313a; --mark: #e8c033;
  --ok: #7cc28a; --ok-soft: #1b2e1f; --run: #7fb0e0; --run-soft: #18283a; --part: #e3a14a; --part-soft: #3a2a14;
  --bad: #ef5a6f; --bad-soft: #3b1a1f; --pend: #a3aab2; --pend-soft: #26292d; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
mark { background: linear-gradient(transparent 55%, var(--mark) 55%); color: inherit; padding: 0 2px; }

/* ---------- Barra superior ---------- */
/* En móviles con muesca, la barra se queda por debajo de la zona segura */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--bg); }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 12px 16px 12px max(16px, calc((100% - 1160px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font: 800 21px "Fraunces", serif; color: var(--ink); text-decoration: none; letter-spacing: -.3px; white-space: nowrap; flex-shrink: 0; }
.brand b { font-weight: 800; background: linear-gradient(transparent 58%, var(--mark) 58%); padding: 0 2px; color: var(--mark-ink); }
:root[data-theme="dark"] .brand b { color: var(--ink); background: linear-gradient(transparent 58%, color-mix(in srgb, var(--mark) 55%, transparent) 58%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand b { color: var(--ink); background: linear-gradient(transparent 58%, color-mix(in srgb, var(--mark) 55%, transparent) 58%); } }
.brand-logo { width: 30px; height: 30px; }
.nav { display: flex; gap: 18px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--ink); width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.menu-toggle { touch-action: manipulation; -webkit-tap-highlight-color: transparent; display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; padding: 0; }
.menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1100px) {
  .brand { flex: 1; }
  .menu-toggle { display: inline-flex; }
  .theme-toggle { width: 40px; height: 40px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 4px 16px 12px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 17px; font-weight: 600; color: var(--ink); padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { content: "→"; float: right; color: var(--accent); font-weight: 400; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .nav { grid-template-columns: 1fr 1fr; column-gap: 24px; padding: 8px max(16px, calc((100% - 1160px) / 2)) 16px; }
  .nav.open { display: grid; }
  .nav a:nth-last-child(2) { border-bottom: 0; }
}
@media (min-width: 1101px) { .topbar { padding-right: 16px; } .theme-toggle { margin-left: auto; } }

main { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ---------- Portada ---------- */
.hero { position: relative; padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.hero-logo { position: absolute; right: 0; top: 64px; width: 168px; height: 168px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 16px; }
.hero .kicker, .hero h1 { padding-right: 200px; }
.hero h1 { font-size: clamp(38px, 7vw, 74px); font-weight: 800; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--mark) 62%); color: inherit; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
:root[data-theme="dark"] .hero h1 em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--mark) 45%, transparent) 62%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero h1 em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--mark) 45%, transparent) 62%); } }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 740px; margin: 24px 0 28px; }
.fase-banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: 8px; margin: 0 0 28px; max-width: 860px; box-shadow: var(--shadow); }
.fase-banner .pulse { flex-shrink: 0; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--part); box-shadow: 0 0 0 0 color-mix(in srgb, var(--part) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .fase-banner .pulse { animation: none; } html { scroll-behavior: auto; } }
.fase-banner p { margin: 0; font-size: 15px; color: var(--ink-2); }
.fase-banner strong { color: var(--ink); }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.counter { background: var(--surface); padding: 20px; }
.counter span { display: block; font: 800 clamp(28px, 4vw, 42px) "Fraunces", serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.counter small { color: var(--muted); font-size: 13px; }
.updated { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 1199px) { .hero .kicker, .hero h1 { padding-right: 0; } .hero-logo { position: static; display: block; width: 84px; height: 84px; margin-bottom: 16px; } }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.5px; margin-bottom: 10px; }
.section-head p { color: var(--ink-2); margin: 0 0 8px; }
.sub { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 40px 0 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.srcs { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.srcs a { color: var(--muted); }
.srcs a:hover { color: var(--accent); }

/* ---------- Hoja de ruta (fases) ---------- */
.ruta { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 12px; counter-reset: paso; }
.ruta li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 14px; box-shadow: var(--shadow); }
.ruta li::before { counter-increment: paso; content: counter(paso); position: absolute; top: 14px; right: 14px; font: 700 12px "Inter", sans-serif; color: var(--muted); }
.ruta .r-fecha { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ruta h3 { font-size: 18px; margin: 6px 0 6px; padding-right: 16px; }
.ruta p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ruta .hecho { border-top: 4px solid var(--ok); }
.ruta .hecho .r-fecha { color: var(--ok); }
.ruta .ahora { border-top: 4px solid var(--mark); background: color-mix(in srgb, var(--mark) 10%, var(--surface)); }
.ruta .ahora .r-fecha::after { content: " · estamos aquí"; color: var(--part); }
.ruta .futuro { border-top: 4px solid var(--line); }
.ruta .futuro h3 { color: var(--ink-2); }
.nota-legal { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); max-width: 860px; background: var(--surface-2); border-radius: 8px; padding: 12px 16px; }

/* ---------- Resultados ---------- */
.urnas-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.hemi-card { padding: 22px 22px 16px; }
.hemi { width: 100%; height: auto; display: block; }
.hemi g { transition: opacity .15s; }
.hemi .maj { font: 800 22px "Fraunces", serif; fill: var(--ink); }
.hemi .maj-s { font: 500 7px "Inter", sans-serif; fill: var(--muted); }
.bloques { margin-top: 14px; }
.bloque-bar { position: relative; display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.bloque-bar i { display: block; height: 100%; }
.bloque-bar .linea { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.bloque-leyenda { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-top: 8px; color: var(--ink-2); flex-wrap: wrap; }
.bloque-leyenda b { color: var(--ink); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.tabla td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabla td.num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla tr:hover td { background: var(--surface-2); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.delta-up { color: var(--ok); font-weight: 600; }
.delta-down { color: var(--bad); font-weight: 600; }
.senado { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-2); }
.senado b { color: var(--ink); font-variant-numeric: tabular-nums; }
.aviso { font-size: 13px; color: var(--ink-2); background: var(--part-soft); border-left: 3px solid var(--part); border-radius: 6px; padding: 10px 14px; margin: 16px 0 0; }
@media (max-width: 900px) { .urnas-grid { grid-template-columns: 1fr; } }

/* ---------- Investidura / pacto ---------- */
.estado-pacto { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-bottom: 24px; }
.sello { width: 148px; height: 148px; border-radius: 50%; border: 3px dashed var(--muted); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; transform: rotate(-8deg); color: var(--ink-2); }
.sello b { font: 800 22px "Fraunces", serif; line-height: 1.05; color: var(--ink); }
.sello small { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.sello.firmado { border-style: solid; border-color: var(--ok); color: var(--ok); }
.estado-pacto p { margin: 0 0 8px; font-size: 16px; color: var(--ink-2); }
.aritmetica { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 8px; }
.escenario h3 { font-size: 20px; margin-bottom: 6px; }
.escenario .votos { font: 800 30px "Fraunces", serif; font-variant-numeric: tabular-nums; margin: 6px 0; }
.escenario .votos small { font: 500 13px "Inter", sans-serif; color: var(--muted); }
.escenario p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.veredicto { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.v-si { background: var(--ok-soft); color: var(--ok); }
.v-no { background: var(--bad-soft); color: var(--bad); }
.v-duda { background: var(--part-soft); color: var(--part); }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lista-puntos { list-style: none; margin: 0; padding: 0; }
.lista-puntos li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.lista-puntos li:first-child { border-top: 0; padding-top: 0; }
.lista-puntos strong { color: var(--ink); }
.lista-puntos .srcs { margin-top: 4px; }
.card h3 { font-size: 20px; margin-bottom: 12px; }
.tag-esp { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--part); margin-right: 6px; }
.posiciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pos { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.pos-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pos-top b { font-size: 15px; }
.pos p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 900px) { .aritmetica, .dos-col { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .estado-pacto { grid-template-columns: 1fr; } .sello { width: 120px; height: 120px; } }

/* ---------- Comparador PP / VOX ---------- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 500 13px "Inter", sans-serif; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .6; margin-left: 4px; }
.chip-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.search { flex: 1; min-width: 220px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 14px "Inter", sans-serif; }
.comp { display: flex; flex-direction: column; gap: 12px; }
.comp-row { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.comp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.comp-head h3 { font-size: 19px; }
.comp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comp-col { border-radius: 8px; padding: 12px 14px; background: var(--surface-2); font-size: 14.5px; }
.comp-col .quien { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: 4px; }
.comp-col.pp .quien { color: #1d84ce; }
.comp-col.vox .quien { color: #4f9f2e; }
.comp-col.vacio { color: var(--muted); font-style: italic; }
.comp-nota { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.vd { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.vd-coinciden { background: var(--ok-soft); color: var(--ok); }
.vd-coinciden::before { content: "= "; }
.vd-matiz { background: var(--run-soft); color: var(--run); }
.vd-matiz::before { content: "≈ "; }
.vd-choque { background: var(--bad-soft); color: var(--bad); }
.vd-choque::before { content: "≠ "; }
.vd-solo { background: var(--pend-soft); color: var(--pend); }
.vd-solo::before { content: "· "; }
@media (max-width: 700px) { .comp-cols { grid-template-columns: 1fr; } }

.comp-cita { display: block; margin-top: 6px; font-size: 11.5px; }
.comp-cita a { color: var(--muted); }

/* ---------- Contrato con España ---------- */
.contrato-meta { max-width: 860px; margin-bottom: 20px; }
.contrato-meta p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.contrato-resumen { display: flex; flex-wrap: wrap; gap: 8px; }
.contrato { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cto { display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.cto-n { font: 800 28px "Fraunces", serif; color: var(--muted); line-height: 1; font-variant-numeric: tabular-nums; }
.cto-body { min-width: 0; }
.cto-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cto-head h3 { font-size: 19px; }
.cto p { margin: 0 0 6px; font-size: 14.5px; color: var(--ink-2); }
.cto .cto-nota { background: var(--surface-2); border-radius: 6px; padding: 8px 12px; color: var(--ink); }
.cto .cto-refs { font-size: 13px; }
.cto .cto-refs b { color: var(--ink); font-weight: 600; }
.ausentes h3 { font-size: 18px; margin-bottom: 6px; }
.ausentes p { margin: 0 0 8px; color: var(--ink-2); font-size: 14.5px; }
.ausentes ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 28px; font-size: 14px; }
.ausentes li { margin-bottom: 4px; break-inside: avoid; }
.ausentes ul.una-col { columns: 1; }
.versiones { border-left: 4px solid var(--part); margin-bottom: 14px; }
.contrato-meta .contrato-intro { font: 600 clamp(19px, 2.4vw, 24px)/1.3 "Fraunces", Georgia, serif; color: var(--ink); }
@media (max-width: 700px) { .cto { grid-template-columns: 1fr; gap: 4px; } .ausentes ul { columns: 1; } }

/* ---------- Marcador de compromisos ---------- */
.resumen { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 26px; }
.stack { display: flex; height: 18px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin: 10px 0 12px; }
.stack i { display: block; height: 100%; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.leyenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.leyenda b { color: var(--ink); font-variant-numeric: tabular-nums; }
.big { font: 800 40px "Fraunces", serif; font-variant-numeric: tabular-nums; line-height: 1; }
.resumen h3 { font: 600 14px "Inter", sans-serif; color: var(--ink-2); margin: 0; }
.resumen p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.filtros-comp { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.filtros-comp .fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.compromisos { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cmp { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 14px; display: flex; flex-direction: column; box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--line)); scroll-margin-top: 90px; }
.cmp:target { outline: 3px solid var(--mark); outline-offset: 2px; }
.cmp-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.origen { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; color: #fff; }
.o-pp { background: #1d84ce; }
.o-vox { background: #4f9f2e; }
.o-pacto { background: var(--ink); color: var(--bg); }
.o-contrato { background: transparent; color: #1d84ce; box-shadow: inset 0 0 0 1.5px #1d84ce; }
.o-anuncio { background: var(--surface-2); color: var(--ink-2); }
.cmp .area { font-size: 12px; color: var(--muted); }
.cmp h3 { font-size: 18px; margin-bottom: 6px; }
.cmp h3 a { color: inherit; text-decoration: none; }
.cmp h3 a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; }
.cmp p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.cmp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.e-pendiente { background: var(--pend-soft); color: var(--pend); }
.e-en-marcha { background: var(--run-soft); color: var(--run); }
.e-cumplido { background: var(--ok-soft); color: var(--ok); }
.e-parcial { background: var(--part-soft); color: var(--part); }
.e-incumplido { background: var(--bad-soft); color: var(--bad); }
.e-descartado { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.p-por-ver { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.p-incluido { background: var(--ink); color: var(--bg); }
.p-modificado { background: var(--part-soft); color: var(--part); border: 1px solid var(--part); }
.p-excluido { background: transparent; border: 1px solid var(--bad); color: var(--bad); }
.plazo { background: var(--mark); color: var(--mark-ink); }
.par { font-size: 12.5px; color: var(--ink-2); margin: 0 0 8px; }
.par a { color: var(--accent); }
.cmp details { font-size: 13px; color: var(--ink-2); margin-top: auto; }
.cmp summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 2px 0; }
.cmp details ul { padding-left: 18px; margin: 6px 0; }
.cmp details li { margin-bottom: 4px; }
.mas { display: block; margin: 20px auto 0; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Plazos ---------- */
.plazos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.plz { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: 10px; padding: 14px 16px; }
.plz .cuando { font: 800 20px "Fraunces", serif; }
.plz .cuando small { display: block; font: 500 12px "Inter", sans-serif; color: var(--muted); }
.plz p { margin: 6px 0 0; font-size: 14px; }
.plz a { color: var(--ink); text-decoration-color: var(--line); }

/* ---------- Diario ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 20px; max-width: 800px; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid var(--bg); }
.timeline li.clave::before { background: var(--mark); box-shadow: 0 0 0 1px var(--ink); }
.timeline .t-date { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.timeline h3 { font-size: 19px; margin: 4px 0 6px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- Método ---------- */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.method h3 { font-size: 20px; margin-bottom: 10px; }
.method li, .method p { color: var(--ink-2); font-size: 15px; }
.method dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: baseline; }
.method dd { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.method dt .pill { display: inline-block; min-width: 110px; text-align: center; }
.footer { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .method-grid { grid-template-columns: 1fr; } .resumen { grid-template-columns: 1fr; } }

/* ---------- Móvil ---------- */
@media (max-width: 600px) {
  .topbar { gap: 12px; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .compromisos, .plazos { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 52px 0; }
  .tabla .hide-s { display: none; }
}
