/* Los Mexicanos front-door deck. Fluid type is bounded with clamp(); the body copy steps
   from ~16px on phones to ~21px at 1600 and ~24px on ultrawide. Labels stay >= 13px. */

@font-face { font-family: 'Geist'; src: url('assets/fonts/geist-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('assets/fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/fonts/jetbrains-mono-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #0b0907;
  --ink-2: #15110d;
  --bone: #f3ecdd;
  --paper: #efe7d6;
  --paper-2: #e4d9c3;
  --ember: #e8733a;
  --ember-hi: #f4a36b;
  --ember-deep: #8f3010;
  --signal: #b42a22;
  --text-dark: #f3ecdd;
  --muted-dark: #bdb3a3;
  --text-paper: #1a1612;
  --muted-paper: #4b4438;
  --rule-dark: rgba(243, 236, 221, 0.18);
  --rule-paper: rgba(26, 22, 18, 0.22);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --body: clamp(16px, 0.55vw + 12.5px, 24px);
  --lede: clamp(18px, 0.62vw + 12px, 26px);
  --h3: clamp(22px, 1vw + 10px, 30px);
  --h2: clamp(40px, 3.2vw + 10px, 66px);
  --h1: clamp(52px, 7.4vw, 124px);
  --label: clamp(13px, 0.45vw + 7px, 15px);
  --chrome-top: 74px;
  --chrome-bottom: 60px;
  --gutter: clamp(20px, 4vw, 58px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ink);
  color: var(--text-dark);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; }
button { font: inherit; color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; color: var(--ember-hi); }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.04em; line-height: 1.45; }
.small { font-size: var(--label); }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; color: var(--ember-hi); }
.support { font-size: var(--lede); max-width: 60ch; color: var(--muted-dark); margin-top: 0.8em; }
.boundary { margin-top: auto; padding-top: 1.2em; color: var(--muted-dark); font-size: var(--label); }

/* ---------- Chrome ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 31;
  background: var(--ember); transform-origin: 0 50%; transform: scaleX(0);
  transition: transform 0.6s ease;
}
.chrome {
  position: fixed; top: 0; left: 0; right: 0; height: var(--chrome-top); z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 var(--gutter); color: var(--text-dark);
  transition: color 0.4s ease, background-color 0.4s ease;
}
.chrome-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chrome-logo { height: 22px; width: auto; }
.logo-light { display: none; }
body[data-theme="paper"] .logo-dark { display: none; }
body[data-theme="paper"] .logo-light { display: block; }
.cross { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; color: var(--ember-hi); }
body[data-theme="paper"] .cross { color: var(--ember-deep); }
.chrome-client { font-family: var(--mono); font-size: var(--label); text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrome-label { text-transform: uppercase; letter-spacing: 0.12em; text-align: center; white-space: nowrap; }
.chrome-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.count { color: inherit; opacity: 0.9; white-space: nowrap; }
.chip-btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px; background: transparent; cursor: pointer;
  border: 1px solid currentColor; font-family: var(--mono); font-size: var(--label); letter-spacing: 0.08em; text-transform: uppercase;
}
.chip-btn:focus-visible, .nav-btn:focus-visible, .btn:focus-visible, .tabs button:focus-visible,
.menu-chip:focus-visible, .rail-dot:focus-visible, .index-card:focus-visible, .cover-cue a:focus-visible,
.phase a:focus-visible, .rep a:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--ember-hi); outline-offset: 3px;
}
body[data-theme="paper"] a:focus-visible, body[data-theme="paper"] .btn:focus-visible { outline-color: var(--ember-deep); }
body[data-theme="paper"] .chrome { color: var(--text-paper); }

/* ---------- Slides ---------- */
.deck { position: fixed; inset: 0; }
.slide {
  position: absolute; inset: 0; overflow: hidden;
  visibility: hidden; opacity: 0;
  transform: translate3d(6%, 0, 0) scale(0.985);
  transition: opacity 0.48s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), visibility 0s linear 0.5s;
}
.slide.is-before { transform: translate3d(-6%, 0, 0) scale(0.985); }
.slide.is-after { transform: translate3d(6%, 0, 0) scale(0.985); }
.slide.is-active {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.48s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), visibility 0s;
}
.slide-dark { background: var(--ink); color: var(--text-dark); }
.slide-paper { background: var(--paper); color: var(--text-paper); }
.slide-paper .h2 { color: var(--text-paper); }
.slide-paper .support, .slide-paper .boundary { color: var(--muted-paper); }
.slide-paper .kicker { color: var(--ember-deep); }
.slide-paper em { color: var(--ember-deep); }

