/* =====================================================================
   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: #1565C0;
  --sev-grave: #F5A300;
  --sev-muy_grave: #B3001B;
  --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: 1100px) {
  .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="url"], 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-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; margin-right: 6px; vertical-align: -4px; box-shadow: 0 0 0 1.5px #0F1C2B; font: 800 11px/1 Arial, Helvetica, sans-serif; color: #fff; }
.sev-dot::after { content: ""; }
.sev-dot.sev-leve::after { content: "L"; } .sev-dot.sev-grave::after { content: "G"; } .sev-dot.sev-muy_grave::after { content: "!"; font-size: 13px; }
html[lang="en"] .sev-dot.sev-leve::after { content: "M"; } html[lang="en"] .sev-dot.sev-grave::after { content: "S"; }
.sev-dot.sev-desconocida::after, .sev-dot.sev-sin_indicar::after { content: "?"; }
.sev-leve { background: var(--sev-leve); } .sev-grave { background: var(--sev-grave); color: #0F1C2B; } .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: #DCE9FA; } .tag-sev-grave { background: #FFEDB8; } .tag-sev-muy_grave { background: #FAD4D9; color: #7A0012; }
.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; }
/* Textos largos: caja con barra de desplazamiento a la derecha */
.scroll-txt { max-height: 9.5em; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: #8A94A3 #EEF0F2; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.scroll-txt::-webkit-scrollbar { width: 8px; } .scroll-txt::-webkit-scrollbar-track { background: #EEF0F2; border-radius: 4px; } .scroll-txt::-webkit-scrollbar-thumb { background: #8A94A3; border-radius: 4px; }
.popup .scroll-txt { max-height: 11em; }
.inc-item .scroll-txt { max-height: 8.5em; }
.inc-loc { font-size: .92rem; color: var(--muted); }
.leaflet-popup-content { font-family: var(--font-body); font-size: .95rem; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.leaflet-popup-scrolled { border: 0; padding-right: 6px; overscroll-behavior: contain; }
/* Marcadores de gravedad: letra sobre color (L leve, G grave, ! muy grave) */
.sev-pin { background: none; border: 0; }
.sev-pin span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 2px #0F1C2B, 0 2px 6px rgba(0,0,0,.45); font: 800 14px/1 Arial, Helvetica, sans-serif; color: #fff; box-sizing: border-box; }
.sev-pin.p-leve span { background: var(--sev-leve); }
.sev-pin.p-grave span { background: var(--sev-grave); color: #0F1C2B; }
.sev-pin.p-muy_grave span { background: var(--sev-muy_grave); font-size: 18px; }
.sev-pin.p-desconocida span { background: #6B7480; }
.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; }

/* ---------- v2: mapa con líneas ferroviarias, ficha pública ---------- */
.vs-base-muted { filter: grayscale(1) brightness(1.06) contrast(.92); }
.rail-legend { display: grid; gap: 6px; margin-top: 8px; font-size: .92rem; color: var(--muted); }
.rail-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rail-legend i { display: inline-block; width: 26px; height: 4px; border-radius: 2px; flex: none; }
.rail-legend .hint { font-size: .82rem; margin-top: 4px; }
.ficha-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .ficha-layout { grid-template-columns: 1fr; } }
.ficha-map { height: 320px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #DDD8CC; }
.kv-public { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: .97rem; }
.kv-public dt { color: var(--muted); }
.kv-public dd { margin: 0; }
.adif-box { border-left: 6px solid var(--ink-3); }
.adif-pending { font-size: 1.15rem; margin-bottom: .3em; }
.adif-answer { border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 10px; }
.adif-answer:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.updates { list-style: none; padding: 0; margin: 0; }
.updates li { border-left: 3px solid var(--signal); padding: 2px 0 2px 12px; margin-bottom: 12px; }
.resp-form summary { cursor: pointer; }
.resp-form[open] summary { margin-bottom: 10px; }
.inc-item h3 a { color: var(--ink); text-decoration: none; }
.inc-item h3 a:hover { text-decoration: underline; }

/* v2.1 — pendientes de verificar por corredor */
.pend-badge { background: none; border: 0; }
.pend-badge span, .legend .pend-sw { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px dashed #5B6675; color: #24384D; font: 700 1rem/1 var(--font-display, sans-serif); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.legend .pend-sw { width: 22px; height: 22px; border-width: 2px; font-size: .75rem; box-shadow: none; }
.inc-item.inc-pending { border-left: 6px dashed #8A94A3; background: #F6F7F9; }
.counter-sub { margin: 4px 0 0; font-weight: 700; }
#c-pend svg { max-width: 620px; }
.sev-desconocida { background: #8A94A3; } .tag-sev-desconocida { background: #E6E9EE; }

/* v2.3 — selector de idioma */
.header-tools { display: flex; align-items: center; gap: 10px; order: 3; }
.site-nav { margin-left: auto; }
.lang-switch { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-weight: 700; font-size: .9rem; }
.lang-switch a, .lang-switch span { padding: 7px 10px; line-height: 1; text-decoration: none; color: var(--ink); }
.lang-switch span[aria-current] { background: var(--ink); color: #fff; }
.lang-switch a:hover { background: #fff; }
html[lang="en"] .hero .tagline::before { content: "“"; } html[lang="en"] .hero .tagline::after { content: "”"; }

/* v2.6 — rectificaciones y documentos en la ficha */
.callout-rect { background: #FFF7E0; border-left: 6px solid var(--signal); }
.doc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.doc-item a { display: block; border-radius: 8px; overflow: hidden; background: #EEF0F3; }
.doc-item img { display: block; width: 100%; height: 150px; object-fit: cover; }
.doc-pdf { display: grid; place-items: center; height: 150px; font: 700 1.6rem var(--font-display); color: var(--ink); }
.doc-item p { margin-top: 6px; }
.legend .sev-dot, .tag .sev-dot, .choice .sev-dot { display: inline-flex; align-items: center; justify-content: center; gap: 0; padding: 0; text-align: center; }
.legend .sev-dot { width: 22px; height: 22px; font-size: 12px; line-height: 1; margin-right: 0; }

/* v2.7 · Análisis de datos */
.an-kicker { margin: 0 0 .4em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.an-kicker a { color: var(--signal); text-decoration: none; }
.an-lead { font-size: 1.2rem; max-width: 46em; }
.an-meta { font-size: .95rem; opacity: .85; margin-bottom: 0; }
.an-wrap { max-width: 860px; }
.an-body { font-size: 1.08rem; line-height: 1.65; }
.an-body h2 { font-size: 1.75rem; margin: 1.6em 0 .5em; }
.an-body h3 { font-size: 1.35rem; margin: 1.3em 0 .4em; }
.an-body blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--line); color: var(--muted); }
.an-body ul, .an-body ol { padding-left: 1.3em; }
.an-ref a { text-decoration: none; font-weight: 700; font-size: .8em; }
.an-figure { margin: 2em 0; padding: 18px 18px 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.an-fig-note { font-size: .9rem; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.an-img a { display: block; cursor: zoom-in; }
.an-img img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 0 auto; }
.an-claim { margin: 0 0 2em; padding: 20px 22px; border-radius: var(--radius); background: #EEF2F6; border-left: 6px solid var(--ink-3); }
.an-claim-k { margin: 0 0 .3em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; color: var(--muted); }
.an-claim blockquote { margin: 0 0 .5em; padding: 0; border: 0; font-size: 1.25rem; line-height: 1.45; color: var(--ink); font-style: italic; }
.an-claim-by { font-size: .95rem; color: var(--muted); margin-bottom: .6em; }
.an-verdict { margin: 0 0 .4em; }
.an-vnote p:last-child { margin-bottom: 0; }
.an-vpill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .92rem; background: #E6E8EB; color: var(--ink); }
.an-vpill.v-correcta { background: #CDEBD9; color: #0E5432; }
.an-vpill.v-matizable { background: #DCE9FA; color: #0D3C78; }
.an-vpill.v-enganosa { background: #FFEDB8; color: #6B4500; }
.an-vpill.v-falsa { background: #FAD4D9; color: #7A0012; }
.an-vpill.v-sin_datos { background: #E6E8EB; color: #3A4553; }
.an-sec { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.an-sec h2 { font-size: 1.45rem; margin-top: 0; }
.an-sources { padding-left: 1.6em; font-size: .97rem; }
.an-sources li { margin-bottom: .45em; word-wrap: break-word; overflow-wrap: anywhere; }
.an-sources li:target { background: #FFF8E6; }
.an-src-url { font-size: .9rem; }
.an-corr li { margin-bottom: .4em; }
.an-cite { font-size: .95rem; }
.an-lang-note { margin-bottom: 1.5em; }
.an-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.an-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border-left: 6px solid var(--signal); }
.an-card h2 { font-size: 1.6rem; margin-bottom: .3em; }
.an-card h2 a { color: var(--ink); text-decoration: none; }
.an-card h2 a:hover { text-decoration: underline; }
.an-card-date { margin: 0 0 .3em; font-size: .9rem; color: var(--muted); }
.preview-banner { background: #FFF2CC; border-bottom: 2px solid #F0D58A; padding: 10px 0; }
.preview-banner .wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
@media (max-width: 600px) { .an-figure { padding: 14px 10px 12px; margin-left: -6px; margin-right: -6px; } .an-body { font-size: 1.02rem; } }
