/* =====================================================================
   Vía Segura — hoja de estilos
   Identidad: azul tinta (noche ferroviaria) + ámbar de señal + papel cálido.
   ===================================================================== */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #0F1C2B;
  --ink-2: #172839;
  --ink-3: #24384D;
  --steel: #5A6878;
  --line: #DAD6CC;
  --line-soft: #E9E5DC;
  --paper: #F6F4EF;
  --card: #FFFFFF;
  --text: #16212D;
  --muted: #586472;
  --signal: #F2A900;
  --signal-deep: #D99600;
  --signal-ink: #7A5000;
  --sev-leve: #D4A90F;
  --sev-grave: #E06A12;
  --sev-muy_grave: #C42B2B;
  --ok: #1F7A4D;
  --err: #B3261E;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15,28,43,.06), 0 6px 20px rgba(15,28,43,.07);
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--ink-3); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: .005em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--signal); color: var(--ink); padding: 8px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; color: var(--signal-ink); margin-bottom: .6em; display: inline-flex; align-items: center; gap: .6em; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--signal); border-radius: 2px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.pending-config { background: #FFF2CC; color: #6B4A00; padding: 0 .35em; border-radius: 3px; font-size: .95em; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .65em 1.25em; border-radius: 8px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 700 1.02rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-signal { background: var(--signal); border-color: var(--signal); color: var(--ink); box-shadow: 0 2px 0 var(--signal-deep); }
.btn-signal:hover { background: #FFBC1F; border-color: #FFBC1F; color: var(--ink); transform: translateY(-1px); }
.btn-lg { min-height: 58px; font-size: 1.15rem; padding: .8em 1.6em; }
.btn-sm { min-height: 40px; padding: .4em .95em; font-size: .95rem; }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-link { background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Avisos superiores, cabecera ---------- */
.emergency-bar { background: var(--ink); color: #D9DEE4; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid #22344A; }
.emergency-bar strong { color: var(--signal); }
.emergency-bar a { color: #fff; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; letter-spacing: .01em; line-height: 1; }
.brand-light { color: #fff; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 6px; }
.site-nav a:not(.btn):hover { background: var(--line-soft); }
.site-nav a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.site-nav li:last-child { margin-left: 8px; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 0 auto; position: relative; transition: transform .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; } .nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .js .nav-toggle { display: block; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(15,28,43,.12); }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .no-js .site-nav ul { flex-wrap: wrap; flex-direction: row; padding: 0 0 10px; }
  .no-js .header-inner { flex-wrap: wrap; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 1.1rem; }
  .site-nav li:last-child { margin: 8px 0 0; }
  .site-nav .btn { width: 100%; min-height: 52px; }
}

/* ---------- Portada ---------- */
.hero { position: relative; background: var(--ink); color: #E8ECF0; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15,28,43,.96) 0%, rgba(15,28,43,.86) 45%, rgba(15,28,43,.25) 100%); }
.hero-inner { padding: 72px 0 84px; max-width: 680px; }
.hero h1 { color: #fff; font-size: clamp(3.2rem, 9vw, 6rem); text-transform: uppercase; letter-spacing: .01em; margin-bottom: .1em; line-height: .95; }
.hero h1 .accent { color: var(--signal); }
.hero .tagline { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, 3vw, 1.9rem); color: #fff; margin-bottom: 1em; letter-spacing: .01em; }
.hero .tagline::before { content: "«"; color: var(--signal); } .hero .tagline::after { content: "»"; color: var(--signal); }
.hero p.intro { font-size: 1.18rem; color: #C8D0D9; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .95rem; color: #9FABB8; }
@media (max-width: 720px) { .hero::after { background: linear-gradient(180deg, rgba(15,28,43,.82), rgba(15,28,43,.95)); } .hero-inner { padding: 48px 0 56px; } .hero-actions .btn { width: 100%; } }

.quicklinks { margin-top: -40px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .quick-grid { grid-template-columns: 1fr; } }
.quick { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-top: 4px solid var(--ink); transition: transform .15s, border-color .15s; }
.quick:hover { transform: translateY(-2px); border-top-color: var(--signal); color: var(--text); }
.quick svg { width: 34px; height: 34px; flex: none; color: var(--ink); }
.quick strong { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); line-height: 1.1; margin-bottom: 2px; }
.quick span { font-size: .95rem; color: var(--muted); line-height: 1.4; display: block; }

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-dark { background: var(--ink); color: #D5DCE3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 36px; }

/* Proceso (como una línea con estaciones) */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; counter-reset: step; }
.process::before { content: ""; position: absolute; top: 27px; left: 8%; right: 8%; height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 22px); opacity: .9; }
.process li { position: relative; padding: 0 18px; text-align: center; }
.process .station { width: 60px; height: 60px; border-radius: 50%; background: var(--paper); border: 5px solid var(--ink); margin: 0 auto 18px; display: grid; place-items: center; font: 700 1.5rem var(--font-display); color: var(--ink); position: relative; z-index: 1; }
.process li:nth-child(3) .station { border-color: var(--signal); background: var(--signal); }
.process h3 { margin-bottom: .3em; }
.process p { color: var(--muted); font-size: 1rem; }
@media (max-width: 760px) {
  .process { grid-template-columns: 1fr; gap: 26px; }
  .process::before { top: 10px; bottom: 10px; left: 27px; right: auto; width: 6px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 14px, transparent 14px 22px); }
  .process li { text-align: left; padding: 0 0 0 82px; min-height: 60px; }
  .process .station { position: absolute; left: 0; top: 0; margin: 0; }
}

/* Contador */
.counter-band { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border-left: 8px solid var(--signal); }
.counter-num { font: 700 clamp(4rem, 12vw, 6.5rem)/0.9 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; min-width: 1.2ch; text-align: center; }
.counter-label { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--ink); margin-bottom: .2em; }
.counter-band p { margin: 0 0 .4em; color: var(--muted); }
@media (max-width: 560px) { .counter-band { grid-template-columns: 1fr; text-align: left; } .counter-num { text-align: left; } }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 860px) { .cards-3, .cards-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.35rem; }
.card p:last-child { margin-bottom: 0; }
.section-dark .card { background: var(--ink-2); box-shadow: none; border: 1px solid #2A3F55; }
.section-dark .card p { color: #BBC5CF; }
.icon-chip { width: 44px; height: 44px; border-radius: 10px; background: var(--signal); color: var(--ink); display: grid; place-items: center; margin-bottom: 14px; }
.icon-chip svg { width: 24px; height: 24px; }

.callout { border-radius: var(--radius); padding: 20px 22px; background: #FFF8E6; border: 1px solid #F0D58A; border-left: 6px solid var(--signal); }
.callout h2, .callout h3 { font-size: 1.35rem; margin-bottom: .35em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-dark { background: var(--ink-2); border-color: #2A3F55; border-left-color: var(--signal); color: #D5DCE3; }
.callout-dark h2, .callout-dark h3 { color: #fff; }
.callout-error { background: #FDECEA; border-color: #F2B8B5; border-left-color: var(--err); }
.callout-ok { background: #E8F4EE; border-color: #A9D5BE; border-left-color: var(--ok); }
.callout-info { background: #EEF2F6; border-color: #CBD5DF; border-left-color: var(--ink-3); }

.page-head { background: var(--ink); color: #C8D0D9; padding: 52px 0 46px; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -60px; bottom: -6px; width: 420px; height: 26px; background: repeating-linear-gradient(90deg, rgba(242,169,0,.85) 0 26px, transparent 26px 40px); transform: skewX(-30deg); }
.page-head h1 { color: #fff; margin-bottom: .25em; }
.page-head p { max-width: 64ch; font-size: 1.15rem; margin: 0; }

.prose h2 { margin-top: 1.6em; font-size: 2rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.faq details { background: var(--card); border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font: 700 1.4rem/1 var(--font-display); color: var(--signal-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; }

/* ---------- Formulario ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .form-layout { grid-template-columns: 1fr; } }
.form-aside { position: sticky; top: 90px; }
@media (max-width: 1000px) { .form-aside { position: static; } }
fieldset { border: 0; margin: 0 0 22px; padding: 22px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font: 700 1.45rem/1.1 var(--font-display); color: var(--ink); display: flex; align-items: center; gap: 10px; }
legend + * { clear: both; }
legend .num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 1.05rem; flex: none; }
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.hint { display: block; font-size: .93rem; color: var(--muted); margin-top: -2px; margin-bottom: 8px; font-weight: 400; }
.opt { font-weight: 400; color: var(--muted); font-size: .92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="month"], input[type="datetime-local"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #B9B4A8; border-radius: 8px; background: #fff; font: inherit; color: var(--text); }
textarea { min-height: 170px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 3px solid rgba(242,169,0,.55); outline-offset: 0; }
.counter-chars { font-size: .85rem; color: var(--muted); text-align: right; margin-top: 4px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1.5px solid #CFCABF; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; transition: border-color .15s, background .15s; }
.choice label small { font-weight: 400; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.choice input:checked + label { border-color: var(--ink); background: #F3F1EA; box-shadow: inset 0 0 0 1.5px var(--ink); }
.choice input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: 2px; }
.choice input:disabled + label { opacity: .5; cursor: not-allowed; }
.sev-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.sev-leve { background: var(--sev-leve); } .sev-grave { background: var(--sev-grave); } .sev-muy_grave { background: var(--sev-muy_grave); }
.field-error { color: var(--err); font-weight: 600; font-size: .95rem; margin-top: 6px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); }
.honeypot { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.loc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.map-box { position: relative; border-radius: 8px; overflow: hidden; border: 1.5px solid #B9B4A8; background: #E4E0D6; }
.map-pick { height: 380px; }
@media (max-width: 600px) { .map-pick { height: 320px; } }
.map-consent { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: repeating-linear-gradient(135deg, #ECE8DF 0 16px, #E4E0D6 16px 32px); z-index: 500; }
.map-consent p { max-width: 44ch; font-size: .95rem; color: var(--muted); margin: 10px auto 0; }
.loc-readout { font-size: .95rem; margin-top: 8px; color: var(--muted); }
.dropzone { border: 2px dashed #B9B4A8; border-radius: 10px; padding: 22px; text-align: center; background: #FBFAF7; }
.dropzone.drag { border-color: var(--ink); background: #F1EEE6; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 12px; background: #F3F1EA; border-radius: 6px; margin-bottom: 6px; font-size: .95rem; word-break: break-all; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.submit-bar { background: var(--ink); color: #D5DCE3; padding: 22px; border-radius: var(--radius); }
.submit-bar .btn { width: 100%; }
.progress { height: 8px; background: #2A3F55; border-radius: 4px; overflow: hidden; margin-top: 12px; display: none; }
.progress.on { display: block; }
.progress span { display: block; height: 100%; width: 0; background: var(--signal); transition: width .2s; }

.preview { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.preview-head { background: var(--ink); color: #fff; padding: 12px 16px; font: 700 1.15rem var(--font-display); letter-spacing: .02em; display: flex; justify-content: space-between; align-items: center; }
.preview-body { padding: 16px; }
.preview-body h3 { font-size: 1.3rem; margin-bottom: .3em; word-wrap: break-word; }
.preview-body .summary { font-size: .95rem; color: var(--muted); white-space: pre-wrap; max-height: 9.5em; overflow: hidden; word-wrap: break-word; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #EEF0F2; font-size: .85rem; font-weight: 600; color: var(--ink); }
.tag-sev-leve { background: #FBF1C9; } .tag-sev-grave { background: #FCE2CC; } .tag-sev-muy_grave { background: #F7D1CF; }
.private-list { list-style: none; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: .9rem; }
.private-list li { display: flex; gap: 8px; padding: 3px 0; color: var(--muted); }
.private-list li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 3px; background: var(--ink-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 7V5a3 3 0 0 1 6 0v2' fill='none' stroke='white' stroke-width='1.6'/%3E%3Crect x='4' y='7' width='8' height='6' rx='1' fill='white'/%3E%3C/svg%3E") center/10px no-repeat; }
.result-box { text-align: center; }
.ref-code { font: 700 clamp(2rem, 7vw, 3rem)/1.1 var(--font-display); letter-spacing: .06em; color: var(--ink); background: #fff; border: 2px dashed var(--ink); border-radius: 10px; padding: 12px 18px; display: inline-block; margin: 6px 0 16px; user-select: all; }

/* ---------- Mapa ---------- */
.map-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }
.filters { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); align-self: start; }
.filters .field { margin-bottom: 14px; }
.map-main { height: 620px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #DDD8CC; position: relative; }
@media (max-width: 900px) { .map-main { height: 460px; } }
.map-empty { position: absolute; z-index: 600; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92%, 420px); background: rgba(255,255,255,.96); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .92rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .zone-sw { width: 16px; height: 16px; border-radius: 50%; border: 2px dashed var(--ink-3); background: rgba(36,56,77,.12); }
.view-switch { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.view-switch button { border: 0; background: #fff; padding: 9px 16px; font: 600 1rem var(--font-body); cursor: pointer; color: var(--ink); min-height: 44px; }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.inc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inc-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-left: 6px solid var(--line); }
.inc-item.sev-b-leve { border-left-color: var(--sev-leve); } .inc-item.sev-b-grave { border-left-color: var(--sev-grave); } .inc-item.sev-b-muy_grave { border-left-color: var(--sev-muy_grave); }
.inc-item h3 { font-size: 1.3rem; margin-bottom: .25em; }
.inc-item p { margin: 0 0 .5em; }
.inc-loc { font-size: .92rem; color: var(--muted); }
.leaflet-popup-content { font-family: var(--font-body); font-size: .95rem; line-height: 1.45; }
.popup h3 { font-size: 1.2rem; margin: 0 0 .3em; }
.popup p { margin: 0 0 .5em; }
.popup .small { font-size: .82rem; color: var(--muted); }

/* ---------- Estadísticas ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-top: 5px solid var(--ink); }
.kpi .v { font: 700 2.8rem/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.kpi.k-leve { border-top-color: var(--sev-leve); } .kpi.k-grave { border-top-color: var(--sev-grave); } .kpi.k-muy_grave { border-top-color: var(--sev-muy_grave); }
.chart-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-card h2 { font-size: 1.5rem; margin-bottom: .2em; }
.chart-card .sub { color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-body); fill: var(--muted); font-size: 13px; }
.chart .val { fill: var(--ink); font-weight: 700; }
.chart-empty { color: var(--muted); font-style: italic; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 10px; }
.data-table th, .data-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.data-table td.n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Pie ---------- */
.site-footer { background: #0A1420; color: #9FABB8; padding: 52px 0 22px; margin-top: 0; font-size: .97rem; }
.site-footer a { color: #D5DCE3; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-h { font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .7em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-lema { color: #fff; font: 600 1.25rem var(--font-display); margin: 12px 0 8px; }
.footer-small { font-size: .9rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid #1E2E40; margin-top: 30px; padding-top: 18px; font-size: .85rem; }

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-2 { margin-top: 24px; } .center { text-align: center; }
.no-js .js-only { display: none; }
.js #date-mes, .js #date-dia { display: none; }
.js #date-mes.on { display: grid; } .js #date-dia.on { display: block; }
