@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500&display=swap');
/* Vektia: estilos compartidos de las paginas (portada, lineas, estaciones, avisos, estadisticas, datos).
   Layout: cabecera fija con marca, enlaces y menu lateral; contenido en una columna central de hasta 1160 px.
   Modo dia por defecto; modo noche con el tema oscuro del sistema o el boton. */
:root {
  --is-dark: 0;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --ink: #0f1a24;
  --muted: #536271;
  --faint: #8291a0;
  --rule: rgba(15, 26, 36, .1);
  --grid: rgba(30, 60, 90, .06);
  --accent: #c46f05;
  --accent-ink: #ffffff;
  --late: #b46600;
  --late-bg: rgba(214, 128, 10, .13);
  --bad: #cf3434;
  --bad-bg: rgba(207, 52, 52, .1);
  --ok: #10855a;
  --ok-bg: rgba(16, 133, 90, .1);
  --data: #2a78d6;
  --sim: #6d5bd0;
  --sim-bg: rgba(109, 91, 208, .12);
  --shadow: 0 0 0 1px rgba(15, 26, 36, .06), 0 10px 30px rgba(15, 26, 36, .08);
  --f-display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-cond: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-brand: "Sora", "IBM Plex Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --is-dark: 1; --bg: #070b10; --surface: #0e151d; --surface-2: #141d27; --ink: #e3eaf0; --muted: #8fa0ae; --faint: #5d6c79;
    --rule: rgba(150, 176, 200, .13); --grid: rgba(120, 152, 182, .07); --accent: #f2a93b; --accent-ink: #1b1204;
    --late: #f2a93b; --late-bg: rgba(242, 169, 59, .13); --bad: #ff6b6b; --bad-bg: rgba(255, 107, 107, .13);
    --ok: #4fd1a1; --ok-bg: rgba(79, 209, 161, .11); --data: #3987e5; --sim: #a99bff; --sim-bg: rgba(169, 155, 255, .14);
    --shadow: 0 0 0 1px rgba(150, 176, 200, .1), 0 14px 34px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --is-dark: 1; --bg: #070b10; --surface: #0e151d; --surface-2: #141d27; --ink: #e3eaf0; --muted: #8fa0ae; --faint: #5d6c79;
  --rule: rgba(150, 176, 200, .13); --grid: rgba(120, 152, 182, .07); --accent: #f2a93b; --accent-ink: #1b1204;
  --late: #f2a93b; --late-bg: rgba(242, 169, 59, .13); --bad: #ff6b6b; --bad-bg: rgba(255, 107, 107, .13);
  --ok: #4fd1a1; --ok-bg: rgba(79, 209, 161, .11); --data: #3987e5; --sim: #a99bff; --sim-bg: rgba(169, 155, 255, .14);
  --shadow: 0 0 0 1px rgba(150, 176, 200, .1), 0 14px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ---------- base de las paginas ---------- */
body.site { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
.site * { box-sizing: border-box; }
.site a { color: inherit; }
.site button { font: inherit; color: inherit; cursor: pointer; }
.site :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.site .wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.site .eyebrow { font: 500 11.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.site .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.site .h1 { font: 600 clamp(36px, 5.6vw, 64px)/1.04 var(--f-display); letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.site .h2 { font: 600 clamp(22px, 2.6vw, 30px)/1.15 var(--f-display); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.site .h3 { font: 600 17px/1.3 var(--f-display); margin: 0; }
.site .lead { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); max-width: 58ch; margin: 0; }
.site .muted { color: var(--muted); }
.site .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.site .section { padding-block: clamp(40px, 6vw, 72px); }
.site .section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.site .section-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.site .link { font: 500 13px var(--f-mono); color: var(--accent); text-decoration: none; white-space: nowrap; }
.site .link:hover { text-decoration: underline; }

/* ---------- cabecera y menu ---------- */
body.site::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.vk-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--rule); }
.vk-bar .wrap { height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.vk-left { display: flex; align-items: center; gap: 10px; }
.vk-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.vk-sub { border-bottom: 1px solid var(--rule); background: var(--bg); }
.vk-sub .wrap { height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vk-nav { display: flex; gap: 4px; }
.vk-nav a { text-decoration: none; padding: 6px 10px; border-radius: 7px; font-size: 13.5px; color: var(--muted); }
.vk-nav a:hover { color: var(--ink); background: var(--surface-2); }
.vk-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.vk-find { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-size: 13.5px; }
.vk-find:hover { color: var(--ink); }
.vk-find svg { width: 15px; height: 15px; }
/* Marca: VEKTIA espaciado; sobre la V, una via con un vehiculo en marcha */
.vk-word { position: relative; display: inline-block; font: 400 21px/1 var(--f-brand); letter-spacing: .36em; margin-right: -.36em; text-decoration: none; color: var(--ink); padding-top: 9px; text-transform: uppercase; }
.vk-word::before { content: ""; position: absolute; left: 0; top: 0; width: .78em; height: 2px; border-radius: 1px; background: currentColor; }
.vk-word::after { content: ""; position: absolute; left: .5em; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transition: left .6s ease; }
.vk-word:hover::after { left: .05em; }
.vk-live { display: inline-flex; align-items: center; gap: 7px; font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); padding: 6px 10px; border-radius: 999px; background: var(--ok-bg); }
.vk-live .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: vkpulse 1.6s ease-in-out infinite; }
.vk-live.off { color: var(--muted); background: var(--surface-2); }
.vk-live.off .dot { animation: none; }
@keyframes vkpulse { 50% { opacity: .3; } }
.vk-icon { width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; display: grid; place-items: center; color: var(--ink); }
.vk-icon:hover { background: var(--surface-2); }
.vk-icon svg { width: 20px; height: 20px; }
.vk-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px var(--f-display); letter-spacing: -.01em; }
.vk-logo svg { width: 28px; height: 28px; flex: none; }
.vk-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 15, .42); opacity: 0; pointer-events: none; transition: opacity .2s; }
.vk-scrim.open { opacity: 1; pointer-events: auto; }
.vk-drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 41; width: min(360px, 88vw); background: var(--surface); box-shadow: var(--shadow); transform: translateX(-102%); transition: transform .25s ease; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); color: var(--ink); font-family: var(--f-body); }
.vk-drawer.open { transform: none; }
.vk-drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px; border-bottom: 1px solid var(--rule); }
.vk-drawer nav { display: grid; gap: 2px; padding: 12px 0; }
.vk-drawer nav a { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; text-decoration: none; padding: 10px 10px; border-radius: 9px; color: var(--ink); }
.vk-drawer nav a:hover, .vk-drawer nav a[aria-current="page"] { background: var(--surface-2); }
.vk-drawer nav a svg { width: 18px; height: 18px; color: var(--muted); justify-self: center; }
.vk-drawer nav a b { font-weight: 500; font-size: 15px; display: block; }
.vk-drawer nav a span { font-size: 12.5px; color: var(--muted); }
.vk-drawer .vk-maps { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px; padding: 0 10px 8px 48px; }
.vk-drawer .vk-maps a { display: inline-block; padding: 5px 9px; border-radius: 7px; font: 500 12.5px var(--f-body); color: var(--muted); background: var(--surface-2); text-decoration: none; }
.vk-drawer .vk-maps a:hover { color: var(--ink); }
.vk-drawer-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--muted); }
.vk-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vk-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; border: 1px solid var(--rule); }
.vk-seg button { border: 0; background: none; padding: 5px 10px; border-radius: 6px; font: 500 12px var(--f-mono); color: var(--muted); }
.vk-seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }

