@font-face { font-family: "Overpass"; src: url(/assets/fonts/overpass-v19.woff2) format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass Mono"; src: url(/assets/fonts/overpass-mono-v21.woff2) format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-v26.woff2) format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; src: url(/assets/fonts/newsreader-italic-v26.woff2) format("woff2"); font-style: italic; font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F3EFE6; --ink: #17150F; --ink-2: #2C2922; --soft: #4A453C; --muted: #5F594E;
  --rule: #D9D1C1; --topo: #E2DACB; --gold: #C9A04A; --gold-text: #8A6A22;
  --band: #17150F; --band-ink: #F3EFE6; --band-soft: #D6CFBF; --band-muted: #A39D90; --band-rule: #3A362E;
  --board: #0F1115; --board-ink: #EEE8DC; --board-muted: #A39D90; --board-rule: #262A31;
  --sans: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "Overpass Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --body: var(--sans);
  --gutter: clamp(16px, 4vw, 48px);
  --mix: 55%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1115; --ink: #EEE8DC; --ink-2: #D6CFBF; --soft: #C9C2B4; --muted: #A39D90;
    --rule: #262A31; --topo: #1B1F26; --gold-text: #E3C27A; --mix: 75%;
    --band: #16181D; --band-rule: #2E3239; --board: #0A0B0E; --board-rule: #22262C;
  }
}
[data-mode="essayist"] { --body: var(--serif); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font: 400 1.0625rem/1.55 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
b { font-weight: 800; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 72px; }
.ess { display: none; }
[data-mode="essayist"] .ess { display: revert; }
[data-mode="essayist"] .eng { display: none; }

/* Saltar al contenido: aparece al recibir el foco */
.skip { position: absolute; left: var(--gutter); top: 8px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 14px/1 var(--mono); text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }
/* Sin JS no hay modos ni líneas que seguir: se ocultan los controles que no harían nada */
html:not(.js) .modes, html:not(.js) .chips, html:not(.js) .map-caption { display: none; }

/* Cabecera */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding: 14px var(--gutter); border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.mark { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.dim { color: var(--muted); font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .lang:hover { color: var(--muted); }
.tools { display: flex; align-items: center; gap: 12px; }
.modes { display: flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; }
.modes button { font: 600 13px/1 var(--mono); color: inherit; background: none; border: 0; border-radius: 999px; min-height: 38px; padding: 0 14px; cursor: pointer; }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
[data-mode="essayist"] .modes button[aria-pressed="true"] { background: var(--gold); color: #17150F; }
.lang { font: 600 13px/1 var(--mono); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: 64px 48px; }
.hero-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.kicker { font: 600 13px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
h1 { font: 800 clamp(2.6rem, 5.2vw, 4.5rem)/1 var(--sans); letter-spacing: -0.03em; text-wrap: balance; }
h1 em { font-style: normal; }
[data-mode="essayist"] h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; }
[data-mode="essayist"] h1 em { font-style: italic; color: var(--gold-text); }
.lede { font-size: 1.2rem; line-height: 1.5; color: var(--soft); max-width: 32em; text-wrap: pretty; }
[data-mode="essayist"] .lede { font-size: 1.35rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 800 1rem/1 var(--sans); text-decoration: none; border: 1.5px solid var(--ink); transition: transform .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: none; color: var(--ink); }
.ribbon { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; max-width: 360px; margin-top: 12px; }
.ribbon i { height: 6px; border-radius: 3px; }

/* Mapa */
.map { flex: 2 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.map-svg { position: relative; display: block; width: 100%; height: auto; }
/* Demo de la colonia (metaheuristics-lab): un canvas detrás del SVG, lo crea site.js */
.st-colony { display: flex; flex-direction: column; gap: 16px; padding-bottom: 72px; }
.st-colony > p { max-width: 68ch; }
.colony { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.colony-stage { position: relative; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; touch-action: none; }
.colony-stage svg { position: relative; display: block; width: 100%; height: auto; }
.colony-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.colony-stage canvas.on { opacity: 1; }
.colony .stop { fill: var(--paper); stroke: var(--c); stroke-width: 3.5; }
.colony .hub { fill: var(--ink); stroke: var(--paper); stroke-width: 4; }
.colony figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.colony figcaption b { color: var(--ink); font-variant-numeric: tabular-nums; }
.colony-play { font: 600 13px var(--mono); padding: 8px 14px; border: 1px solid var(--ink); border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.topo path { fill: none; stroke: var(--topo); stroke-width: 1; }
.topo .major { stroke-width: 1.8; }
.ln { fill: none; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .35s ease; }
.l51 { stroke-linecap: butt; }
.trains circle { fill: #FFFFFF; stroke-width: 3; transition: opacity .35s ease; }
.stations circle, .stations rect { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.stations .xfer { stroke-width: 3.5; }
.stations .terminal { stroke: var(--gold); stroke-width: 6; }
.stations .origin { stroke-width: 5; }
.stations .stadium { fill: #0A0A0A; stroke: #C8102E; stroke-width: 5; }
.stations .pulse { fill: none; stroke: var(--ink); stroke-width: 2; }
.stations .hub { fill: var(--ink); stroke: var(--paper); stroke-width: 4; }
.stations .hub-dot { fill: var(--paper); stroke: none; }
.labels text { font: 600 13px var(--sans); fill: var(--ink); }
.labels .bold { font-size: 14px; font-weight: 800; }
.labels .big { font-size: 20px; font-weight: 800; }
.st-links text { font: 600 13px var(--sans); fill: var(--ink); transition: fill .2s ease; }
.st-links .bold { font-size: 14px; font-weight: 800; }
.st-links .big { font-size: 20px; font-weight: 800; }
.st-links a { cursor: pointer; }
.st-links .hit { fill: transparent; stroke: none; }
.st-links a > circle:not(.hit), .st-links a > rect { transform-box: fill-box; transform-origin: center; transition: transform .2s ease, fill .2s ease; }
.st-links a:hover > circle:not(.hit), .st-links a:hover > rect, .st-links a:focus-visible > circle:not(.hit) { fill: var(--c); transform: scale(1.35); }
.st-links a:hover text { fill: var(--gold-text); }
.stops a, .table .name a { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--c, var(--gold)); }
.stops a:hover, .table .name a:hover { color: var(--gold-text); }
.labels .special { font: 600 11px var(--mono); fill: #C8102E; }
[data-mode="essayist"] .ln { stroke-width: 5; opacity: .55; }
[data-mode="essayist"] .labels text { fill: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid var(--rule); background: none; color: inherit; font: 800 14px/1 var(--sans); cursor: pointer; transition: transform .2s ease, background-color .2s ease; }
.chip:hover { transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: var(--on); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 7px; border-radius: 999px; font: 600 12px/1 var(--mono); }
.map figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.map-caption { color: var(--ink); }

/* Speculum */
.band { background: var(--band); color: var(--band-ink); }
.split { display: flex; flex-wrap: wrap; gap: 56px; padding-block: 88px; }
.spec-text, .arch { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; }
.spec-text { gap: 24px; }
.gold { color: #E3C27A; }
.ring { width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--gold); }
.display { font: 800 clamp(3rem, 6vw, 5.5rem)/.95 var(--sans); letter-spacing: -0.035em; }
.spec-body { font-size: 1.25rem; line-height: 1.5; color: var(--band-soft); max-width: 32em; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; max-width: 520px; background: var(--band-rule); border: 1px solid var(--band-rule); }
.metrics div { background: var(--band); padding: 18px 20px; }
.metrics dt { font: 400 12px var(--mono); color: var(--band-muted); }
.metrics dd { margin-top: 6px; font: 800 30px/1.1 var(--sans); }
.metrics dd.sm { font-size: 22px; }
.arch .label { font: 400 12px var(--mono); color: var(--band-muted); margin-bottom: 16px; }
.node { border: 1px solid var(--band-rule); border-radius: 14px; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.node span { font: 400 12px var(--mono); color: #E3C27A; }
.node b { font-size: 20px; }
.node small { font-size: 14px; color: var(--band-muted); }
.node.hl { border: 1.5px solid var(--gold); }
.gold-btn { background: var(--gold); border-color: var(--gold); color: #17150F; }
.link { width: 2px; height: 26px; margin-left: 32px; background: var(--gold); }
.shots { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 6vw, 88px); padding-bottom: 104px; }
.shot { flex: 0 1 280px; min-width: 0; container-type: inline-size; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.shot:nth-child(2) { margin-top: clamp(28px, 6vw, 64px); }
.phone { position: relative; width: 100%; padding: 3.2cqi; border-radius: 15cqi; background: #050506; box-shadow: 0 0 0 1.5px var(--phone-ring, var(--band-rule)), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 70px -30px rgba(0, 0, 0, .75); }
.phone::before { content: ""; position: absolute; top: 24%; right: -4px; width: 3px; height: 14%; border-radius: 0 2px 2px 0; background: var(--band-rule); }
.phone::after { content: ""; position: absolute; top: 5cqi; left: 50%; width: 3cqi; height: 3cqi; margin-left: -1.5cqi; border-radius: 50%; background: #050506; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.phone img { width: 100%; height: auto; border-radius: 11.8cqi; }
.shot figcaption { font: 400 12px var(--mono); letter-spacing: .04em; color: var(--shot-cap, #E3C27A); }

/* Estación */
.line-stripe { height: 10px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; font: 400 13px var(--mono); }
.crumbs a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--muted); }
.crumbs span[aria-hidden] { color: var(--muted); }
.crumbs [aria-current] { font-weight: 600; }
.st-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 72px; }
.st-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; font: 600 13px var(--mono); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--rule); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-service { color: #1D7A43; }
.st-building, .st-expanding { color: #8A5A00; }
.st-complete { color: #2A5FB0; }
.st-heritage { color: var(--muted); }
.st-name { font-size: clamp(4rem, 9vw, 8rem); line-height: .9; letter-spacing: -0.045em; }
@media (max-width: 560px) { .st-name { font-size: min(4rem, 12vw); overflow-wrap: break-word; } }
.st-lede { font-size: 1.5rem; line-height: 1.45; color: var(--ink-2); max-width: 24em; text-wrap: pretty; }
.st-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.st-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); font: 600 13px var(--mono); text-decoration: none; transition: transform .15s ease, background-color .15s ease; }
.st-link:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.st-link-icon { flex: none; }
.st-link.go { background: var(--c); border-color: var(--c); color: var(--on); }
.st-link.go:hover { background: color-mix(in srgb, var(--c) 88%, black); }
.facts { display: flex; flex-wrap: wrap; gap: 16px 28px; font: 400 13px var(--mono); }
.facts dt { color: var(--muted); }
.facts dd { margin-top: 4px; font-weight: 600; }
.st-shots { flex: 1 1 520px; min-width: 0; display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 4vw, 32px); --phone-ring: var(--rule); --shot-cap: var(--muted); }
.st-shots .shot { flex-basis: 250px; }
.st-logo { width: auto; height: 76px; }
.st-logo.st-wordmark { height: 44px; }

/* Capturas de apps web, en una ventana de navegador */
.st-screen { flex: 1 1 520px; min-width: 0; }
.st-hero:has(.st-screen) .st-name { font-size: clamp(3rem, 6.2vw, 6.5rem); }
.screen { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.screen figcaption { font: 400 12px/1.5 var(--mono); letter-spacing: .02em; color: var(--muted); }
.browser { border-radius: 12px; overflow: hidden; background: #05070B; box-shadow: 0 0 0 1.5px var(--rule), 0 40px 70px -30px rgba(0, 0, 0, .6); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #141A25; font: 400 12px var(--mono); color: #9CA3AF; }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2A3140; }
.browser-bar img { width: 18px; height: 18px; margin-left: 10px; padding: 2px; border-radius: 50%; background: #E8EEF6; }
.browser picture img { width: 100%; height: auto; }
.st-screens { display: grid; gap: 40px; max-width: 1040px; margin-top: 56px; }

/* Recorrido: diagrama de puerta de vagón */
.trip { border-block: 1px solid var(--rule); }
.trip .wrap { display: flex; flex-direction: column; gap: 22px; padding-block: 36px 40px; }
.route-head { font: 400 12px var(--mono); color: var(--muted); }
.route-head span { color: var(--ink); font-weight: 600; }
.route-track { position: relative; padding-right: 16px; }
.trip ol { list-style: none; padding: 0; display: flex; justify-content: space-between; gap: 16px; position: relative; }
.trip ol::before { content: ""; position: absolute; left: 8px; right: -10px; top: 11px; height: 8px; border-radius: 4px; background: var(--c); }
.trip ol::after { content: ""; position: absolute; right: -16px; top: 3px; width: 6px; height: 24px; border-radius: 2px; background: var(--c); }
.trip li { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.trip li:first-child { align-items: flex-start; text-align: left; }
.trip li:last-child { align-items: flex-end; text-align: right; }
.dot { position: relative; z-index: 1; width: 16px; height: 16px; margin-block: 7px 8px; border-radius: 50%; background: var(--paper); border: 3px solid var(--c); }
.here .dot { width: 30px; height: 30px; margin-block: 0 1px; border-width: 5px; }
.here .dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--c); transition: transform .4s cubic-bezier(.2, .8, .2, 1.5); }
.arriving .here .dot::after { transform: scale(0); }
.when { font: 400 12px var(--mono); color: var(--muted); }
.here .when { color: var(--ink); font-weight: 600; }
.trip li b, .trip li a { font-size: 1.125rem; font-weight: 800; }
.trip li a { text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.trip li a:hover { color: var(--muted); }
.train { position: absolute; left: 0; top: 0; z-index: 2; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--c); opacity: 0; transition: transform 1.8s cubic-bezier(.45, 0, .2, 1); }
@media (max-width: 640px) {
  .route-track { padding-right: 0; padding-bottom: 16px; }
  .trip ol { flex-direction: column; gap: 24px; padding-left: 44px; }
  .trip ol::before { left: 11px; right: auto; top: 8px; bottom: -10px; width: 8px; height: auto; }
  .trip ol::after { left: 4px; right: auto; top: auto; bottom: -16px; width: 22px; height: 6px; }
  .trip li, .trip li:first-child, .trip li:last-child { align-items: flex-start; gap: 2px; text-align: left; }
  .dot { position: absolute; left: -37px; top: 0; margin: 0; }
  .here .dot { left: -44px; top: -7px; margin: 0; }
}

.st-why { display: flex; flex-wrap: wrap; gap: 48px; }
.st-why h2 { flex: 1 1 280px; }
.st-why > div { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; font-size: 1.3rem; line-height: 1.6; }
.st-why > .ess { display: none; }
[data-mode="essayist"] .st-why > .ess { display: flex; }
.st-what { display: flex; flex-direction: column; gap: 28px; padding-bottom: 88px; }
.st-diagram { margin: 0 auto; padding-bottom: 72px; display: flex; flex-direction: column; gap: 14px; }
.st-diagram img { width: 100%; max-width: 960px; height: auto; }
.st-diagram figcaption { font: 400 12px/1.5 var(--mono); color: var(--muted); }
.st-versions { display: flex; flex-direction: column; gap: 28px; padding-bottom: 88px; }
.versions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px 32px; }
@media (min-width: 760px) { .versions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.versions li { position: relative; display: flex; flex-direction: column; gap: 12px; padding-top: 28px; border-top: 3px solid var(--c); }
.versions li::before { content: ""; position: absolute; top: -10px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 3px solid var(--c); box-sizing: border-box; }
.ver-head { display: flex; align-items: baseline; gap: 12px; margin: 0; font: 400 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ver-head b { font: 800 22px var(--sans); color: var(--ink); text-transform: none; }
.versions picture img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1.5px var(--rule), 0 24px 40px -24px rgba(0, 0, 0, .45); }
.versions h3 { margin: 6px 0 0; font-size: 20px; }
.versions li > p:last-child { margin: 0; color: var(--soft); line-height: 1.55; }
.features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.feature { border: 1px solid var(--rule); border-top: 6px solid var(--c); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.feature span { font: 400 12px var(--mono); color: var(--muted); }
.feature p { color: var(--soft); line-height: 1.55; }
.st-how { display: flex; flex-direction: column; gap: 32px; padding-block: 88px; }
.st-how .section-head { margin: 0; }
.st-how .meta { color: var(--band-muted); }
.nodes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 560px) { .nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.math { margin: 0; border: 1px solid var(--band-rule); border-radius: 14px; padding: 8px clamp(16px, 4vw, 40px) 24px; }
.math ol { list-style: none; padding: 0; margin: 0; counter-reset: eq; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); column-gap: 40px; }
.math li { counter-increment: eq; display: flex; align-items: center; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--band-rule); overflow-x: auto; }
.math li::after { content: "(" counter(eq) ")"; margin-left: auto; font: 400 12px var(--mono); color: var(--band-muted); }
.math math { margin: 0; font-size: 1.25rem; color: var(--band-ink); }
.math figcaption { margin-top: 18px; font-size: 15px; line-height: 1.55; color: var(--band-soft); max-width: 46em; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font: 400 13px var(--mono); }
.tags li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--band-rule); }
.st-notes { display: flex; flex-wrap: wrap; gap: 56px 64px; }
.st-notes > div { flex: 1 1 420px; min-width: 0; }
.st-notes h2 { margin-bottom: 28px; }
.log { list-style: none; padding: 0 0 0 22px; border-left: 4px solid var(--c); display: flex; flex-direction: column; gap: 26px; max-width: 720px; }
.log li { display: flex; flex-direction: column; gap: 4px; }
.log span { font: 400 12px var(--mono); color: var(--muted); }
.log b { font-size: 1.125rem; }
.learned { padding-left: 20px; display: flex; flex-direction: column; gap: 16px; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.learned li::marker { color: var(--c); }
.next-stop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1px; background: var(--rule); border-top: 1px solid var(--rule); }
.next-stop > * { display: flex; flex-direction: column; gap: 6px; padding: 32px var(--gutter); background: var(--paper); text-decoration: none; }
.next-stop span { font: 400 12px var(--mono); color: var(--muted); }
.next-stop b { font-size: 1.625rem; letter-spacing: -0.01em; }
.next-stop a:hover b { color: var(--muted); }
.next-stop .hop { padding: 1px 6px; border-radius: 4px; font-style: normal; font-weight: 600; }
/* Flechas laterales: la estación anterior y la siguiente, como bolitas del mapa */
.side-nav { display: none; }
@media (min-width: 1500px) {
  .side-nav { display: block; }
  .side-stack { position: fixed; top: 50%; z-index: 20; display: flex; flex-direction: column; gap: 14px; transform: translateY(-50%); }
  .side-stack.prev { left: 20px; align-items: flex-start; }
  .side-stack.next { right: 20px; align-items: flex-end; }
  .side { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
  .next .side { flex-direction: row-reverse; }
  .side-dot { display: grid; place-items: center; width: 48px; height: 48px; border: 4px solid var(--c); border-radius: 50%; background: var(--paper); font: 700 18px/1 var(--mono); transition: background .2s ease, color .2s ease, transform .2s ease; }
  .side-label { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .prev .side-label { transform: translateX(-6px); }
  .next .side-label { transform: translateX(6px); text-align: right; }
  .side-label small { font: 400 11px var(--mono); letter-spacing: .04em; color: var(--muted); }
  .side-label b { font-size: 1rem; }
  .side:hover .side-dot, .side:focus-visible .side-dot { background: var(--c); color: var(--on); transform: scale(1.08); }
  .side:hover .side-label, .side:focus-visible .side-label { opacity: 1; transform: none; }
}

/* Líneas */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 32px; }
h2 { font: 800 2.5rem/1.1 var(--sans); letter-spacing: -0.02em; }
[data-mode="essayist"] h2 { font-family: var(--serif); font-weight: 400; }
.meta { font: 400 13px var(--mono); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--paper); border-top: 6px solid var(--c); padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s ease, box-shadow .25s ease; }
.card:last-child:nth-child(4n + 1) { grid-column: 1 / -1; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(23, 21, 15, .10); position: relative; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .badge { min-width: 40px; height: 28px; font-size: 13px; }
h3 { font: 800 1.375rem/1.2 var(--sans); letter-spacing: -0.01em; }
.who { font-size: 15px; color: var(--soft); }
.story { font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); }
.route { font-style: italic; color: var(--muted); }
.stops { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stops li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px 10px; align-items: start; }
.stops li > i { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 3px solid var(--c); background: var(--paper); }
.stops small { font: 400 12px/1.5 var(--mono); color: var(--muted); }
/* El color de la línea mezclado con la tinta, para que el texto pequeño llegue a 4.5:1 */
.xfer-tag { font-weight: 600; color: color-mix(in srgb, var(--c) var(--mix), var(--ink)); }

/* Inauguraciones */
.board { background: var(--board); color: var(--board-ink); }
.board .meta { color: var(--board-muted); }
.table { display: flex; flex-direction: column; border-top: 1px solid var(--board-rule); }
.row { display: grid; grid-template-columns: minmax(84px, 120px) minmax(72px, 130px) minmax(0, 1fr) minmax(0, 210px); gap: 16px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--board-rule); }
.row.head { min-height: 44px; font: 400 12px var(--mono); color: var(--board-muted); }
.row .date { font: 600 15px var(--mono); color: #F5B841; }
.row .badge + .badge { margin-left: 4px; }
.row .name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--mono); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.s-service { color: #3FBF6F; }
.s-building, .s-expanding { color: #F5B841; }
.s-building i, .s-expanding i, .blink { animation: blink 1.4s ease-in-out infinite; }
.s-complete { color: #7DB4FF; }
.s-heritage { color: #A39D90; }
.s-special { color: #FF5A6E; }
.row.special { background: repeating-linear-gradient(135deg, rgba(200, 16, 46, .16) 0 14px, transparent 14px 28px); }
.board.on .row:not(.head) { animation: flap .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 55ms); transform-origin: top; }
@keyframes flap { from { opacity: 0; transform: perspective(600px) rotateX(-80deg); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 640px) {
  .row { grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px; padding-block: 10px; }
  .row.head span:nth-child(2), .row.head span:nth-child(4) { display: none; }
  .row > :nth-child(1) { grid-area: 1 / 1; }
  .row > :nth-child(2) { grid-area: 2 / 1; }
  .row > :nth-child(3) { grid-area: 1 / 2; }
  .row > :nth-child(4) { grid-area: 2 / 2; }
}

/* Sobre mí */
.about { display: flex; flex-wrap: wrap; gap: 48px; }
.about h2 { flex: 1 1 260px; }
.about > div { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; font-size: 1.25rem; line-height: 1.55; }
.soft { color: var(--soft); }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 999px; font: 600 14px var(--mono); text-decoration: none; }

/* Km 0 */
.ribbon-stripe { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); height: 10px; }
.km-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 72px; }
.km-name { font-size: clamp(3.4rem, 8vw, 7rem); line-height: .92; letter-spacing: -0.045em; text-wrap: balance; }
.plaque { flex: 0 1 420px; min-width: 0; margin-inline: auto; }
.plaque svg { width: 100%; height: auto; }
.plaque-bg { fill: var(--band); }
.rays line { stroke-width: 10; stroke-linecap: round; stroke-dasharray: 92; stroke-dashoffset: 92; animation: ray .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + .1s); }
.rays circle { fill: var(--band); stroke-width: 4; opacity: 0; animation: pop .35s ease forwards; animation-delay: calc(var(--i) * 70ms + .8s); }
.plaque-ring { fill: var(--paper); stroke: var(--gold); stroke-width: 8; }
.plaque-km { font: 600 22px var(--mono); letter-spacing: .2em; fill: var(--muted); }
.plaque-zero { font: 800 92px var(--sans); fill: var(--ink); }
.plaque-coords { font: 400 12px var(--mono); fill: var(--band-muted); }
.rays a { outline: none; transition: opacity .2s; }
.rays a line { transition: stroke-width .2s; }
.rays .hit { stroke: transparent; stroke-width: 36; stroke-dasharray: none; animation: none; }
.rays:has(a:is(:hover, :focus-visible)) a:not(:hover, :focus-visible) { opacity: .3; }
.rays a:is(:hover, :focus-visible) line:not(.hit) { stroke-width: 14; }
.rays a:focus-visible circle { stroke-width: 6; }
.ray-label { font: 600 12px var(--mono); fill: var(--paper); opacity: 0; pointer-events: none; transition: opacity .2s; }
.rays a:is(:hover, :focus-visible) .ray-label { opacity: 1; }
.plaque-coords { transition: opacity .2s; }
.plaque svg:has(.rays a:is(:hover, :focus-visible)) .plaque-coords { opacity: 0; }
@keyframes ray { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
.km-about { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 64px; }
.km-about > .eng, .km-about > .letter { flex: 1 1 520px; min-width: 0; }
[data-mode="engineer"] .km-about > .eng { display: flex; flex-direction: column; gap: 28px; }
.postcard { flex: 0 1 320px; min-width: 0; margin-inline: auto; padding: 12px 12px 16px; background: #FFFFFF; border-radius: 4px; box-shadow: 0 1px 0 var(--rule), 0 24px 48px -24px rgba(23, 21, 15, .45); transform: rotate(-2deg); transition: transform .3s ease; }
.postcard:hover { transform: rotate(0); }
.postcard img { width: 100%; height: auto; border-radius: 2px; }
.postcard figcaption { margin-top: 12px; font: 400 12px var(--mono); color: #5F594E; text-align: center; }
@media (min-width: 900px) { .postcard { position: sticky; top: 32px; } }
.sheet { flex: 2 1 560px; min-width: 0; border-top: 1px solid var(--rule); }
.sheet div { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 4px 24px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.sheet dt { font: 400 12px/1.9 var(--mono); color: var(--muted); }
.sheet dd { font-size: 1.125rem; font-weight: 600; }
@media (max-width: 560px) { .sheet div { grid-template-columns: minmax(0, 1fr); } }
[data-mode="essayist"] .km-about > .letter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 40rem; }
.letter p { font-size: 1.3rem; line-height: 1.65; text-wrap: pretty; }
.letter > p:first-of-type::first-letter { float: left; font-size: 4.2em; line-height: .85; padding: 6px 10px 0 0; color: var(--gold-text); }
.motto { margin-top: 16px; padding: 28px 0 0; border-top: 1px solid var(--rule); }
.motto p { font-style: italic; font-size: 1.75rem; line-height: 1.3; }
.motto footer { margin-top: 10px; font: 400 13px var(--mono); color: var(--muted); }
.km-intel h2 { color: var(--band-ink); }
.km-intel-grid { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.km-log { flex: 3 1 420px; --c: var(--gold); }
.km-log span { color: var(--band-muted); }
.km-log b { font-weight: 600; color: var(--band-ink); }
.km-transfers { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.km-transfers .label { font: 400 12px var(--mono); color: var(--band-muted); }
.km-transfers .node span { display: flex; align-items: center; gap: 10px; font: 800 18px var(--sans); color: var(--band-ink); }
.km-transfers .badge { font-style: normal; }
.km-transfers .node small { font-size: 15px; line-height: 1.5; }
.km-story { max-width: 40rem; margin-inline: auto; flex-direction: column; gap: 20px; }
[data-mode="essayist"] .km-story { display: flex; }
.km-story p { font-size: 1.25rem; line-height: 1.65; color: var(--band-soft); }
.now-rows { border-top: 1px solid var(--board-rule); }
.now-rows div { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--board-rule); }
.now-rows div[hidden] { display: none; }
.now-rows dt { font: 600 13px var(--mono); color: #F5B841; }
.now-rows dt.red { color: #FF5A6E; }
.now-rows dd { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.now-rows dd a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: #F5B841; }
@media (max-width: 560px) { .now-rows div { grid-template-columns: minmax(0, 1fr); } }
.tags-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.luggage { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 22px 30px; border: 1px solid var(--rule); border-left: 8px solid var(--c); border-radius: 6px 18px 18px 6px; transition: transform .25s ease; }
.luggage:hover { transform: rotate(-1deg) translateY(-2px); }
.luggage-label { display: flex; align-items: center; gap: 10px; font: 600 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
.luggage-label i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--c); }
.luggage ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 1.125rem; font-weight: 800; }
.luggage li:not(:last-child)::after { content: "·"; margin-left: 10px; color: var(--c); }
.luggage-note { margin-top: auto; font-size: 15px; color: var(--soft); }
[data-mode="essayist"] .luggage ul { font-weight: 400; font-style: italic; }
.km-contact { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.km-contact h2 { flex: 1 1 260px; }
.km-contact > div { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; font-size: 1.25rem; }
.mail { display: flex; flex-wrap: wrap; gap: 12px; }
.mail .btn { font-family: var(--mono); font-weight: 600; }
.mail-plain { font: 600 1.125rem var(--mono); }
.links .link-icon { flex: none; margin-right: 8px; }
/* Logo oficial de LinkedIn (PNG con transparencia) como máscara, en el color del texto. */
.link-icon.li { flex: none; width: 19px; height: 18px; background: currentColor; -webkit-mask: url(/assets/img/km0/linkedin-in.png) center / contain no-repeat; mask: url(/assets/img/km0/linkedin-in.png) center / contain no-repeat; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.about-cta { font-weight: 800; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.map-origin { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.map-origin:hover { color: var(--ink); }

/* Barra de estado */
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; padding: 14px var(--gutter); border-top: 1px solid var(--rule); font: 400 12px/1.5 var(--mono); color: var(--soft); }
.bar b { font-weight: 400; color: var(--muted); }
.bar b.red { color: #C8102E; }
@media (prefers-color-scheme: dark) { .bar b.red { color: #FF5A6E; } }
.bar a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.bar a:hover { color: var(--muted); }
.eq-wrap { display: inline-flex; align-items: center; gap: 8px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 12px; background: #C8102E; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { background: var(--ink); animation-delay: .2s; }
.eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* Día de partido */
.match-banner { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; padding: 8px var(--gutter); background: repeating-linear-gradient(135deg, #C8102E 0 18px, #0A0A0A 18px 36px); font: 600 13px/1.4 var(--mono); letter-spacing: 0.04em; color: #FFFFFF; }
.match-banner span { background: #0A0A0A; padding: 4px 10px; border-radius: 4px; }

/* 404 */
.nf { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 80px; min-height: calc(100svh - 160px); }
.nf-text, .nf-side { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.nf h1 { font-size: clamp(3rem, 7vw, 5.25rem); line-height: .95; }
.alert { color: #B4281A; }
.alert i { width: 9px; height: 9px; border-radius: 50%; background: #D3311F; }
.sign { background: #17150F; color: #F3EFE6; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.sign-head { display: flex; align-items: center; gap: 16px; }
.sign-head span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sign-head b { font-size: 24px; }
.sign-head small { font: 400 13px var(--mono); color: #A39D90; }
.sign-code { display: inline-flex; align-items: center; height: 56px; padding: 0 18px; border-radius: 12px; background: #D3311F; color: #FFFFFF; font: 600 26px var(--mono); }
.sign svg { width: 100%; height: auto; }
.sign-foot { display: flex; justify-content: space-between; font: 400 12px var(--mono); color: #A39D90; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--rule); font: 400 13px/1.4 var(--mono); color: var(--soft); }
.notice i { flex: none; width: 34px; height: 12px; border-radius: 3px; background: repeating-linear-gradient(90deg, #C8102E 0 6px, #0A0A0A 6px 12px); }
@media (prefers-color-scheme: dark) {
  .alert { color: #FF7A66; }
  .st-service { color: #3FBF6F; }
  .st-building, .st-expanding { color: #F5B841; }
  .st-complete { color: #7DB4FF; }
}

/* Transiciones entre páginas: se abren las puertas del vagón y el título y los teléfonos viajan */
@view-transition { navigation: auto; types: doors; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
html:active-view-transition-type(doors)::view-transition-old(root) { animation: .55s ease-in both vt-dim; }
html:active-view-transition-type(doors)::view-transition-new(root) { animation: .55s cubic-bezier(.2, .8, .2, 1) both vt-doors; }
@keyframes vt-doors { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes vt-dim { to { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .trains, .stations .pulse, .train { display: none; }
  .board.on .row, .blink, .s-building i, .s-expanding i, .eq i { animation: none; }
  .btn, .chip, .card, .ln, .luggage, .postcard { transition: none; }
  .rays line, .rays circle { animation: none; stroke-dashoffset: 0; opacity: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Recado de la L2 ("estrellita"). */
.estrellita { margin: auto; max-width: calc(100vw - 32px); border: 0; padding: 40px 48px 32px; border-radius: 20px; background: var(--paper); color: #E5559B; text-align: center; box-shadow: 0 0 0 2px #E5559B, 0 30px 80px -20px rgba(229, 85, 155, .55); overflow: visible; }
.estrellita::backdrop { background: rgba(23, 21, 15, .55); backdrop-filter: blur(3px); }
.estrellita svg { display: block; margin: 0 auto 18px; }
.estrellita p { margin: 0; font: 400 clamp(1.6rem, 4vw, 2.2rem)/1.2 var(--serif, Georgia, serif); font-style: italic; color: var(--ink); }
.estrellita form { position: absolute; top: 10px; right: 12px; }
.estrellita button { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px; }
.estrellita .twinkle { position: absolute; font-style: normal; font-size: 22px; color: #F5B841; }
.estrellita .twinkle:nth-of-type(1) { top: -14px; left: 18px; }
.estrellita .twinkle:nth-of-type(2) { top: 30%; right: -14px; font-size: 16px; }
.estrellita .twinkle:nth-of-type(3) { bottom: -12px; left: 40%; font-size: 18px; }
.estrellita[open] svg { animation: latido 1.2s ease-in-out infinite; }
.estrellita[open] .twinkle { animation: titila 1.6s ease-in-out infinite alternate; }
.estrellita .twinkle:nth-of-type(2) { animation-delay: .5s; }
.estrellita .twinkle:nth-of-type(3) { animation-delay: 1s; }
@keyframes latido { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@keyframes titila { from { opacity: .25; transform: scale(.8); } to { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .estrellita[open] svg, .estrellita[open] .twinkle { animation: none; } }
