:root{--bg:#fbfaf7;--card:#fff;--ink:#1c2230;--muted:#586172;--line:#e4e0d6;--brand:#b8281d;--brand-d:#8f1e15;--gold:#f1bf00;--link:#174f9c;--sea:#d7e8f3;--soft:#f3f0e9;--r:10px}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
a{color:var(--link);text-underline-offset:2px}
a:hover{color:var(--brand)}
h1,h2,h3{line-height:1.2;color:#111723;margin:1.6em 0 .55em}
h1{font-size:clamp(1.75rem,4.2vw,2.5rem);margin-top:.4em;letter-spacing:-.01em}
h2{font-size:clamp(1.3rem,2.8vw,1.65rem)}
h3{font-size:1.12rem}
p{margin:0 0 1em}
img,svg{max-width:100%}
.wrap{max-width:1120px;margin:0 auto;padding:0 16px}
.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:8px;background:#fff;padding:6px 10px;z-index:9}

/* cabecera */
.top{background:#fff;border-bottom:1px solid var(--line)}
.top .wrap{display:flex;align-items:center;gap:18px;min-height:58px}
.logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:1.08rem;color:var(--ink);text-decoration:none;white-space:nowrap}
.logo b{color:var(--brand)}
.logo svg{width:28px;height:28px;flex:none}
.nav{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;margin-left:auto}
.nav::-webkit-scrollbar{display:none}
.nav a{padding:8px 10px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:.94rem;white-space:nowrap}
.nav a:hover,.nav a[aria-current]{background:var(--soft);color:var(--brand)}
@media (max-width:760px){.top .wrap{flex-wrap:wrap;gap:0;padding-top:6px}.nav{margin:0 -16px;padding:0 10px 6px;width:calc(100% + 32px)}}

/* migas */
.crumbs{font-size:.86rem;color:var(--muted);margin:14px 0 0;padding:0;list-style:none;display:flex;flex-wrap:wrap}
.crumbs li+li::before{content:"›";margin:0 7px;color:#a39d90}
.crumbs a{color:var(--muted)}

.lead{font-size:1.1rem;color:#2b3242;max-width:78ch}
.upd{font-size:.84rem;color:var(--muted);margin-top:-.4em}
main{padding-bottom:40px}
main p,main li{max-width:80ch}

/* rejilla principal */
.split{display:grid;gap:28px;grid-template-columns:1fr}
@media (min-width:920px){.split{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);align-items:start}}

/* ficha */
.facts{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:6px 18px;margin:0}
.facts div{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--soft)}
.facts div:last-child{border:0}
.facts dt{color:var(--muted);font-size:.93rem}
.facts dd{margin:0;font-weight:600;text-align:right}

/* estadísticas */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:22px 0}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px}
.stat b{display:block;font-size:1.5rem;color:var(--brand);line-height:1.15}
.stat span{font-size:.88rem;color:var(--muted)}

