/* Layout: sticky civic nav over a single column of "views"; every claim sits in a two-column Prometido | Hecho frame.
   Palette: deep monte green ink, lapacho rose accent, lantern amber for highlights; semantic green/amber/red reserved for feasibility & votes. */
:root {
  --bg: #F3F5F1;
  --surface: #FFFFFF;
  --surface-2: #E8EDE7;
  --ink: #142A24;
  --muted: #56665F;
  --line: #D3DCD5;
  --accent: #B02A6B;        /* lapacho */
  --accent-soft: #F6E1EC;
  --lamp: #E2A11B;          /* linterna */
  --lamp-soft: #FBEFD2;
  --ok: #2B8653;  --ok-soft: #DDF0E4;
  --warn: #B87A06; --warn-soft: #FAEDCF;
  --bad: #BE3B33; --bad-soft: #F8DEDB;
  --absent: #B9C3BD;
  --p-anr: #B9363A; --p-unidos: #2C7F86; --p-plra: #2E5CA6;
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  --shadow: 0 1px 2px rgba(20, 42, 36, .06), 0 6px 20px rgba(20, 42, 36, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1613; --surface: #15201C; --surface-2: #1C2924; --ink: #E4ECE7; --muted: #9AABA3; --line: #2A3A34;
    --accent: #E763A3; --accent-soft: #3A1A2A; --lamp: #F0B840; --lamp-soft: #3A2E12;
    --ok: #52B77E; --ok-soft: #173326; --warn: #E0A93A; --warn-soft: #3A2D10; --bad: #E86A61; --bad-soft: #3D1B19;
    --absent: #4A5A54; --p-anr: #E06A6C; --p-unidos: #4DB5BC; --p-plra: #6C96DE;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1613; --surface: #15201C; --surface-2: #1C2924; --ink: #E4ECE7; --muted: #9AABA3; --line: #2A3A34;
  --accent: #E763A3; --accent-soft: #3A1A2A; --lamp: #F0B840; --lamp-soft: #3A2E12;
  --ok: #52B77E; --ok-soft: #173326; --warn: #E0A93A; --warn-soft: #3A2D10; --bad: #E86A61; --bad-soft: #3D1B19;
  --absent: #4A5A54; --p-anr: #E06A6C; --p-unidos: #4DB5BC; --p-plra: #6C96DE;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.9rem); font-weight: 850; font-stretch: 78%; line-height: 1.0; letter-spacing: -.01em; }
.h1-sm { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; font-stretch: 80%; line-height: 1.05; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 750; font-stretch: 88%; line-height: 1.15; }
h3 { font-size: 1.1rem; font-weight: 700; font-stretch: 95%; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.section { padding-block: 40px 56px; display: grid; gap: 18px; }
.section > * { min-width: 0; }
.mt { margin-top: 28px; }
.eyebrow { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sub { color: var(--muted); max-width: 68ch; font-size: 1.02rem; }
.fine { color: var(--muted); font-size: .82rem; }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 26px; height: 26px; }
.brand-word { font-family: var(--f-display); font-weight: 700; font-stretch: 85%; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-word b { color: var(--accent); font-weight: 850; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-on { color: var(--ink); background: var(--lamp-soft); box-shadow: inset 0 -2px 0 var(--lamp); }
.menu-btn { display: none; margin-left: auto; font: 600 .9rem var(--f-body); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .top-in { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px; }
}
.mvp-band { background: var(--lamp-soft); color: var(--ink); font-size: .8rem; font-family: var(--f-mono); border-bottom: 1px solid var(--line); }
.mvp-band .wrap { padding-block: 6px; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 .95rem var(--f-body); padding: 11px 18px; border-radius: 8px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-btn { font: 600 .86rem var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.chip-btn span { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); margin-left: 4px; }
.chip-btn:hover { border-color: var(--ink); }
.chip-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-btn.is-on span { color: var(--bg); opacity: .75; }
.search { margin-left: auto; }
.search input { font: .9rem var(--f-body); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 220px; max-width: 100%; }
@media (max-width: 560px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding-block: 48px 32px; }
.hero > * { min-width: 0; }
.hero-text { display: grid; gap: 18px; }
.hl { color: var(--accent); }
.lead { font-size: 1.12rem; max-width: 56ch; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 32px 20px; } }

.balanza { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; }
.balanza-tag { font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.balanza-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.balanza-cols > div { padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.col-teoria { background: var(--surface-2); }
.col-realidad { background: var(--lamp-soft); border-left: 1px solid var(--line); }
.lbl { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.col-teoria .lbl { color: var(--muted); }
.col-realidad .lbl { color: var(--ink); }
.balanza-cols p { font-size: .92rem; }
.meter { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--muted); border-radius: 99px; }
.meter-real span { background: var(--accent); }
.meter-v { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.balanza-link { font-weight: 600; font-size: .9rem; }
@media (max-width: 460px) { .balanza-cols { grid-template-columns: 1fr; } .col-realidad { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 16px 16px 16px 0; display: grid; gap: 4px; align-content: start; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat-v { font-family: var(--f-display); font-weight: 800; font-stretch: 80%; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .88rem; color: var(--ink); }
.stat-s { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.stat-s a { color: var(--muted); }
@media (max-width: 820px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { padding-left: 0; border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- junta bar ---------- */
.jbar { display: grid; gap: 10px; }
.jbar-track { display: flex; gap: 3px; flex-wrap: nowrap; }
.jbar-seat { flex: 1 1 0; height: 38px; border-radius: 5px; min-width: 0; }
.s-ANR { background: var(--p-anr); } .s-UNIDOS { background: var(--p-unidos); } .s-PLRA { background: var(--p-plra); }
.jbar-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; }
.jbar-legend b { font-family: var(--f-display); font-size: 1.15rem; font-stretch: 85%; margin-right: 4px; }
.jbar-mark { position: relative; height: 18px; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.jbar-mark span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; border-left: 1.5px dashed var(--muted); padding-left: 6px; }
@media (max-width: 520px) { .jbar-seat { height: 28px; border-radius: 3px; } .jbar-track { gap: 2px; } }

/* ---------- generic grids / panels ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.panel p { color: var(--muted); font-size: .94rem; }
a.panel { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.panel:hover { border-color: var(--ink); transform: translateY(-2px); }
.panel .go { font-weight: 700; color: var(--accent); font-size: .88rem; margin-top: 4px; }

/* feasibility pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 700 .72rem var(--f-mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.n-facil { color: var(--ok); background: var(--ok-soft); }
.n-medio { color: var(--warn); background: var(--warn-soft); }
.n-dificil { color: var(--bad); background: var(--bad-soft); }

/* feasibility summary */
.fsum { display: grid; gap: 12px; }
.fsum-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 2px; }
.fsum-bar span { display: block; height: 100%; }
.fb-facil { background: var(--ok); } .fb-medio { background: var(--warn); } .fb-dificil { background: var(--bad); }
.fsum-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fsum-col { display: grid; gap: 6px; align-content: start; font-size: .9rem; }
.fsum-col h3 { display: flex; align-items: baseline; gap: 8px; }
.fsum-col h3 b { font-size: 1.6rem; font-stretch: 80%; font-variant-numeric: tabular-nums; }
.fsum-col ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 3px; }
@media (max-width: 720px) { .fsum-cols { grid-template-columns: 1fr; } }

/* ---------- intendencia ---------- */
.intendencia { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.intendencia > * { min-width: 0; }
.int-role { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.int-name { font-family: var(--f-display); font-weight: 800; font-stretch: 85%; font-size: 1.35rem; }
.int-meta { font-size: .9rem; color: var(--muted); }
.int-count { text-align: right; }
.int-count b { font-family: var(--f-display); font-size: 2rem; font-stretch: 80%; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.int-count span { font-size: .78rem; color: var(--muted); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-stretch: 80%; font-size: 1.1rem; color: #fff; flex-shrink: 0; }
.av-ANR { background: var(--p-anr); } .av-UNIDOS { background: var(--p-unidos); } .av-PLRA { background: var(--p-plra); } .av-INT { background: var(--accent); }
@media (max-width: 620px) { .intendencia { grid-template-columns: auto 1fr; } .int-count { grid-column: 1 / -1; text-align: left; } }

/* ---------- concejal cards ---------- */
.legend-inline { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.d-prop { background: var(--muted); } .d-real { background: var(--accent); } .d-gap { background: var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card-head { display: flex; gap: 12px; align-items: center; }
.card-head > div { min-width: 0; }
.card-name { font-family: var(--f-display); font-weight: 750; font-stretch: 88%; font-size: 1.08rem; line-height: 1.15; }
.card-nick { color: var(--muted); font-weight: 500; font-size: .9rem; }
.card-party { font-size: .8rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 600 .72rem var(--f-mono); padding: 2px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.tag-inc { background: var(--lamp-soft); color: var(--ink); }
.card-perfil { font-size: .86rem; color: var(--muted); }
.card-meter { display: grid; gap: 5px; }
.cm-track { display: flex; height: 6px; gap: 2px; }
.cm-track span { flex: 1; border-radius: 2px; background: var(--line); }
.cm-track .on-p { background: var(--muted); }
.cm-track .on-r { background: var(--accent); }
.cm-label { font-family: var(--f-mono); font-size: .7rem; color: var(--muted); display: flex; justify-content: space-between; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); grid-column: 1 / -1; }

/* ---------- perfil ---------- */
.back { font-weight: 600; font-size: .9rem; text-decoration: none; }
.perfil-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.perfil-head .avatar { width: 76px; height: 76px; font-size: 1.6rem; }
.perfil-head > div { min-width: 0; }
.perfil-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.perfil-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.split > div { padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.split .s-teoria { background: var(--surface); }
.split .s-realidad { background: var(--lamp-soft); border-left: 1px solid var(--line); }
.split-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.split-h .lbl { font-size: 1rem; }
.split-h small { font-size: .8rem; color: var(--muted); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split .s-realidad { border-left: 0; border-top: 1px solid var(--line); } }
.item { display: grid; gap: 6px; padding: 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.s-realidad .item { background: var(--surface); }
.item p { font-size: .93rem; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .78rem; }
.item-meta a { color: var(--muted); }
.comp { font: 700 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; }
.c-si { background: var(--ok-soft); color: var(--ok); }
.c-parcial { background: var(--warn-soft); color: var(--warn); }
.c-no { background: var(--bad-soft); color: var(--bad); }
.estado { font: 700 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.t-verificado { background: var(--ok-soft); color: var(--ok); }
.t-atribuido { background: var(--accent-soft); color: var(--accent); }
.t-declarado { background: var(--warn-soft); color: var(--warn); }
.t-pendiente { background: var(--surface-2); color: var(--muted); }
.gap-box { padding: 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .9rem; display: grid; gap: 6px; }
.gap-box b { color: var(--ink); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 6px; align-content: start; }
.metric-v { font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; font-stretch: 80%; color: var(--absent); line-height: 1; }
.metric-l { font-size: .86rem; }
@media (max-width: 760px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.src-mini { display: grid; gap: 4px; font-size: .84rem; }
.src-mini a { word-break: break-word; }

/* ---------- votaciones ---------- */
.demo-flag { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--warn); border-radius: 8px; padding: 10px 14px; font-size: .92rem; }
.vote-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.vote-layout > * { min-width: 0; }
@media (max-width: 860px) { .vote-layout { grid-template-columns: 1fr; } }
.vote-list { display: grid; gap: 8px; }
.vote-item { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; }
.vote-item:hover { border-color: var(--ink); }
.vote-item.is-on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.vote-item small { font-family: var(--f-mono); color: var(--muted); font-size: .72rem; }
.vote-item b { font-size: .93rem; font-weight: 600; line-height: 1.3; }
.vote-stage { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
#hemi svg { width: 100%; height: auto; display: block; max-width: 560px; margin: 0 auto; }
.vote-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); align-items: center; }
.vote-legend .sep { width: 1px; height: 14px; background: var(--line); }
.sq { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.v-si { background: var(--ok); } .v-no { background: var(--bad); } .v-abstencion { background: var(--warn); } .v-ausente { background: var(--absent); }
.ring { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2.5px solid; }
.r-ANR { border-color: var(--p-anr); } .r-UNIDOS { border-color: var(--p-unidos); } .r-PLRA { border-color: var(--p-plra); }
.vsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vsum-b { border-top: 3px solid; padding-top: 8px; display: grid; gap: 4px; font-size: .84rem; }
.vsum-b.b-ANR { border-color: var(--p-anr); } .vsum-b.b-UNIDOS { border-color: var(--p-unidos); } .vsum-b.b-PLRA { border-color: var(--p-plra); }
.vsum-b strong { font-family: var(--f-display); font-stretch: 88%; font-size: .98rem; }
.vsum-b span { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }
.vresult { font-family: var(--f-display); font-weight: 800; font-stretch: 85%; font-size: 1.25rem; }
@media (max-width: 520px) { .vsum { grid-template-columns: 1fr; } }
.steps { display: grid; gap: 12px; margin-top: 12px; }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; max-width: 72ch; }

/* ---------- casos ---------- */
.caso { display: grid; gap: 14px; padding-block: 8px 20px; border-bottom: 1px solid var(--line); }
.caso + .caso { padding-top: 20px; }
.caso-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.caso-head span { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.cbar { display: grid; gap: 8px; }
.cbar-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; font-size: .86rem; }
.cbar-row > * { min-width: 0; }
.cbar-track { background: var(--surface-2); border-radius: 6px; height: 26px; position: relative; overflow: hidden; }
.cbar-fill { height: 100%; border-radius: 6px; background: var(--muted); }
.cbar-fill.real { background: var(--accent); }
.cbar-txt { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: .74rem; color: var(--ink); white-space: nowrap; }
.cbar-row .lbl { font-size: .78rem; color: var(--muted); }
.caso-junta { font-size: .9rem; padding: 12px 14px; border-left: 3px solid var(--lamp); background: var(--surface); border-radius: 0 8px 8px 0; }
.tile-h { display: flex; justify-content: space-between; gap: 8px; align-items: start; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.ftable { min-width: 820px; }
.ftable td:first-child { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); white-space: nowrap; }
.ftable td.dato { font-weight: 600; }
.ftable td.metodo { color: var(--muted); }
.ctable { min-width: 640px; }
.ctable td:first-child { font-weight: 700; font-family: var(--f-display); font-stretch: 90%; }
.ctable .ok-c { color: var(--ok); font-weight: 600; } .ctable .bad-c { color: var(--bad); font-weight: 600; }
.fact-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fl { padding: 14px; border-radius: var(--r); display: grid; gap: 4px; font-size: .88rem; }
.fl b { font-family: var(--f-display); font-size: 1.05rem; }
.fl-facil { background: var(--ok-soft); } .fl-facil b { color: var(--ok); }
.fl-medio { background: var(--warn-soft); } .fl-medio b { color: var(--warn); }
.fl-dificil { background: var(--bad-soft); } .fl-dificil b { color: var(--bad); }
@media (max-width: 720px) { .fact-legend { grid-template-columns: 1fr; } }

/* ---------- rol ---------- */
.nopuede { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; }
.nopuede ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); }
.callout { background: var(--ink); color: var(--bg); border-radius: 12px; padding: 22px; display: grid; gap: 10px; margin-top: 10px; }
.callout h3 { color: var(--bg); }
.callout p { max-width: 70ch; opacity: .9; }
.callout a { color: var(--lamp); font-weight: 700; }

/* ---------- fuentes ---------- */
.src-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.src { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; align-content: start; }
.src h3 { font-size: 1rem; }
.src h3 a { color: var(--ink); text-decoration: none; }
.src h3 a:hover { color: var(--accent); text-decoration: underline; }
.src p { font-size: .88rem; color: var(--muted); }
.src .nota { color: var(--ink); font-size: .84rem; }
.src-url { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); word-break: break-all; }
.tipo { font: 700 .68rem var(--f-mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; justify-self: start; }
.tp-oficial { background: var(--ok-soft); color: var(--ok); }
.tp-prensa { background: var(--surface-2); color: var(--muted); }
.tp-referencia { background: var(--lamp-soft); color: var(--warn); }
.tp-campaña { background: var(--accent-soft); color: var(--accent); }

/* ---------- roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.phase { padding: 16px 16px 4px 0; display: grid; gap: 8px; align-content: start; position: relative; }
.phase + .phase { padding-left: 16px; border-left: 1px solid var(--line); }
.phase::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.phase + .phase::before { left: 16px; }
.phase.now::before { background: var(--lamp); border-color: var(--lamp); }
.phase small { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.phase ul { margin: 0; padding-left: 18px; font-size: .88rem; color: var(--muted); display: grid; gap: 4px; }
@media (max-width: 860px) { .roadmap { grid-template-columns: 1fr 1fr; row-gap: 20px; } .phase:nth-child(3) { padding-left: 0; border-left: 0; } .phase:nth-child(3)::before { left: 0; } }
@media (max-width: 520px) { .roadmap { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--ink); } .phase, .phase + .phase { padding: 0 0 16px 18px; border-left: 0; } .phase::before, .phase + .phase::before { top: 2px; left: -7px; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { padding-block: 24px; display: grid; gap: 6px; font-size: .84rem; color: var(--muted); }
.foot b { color: var(--ink); }

.view { animation: fade .25s ease both; }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }
