/* ==========================================================================
   Datatón INEGI 2026 · Estrategia CoDi — sistema visual
   ========================================================================== */
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('../fonts/sourcesans3.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('../fonts/sourcesans3-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --night: #071629;
  --night-2: #0A1D35;
  --deep: #102D4F;
  --deep-2: #17395F;
  --gold: #D6AC55;
  --gold-soft: rgba(214, 172, 85, .14);
  --sky: #62C8F5;
  --paper: #F6F8FC;
  --paper-2: #EBF0F7;
  --ink: #0D2137;
  --ink-2: #435770;
  --on-night: #EAF0F8;
  --on-night-2: #A9BBD1;
  --on-night-3: #91A6BF;
  --line-night: rgba(169, 187, 209, .16);
  --line-paper: rgba(13, 33, 55, .12);
  /* categóricas validadas (dataviz validator) */
  --c1: #3A9BDC; --c2: #BE8A28; --c3: #9474E0; --c4: #2FA98A; --c5: #D9604C;
  --c1l: #1F7FC4; --c2l: #B07C1E; --c3l: #7A5BD0; --c4l: #178F72; --c5l: #C24A36;

  --f-head: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --t-hero: clamp(2.35rem, 1.3rem + 3.4vw, 4.6rem);
  --t-h2: clamp(2rem, 1.3rem + 2.8vw, 3.75rem);
  --t-h3: clamp(1.25rem, 1.05rem + .8vw, 1.75rem);
  --t-lead: clamp(1.125rem, 1.02rem + .45vw, 1.375rem);
  --t-body: clamp(1.0625rem, 1rem + .2vw, 1.1875rem);
  --t-small: .9375rem;
  --t-micro: .8125rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --r-s: 6px; --r-m: 12px; --r-l: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html, body { max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
/* body con clip: evita el desbordamiento horizontal sin crear un contenedor de scroll que anule position: sticky */
@supports (overflow-x: clip) { body { overflow-x: clip; } }
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--on-night);
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 var(--s4); max-width: 68ch; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.num, .tab { font-variant-numeric: tabular-nums lining-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- navegación ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 56px;
  display: flex; align-items: center; gap: var(--s5); padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(7, 22, 41, .92), rgba(7, 22, 41, .72));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-night);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; font-size: .95rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand svg { flex: none; }
.brand small { font-weight: 500; color: var(--on-night-3); font-size: .8rem; }
.toc { display: flex; gap: 2px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.toc a {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 18px;
  font-family: var(--f-head); font-size: .8rem; font-weight: 600; color: var(--on-night-2); text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.toc a:hover { color: var(--on-night); background: rgba(255,255,255,.06); }
.toc a.active { background: var(--gold); color: var(--night); }
.toc a .lbl { display: none; }
.toc-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line-night); border-radius: 18px; height: 36px; padding: 0 14px; font-family: var(--f-head); font-weight: 600; font-size: .85rem; cursor: pointer; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--sky), var(--gold)); }

/* ---------- estructura ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section.chapter { position: relative; padding: var(--s10) 0 var(--s9); scroll-margin-top: 56px; }
.paper { background: var(--paper); color: var(--ink); }
.paper .muted, .paper .note { color: var(--ink-2); }
.deep { background: var(--deep); }
.muted { color: var(--on-night-2); }

.chapter-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); margin-bottom: var(--s8); }
.chapter-no { display: flex; align-items: center; gap: var(--s3); font-family: var(--f-head); font-weight: 600; font-size: var(--t-small); color: var(--gold); }
.chapter-no::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.paper .chapter-no { color: #7E5A14; }
.chapter-head h2 { font-size: var(--t-h2); max-width: 18ch; font-weight: 700; }
.question { font-family: var(--f-body); font-style: italic; font-size: var(--t-lead); color: var(--on-night-2); max-width: 52ch; margin: 0; }
.paper .question { color: var(--ink-2); }
.lead { font-size: var(--t-lead); line-height: 1.55; max-width: 60ch; }

.grid-2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--s6); align-items: start; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-4 { grid-column: span 4; } .col-8 { grid-column: span 8; } .col-12 { grid-column: 1 / -1; }

/* ---------- figura de datos ---------- */
.figure { margin: 0; }
.fig-title { font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.005em; margin: 0 0 4px; }
.fig-sub { font-size: var(--t-small); color: var(--on-night-2); margin: 0 0 var(--s4); max-width: 70ch; }
.paper .fig-sub { color: var(--ink-2); }
.chart { width: 100%; height: 380px; }
.chart.tall { height: 520px; }
.chart.short { height: 300px; }
.fig-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: var(--s3); font-size: var(--t-micro); color: var(--on-night-3); line-height: 1.45; }
.paper .fig-foot { color: #5A6B80; }
.fig-foot b { font-weight: 600; color: var(--on-night-2); }
.paper .fig-foot b { color: var(--ink-2); }
.denom { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px dashed rgba(214,172,85,.55); color: var(--gold); font-size: var(--t-micro); font-weight: 600; }
.paper .denom { color: #8A6316; border-color: rgba(138, 99, 22, .5); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-toggle { margin-top: var(--s3); }
.table-toggle summary { cursor: pointer; font-size: var(--t-micro); font-weight: 600; color: var(--on-night-2); }
.paper .table-toggle summary { color: var(--ink-2); }
table.data { border-collapse: collapse; font-size: var(--t-micro); margin-top: var(--s3); min-width: 100%; }
table.data th, table.data td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line-night); white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper table.data th, .paper table.data td { border-color: var(--line-paper); }
table.data th:first-child, table.data td:first-child { text-align: left; }

/* ---------- controles segmentados ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line-night); }
.paper .seg { background: #fff; border-color: var(--line-paper); }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 8px 16px; min-height: 40px; border-radius: 999px;
  font-family: var(--f-head); font-weight: 600; font-size: .85rem; color: var(--on-night-2);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.paper .seg button { color: var(--ink-2); }
.seg button:hover { color: var(--on-night); }
.paper .seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--gold); color: var(--night); }
.controls { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; margin-bottom: var(--s5); }
.range { display: flex; align-items: center; gap: 12px; font-family: var(--f-head); font-weight: 600; font-size: .9rem; }
.range input[type=range] { width: min(280px, 60vw); accent-color: var(--gold); }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 96px 0 64px; overflow: hidden; isolation: isolate; }
#netCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(1200px 600px at 78% 40%, rgba(16,45,79,.0), rgba(7,22,41,.55) 60%, var(--night) 100%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s8); align-items: center; }
.kicker { font-family: var(--f-head); font-weight: 600; font-size: var(--t-small); color: var(--on-night-2); margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.kicker { flex-direction: column; } .kicker span + span { color: var(--on-night-3); font-weight: 500; }
.hero h1 { font-size: var(--t-hero); font-weight: 800; letter-spacing: -0.035em; line-height: 1; max-width: 15ch; }
.hero h1 .gold { color: var(--gold); }
.hero .lead { margin-top: var(--s5); color: var(--on-night-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-family: var(--f-head); font-weight: 700; font-size: .92rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #E3BC69; }
.btn-ghost { border-color: var(--line-night); color: var(--on-night); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.team { margin-top: var(--s7); font-size: var(--t-micro); color: var(--on-night-3); line-height: 1.6; max-width: 60ch; }

.pesos { background: rgba(10, 29, 53, .78); border: 1px solid var(--line-night); border-radius: var(--r-l); padding: var(--s6); backdrop-filter: blur(6px); }
.pesos-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.pesos-big { font-family: var(--f-head); font-weight: 800; font-size: clamp(3.25rem, 2.4rem + 3vw, 5.25rem); white-space: nowrap; line-height: .9; letter-spacing: -0.04em; color: var(--gold); font-variant-numeric: tabular-nums; }
.pesos-big small { font-size: .38em; letter-spacing: 0; margin-left: 4px; color: var(--on-night-2); font-weight: 600; }
.pesos-year { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; padding: 4px 10px; border: 1px solid var(--line-night); border-radius: 999px; color: var(--on-night); font-variant-numeric: tabular-nums; }
.coins { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; margin: var(--s4) 0; }
.coin { aspect-ratio: 1; border-radius: 2px; background: rgba(169,187,209,.14); transition: background .35s var(--ease), transform .35s var(--ease); }
.coin.on { background: var(--gold); }
.coin.half { background: linear-gradient(90deg, var(--gold) var(--fill, 50%), rgba(169,187,209,.14) var(--fill, 50%)); }
.pesos-cap { font-size: var(--t-small); color: var(--on-night-2); margin: 0 0 var(--s4); }
.pesos-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line-night); }
.stat-k { font-size: var(--t-micro); color: var(--on-night-3); }
.stat-v { font-family: var(--f-head); font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.scrub { width: 100%; margin-top: var(--s4); accent-color: var(--gold); }
.scrub-row { display: flex; justify-content: space-between; font-size: var(--t-micro); color: var(--on-night-3); font-variant-numeric: tabular-nums; }
.play { background: none; border: 1px solid var(--line-night); border-radius: 999px; min-height: 36px; padding: 0 14px; font-family: var(--f-head); font-weight: 600; font-size: .8rem; cursor: pointer; color: var(--on-night-2); }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-size: var(--t-micro); color: var(--on-night-3); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scroll-cue i { width: 1px; height: 32px; background: linear-gradient(var(--gold), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Sección 1: contraste pandemia ---------- */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s5); align-items: end; padding: var(--s6) 0; border-top: 1px solid var(--line-night); border-bottom: 1px solid var(--line-night); margin: var(--s7) 0; }
.versus .v { font-family: var(--f-head); font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 6.5rem); letter-spacing: -0.04em; line-height: .9; font-variant-numeric: tabular-nums; }
.versus .v.neg { color: #EE8B7B; }
.versus .v.pos { color: var(--sky); }
.versus .k { font-size: var(--t-small); color: var(--on-night-2); margin-top: var(--s2); }
.versus .mid { font-family: var(--f-head); font-weight: 700; font-size: 1rem; color: var(--on-night-3); align-self: center; text-align: center; }
.insight { border-left: 2px solid var(--gold); padding: 4px 0 4px var(--s5); margin: var(--s5) 0; }
.insight p { margin: 0; font-size: var(--t-lead); line-height: 1.5; }
.paper .insight { border-color: #B07C1E; }

/* ---------- transiciones narrativas ---------- */
.bridge { padding: var(--s9) 0; text-align: left; position: relative; }
.bridge p { font-family: var(--f-head); font-weight: 600; font-size: clamp(1.4rem, 1rem + 1.8vw, 2.4rem); line-height: 1.25; letter-spacing: -0.02em; max-width: 30ch; margin: 0; color: var(--on-night); }
.bridge p .dim { color: var(--on-night-3); }
.bridge svg.thread { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); width: min(38vw, 420px); height: 120px; opacity: .9; }

/* ---------- Sección 2: mapa ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s6); align-items: start; }
.map-box { position: relative; border: 1px solid var(--line-night); border-radius: var(--r-l); background: radial-gradient(800px 400px at 40% 30%, rgba(23,57,95,.55), rgba(10,29,53,.4)); padding: var(--s4); }
.map-readout { position: absolute; left: var(--s6); bottom: var(--s6); pointer-events: none; max-width: 260px; }
.map-readout .k { font-size: var(--t-micro); color: var(--on-night-2); }
.map-readout .v { font-family: var(--f-head); font-weight: 800; font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rank { list-style: none; margin: 0; padding: 0; font-size: var(--t-small); }
.rank li { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-night); cursor: default; }
.rank li .bar { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: var(--sky); transform-origin: 0 50%; opacity: .75; }
.rank li .i { color: var(--on-night-3); font-variant-numeric: tabular-nums; font-size: var(--t-micro); }
.rank li .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.rank-split { font-family: var(--f-head); font-weight: 600; font-size: var(--t-micro); color: var(--on-night-3); padding: 12px 0 4px; }
.panel-title { font-family: var(--f-head); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }

/* ---------- Sección 3: lente ---------- */
.lens { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); align-items: start; }
.lens-read { position: sticky; top: 96px; }
.lens-big { font-family: var(--f-head); font-weight: 800; font-size: clamp(3.5rem, 2.4rem + 4vw, 6rem); letter-spacing: -0.04em; line-height: .9; color: var(--ink); font-variant-numeric: tabular-nums; }
.lens-big small { font-size: .35em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.lens-meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin: var(--s5) 0; padding: var(--s4) 0; border-top: 1px solid var(--line-paper); border-bottom: 1px solid var(--line-paper); }
.lens-meta .stat-k { color: var(--ink-2); }
.lens-meta .stat-v { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-micro); margin-bottom: var(--s3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 18px; border-radius: 1px; }
.legend i.dot { border-radius: 50%; }
.hint { font-size: var(--t-micro); color: var(--on-night-3); }
.paper .hint { color: #5A6B80; }

/* ---------- Sección 4 ---------- */
.goods-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s4); }
.callouts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s5); margin-top: var(--s7); }
.callout { padding-top: var(--s4); border-top: 2px solid var(--ink); }
.callout .v { font-family: var(--f-head); font-weight: 800; font-size: 2.4rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.callout p { font-size: var(--t-small); color: var(--ink-2); margin: var(--s2) 0 0; }

/* ---------- Sección 5 ---------- */
.turn { background: linear-gradient(180deg, var(--night) 0%, #0B1A2E 100%); }
.split-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s6); }
.steps-manual { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: var(--s4) 0; }
.steps-manual span { font-size: var(--t-small); padding: 8px 12px; border-radius: var(--r-s); background: rgba(255,255,255,.05); border: 1px solid var(--line-night); }
.steps-manual b { color: var(--on-night-3); font-weight: 400; }
.compare-box { border: 1px solid var(--line-night); border-radius: var(--r-l); padding: var(--s6); background: rgba(10,29,53,.6); }

/* ---------- Sección 6 ---------- */
.explorer { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s6); align-items: start; }
.lens-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 96px; }
.lens-list button {
  text-align: left; border: 1px solid transparent; background: none; border-radius: var(--r-m); padding: 12px 14px; cursor: pointer;
  display: grid; gap: 2px; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lens-list button b { font-family: var(--f-head); font-weight: 700; font-size: .95rem; }
.lens-list button span { font-size: var(--t-micro); color: var(--on-night-3); }
.lens-list button:hover { background: rgba(255,255,255,.04); }
.lens-list button[aria-selected="true"] { background: rgba(214,172,85,.1); border-color: rgba(214,172,85,.45); }
.lens-list button[aria-selected="true"] b { color: var(--gold); }
.view-text { margin-top: var(--s5); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
.view-text .tag { font-family: var(--f-head); font-weight: 700; font-size: var(--t-micro); color: var(--gold); margin-bottom: 4px; }
.region-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: var(--s4); }
.region-strip div { padding: 10px 12px; border-radius: var(--r-s); background: rgba(255,255,255,.04); border-top: 2px solid var(--rc, var(--on-night-3)); }
.region-strip .k { font-size: var(--t-micro); color: var(--on-night-2); }
.region-strip .v { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.takeaway { margin-top: var(--s8); padding: var(--s6); border-radius: var(--r-l); background: var(--deep); display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: center; }
.takeaway p { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem); line-height: 1.35; letter-spacing: -0.01em; max-width: 52ch; }

/* ---------- Sección 7: CoDi ---------- */
.codi-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s8); align-items: center; }
.rail { position: relative; margin: var(--s6) 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
.rail .node { position: relative; padding: 52px 12px 0 0; }
.rail .node::before { content: ""; position: absolute; left: 0; top: 16px; width: 16px; height: 16px; border-radius: 50%; background: var(--night); border: 2px solid var(--gold); }
.rail::before { content: ""; position: absolute; left: 8px; right: 0; top: 23px; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(98,200,245,.7)); }
.rail .node b { display: block; font-family: var(--f-head); font-size: .95rem; margin-bottom: 4px; }
.rail .node span { font-size: var(--t-small); color: var(--on-night-2); display: block; line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s4); }
.fact { padding: var(--s5); border: 1px solid var(--line-night); border-radius: var(--r-m); }
.fact .v { font-family: var(--f-head); font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact .k { font-size: var(--t-small); color: var(--on-night-2); margin-top: var(--s2); line-height: 1.4; }
.fact .u { display: block; margin-top: var(--s3); font-size: var(--t-micro); color: var(--on-night-3); }
.gap-viz { margin-top: var(--s7); }
.gap-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 70px; gap: var(--s4); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-night); }
.gap-row .lbl { font-weight: 600; font-size: var(--t-small); }
.gap-row .lbl small { display: block; font-weight: 400; color: var(--on-night-3); font-size: var(--t-micro); }
.gap-track { position: relative; height: 14px; border-radius: 7px; background: rgba(255,255,255,.06); overflow: hidden; }
.gap-fill { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: var(--sky); width: 0; transition: width 1.1s var(--ease); }
.gap-row.weak .gap-fill { background: var(--gold); }
.gap-row .val { font-family: var(--f-head); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* teléfono demo */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: center; margin-top: var(--s9); padding: var(--s7); border-radius: 28px; background: radial-gradient(600px 400px at 70% 50%, rgba(98,200,245,.12), transparent 70%), var(--deep); border: 1px solid var(--line-night); }
.demo-steps { list-style: none; padding: 0; margin: var(--s5) 0 0; counter-reset: st; }
.demo-steps li { counter-increment: st; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 12px 0; color: var(--on-night-3); transition: color .3s var(--ease); border-bottom: 1px solid var(--line-night); }
.demo-steps li::before { content: counter(st); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: .8rem; border: 1px solid var(--line-night); }
.demo-steps li.on { color: var(--on-night); }
.demo-steps li.on::before { background: var(--gold); color: var(--night); border-color: var(--gold); }
.disclaimer { display: inline-flex; gap: 10px; align-items: flex-start; font-size: var(--t-micro); color: var(--on-night-2); padding: 10px 14px; border-radius: var(--r-m); background: rgba(214,172,85,.1); border: 1px solid rgba(214,172,85,.35); margin-top: var(--s5); max-width: 52ch; }
.phone-stage { display: flex; justify-content: center; }
.phone { position: relative; width: 300px; height: 610px; border-radius: 44px; padding: 12px; background: linear-gradient(160deg, #1f3553, #0b1a2e); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 12px; background: #050d18; z-index: 3; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #F7F9FC; color: #0D2137; }
.scr { position: absolute; inset: 0; padding: 56px 18px 30px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s; }
.scr.on { opacity: 1; visibility: visible; transform: none; }
.scr h4 { font-family: var(--f-head); font-size: 1rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.scr .sm { font-size: .78rem; color: #52657C; line-height: 1.4; }
.shop-total { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #E1E7EF; margin: 12px 0; font-size: .85rem; }
.shop-total b { font-family: var(--f-head); }
.pm { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #fff; border: 1.5px solid #E1E7EF; margin-bottom: 8px; font-size: .84rem; cursor: pointer; text-align: left; width: 100%; }
.pm .rd { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9AA8BA; flex: none; }
.pm.sel { border-color: #102D4F; box-shadow: 0 0 0 3px rgba(16,45,79,.08); }
.pm.sel .rd { border: 5px solid #102D4F; }
.pm .tagn { margin-left: auto; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #D6AC55; color: #071629; }
.pm-info { font-size: .74rem; color: #3D516A; background: #EEF3F9; border-radius: 10px; padding: 10px 12px; margin: 2px 0 10px; line-height: 1.4; }
.phone-btn { margin-top: auto; width: 100%; min-height: 46px; border-radius: 12px; border: 0; background: #102D4F; color: #fff; font-family: var(--f-head); font-weight: 700; font-size: .9rem; cursor: pointer; }
.phone-btn.gold { background: #D6AC55; color: #071629; }
.phone-btn:disabled { opacity: .45; cursor: not-allowed; }
.qr-wrap { display: grid; place-items: center; margin: 14px 0 8px; }
.qr-wrap svg { width: 168px; height: 168px; background: #fff; padding: 10px; border-radius: 14px; border: 1px solid #E1E7EF; }
.timer { text-align: center; font-family: var(--f-head); font-weight: 600; font-size: .8rem; color: #102D4F; }
.bank-top { margin: -56px -18px 12px; padding: 56px 18px 18px; background: #102D4F; color: #fff; }
.bank-top .sm { color: #A9BBD1; }
.req { background: #fff; border: 1px solid #E1E7EF; border-radius: 14px; padding: 14px; font-size: .82rem; }
.req div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #E1E7EF; }
.req div:last-child { border-bottom: 0; }
.pin { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.pin i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #102D4F; transition: background .2s; }
.pin i.f { background: #102D4F; }
.ok-mark { display: grid; place-items: center; margin: 24px 0 12px; }
.ok-mark circle { stroke-dasharray: 210; stroke-dashoffset: 210; }
.ok-mark path { stroke-dasharray: 60; stroke-dashoffset: 60; }
.scr.on .ok-mark circle { animation: draw .7s .1s var(--ease) forwards; }
.scr.on .ok-mark path { animation: draw .45s .65s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.illus { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: .7rem; color: #56677D; }

/* ---------- Sección 8: logit ---------- */
.model-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line-paper); margin-bottom: var(--s7); }
.model-strip div { padding: var(--s4) var(--s4) var(--s4) 0; }
.model-strip div + div { padding-left: var(--s4); border-left: 1px solid var(--line-paper); }
.model-strip .v { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.model-strip .k { font-size: var(--t-small); color: var(--ink-2); }
.coef-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); align-items: start; }
.coef svg text { font-family: var(--f-body); }
.coef .row { cursor: pointer; }
.coef .row:focus { outline: none; }
.coef .row:focus-visible .hit { stroke: #B07C1E; stroke-width: 2; }
.coef-detail { position: sticky; top: 96px; padding: var(--s6); border-radius: var(--r-l); background: #fff; border: 1px solid var(--line-paper); }
.coef-detail .me { font-family: var(--f-head); font-weight: 800; font-size: 3rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.coef-detail h3 { font-size: 1.1rem; margin-bottom: var(--s3); line-height: 1.25; }
.coef-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--t-small); margin: var(--s4) 0; }
.coef-detail dt { color: var(--ink-2); }
.coef-detail dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.caution { font-size: var(--t-small); padding: 12px 14px; border-radius: var(--r-m); background: #FBF4E4; border: 1px solid rgba(176,124,30,.45); color: #4B3A12; }
.method { margin-top: var(--s7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); font-size: var(--t-small); color: var(--ink-2); }
.method h4 { font-size: .95rem; color: var(--ink); margin-bottom: 6px; }
.method p { font-size: var(--t-small); }

/* ---------- Sección 9: propuesta ---------- */
.proposal { background: radial-gradient(1000px 500px at 80% 0%, rgba(214,172,85,.12), transparent 60%), var(--night); }
.motto { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.2rem, 1.2rem + 4.2vw, 5.25rem); line-height: .98; letter-spacing: -0.035em; max-width: 16ch; }
.motto em { font-style: normal; color: var(--gold); }
.goal { display: flex; flex-wrap: wrap; gap: var(--s5); align-items: baseline; margin: var(--s6) 0 var(--s8); padding: var(--s5) 0; border-top: 1px solid var(--line-night); border-bottom: 1px solid var(--line-night); }
.goal .v { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.4rem, 1.8rem + 2.4vw, 4rem); letter-spacing: -0.03em; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1; }
.goal p { margin: 0; max-width: 46ch; color: var(--on-night-2); }
.axes-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s3); margin-bottom: var(--s6); }
.axes-tabs button { text-align: left; padding: var(--s5); border-radius: var(--r-l); border: 1px solid var(--line-night); background: rgba(255,255,255,.02); cursor: pointer; display: grid; gap: 6px; transition: background .25s var(--ease), border-color .25s var(--ease); }
.axes-tabs button .ax { font-family: var(--f-head); font-weight: 600; font-size: var(--t-micro); color: var(--on-night-3); }
.axes-tabs button b { font-family: var(--f-head); font-size: 1.35rem; letter-spacing: -0.02em; }
.axes-tabs button span.who { font-size: var(--t-small); color: var(--on-night-2); }
.axes-tabs button[aria-selected="true"] { background: var(--gold-soft); border-color: var(--gold); }
.axes-tabs button[aria-selected="true"] .ax { color: var(--gold); }
.axis-panel { display: none; }
.axis-panel.on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: start; animation: fadeIn .5s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.axis-panel h3 { font-size: var(--t-h3); margin-bottom: var(--s3); }
.checks { list-style: none; padding: 0; margin: var(--s4) 0; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-night); font-size: var(--t-small); }
.checks li svg { margin-top: 3px; }
.proposed { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-head); font-weight: 700; font-size: var(--t-micro); color: var(--night); background: var(--gold); padding: 4px 10px; border-radius: 999px; }
.journey { display: grid; gap: 0; position: relative; }
.journey button { display: grid; grid-template-columns: 40px 1fr; gap: 14px; text-align: left; background: none; border: 0; padding: 12px 0; cursor: pointer; position: relative; }
.journey button .dot { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-night); display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: .85rem; color: var(--on-night-3); background: var(--night); position: relative; z-index: 1; transition: all .3s var(--ease); }
.journey::before { content: ""; position: absolute; left: 19.5px; top: 24px; bottom: 24px; width: 1px; background: var(--line-night); }
.journey .fill { position: absolute; left: 19px; top: 24px; width: 2px; background: var(--gold); height: 0; transition: height .5s var(--ease); }
.journey button b { font-family: var(--f-head); font-size: .98rem; display: block; color: var(--on-night-2); transition: color .3s; }
.journey button span { font-size: var(--t-small); color: var(--on-night-3); display: none; line-height: 1.45; margin-top: 4px; }
.journey button.done .dot { background: var(--gold); color: var(--night); border-color: var(--gold); }
.journey button.cur b { color: var(--on-night); }
.journey button.cur span { display: block; }
.mock { border-radius: 26px; background: #F7F9FC; color: #0D2137; padding: 20px; max-width: 360px; margin: 0 auto; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.mock-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mock-h b { font-family: var(--f-head); font-size: .95rem; }
.mock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.mock-grid div { aspect-ratio: 1; border-radius: 12px; background: #fff; border: 1px solid #E1E7EF; display: grid; place-items: center; font-size: .72rem; color: #52657C; text-align: center; padding: 4px; }
.mock-grid div.codi { background: #102D4F; color: #fff; border: 2px solid #D6AC55; font-weight: 700; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid #E1E7EF; border-radius: 12px; margin-bottom: 8px; font-size: .8rem; }
.toggle { width: 36px; height: 20px; border-radius: 10px; background: #102D4F; position: relative; }
.toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #D6AC55; }
.seal { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1.5px dashed #B07C1E; background: #FBF4E4; font-size: .78rem; color: #4B3A12; margin-top: 10px; }
.mock-cap { text-align: center; font-size: var(--t-micro); color: var(--on-night-3); margin-top: var(--s3); }

/* arquitectura */
.arch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--s7); align-items: center; margin-top: var(--s9); }
.arch svg { width: 100%; height: auto; overflow: visible; }
.arch .nd { cursor: pointer; }
.arch .nd circle.c { fill: var(--night-2); stroke: var(--on-night-3); stroke-width: 1.5; transition: all .3s var(--ease); }
.arch .nd text { fill: var(--on-night); font-family: var(--f-head); font-weight: 700; font-size: 13px; pointer-events: none; }
.arch .nd text.s { font-family: var(--f-body); font-weight: 400; font-size: 11px; fill: var(--on-night-3); }
.arch .nd.sel circle.c { fill: var(--gold); stroke: var(--gold); }
.arch .nd.sel text.in { fill: var(--night); }
.arch .nd:focus { outline: none; }
.arch .nd:focus-visible circle.c { stroke: var(--sky); stroke-width: 3; }
.arch .lk { stroke: var(--line-night); stroke-width: 1.5; fill: none; transition: stroke .3s, stroke-width .3s; }
.arch .lk.hot { stroke: var(--gold); stroke-width: 2.5; }
.arch .lk.flow { stroke-dasharray: 4 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.role-card h3 { font-size: var(--t-h3); margin-bottom: 4px; }
.role-card .axis-chip { display: inline-block; font-size: var(--t-micro); font-weight: 600; color: var(--gold); margin-bottom: var(--s4); }
.role-card ul { padding-left: 18px; margin: var(--s3) 0; font-size: var(--t-small); color: var(--on-night-2); }
.role-card ul li { margin-bottom: 6px; }

/* piloto */
.pilot { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s7); margin-top: var(--s9); align-items: start; }
.reasons { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.reasons li { counter-increment: r; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: var(--s5) 0; border-top: 1px solid var(--line-night); }
.reasons li::before { content: counter(r); font-family: var(--f-head); font-weight: 800; font-size: 1.6rem; color: var(--gold); line-height: 1; }
.reasons b { font-family: var(--f-head); display: block; margin-bottom: 4px; }
.reasons p { font-size: var(--t-small); color: var(--on-night-2); margin: 0; }
.nl-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s3); }
.nl-stat { padding: var(--s4); border-radius: var(--r-m); background: rgba(255,255,255,.03); border: 1px solid var(--line-night); }
.nl-stat .v { font-family: var(--f-head); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.nl-stat .v small { font-size: .5em; color: var(--on-night-3); font-weight: 600; margin-left: 6px; }
.nl-stat .k { font-size: var(--t-micro); color: var(--on-night-2); line-height: 1.4; }

/* fases */
.phases { margin-top: var(--s9); }
.ph-track { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin: var(--s5) 0 var(--s6); }
.ph-track button { text-align: left; border: 0; cursor: pointer; padding: 14px 14px 12px; border-radius: var(--r-m); background: rgba(255,255,255,.04); border: 1px solid var(--line-night); transition: background .25s var(--ease); display: grid; gap: 2px; }
.ph-track button b { font-family: var(--f-head); font-size: .98rem; }
.ph-track button span { font-size: var(--t-micro); color: var(--on-night-3); font-variant-numeric: tabular-nums; }
.ph-track button[aria-selected="true"] { background: rgba(255,255,255,.1); }
.ph-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.ph-info dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: var(--t-small); margin: 0; }
.ph-info dt { color: var(--on-night-3); font-weight: 600; }
.ph-info dd { margin: 0; color: var(--on-night); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: var(--t-micro); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-night); }
.gate { margin-top: var(--s7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.gate div { padding: var(--s5); border-radius: var(--r-m); border: 1px solid var(--line-night); }
.gate b { display: block; font-family: var(--f-head); font-size: .95rem; margin-bottom: 6px; }
.gate p { font-size: var(--t-small); color: var(--on-night-2); margin: 0; }
.gate .who { font-size: var(--t-micro); color: var(--gold); font-weight: 700; display: block; margin-bottom: 6px; }

/* cierre */
.closing { min-height: 100svh; display: flex; align-items: center; padding: var(--s10) 0; position: relative; overflow: hidden; background: var(--night); }
.closing-motto { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.4rem, 1rem + 6vw, 7.5rem); line-height: .95; letter-spacing: -0.045em; }
.closing-motto span { display: block; }
.closing-motto .g { color: var(--gold); }
.closing-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); margin-top: var(--s8); }
.closing-cols h4 { font-size: .95rem; color: var(--gold); margin-bottom: var(--s3); }
.closing-cols p { font-size: var(--t-small); color: var(--on-night-2); }
footer.site { padding: var(--s7) 0; border-top: 1px solid var(--line-night); font-size: var(--t-micro); color: var(--on-night-3); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); justify-content: space-between; }

/* reveal (JS añade .js) */
.js .rv { opacity: 0; transform: translateY(24px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .toc a { min-width: 32px; padding: 0 6px; }
  .map-layout { grid-template-columns: minmax(0,1fr); }
  .rank-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .explorer { grid-template-columns: minmax(0,1fr); }
  .lens-list { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .lens-list button { flex: none; scroll-snap-align: start; min-width: 168px; border-color: var(--line-night); }
}
@media (max-width: 900px) {
  .toc { display: none; }
  .toc.open { display: flex; position: fixed; top: 56px; left: 0; right: 0; flex-direction: column; background: var(--night); border-bottom: 1px solid var(--line-night); padding: 8px var(--gutter) 16px; }
  .toc.open a { justify-content: flex-start; display: flex; gap: 12px; height: 44px; border-radius: 8px; }
  .toc.open a .lbl { display: inline; font-weight: 500; color: var(--on-night-2); }
  .toc-btn { display: inline-flex; align-items: center; }
  .hero-grid, .codi-hero, .lens, .coef-layout, .axis-panel.on, .arch, .pilot, .ph-body, .demo { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 > [class*="col-"] { grid-column: 1 / -1; }
  .lens-read, .coef-detail { position: static; }
  .callouts, .method, .gate, .closing-cols, .facts { grid-template-columns: minmax(0,1fr); }
  .split-cards, .view-text { grid-template-columns: minmax(0,1fr); }
  .bridge svg.thread { display: none; }
  .demo { padding: var(--s5); }
  .model-strip { grid-template-columns: 1fr 1fr; }
  .model-strip div:nth-child(3) { padding-left: 0; border-left: 0; }
  .model-strip div:nth-child(n+3) { border-top: 1px solid var(--line-paper); }
}
@media (max-width: 768px) {
  .grid2, .cards4 { grid-template-columns: 1fr; }
  section.chapter { padding: var(--s9) 0 var(--s8); }
  .chapter-head { margin-bottom: var(--s6); }
  .chart { height: 340px; }
  .chart.tall { height: 560px; }
  .rank-wrap { grid-template-columns: minmax(0,1fr); }
  .rail { grid-template-columns: minmax(0,1fr); }
  .rail::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .rail .node { padding: 0 0 var(--s5) 36px; }
  .rail .node::before { top: 2px; }
  .gap-row { grid-template-columns: minmax(0,1fr) 64px; }
  .gap-row .gap-track { grid-column: 1 / -1; grid-row: 2; }
  .region-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ph-track { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ph-info dl { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .ph-info dd { margin-bottom: 10px; }
  .axes-tabs { grid-template-columns: minmax(0,1fr); }
  .versus { grid-template-columns: 1fr; gap: var(--s3); }
  .versus .mid { text-align: left; }
  .map-readout { position: static; margin-top: var(--s3); }
  .takeaway { grid-template-columns: minmax(0,1fr); }
  .nl-stats { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .pesos { padding: var(--s5); }
  .coins { grid-template-columns: repeat(10, 1fr); }
  .brand small { display: none; }
}
@media (max-width: 400px) {
  .phone { width: 272px; height: 560px; }
  .seg button { padding: 8px 12px; font-size: .8rem; }
  .nl-stats { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; }
}
@media (max-width: 768px) {
  .map-box .chart.tall { height: 420px; }
  .map-box { padding: var(--s2); }
}
.ent-legend-note { font-size: var(--t-micro); color: var(--on-night-3); }
.ph-track button b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); margin-right: 8px; vertical-align: 1px; }
.ph-track button[aria-selected="true"] { border-color: var(--pc); }