.slide-inner {
  position: relative; z-index: 2; height: 100%; min-height: 0;
  display: flex; flex-direction: column; gap: clamp(16px, 2.2vh, 28px);
  padding: calc(var(--chrome-top) + 6px) var(--gutter) calc(var(--chrome-bottom) + 10px);
  overflow-y: auto; overscroll-behavior: contain;
}
.slide-head { display: grid; gap: 0.6em; }
.h2 { font-family: var(--sans); font-weight: 600; font-size: var(--h2); line-height: 0.98; letter-spacing: -0.045em; max-width: 22ch; text-wrap: balance; }
.slide-head .h2 { color: var(--text-dark); }
.slide-paper .slide-head .h2 { color: var(--text-paper); }
.slide-head .support { max-width: 62ch; }
.boundary { font-size: var(--label); }

/* ---------- Cover ---------- */
.slide-cover .cover-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
.cover-copy { position: relative; z-index: 3; max-width: 44ch; align-self: center; opacity: 0; transform: translateY(12px); transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s; }
body.ready .cover-copy { opacity: 1; transform: none; }
.eyebrow { color: var(--ember-hi); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.9em; }
.cover-title { font-family: var(--sans); font-weight: 600; font-size: var(--h1); line-height: 0.92; letter-spacing: -0.055em; color: var(--text-dark); }
.cover-title em { font-size: 1em; letter-spacing: -0.01em; }
.lede { font-size: var(--lede); color: var(--muted-dark); max-width: 42ch; margin-top: 0.6em; }
.ticker { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 1.2em; }
.ticker li { border: 1px solid var(--rule-dark); padding: 6px 12px; border-radius: 999px; color: var(--bone); }
.prepared { margin-top: 1.6em; display: grid; gap: 4px; }
.prepared .mono { color: var(--ember-hi); }
.cover-cue { margin-top: 1.4em; }
.cover-cue a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--rule-dark); }

/* Static medallion: used when WebGL is unavailable or motion is reduced. Same real product, no motion. */
.medallion { display: none; place-self: center; }
body.no-webgl .medallion, body.reduced .medallion { display: block; }
.medallion-disc {
  position: relative; width: min(60vmin, 540px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, #f6dfa9 0%, #e3b872 48%, #b57a3a 80%, #8a5222 100%);
  box-shadow: 0 0 0 clamp(10px, 1.2vmin, 16px) #2a2520, 0 0 0 calc(clamp(10px, 1.2vmin, 16px) + 3px) #9a3413, 0 40px 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.medallion-disc .char { position: absolute; border-radius: 50%; background: rgba(44, 22, 8, 0.5); filter: blur(1px); }
.medallion-disc .c1 { width: 16%; height: 10%; left: 22%; top: 30%; }
.medallion-disc .c2 { width: 10%; height: 7%; left: 58%; top: 56%; background: rgba(110, 58, 20, 0.35); }
.medallion-disc .c3 { width: 22%; height: 12%; left: 46%; top: 18%; background: rgba(110, 58, 20, 0.3); }

.stage3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }
.stage3d.fx-boom { z-index: 40; }
body.no-webgl .stage3d, body.reduced .stage3d { display: none !important; }

/* ---------- Audit ---------- */
.findings { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); }
.finding { display: grid; align-content: start; gap: 0.55em; border-top: 2px solid var(--text-paper); padding-top: 16px; }
.finding h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); line-height: 1.12; letter-spacing: -0.02em; color: var(--text-paper); }
.finding p { font-size: var(--body); color: var(--text-paper); max-width: 62ch; }
.sev { justify-self: start; padding: 4px 10px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: 0.1em; }
.sev[data-sev="high"] { background: var(--signal); border-color: var(--signal); color: #fff; }
.sev[data-sev="medium"] { color: var(--ember-deep); }
.sev[data-sev="low"] { color: var(--muted-paper); }
.source { color: var(--ember-deep); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Gap ---------- */
.gap-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.moment { display: grid; gap: 0.7em; border-left: 3px solid var(--ember); padding: 4px 0 4px 22px; }
.moment .mono { color: var(--muted-dark); }
.moment-time { font-family: var(--serif); font-style: italic; font-size: clamp(34px, 2.6vw + 10px, 56px); color: var(--ember-hi); line-height: 1; }
.moment p:last-child { max-width: 44ch; }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); }
.path { border-top: 1px solid var(--rule-dark); padding-top: 14px; display: grid; gap: 0.5em; align-content: start; }
.path h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); letter-spacing: -0.02em; }
.path-concept h3 { color: var(--ember-hi); }
.path ol { list-style: none; counter-reset: step; display: grid; gap: 0.7em; }
.path li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; gap: 6px; font-size: var(--body); color: var(--bone); }
.path li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: var(--label); color: var(--ember-hi); padding-top: 0.25em; }