/* ---------- piezas comunes ---------- */
.site .card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.site .badge { display: inline-grid; place-items: center; min-width: 38px; height: 22px; padding: 0 6px; border-radius: 5px; font: 600 12px/1 var(--f-mono); letter-spacing: .02em; color: #fff; flex: none; text-decoration: none; }
.site .chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 3px 8px; font: 500 12px/1.3 var(--f-mono); white-space: nowrap; }
.site .chip.ok { background: var(--ok-bg); color: var(--ok); }
.site .chip.late { background: var(--late-bg); color: var(--late); }
.site .chip.bad { background: var(--bad-bg); color: var(--bad); }
.site .chip.plain { background: var(--surface-2); color: var(--muted); }
.site .chip.sim { background: var(--sim-bg); color: var(--sim); }
.site .state { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--f-mono); letter-spacing: .03em; white-space: nowrap; color: var(--muted); }
.site .state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.site .state.ok { color: var(--ok); } .state.ok::before { background: var(--ok); }
.site .state.late { color: var(--late); } .state.late::before { background: var(--late); }
.site .state.bad { color: var(--bad); } .state.bad::before { background: var(--bad); }
.site .btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 15px; }
.site .btn:hover { border-color: var(--faint); }
.site .btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.site .btn.primary:hover { opacity: .9; }
.site .btn svg { width: 16px; height: 16px; }
.site .kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.site .kpi { background: var(--surface); padding: 18px 20px; display: grid; gap: 6px; min-width: 0; }
.site .kpi strong { font: 500 clamp(26px, 3vw, 34px)/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.site .kpi span { font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.site .kpi small { color: var(--muted); font-size: 12.5px; }
.site .kpi.warn strong { color: var(--late); }
.site .kpi.bad strong { color: var(--bad); }
.site .search-box { position: relative; }
.site .search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.site .search-box input { width: 100%; height: 52px; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: 0 16px 0 44px; font: 16px var(--f-body); box-shadow: var(--shadow); }
.site .search-box input:focus { outline: none; border-color: var(--accent); }
.site .search-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 360px; overflow: auto; }
.site .search-res a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; text-decoration: none; }
.site .search-res a:hover, .site .search-res a.on { background: var(--surface-2); }
.site .search-res .kind { font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.site .search-res .badges { display: flex; gap: 3px; }
.site .search-res .badges .badge { min-width: 30px; height: 19px; font-size: 10.5px; padding: 0 4px; }
.site .table { width: 100%; border-collapse: collapse; font-size: 14px; }
.site .table th { text-align: left; font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.site .table td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.site .table tr:last-child td { border-bottom: 0; }
.site .table .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.site .scroll-x { overflow-x: auto; }
.site .empty { padding: 28px 20px; color: var(--muted); text-align: center; }
.site .note { font-size: 13px; color: var(--muted); }
.vk-foot { border-top: 1px solid var(--rule); padding-block: 28px 40px; color: var(--muted); font-size: 13px; }
.vk-foot .wrap { display: flex; gap: 18px 30px; flex-wrap: wrap; justify-content: space-between; }
.vk-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.vk-foot a { text-decoration: none; }
.vk-foot a:hover { color: var(--ink); }
.site .tip { position: fixed; pointer-events: none; z-index: 50; background: var(--surface); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font: 12.5px/1.45 var(--f-body); max-width: 260px; }

@media (max-width: 860px) {
  .vk-sub .vk-nav { display: none; }
  .vk-live span:last-child { display: none; }
  .vk-live { padding: 8px; }
  .vk-word { font-size: 18px; letter-spacing: .3em; margin-right: -.3em; }
  .site .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .vk-live .dot { animation: none; }
  .vk-drawer, .vk-scrim { transition: none; }
}