/* mapas SVG */
.map{margin:18px 0;background:var(--sea);border:1px solid #c7dbe9;border-radius:var(--r);overflow:hidden;position:relative}
.map svg{display:block;width:100%;height:auto}
.map figcaption{font-size:.84rem;color:var(--muted);background:#fff;padding:8px 14px;border-top:1px solid var(--line)}
.es path,.es circle,.es rect{vector-effect:non-scaling-stroke}
.es path{stroke:#fff;stroke-width:.9;stroke-linejoin:round;transition:fill .15s}
.es .ctx{fill:#eeebe4;stroke:#cfcabe;stroke-width:.8}
.es .ptd{fill:#e6e2d9;stroke:#fff;stroke-width:.8}
.es .cbox{fill:var(--sea);stroke:#8aa6bd;stroke-width:1}
.es .k0{fill:#f0b56c}.es .k1{fill:#a9d39e}.es .k2{fill:#9fc4e8}.es .k3{fill:#f0a59c}.es .k4{fill:#cbb3dc}.es .k5{fill:#f7dd82}.es .k6{fill:#ade0d6}.es .k7{fill:#c8d68c}
.es .dim{fill:#ebe7de}.es .mid{fill:#f3cf8f}.es .hl{fill:var(--brand)}
.es .w{fill:#fff;stroke:#333;stroke-width:1}
.es a:hover path,.es a:focus path{fill:var(--brand)}
.es a:focus{outline:none}
.es .rv{fill:none;stroke:#2d7fc1;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.es .rv.hl{stroke:#0b4f9c;stroke-width:3.2;fill:none}
.es .rv.lo{stroke:#8db8dc;stroke-width:1}
.es .dot{fill:#1c2230;stroke:#fff;stroke-width:1}
.es .dot.big{fill:var(--brand)}
.es .dot.pk{fill:#6b4b2a}.es .dot.gr{fill:#2f7d46}
.es text{font-family:system-ui,sans-serif;font-weight:600;fill:#1c2230;paint-order:stroke;stroke:#fff;stroke-linejoin:round;pointer-events:none;text-anchor:middle}
.es text.l{font-weight:800}.es text.s{font-weight:500}
.map.zoom{overflow-x:auto}.map.zoom svg{min-width:760px}
.map.zoom figcaption{position:sticky;left:0}
@media (max-width:760px){.map.zoom figcaption::before{content:"↔ Desliza para ver el mapa completo. ";font-weight:600;color:var(--brand)}}
.tip{position:absolute;pointer-events:none;background:#1c2230;color:#fff;font-size:.85rem;padding:4px 9px;border-radius:6px;white-space:nowrap;transform:translate(-50%,-130%);opacity:0;transition:opacity .1s}
.tip.on{opacity:1}

/* leyenda / chips */
.legend,.chips{display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:14px 0;list-style:none}
.legend a,.chips a,.chips span{display:inline-flex;align-items:center;gap:7px;font-size:.9rem;padding:5px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);text-decoration:none}
.legend a:hover,.chips a:hover{border-color:var(--brand);color:var(--brand)}
.legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.legend .k0{background:#f0b56c}.legend .k1{background:#a9d39e}.legend .k2{background:#9fc4e8}.legend .k3{background:#f0a59c}.legend .k4{background:#cbb3dc}.legend .k5{background:#f7dd82}.legend .k6{background:#ade0d6}.legend .k7{background:#c8d68c}

/* tablas */
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff;margin:14px 0 22px}
table{border-collapse:collapse;width:100%;font-size:.94rem}
th,td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--soft);white-space:nowrap}
td.wrapc{white-space:normal;min-width:260px}
th{background:#f7f5f0;font-weight:700;position:sticky;top:0;cursor:default}
th[data-sort]{cursor:pointer;user-select:none}
th[data-sort]::after{content:" ↕";color:#a49f94;font-weight:400}
tr:hover td{background:#fcfbf8}
td.n,th.n{text-align:right;font-variant-numeric:tabular-nums}
.filter{width:100%;max-width:360px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff}

/* tarjetas */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:16px 0 26px;padding:0;list-style:none}
.cards a{display:block;height:100%;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;text-decoration:none;color:var(--ink)}
.cards a:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(0,0,0,.05)}
.cards b{display:block;color:var(--link);margin-bottom:3px}
.cards span{font-size:.88rem;color:var(--muted);line-height:1.45;display:block}

.cols{columns:3 210px;column-gap:28px;padding-left:18px}
.cols li{break-inside:avoid;margin-bottom:3px}
.list li{margin-bottom:6px}

/* mapa interactivo */
.lmap{position:relative;aspect-ratio:4/3;max-height:560px;width:100%;background:#e8eef2;border:1px solid #c7dbe9;border-radius:var(--r);margin:16px 0;overflow:hidden;z-index:0}
@media (min-width:760px){.lmap{aspect-ratio:16/9}}
.lmap>button{position:absolute;inset:0;margin:auto;width:max-content;height:max-content;padding:12px 20px;border:0;border-radius:999px;background:var(--brand);color:#fff;font:600 1rem system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.lmap>button:hover{background:var(--brand-d)}
.lmap .leaflet-container{font:inherit}

/* FAQ */
.faq details{background:#fff;border:1px solid var(--line);border-radius:var(--r);margin:10px 0;padding:0 16px}
.faq summary{cursor:pointer;font-weight:650;padding:13px 0;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";float:right;color:var(--brand);font-weight:700}
.faq details[open] summary::after{content:"–"}
.faq details p{margin:0 0 14px}

.note{background:#fff8e1;border:1px solid #f3e1a6;border-radius:var(--r);padding:12px 16px;font-size:.94rem}
.btn{display:inline-block;padding:10px 16px;border-radius:8px;background:var(--brand);color:#fff;text-decoration:none;font-weight:600;border:0;font:600 .95rem system-ui,sans-serif;cursor:pointer}
.btn:hover{background:var(--brand-d);color:#fff}
.btn.alt{background:#fff;color:var(--ink);border:1px solid var(--line)}
.btns{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}

/* juego */
.game{display:grid;gap:14px}
.gbar{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:12px 16px}
.gq{font-size:1.15rem;font-weight:700;flex:1 1 260px}
.gq em{color:var(--brand);font-style:normal}
.gs{font-variant-numeric:tabular-nums;color:var(--muted);font-size:.95rem}
.es .ok{fill:#3f9b58!important}.es .bad{fill:#e06b5f!important}.es .hint{fill:#f1bf00!important}
.game .es path{cursor:pointer}
.gres{background:#eef7f0;border:1px solid #bfe0c7;border-radius:var(--r);padding:14px 16px}

/* pie */
.foot{background:#1c2230;color:#c9cfdb;margin-top:30px;padding:34px 0 22px;font-size:.92rem}
.foot a{color:#e7ebf2;text-decoration:none}.foot a:hover{color:var(--gold)}
.fgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:22px}
.foot h2{color:#fff;font-size:.98rem;margin:0 0 10px}
.foot ul{list-style:none;padding:0;margin:0}.foot li{margin:5px 0}
.foot small{display:block;margin-top:24px;color:#98a1b3;border-top:1px solid #333b4c;padding-top:16px;line-height:1.6}

@media print{.top,.foot,.crumbs,.lmap,.btns,.nav,.noprint{display:none!important}body{background:#fff}.map{border:0;background:#fff}}
.foot small a{text-decoration:underline}