/* ---------- Concept ---------- */
.concept-wrap { gap: clamp(12px, 1.8vh, 20px); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(18px, 2.4vw, 34px); align-items: start; }
.browser { background: #f6f1e6; color: var(--text-paper); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55); min-width: 0; }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #e4dccb; border-bottom: 1px solid #d3c8b1; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #b8ab92; display: block; }
.url { flex: 1; min-width: 0; color: #4b4438; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { background: var(--ember-deep); color: #fff; padding: 3px 8px; border-radius: 999px; font-size: 13px; }
.tabs { display: flex; gap: 6px; padding: 10px 14px 0; border-bottom: 1px solid #d3c8b1; background: #f6f1e6; }
.tabs button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px 10px 0 0; background: transparent; cursor: pointer;
  font-size: 16px; font-weight: 600; color: #4b4438;
}
.tabs button[aria-selected="true"] { background: #1a1612; color: #f6f1e6; }
.concept-scroll { max-height: min(60vh, 560px); overflow-y: auto; padding: 22px 24px 26px; overscroll-behavior: contain; }
.panel { display: grid; gap: 14px; }
.panel .mono.small { color: var(--ember-deep); }
.panel-title { font-family: var(--sans); font-weight: 600; font-size: clamp(22px, 1.2vw + 8px, 30px); letter-spacing: -0.02em; line-height: 1.12; color: #1a1612; max-width: 24ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 1.5px solid #1a1612; background: transparent; color: #1a1612; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: #1a1612; color: #f6f1e6; }
.btn:hover { background: #1a1612; color: #f6f1e6; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info-card { background: #ece4d3; border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.info-card p:last-child { font-size: 16px; color: #2c2620; }
.info-card .mono { color: var(--ember-deep); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row span { border: 1px solid #b8ab92; padding: 6px 12px; border-radius: 999px; font-size: 15px; background: #fbf8f1; }
.menu-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-chip {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #1a1612; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 600; color: #1a1612;
}
.menu-chip[aria-pressed="true"] { background: #1a1612; color: #f6f1e6; }
.menu-detail { background: #ece4d3; border-radius: 12px; padding: 16px 18px; display: grid; gap: 8px; }
.menu-detail h3 { font-family: var(--sans); font-weight: 600; font-size: 22px; color: #1a1612; }
.menu-detail .live-label { font-family: var(--mono); font-size: 14px; color: #2c2620; word-break: break-word; }
.menu-detail .note-copy { font-size: 16px; color: #2c2620; }
.menu-detail .mono { color: var(--ember-deep); }
.address { font-size: 18px; color: #1a1612; }
.map-slot { border: 1.5px dashed #8b7f68; border-radius: 12px; padding: 40px 16px; text-align: center; color: #4b4438; }

.phone {
  width: 250px; aspect-ratio: 9 / 18.5; border-radius: 36px; background: #0e0b08; padding: 12px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  justify-self: center; position: relative;
}
.phone-screen { height: 100%; background: #f6f1e6; color: #1a1612; border-radius: 26px; padding: 18px 16px; display: grid; align-content: start; gap: 10px; overflow: hidden; }
.phone-screen .mono { color: var(--ember-deep); }
.phone-h { font-family: var(--sans); font-weight: 600; font-size: 20px; line-height: 1.15; letter-spacing: -0.02em; }
.phone-line { font-size: 15px; line-height: 1.4; }
.btn-ghost { border: 1.5px solid #1a1612; border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 600; text-align: center; }
.concept-detail { display: none; gap: 12px; }
.concept-detail > div { background: rgba(243, 236, 221, 0.06); border: 1px solid var(--rule-dark); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.concept-detail .mono { color: var(--ember-hi); }
.concept-wrap .boundary { margin-top: 0; }

/* ---------- System ---------- */
.system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); }
.pillar { border: 1px solid var(--rule-paper); border-radius: 16px; padding: clamp(18px, 1.6vw, 26px); display: grid; align-content: start; gap: 0.6em; background: #f8f3e8; min-height: 0; }
.pillar .mono.small:first-child { color: var(--ember-deep); }
.pillar h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); line-height: 1.12; letter-spacing: -0.02em; color: var(--text-paper); }
.pillar p { font-size: var(--body); color: var(--text-paper); }
.outcome { color: var(--ember-deep); border-top: 1px solid var(--rule-paper); padding-top: 0.7em; margin-top: auto; }

/* ---------- Proof ---------- */
.ba-wrap { display: grid; gap: 12px; max-width: 1100px; }
.ba { position: relative; height: clamp(360px, 52vh, 520px); border-radius: 16px; overflow: hidden; background: #e9e1cf; color: #1a1612; isolation: isolate; }
.ba-before, .ba-after { position: absolute; inset: 0; padding: clamp(18px, 2vw, 30px); overflow: auto; }
.ba-before { background: #e6dcc7; color: #1a1612; }
.ba-after { background: #f6f1e6; color: #1a1612; clip-path: inset(0 0 0 calc(var(--split, 50) * 1%)); border-left: 3px solid var(--ember); }
.ba-before ol, .ba-after ol { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.ba-before li, .ba-after li { font-size: var(--body); padding: 10px 12px; background: rgba(26, 22, 18, 0.06); border-radius: 10px; }
.ba-after li { background: rgba(232, 115, 58, 0.14); }
.ba-before .mono, .ba-after .mono { color: var(--ember-deep); }
.ba-label { color: var(--muted-dark); }
.ba-range { width: 100%; min-height: 44px; accent-color: var(--ember); }

/* ---------- Roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); }
.phase { border-top: 3px solid var(--text-paper); padding-top: 16px; display: grid; align-content: start; gap: 0.7em; }
.phase-day { font-family: var(--serif); font-style: italic; font-size: clamp(40px, 2.6vw + 14px, 64px); line-height: 1; color: var(--ember-deep); }
.phase h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); line-height: 1.12; letter-spacing: -0.02em; }
.phase ul { list-style: none; display: grid; gap: 0.6em; }
.phase li { font-size: var(--body); padding-left: 18px; position: relative; }
.phase li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 7px; height: 7px; border-radius: 50%; background: var(--ember-deep); }
.owner { color: var(--muted-paper); border-top: 1px solid var(--rule-paper); padding-top: 0.8em; margin-top: auto; }

/* ---------- Engagement ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); align-items: stretch; }
.tier { border: 1px solid var(--rule-dark); border-radius: 18px; padding: clamp(20px, 1.8vw, 30px); display: grid; align-content: start; gap: 0.7em; background: var(--ink-2); }
.tier h3 { font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 1.4vw + 10px, 36px); letter-spacing: -0.03em; color: var(--text-dark); }
.tier p:not(.mono) { font-size: var(--body); color: var(--bone); }
.tier .mono.small { color: var(--muted-dark); margin-top: auto; }
.tier-recommended { border: 2px solid var(--ember); }
.tag-rec { color: var(--ember-hi) !important; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Close ---------- */
.close-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
.reps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); align-items: start; }
.rep { display: grid; gap: 12px; align-content: start; }
.rep-portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #15110d; }
.rep h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); letter-spacing: -0.02em; color: var(--text-paper); }
.rep p { font-size: 18px; }
.rep a { text-decoration: none; border-bottom: 1px solid var(--rule-paper); }
.reps > .mono { grid-column: 1 / -1; color: var(--muted-paper); }
.scheduler { display: grid; gap: 14px; background: #f8f3e8; border: 1px solid var(--rule-paper); border-radius: 18px; padding: clamp(18px, 1.8vw, 28px); }
.scheduler h3 { font-family: var(--sans); font-weight: 600; font-size: var(--h3); letter-spacing: -0.02em; color: var(--text-paper); }
.field { display: grid; gap: 6px; }
.field .mono { color: var(--muted-paper); }
.field select { min-height: 48px; padding: 0 12px; font-size: 17px; border: 1.5px solid #1a1612; border-radius: 10px; background: #fffdf7; color: var(--text-paper); }
.scheduler .btn-primary { min-height: 48px; font-size: 17px; }
.scheduler a[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
#sched-msg { color: var(--muted-paper); }
.signoff { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin-top: auto; background: var(--ink); color: var(--bone); border-radius: 999px; padding: 12px 22px; width: max-content; max-width: 100%; }
.signoff p { font-size: 16px; }

/* ---------- Navigation ---------- */
.deck-nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--chrome-bottom); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter);
  color: var(--text-dark); background: transparent;
}
body[data-theme="paper"] .deck-nav { color: var(--text-paper); }
.nav-note { color: var(--muted-dark); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body[data-theme="paper"] .nav-note { color: var(--muted-paper); }
.nav-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid currentColor; background: transparent; cursor: pointer; font-size: 16px; font-weight: 600;
}
.nav-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
.nav-primary { background: var(--ember); border-color: var(--ember); color: #0b0907; }
body[data-theme="paper"] .nav-primary { background: var(--ink); border-color: var(--ink); color: var(--bone); }

.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.rail-dot { width: 14px; height: 14px; min-width: 14px; min-height: 14px; padding: 0; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; cursor: pointer; color: var(--text-dark); }
.rail-dot[aria-current="step"] { background: var(--ember); border-color: var(--ember); }
body[data-theme="paper"] .rail-dot { color: var(--text-paper); }

.index-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(8, 6, 4, 0.96); display: grid; place-items: center; padding: 24px; }
.index-panel { width: min(1120px, 100%); max-height: 100%; overflow-y: auto; color: var(--text-dark); display: grid; gap: 18px; }
.index-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.index-head h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 1.6vw + 12px, 38px); letter-spacing: -0.02em; }
.index-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.index-card {
  min-height: 112px; padding: 16px; border-radius: 14px; border: 1px solid var(--rule-dark); background: var(--ink-2); color: var(--text-dark);
  text-align: left; display: grid; align-content: space-between; gap: 8px; cursor: pointer;
}
.index-card:hover { border-color: var(--ember); }
.index-card .mono { color: var(--ember-hi); }
.index-card strong { font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.index-card small { font-family: var(--mono); font-size: 13px; color: var(--muted-dark); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1180px) {
  .gap-grid { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage { grid-template-columns: 1fr; }
  .phone { display: none; }
}
@media (max-width: 1023px) {
  .rail { display: none; }
  .concept-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slide-cover .cover-inner { grid-template-columns: 1fr; }
  .close-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --chrome-top: 58px; --chrome-bottom: 66px; }
  .chrome { grid-template-columns: 1fr auto; background: var(--ink); }
  body[data-theme="paper"] .chrome { background: var(--paper); }
  .chrome-label { display: none; }
  .chrome-client { font-size: 13px; }
  .chrome-logo { height: 18px; width: auto; }
  .deck-nav { background: var(--ink); height: calc(var(--chrome-bottom) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body[data-theme="paper"] .deck-nav { background: var(--paper); }
  .nav-note { display: none; }
  .nav-btn { min-height: 46px; padding: 0 14px; }
  .slide-inner { padding: calc(var(--chrome-top) + 14px) 20px calc(var(--chrome-bottom) + 18px); }
  .findings, .paths, .system-grid, .info-grid, .reps { grid-template-columns: 1fr; }
  .concept-detail { grid-template-columns: 1fr; }
  .slide-cover .cover-inner { align-content: end; padding-top: 42vh; }
  .cover-copy { max-width: none; }
  .cover-title { font-size: clamp(44px, 13vw, 64px); }
  .lede { font-size: 17px; }
  .ticker li { font-size: 13px; padding: 4px 10px; }
  .h2 { font-size: clamp(34px, 9.5vw, 44px); }
  .concept-scroll { max-height: none; overflow: visible; }
  .ba { height: 560px; }
  .ba-before li, .ba-after li { font-size: 16px; }
  .signoff { border-radius: 18px; width: 100%; }
  .scheduler .btn-primary { width: 100%; }
  .url { font-size: 13px; }
  .tabs button { padding: 0 12px; font-size: 15px; }
}
@media (max-width: 420px) {
  .medallion-disc { width: 64vmin; }
}

/* Reduced motion: no transitions and no animation, with the static medallion. */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active, .progress, .cover-copy { transition: none !important; }
}
body.reduced .stage3d { display: none !important; }
