/* ==========================================================================
   轨道上的中国 · 3D 铁路科普馆
   ========================================================================== */

:root {
  --ink: #0b0f10;
  --ink-2: #101617;
  --ink-3: #151d1e;
  --ink-4: #1c2627;
  --paper: #f2eee5;
  --paper-2: #e9e2d5;
  --paper-3: #ddd4c4;
  --white: #fbf8f1;
  --red: #d84435;
  --red-deep: #ad2c22;
  --gold: #b58e54;
  --teal: #6f8781;
  --muted: #6d746f;
  --muted-dark: #98a39f;
  --line: rgba(11, 15, 16, 0.14);
  --line-soft: rgba(11, 15, 16, 0.08);
  --line-light: rgba(242, 238, 229, 0.14);
  --serif: "Noto Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "Bahnschrift", "Consolas", "SFMono-Regular", monospace;
  --pad: clamp(20px, 4.2vw, 72px);
  --max: 1480px;
  --ease: cubic-bezier(0.22, 0.72, 0.18, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--red);
  color: var(--white);
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, h4, p, dl, dd, dt, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
  font-size: 13px;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 88px;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  color: var(--paper);
  transition: height 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 12, 13, 0.62), rgba(8, 12, 13, 0));
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.site-header.is-scrolled {
  height: 72px;
  background: rgba(10, 15, 16, 0.88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line-light);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-copy em {
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.18em;
  color: rgba(242, 238, 229, 0.5);
  margin-top: 4px;
  white-space: nowrap;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
}

.site-nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.66);
  padding: 8px 0;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 1px;
  background: var(--red);
  transition: right 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--paper);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  right: 0;
}

.header-side {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(242, 238, 229, 0.55);
  border: 1px solid var(--line-light);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 68, 53, 0.15);
  animation: blink 2.4s ease-in-out infinite;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 1px;
  background: var(--paper);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span:first-child {
  top: 16px;
}

.nav-toggle span:last-child {
  top: 22px;
}

.nav-open .nav-toggle span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

/* ==========================================================================
   Shared
   ========================================================================== */

.section {
  position: relative;
  padding: clamp(88px, 9.5vw, 156px) 0;
}

.section-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: rgba(242, 238, 229, 0.56);
}

.eyebrow-line {
  width: 34px;
  height: 1px;
  background: var(--red);
}

.eyebrow-no {
  color: rgba(242, 238, 229, 0.3);
  margin-left: 2px;
}

.section-kicker {
  color: var(--muted);
  margin-bottom: 26px;
}

.section-kicker span {
  color: var(--red);
  font-size: 11px;
}

.section-head {
  position: relative;
  margin-bottom: clamp(44px, 5vw, 76px);
}

.section-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.72fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 74px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.section-head h2 em {
  font-style: normal;
  color: var(--red);
  position: relative;
  white-space: nowrap;
}

.section-head h2 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 2px;
  background: currentColor;
  opacity: 0.22;
}

.section-lede {
  max-width: 430px;
  justify-self: end;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.95;
  padding-bottom: 6px;
}

.section-lede p + p {
  margin-top: 12px;
}

.section-head--light h2 {
  color: var(--paper);
}

.section-head--light .section-kicker {
  color: var(--muted-dark);
}

.section-head--light .section-lede {
  color: rgba(242, 238, 229, 0.58);
}

.section-footnote {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: right;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translate(2px, -2px);
}

.btn--primary {
  background: var(--red);
  color: var(--white);
}

.btn--primary:hover {
  background: #e45545;
  transform: translateY(-2px);
}

.btn--ghost {
  border: 1px solid rgba(242, 238, 229, 0.24);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: rgba(242, 238, 229, 0.6);
  background: rgba(242, 238, 229, 0.06);
}

.round-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.round-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.round-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.round-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  padding: 116px var(--pad) 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(to top, var(--ink), transparent);
  z-index: 2;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(900px 640px at 76% 24%, rgba(50, 77, 77, 0.32), transparent 68%),
    radial-gradient(680px 520px at 9% 82%, rgba(173, 44, 34, 0.14), transparent 70%),
    linear-gradient(135deg, #0a0f10 0%, #0d1415 48%, #111a1b 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 238, 229, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 238, 229, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-bigtype {
  position: absolute;
  right: -2vw;
  top: 15vh;
  font-family: var(--serif);
  font-size: clamp(240px, 39vw, 620px);
  line-height: 0.74;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 238, 229, 0.065);
  letter-spacing: -0.08em;
  user-select: none;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  width: min(72vw, 900px);
  aspect-ratio: 1;
  right: -18vw;
  top: 3vh;
  border: 1px solid rgba(242, 238, 229, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(242, 238, 229, 0.055);
  border-radius: 50%;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 8%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(216, 68, 53, 0.09);
}

.hero-orbit--two {
  width: min(48vw, 560px);
  right: -6vw;
  top: 18vh;
  border-color: rgba(181, 142, 84, 0.1);
}

.hero-grid {
  position: relative;
  z-index: 3;
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(400px, 0.8fr) minmax(560px, 1.2fr);
  align-items: center;
  gap: clamp(34px, 3.8vw, 60px);
  padding: clamp(18px, 3vh, 40px) 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 630px;
  padding: 12px 0 30px;
}

.hero h1 {
  margin: 26px 0 24px;
  font-family: var(--serif);
  font-size: clamp(58px, 6.6vw, 106px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
  display: inline-block;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.04em;
  bottom: 0.04em;
  height: 1px;
  background: linear-gradient(90deg, var(--red), transparent);
  opacity: 0.6;
}

.title-dot {
  color: var(--gold);
  margin-left: -0.04em;
}

.hero-lede {
  max-width: 480px;
  color: rgba(242, 238, 229, 0.62);
  font-size: 14.5px;
  line-height: 2;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 520px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

.hero-stats dt {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero-stats dt small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-left: 4px;
  vertical-align: 0.35em;
}

.hero-stats dd {
  margin-top: 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(242, 238, 229, 0.44);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(242, 238, 229, 0.32);
}

.note-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.stage {
  position: relative;
  height: clamp(520px, 68vh, 740px);
  background: #0b1213;
  border: 1px solid rgba(242, 238, 229, 0.13);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.stage:fullscreen {
  border: 0;
  border-radius: 0;
  height: 100vh;
}

#rail-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: none;
  cursor: grab;
}

#rail-canvas.is-dragging {
  cursor: grabbing;
}

.stage-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 50% 45%, transparent 52%, rgba(3, 7, 8, 0.38) 100%),
    linear-gradient(to bottom, rgba(3, 7, 8, 0.45), transparent 22%, transparent 74%, rgba(3, 7, 8, 0.5));
}

.stage-chrome {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 13, 14, 0.56);
  border: 1px solid rgba(242, 238, 229, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(242, 238, 229, 0.7);
}

.stage-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 2.4s ease-in-out infinite;
}

.stage-model {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(242, 238, 229, 0.44);
}

.stage-tools {
  display: flex;
  gap: 7px;
  pointer-events: auto;
}

.stage-tool {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 238, 229, 0.16);
  border-radius: 50%;
  background: rgba(8, 13, 14, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(242, 238, 229, 0.76);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.stage-tool:hover {
  background: rgba(242, 238, 229, 0.12);
  border-color: rgba(242, 238, 229, 0.34);
  transform: translateY(-1px);
}

.stage-tool svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-tool .icon-sun {
  display: none;
}

.stage-tool.is-night .icon-moon {
  display: none;
}

.stage-tool.is-night .icon-sun {
  display: block;
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  pointer-events: auto;
  color: var(--paper);
  transform: translate3d(var(--dx, 0px), var(--dy, 0px), 0) translate(-50%, -50%);
  will-change: left, top;
}

.hotspot::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--red);
  box-sizing: content-box;
  box-shadow: 0 0 0 3px rgba(216, 68, 53, 0.22);
  transition: transform 0.25s var(--ease), background 0.25s ease;
}

.hotspot-pulse {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(216, 68, 53, 0.55);
  border-radius: 50%;
  animation: ping 3.4s var(--ease) infinite;
}

.hotspot-label {
  position: absolute;
  left: 22px;
  top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 7px;
  border: 1px solid rgba(242, 238, 229, 0.15);
  border-radius: 6px;
  background: rgba(7, 12, 13, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(242, 238, 229, 0.85);
  opacity: 0.92;
  transition: opacity 0.25s ease, transform 0.25s var(--ease), border-color 0.25s ease;
}

.hotspot-label b {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 8px;
  color: var(--red);
  letter-spacing: 0.05em;
}

.hotspot:hover .hotspot-label {
  opacity: 1;
  border-color: rgba(242, 238, 229, 0.4);
  transform: translateY(-2px);
}

.hotspot:hover::before {
  background: var(--red);
  transform: scale(1.15);
}

.hotspot.is-active::before {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(216, 68, 53, 0.24), 0 0 20px rgba(216, 68, 53, 0.5);
}

.hotspot.is-active .hotspot-label {
  border-color: var(--red);
  background: rgba(173, 44, 34, 0.9);
  color: var(--white);
}

.hotspot.is-active .hotspot-label b {
  color: rgba(255, 255, 255, 0.72);
}

.hotspot[data-part="rail"] .hotspot-label,
.hotspot[data-part="catenary"] .hotspot-label,
.hotspot[data-part="nose"] .hotspot-label {
  left: auto;
  right: 22px;
  text-align: right;
}

.hotspot[data-part="bogie"] .hotspot-label {
  left: 22px;
  right: auto;
  top: 7px;
  text-align: left;
}

.hotspots.labels-off .hotspot-label {
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
}

.hotspot.is-offscreen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage-bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 15px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.stage-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.45);
  padding: 6px 0;
  white-space: nowrap;
}

.hint-mobile {
  display: none;
}

.drag-symbol {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(242, 238, 229, 0.28);
  border-radius: 50%;
  position: relative;
}

.drag-symbol::before,
.drag-symbol::after {
  content: "";
  position: absolute;
  background: rgba(242, 238, 229, 0.55);
}

.drag-symbol::before {
  left: 7px;
  top: 4px;
  width: 1px;
  height: 6px;
}

.drag-symbol::after {
  left: 5px;
  top: 7px;
  width: 5px;
  height: 1px;
}

.stage-views {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(242, 238, 229, 0.14);
  border-radius: 999px;
  background: rgba(7, 12, 13, 0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.stage-views::-webkit-scrollbar {
  display: none;
}

.view-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(242, 238, 229, 0.6);
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.view-btn:hover {
  color: var(--paper);
  background: rgba(242, 238, 229, 0.08);
}

.view-btn.is-active {
  background: var(--paper);
  color: var(--ink);
}

.view-btn svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.view-btn--cruise.is-active {
  background: var(--red);
  color: var(--white);
}

.part-card {
  position: absolute;
  top: 64px;
  right: 18px;
  z-index: 7;
  width: 326px;
  padding: 20px;
  border: 1px solid rgba(242, 238, 229, 0.16);
  border-radius: 16px;
  background: rgba(9, 15, 16, 0.92);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  color: var(--paper);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.part-card.is-open {
  opacity: 1;
  transform: translateY(0);
}

.part-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.part-index {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--red);
  letter-spacing: -0.05em;
}

.part-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 238, 229, 0.16);
  border-radius: 50%;
  color: rgba(242, 238, 229, 0.7);
  transition: background 0.2s ease;
}

.part-close:hover {
  background: rgba(242, 238, 229, 0.1);
}

.part-close svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.part-eyebrow {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted-dark);
  margin-bottom: 8px;
}

.part-card h3 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.part-desc {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.85;
  color: rgba(242, 238, 229, 0.62);
}

.part-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-light);
}

.part-stats div {
  min-width: 0;
}

.part-stats dt {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.4);
  margin-bottom: 4px;
}

.part-stats dd {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.2;
  color: var(--paper);
  word-break: break-word;
}

.part-stats dd small {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--gold);
  margin-left: 3px;
}

.part-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.55);
  border-bottom: 1px solid rgba(242, 238, 229, 0.2);
  padding-bottom: 3px;
  transition: color 0.25s ease;
}

.part-reset:hover {
  color: var(--paper);
}

.part-reset span {
  color: var(--red);
}

.stage-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0a1112;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.stage-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage-loader p {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(242, 238, 229, 0.45);
}

.stage-loader p em {
  font-style: normal;
  color: rgba(242, 238, 229, 0.22);
  margin-left: 5px;
}

.loader-rail {
  position: relative;
  width: 96px;
  height: 6px;
}

.loader-rail::before,
.loader-rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(242, 238, 229, 0.2);
}

.loader-rail::before {
  left: 0;
}

.loader-rail::after {
  right: 0;
}

.loader-rail span {
  position: absolute;
  top: 2px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--red);
  animation: rail-load 1.5s var(--ease) infinite;
}

.stage-fallback {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  background: #0b1213;
}

.stage-fallback strong {
  font-family: var(--serif);
  font-size: 20px;
}

.stage-fallback p {
  font-size: 12px;
  color: rgba(242, 238, 229, 0.55);
  max-width: 320px;
}

.stage-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.34);
}

.hero-foot {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0 22px;
  border-top: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(242, 238, 229, 0.3);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(242, 238, 229, 0.55);
  transition: color 0.25s ease;
}

.scroll-cue i {
  position: relative;
  width: 42px;
  height: 1px;
  background: rgba(242, 238, 229, 0.2);
  overflow: hidden;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: var(--red);
  animation: scroll-line 2.8s var(--ease) infinite;
}

.scroll-cue:hover {
  color: var(--paper);
}

/* ==========================================================================
   Spec strip
   ========================================================================== */

.spec-strip {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: #070b0c;
  border-top: 1px solid rgba(242, 238, 229, 0.08);
  border-bottom: 1px solid rgba(242, 238, 229, 0.08);
}

.spec-line {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 0;
  padding: 13px 0;
  animation: marquee 44s linear infinite;
}

.spec-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 26px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(242, 238, 229, 0.52);
  white-space: nowrap;
}

.spec-line em {
  font-style: normal;
  color: var(--red);
}

.spec-line i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(242, 238, 229, 0.25);
  flex: none;
}

/* ==========================================================================
   Track
   ========================================================================== */

.track-section {
  background:
    radial-gradient(900px 520px at 85% 20%, rgba(181, 142, 84, 0.08), transparent 70%),
    var(--paper);
}

.track-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.78fr);
  gap: clamp(24px, 3.2vw, 46px);
  align-items: stretch;
}

.track-visual {
  position: relative;
  min-width: 0;
  padding: 20px 20px 14px;
  border-radius: 22px;
  background:
    radial-gradient(700px 420px at 50% 100%, rgba(65, 101, 99, 0.2), transparent 70%),
    #111a1b;
  color: var(--paper);
  border: 1px solid rgba(11, 15, 16, 0.2);
  overflow: hidden;
}

.track-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  opacity: 0.1;
  mix-blend-mode: overlay;
}

.segmented {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  width: fit-content;
  border: 1px solid rgba(242, 238, 229, 0.14);
  border-radius: 999px;
  background: rgba(6, 11, 12, 0.42);
}

.seg-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(242, 238, 229, 0.6);
  transition: background 0.25s ease, color 0.25s ease;
}

.seg-btn:hover {
  color: var(--paper);
}

.seg-btn.is-active {
  background: var(--paper);
  color: var(--ink);
}

.seg-note {
  margin-left: auto;
  padding-right: 8px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.32);
}

.track-svg-wrap {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
}

.track-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.track-svg [hidden] {
  display: none;
}

.track-layer {
  cursor: pointer;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.track-layer:hover,
.track-layer:focus-visible {
  filter: brightness(1.16) drop-shadow(0 0 10px rgba(216, 68, 53, 0.25));
  outline: none;
}

.track-svg.has-selection .track-layer:not(.is-active) {
  opacity: 0.48;
}

.track-layer.is-active {
  filter: brightness(1.12) drop-shadow(0 0 12px rgba(216, 68, 53, 0.32));
}

.track-svg .svg-note {
  transition: opacity 0.3s ease;
}

.track-svg.has-selection .svg-note {
  opacity: 0.26;
}

.track-svg.has-selection .svg-note.is-active {
  opacity: 1;
}

.svg-dim-text {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  fill: #e08c7e;
}

.svg-notes text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: rgba(242, 238, 229, 0.55);
}

.svg-notes path {
  fill: none;
  stroke: rgba(242, 238, 229, 0.26);
  stroke-width: 0.8;
}

.svg-notes circle {
  fill: var(--red);
}

.diagram-note {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.32);
}

.diagram-note span {
  color: var(--red);
  font-size: 12px;
}

.track-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.layer-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.layer-btn {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 4px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: color 0.25s ease, padding 0.25s var(--ease), background 0.25s ease;
}

.layer-btn:hover {
  padding-left: 8px;
  color: var(--red);
}

.layer-btn.is-active {
  padding-left: 12px;
  color: var(--red);
  background: linear-gradient(90deg, rgba(216, 68, 53, 0.07), transparent 80%);
}

.layer-btn-no {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.layer-btn.is-active .layer-btn-no {
  color: var(--red);
}

.layer-btn-name {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.layer-btn-en {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.layer-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 24px;
  border-radius: 18px;
  background:
    radial-gradient(380px 200px at 100% 0%, rgba(216, 68, 53, 0.12), transparent 70%),
    var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.layer-detail-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.layer-detail-index {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--red);
}

.layer-detail-en {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(242, 238, 229, 0.35);
}

.layer-detail h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.layer-detail > p {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(242, 238, 229, 0.62);
}

.layer-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.layer-stats div {
  padding-top: 10px;
  border-top: 1px solid var(--line-light);
}

.layer-stats dt {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.38);
}

.layer-stats dd {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.25;
  color: var(--paper);
}

.layer-stats dd small {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--gold);
  margin-left: 2px;
}

/* ==========================================================================
   Trains
   ========================================================================== */

.trains-section {
  background:
    linear-gradient(180deg, var(--paper) 0%, #ebe5d8 100%);
  border-top: 1px solid var(--line-soft);
}

.trains-section .section-head .train-controls,
.timeline-section .section-head .train-controls {
  position: absolute;
  right: 0;
  bottom: -52px;
  display: flex;
  gap: 8px;
}

.train-viewport {
  position: relative;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
}

.train-viewport::before,
.train-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 20px;
  width: clamp(20px, 7vw, 120px);
  z-index: 2;
  pointer-events: none;
}

.train-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper), transparent);
}

.train-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, var(--paper), transparent);
}

.train-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 6px 0 20px;
}

.train-rail::-webkit-scrollbar {
  display: none;
}

.train-card {
  position: relative;
  flex: 0 0 clamp(300px, 30vw, 382px);
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid rgba(11, 15, 16, 0.1);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s ease;
}

.train-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.train-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 50px -24px rgba(11, 15, 16, 0.42);
  border-color: rgba(11, 15, 16, 0.2);
}

.train-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.train-card-no {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--paper-3);
}

.train-art {
  height: 168px;
  padding: 18px 20px 6px;
  color: var(--accent);
  background:
    linear-gradient(180deg, transparent 48%, rgba(11, 15, 16, 0.025) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(11, 15, 16, 0.04) 40px);
}

.train-art svg {
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease);
}

.train-card:hover .train-art svg {
  transform: translateX(6px);
}

.train-card-body {
  padding: 18px 22px 22px;
}

.train-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.train-name h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.train-name h3 small {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  vertical-align: 0.3em;
}

.train-tag {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  opacity: 0.85;
}

.train-card-body p {
  margin-top: 12px;
  min-height: 78px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--muted);
}

.train-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.train-specs dt {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.train-specs dd {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.train-specs dd small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-left: 3px;
}

.train-card--feature {
  background:
    radial-gradient(360px 260px at 90% 6%, rgba(216, 68, 53, 0.17), transparent 65%),
    var(--ink);
  color: var(--paper);
  border-color: rgba(11, 15, 16, 0.5);
}

.train-card--feature .train-card-top,
.train-card--feature .train-card-body p,
.train-card--feature .train-specs dt {
  color: rgba(242, 238, 229, 0.46);
}

.train-card--feature .train-art {
  background:
    radial-gradient(320px 140px at 50% 80%, rgba(216, 68, 53, 0.16), transparent 70%),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(242, 238, 229, 0.035) 40px);
}

.train-card--feature .train-art {
  color: var(--paper);
}

.train-card--feature .train-specs {
  border-top-color: var(--line-light);
}

.train-card--feature .train-tag {
  color: var(--red);
}

/* ==========================================================================
   Speed
   ========================================================================== */

.speed-section {
  background:
    radial-gradient(1000px 620px at 82% 8%, rgba(69, 97, 100, 0.22), transparent 66%),
    radial-gradient(760px 480px at 8% 92%, rgba(173, 44, 34, 0.1), transparent 70%),
    #0b1112;
  color: var(--paper);
  overflow: hidden;
}

.speed-section::before {
  content: "v²";
  position: absolute;
  right: -3vw;
  top: 4%;
  font-family: var(--serif);
  font-size: clamp(220px, 32vw, 520px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 238, 229, 0.055);
  pointer-events: none;
}

.speed-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(30px, 5vw, 78px);
  align-items: start;
}

.speed-panel {
  padding: 26px;
  border: 1px solid var(--line-light);
  border-radius: 22px;
  background: rgba(17, 26, 27, 0.68);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.speed-readout {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  line-height: 1;
}

.speed-value {
  font-family: var(--serif);
  font-size: clamp(76px, 8.4vw, 122px);
  line-height: 0.88;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.speed-unit {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--red);
  padding-bottom: 9px;
}

.speed-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 22px 0 0;
  background: transparent;
  cursor: pointer;
  --pct: 73%;
}

.speed-range::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red) 0 var(--pct), rgba(242, 238, 229, 0.18) var(--pct) 100%);
}

.speed-range::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(242, 238, 229, 0.18);
}

.speed-range::-moz-range-progress {
  height: 2px;
  background: var(--red);
}

.speed-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -7.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--red);
  box-shadow: 0 0 0 5px rgba(216, 68, 53, 0.16);
  transition: box-shadow 0.2s ease;
}

.speed-range:hover::-webkit-slider-thumb,
.speed-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 9px rgba(216, 68, 53, 0.18);
}

.speed-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--red);
}

.range-labels {
  position: relative;
  height: 14px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(242, 238, 229, 0.32);
}

.range-labels span {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.range-labels span:first-child {
  transform: none;
}

.range-labels span:last-child {
  transform: translateX(-100%);
}

.speed-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
}

.speed-readouts b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.speed-readouts span {
  display: block;
  margin-top: 7px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(242, 238, 229, 0.46);
  line-height: 1.5;
}

.speed-readouts small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: rgba(242, 238, 229, 0.27);
}

.chart-wrap {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-light);
}

.chart-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.38);
}

.chart-head span:last-child {
  color: var(--red);
}

.speed-chart {
  width: 100%;
  height: auto;
  margin-top: 8px;
  overflow: visible;
}

.chart-grid line {
  stroke: rgba(242, 238, 229, 0.1);
  stroke-width: 1;
}

.chart-grid text,
.chart-labels text {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  fill: rgba(242, 238, 229, 0.32);
}

.speed-chart .chart-dot {
  filter: drop-shadow(0 0 8px rgba(216, 68, 53, 0.75));
}

.chart-note {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: rgba(242, 238, 229, 0.26);
}

.speed-copy {
  padding-top: 8px;
}

.speed-quote {
  font-family: var(--serif);
  font-size: clamp(24px, 2.55vw, 35px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-wrap: balance;
}

.speed-copy > p:not(.speed-quote) {
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(242, 238, 229, 0.57);
  max-width: 520px;
}

.formula {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--red);
  background: rgba(242, 238, 229, 0.035);
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: 0.02em;
  color: var(--paper);
}

.formula sub {
  font-size: 0.55em;
  color: var(--red);
}

.formula-eq {
  color: rgba(242, 238, 229, 0.3);
}

.speed-facts {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-light);
  margin-top: 26px;
}

.speed-facts li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
}

.speed-facts li > span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--red);
  padding-top: 3px;
}

.speed-facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.speed-facts p {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.75;
  color: rgba(242, 238, 229, 0.42);
}

.physics-cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(42px, 5vw, 68px);
}

.physics-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line-light);
  border-radius: 18px;
  background: rgba(17, 26, 27, 0.56);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.4s var(--ease);
}

.physics-card:hover {
  border-color: rgba(242, 238, 229, 0.3);
  transform: translateY(-4px);
}

.physics-no {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(242, 238, 229, 0.22);
}

.physics-icon {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.physics-card h3 {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.physics-card p {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(242, 238, 229, 0.48);
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline-section {
  background:
    radial-gradient(900px 500px at 12% 10%, rgba(181, 142, 84, 0.09), transparent 70%),
    var(--paper);
  overflow: hidden;
}

.timeline-viewport {
  position: relative;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
}

.timeline-viewport::before,
.timeline-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(24px, 6vw, 88px);
  z-index: 2;
  pointer-events: none;
}

.timeline-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper), transparent);
}

.timeline-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, var(--paper), transparent);
}

.timeline-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding-bottom: 12px;
}

.timeline-scroll::-webkit-scrollbar {
  display: none;
}

.timeline-inner {
  position: relative;
  min-width: max-content;
  padding: 8px 2px 10px;
}

.timeline-line {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(11, 15, 16, 0.14);
  z-index: 0;
}

.timeline-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.timeline-line span {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--red);
  transition: width 0.1s linear;
}

.timeline-list {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
}

.timeline-item {
  position: relative;
  flex: 0 0 286px;
  width: 286px;
  padding-top: 88px;
  scroll-snap-align: start;
}

.timeline-year {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.timeline-item--end .timeline-year {
  font-size: 25px;
  letter-spacing: 0.02em;
  color: var(--gold);
  font-family: var(--mono);
}

.timeline-dot {
  position: absolute;
  top: 64px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--red);
  z-index: 1;
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline-item--end .timeline-dot {
  border-color: var(--gold);
}

.timeline-card {
  position: relative;
  min-height: 226px;
  padding: 22px;
  border: 1px solid rgba(11, 15, 16, 0.11);
  border-radius: 14px;
  background: rgba(251, 248, 241, 0.66);
  transition: background 0.3s ease, transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
}

.timeline-card:hover {
  background: var(--white);
  border-color: rgba(11, 15, 16, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -26px rgba(11, 15, 16, 0.4);
}

.timeline-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--red);
  border: 1px solid rgba(216, 68, 53, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
}

.timeline-card h3 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.timeline-card p {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

/* ==========================================================================
   Quiz
   ========================================================================== */

.quiz-section {
  background:
    radial-gradient(900px 540px at 80% 0%, rgba(55, 84, 86, 0.24), transparent 66%),
    #0b1112;
  color: var(--paper);
}

.quiz-shell {
  position: relative;
  max-width: 1010px;
  margin: 0 auto;
  padding: clamp(24px, 3.6vw, 44px);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(181, 142, 84, 0.08), transparent 48%),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.75);
}

.quiz-shell::before,
.quiz-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0b1112;
  transform: translateY(-50%);
}

.quiz-shell::before {
  left: -11px;
}

.quiz-shell::after {
  right: -11px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.quiz-progress {
  flex: 1;
  height: 2px;
  background: rgba(11, 15, 16, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 0.4s var(--ease);
}

.quiz-score {
  color: var(--red);
  font-size: 10px;
}

.quiz-body {
  padding: clamp(24px, 3vw, 38px) 0 28px;
  min-height: 330px;
}

.quiz-question-no {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--red);
}

.quiz-question {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid rgba(11, 15, 16, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.25);
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}

.quiz-option:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.quiz-option .option-key {
  flex: none;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(11, 15, 16, 0.2);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.quiz-option.is-correct {
  border-color: #2f6f4e;
  background: rgba(47, 111, 78, 0.1);
}

.quiz-option.is-correct .option-key {
  background: #2f6f4e;
  border-color: #2f6f4e;
  color: #fff;
}

.quiz-option.is-wrong {
  border-color: var(--red);
  background: rgba(216, 68, 53, 0.08);
}

.quiz-option.is-wrong .option-key {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option:disabled:hover {
  transform: none;
}

.quiz-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 2px solid var(--red);
  background: rgba(11, 15, 16, 0.045);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.quiz-feedback strong {
  color: var(--ink);
  font-weight: 600;
}

.quiz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.quiz-foot-note {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}

.quiz-next:hover {
  background: var(--red);
  transform: translateY(-1px);
}

.quiz-next span {
  color: var(--red);
  transition: color 0.25s ease;
}

.quiz-next:hover span {
  color: var(--white);
}

.quiz-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0 6px;
}

.quiz-result .result-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--red);
}

.quiz-result .result-score {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(76px, 10vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.quiz-result .result-score small {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-left: 6px;
}

.quiz-result h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
}

.quiz-result p {
  max-width: 480px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.quiz-result .quiz-restart {
  margin-top: 24px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: background 0.25s ease;
}

.quiz-result .quiz-restart:hover {
  background: var(--red);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  background: #080c0d;
  color: var(--paper);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 480px at 82% 12%, rgba(55, 84, 86, 0.2), transparent 65%),
    radial-gradient(600px 380px at 8% 90%, rgba(173, 44, 34, 0.1), transparent 70%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 112px) var(--pad) 28px;
}

.footer-top {
  position: relative;
  padding-bottom: clamp(52px, 7vw, 90px);
  border-bottom: 1px solid var(--line-light);
}

.footer-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(242, 238, 229, 0.35);
}

.footer-top h2 {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.footer-top h2 em {
  font-style: normal;
  color: var(--red);
}

.footer-top-link {
  position: absolute;
  right: 0;
  bottom: clamp(52px, 7vw, 90px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.6);
  border-bottom: 1px solid rgba(242, 238, 229, 0.24);
  padding-bottom: 6px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-top-link span {
  color: var(--red);
  font-size: 13px;
}

.footer-top-link:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.72fr 0.86fr 1fr;
  gap: clamp(24px, 4vw, 70px);
  padding: 52px 0;
  border-bottom: 1px solid var(--line-light);
}

.footer-col {
  min-width: 0;
}

.footer-col h3 {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(242, 238, 229, 0.32);
}

.footer-col a {
  display: block;
  width: fit-content;
  margin-bottom: 9px;
  font-size: 12px;
  color: rgba(242, 238, 229, 0.62);
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--paper);
}

.footer-about .brand {
  margin-bottom: 20px;
}

.footer-about > p {
  max-width: 320px;
  font-size: 11.5px;
  line-height: 1.85;
  color: rgba(242, 238, 229, 0.38);
}

.footer-meta {
  margin-top: 20px !important;
  font-family: var(--mono);
  font-size: 8px !important;
  letter-spacing: 0.1em;
  line-height: 1.9 !important;
  color: rgba(242, 238, 229, 0.24) !important;
}

.footer-col--note p {
  margin-bottom: 10px;
  font-size: 10.5px;
  line-height: 1.8;
  color: rgba(242, 238, 229, 0.36);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(242, 238, 229, 0.25);
}

.noscript {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  background: var(--red);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

@keyframes rail-load {
  0% { transform: translateX(0); }
  100% { transform: translateX(96px); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scroll-line {
  0% { left: -50%; }
  100% { left: 110%; }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .site-header {
    grid-template-columns: minmax(190px, 1fr) auto minmax(160px, 1fr);
    gap: 16px;
  }

  .site-nav {
    gap: 15px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .live-pill {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(350px, 0.82fr) minmax(480px, 1.18fr);
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(54px, 6.4vw, 88px);
  }

  .stage {
    height: clamp(500px, 64vh, 660px);
  }

  .track-lab {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  }
}

@media (max-width: 1020px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .hero {
    padding-top: 104px;
    min-height: 0;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 26px;
  }

  .hero-copy {
    display: contents;
  }

  .hero-copy > .eyebrow {
    order: 1;
  }

  .hero-copy > h1 {
    order: 2;
    max-width: 740px;
    margin: 8px 0 0;
    font-size: clamp(56px, 9vw, 92px);
  }

  .hero-copy > .hero-lede {
    order: 3;
    max-width: 620px;
    margin-top: 2px;
  }

  .hero-copy > .hero-actions {
    order: 4;
    margin-top: 4px;
  }

  .hero-visual {
    order: 5;
    width: 100%;
    margin-top: 8px;
  }

  .hero-copy > .hero-stats {
    order: 6;
    max-width: 620px;
    margin-top: 6px;
  }

  .hero-copy > .hero-note {
    order: 7;
    margin-top: 8px;
  }

  .stage {
    height: min(68vw, 640px);
    min-height: 440px;
  }

  .hero-foot {
    margin-top: 28px;
  }

  .hero-bigtype {
    font-size: 48vw;
    top: 34vh;
  }

  .section-head-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-lede {
    justify-self: start;
    max-width: 560px;
  }

  .track-lab {
    grid-template-columns: 1fr;
  }

  .track-side {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }

  .layer-detail {
    min-height: 100%;
  }

  .speed-grid {
    grid-template-columns: 1fr;
  }

  .speed-copy {
    padding-top: 0;
  }

  .physics-cards {
    grid-template-columns: 1fr;
  }

  .physics-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0 18px;
    align-items: center;
  }

  .physics-icon {
    grid-row: span 2;
  }

  .physics-card h3 {
    margin-top: 0;
  }

  .physics-card p {
    grid-column: 2;
    margin-top: 2px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-col--note {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line-light);
  }

  .footer-col--note p {
    max-width: 520px;
  }

  .footer-top-link {
    position: static;
    margin-top: 26px;
  }
}

@media (max-width: 880px) {
  .train-viewport::before,
  .train-viewport::after {
    display: none;
  }

  .trains-section .section-head .train-controls,
  .timeline-section .section-head .train-controls {
    position: static;
    margin-top: 24px;
    justify-content: flex-start;
  }

  .train-card {
    flex-basis: 330px;
  }

  .timeline-item {
    flex-basis: 262px;
    width: 262px;
  }

  .timeline-year {
    font-size: 38px;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-about > p {
    max-width: 460px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 74px;
  }

  .site-header {
    height: 70px;
  }

  .site-header.is-scrolled {
    height: 64px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy em {
    display: none;
  }

  .hero {
    padding-top: 88px;
  }

  .hero-grid {
    padding-top: 10px;
    gap: 14px;
  }

  .hero-copy > h1 {
    margin-top: 8px;
    font-size: clamp(46px, 13vw, 68px);
  }

  .hero-lede {
    font-size: 13.5px;
    line-height: 1.95;
  }

  .hero-copy > .hero-actions {
    margin-top: 4px;
  }

  .btn {
    height: 44px;
    padding: 0 18px;
    font-size: 12px;
  }

  .hero-stats {
    margin-top: 8px;
    gap: 10px;
  }

  .hero-stats dt {
    font-size: 28px;
  }

  .hero-stats dd {
    font-size: 9.5px;
  }

  .hero-note {
    margin-top: 10px;
  }

  .stage {
    height: 62svh;
    min-height: 390px;
    border-radius: 18px;
  }

  .stage-chrome {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .stage-model {
    display: none;
  }

  .stage-bottom {
    left: 12px;
    right: 12px;
    bottom: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .stage-hint {
    display: flex;
    padding: 0;
    font-size: 7px;
  }

  .hint-desktop {
    display: none;
  }

  .hint-mobile {
    display: inline;
  }

  .stage-views {
    width: 100%;
    justify-content: flex-start;
  }

  .view-btn {
    height: 26px;
    padding: 0 9px;
    font-size: 9px;
  }

  .stage-caption {
    font-size: 7px;
    gap: 8px;
  }

  .hotspot-label {
    display: none;
  }

  .hotspot {
    width: 36px;
    height: 36px;
    transform: translate3d(0, 0, 0) translate(-50%, -50%);
  }

  .hotspot::before {
    left: 13px;
    top: 13px;
    width: 6px;
    height: 6px;
  }

  .hotspot-pulse {
    left: 1px;
    top: 1px;
    width: 34px;
    height: 34px;
  }

  .part-card {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 78px;
    width: auto;
    padding: 16px;
    border-radius: 14px;
  }

  .part-card h3 {
    font-size: 21px;
  }

  .part-desc {
    font-size: 11px;
  }

  .part-stats {
    margin-top: 12px;
    padding-top: 12px;
  }

  .part-reset {
    margin-top: 12px;
  }

  .hero-foot {
    font-size: 7px;
    padding: 14px 0 18px;
  }

  .hero-coord {
    display: none;
  }

  .scroll-cue span {
    font-size: 7px;
  }

  .spec-line {
    padding: 10px 0;
    animation-duration: 34s;
  }

  .spec-line span {
    padding: 0 18px;
    font-size: 8px;
  }

  .section {
    padding: 66px 0;
  }

  .section-kicker {
    font-size: 8px;
    gap: 9px;
    margin-bottom: 18px;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .section-head h2 {
    font-size: clamp(34px, 9vw, 48px);
    line-height: 1.16;
  }

  .section-head-grid {
    gap: 16px;
  }

  .section-lede {
    font-size: 12.5px;
    line-height: 1.9;
  }

  .section-footnote {
    text-align: left;
    font-size: 8px;
  }

  .track-visual {
    padding: 12px 12px 10px;
    border-radius: 16px;
  }

  .seg-btn {
    height: 27px;
    padding: 0 11px;
    font-size: 10px;
  }

  .seg-note {
    display: none;
  }

  .track-svg {
    margin-top: 2px;
  }

  .svg-notes {
    display: none;
  }

  .dim {
    display: block;
  }

  .svg-dim-text {
    font-size: 18px;
  }

  .track-side {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .layer-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
  }

  .layer-btn {
    grid-template-columns: 22px 1fr;
    padding: 10px 4px 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .layer-btn-en {
    display: none;
  }

  .layer-btn-name {
    font-size: 16px;
  }

  .layer-detail {
    min-height: 0;
    padding: 20px;
  }

  .layer-detail-index {
    font-size: 40px;
  }

  .layer-detail h3 {
    font-size: 24px;
  }

  .layer-stats {
    margin-top: 16px;
  }

  .train-viewport {
    margin: 0 calc(var(--pad) * -1);
  }

  .train-card {
    flex-basis: 84vw;
    max-width: 360px;
  }

  .train-art {
    height: 146px;
  }

  .train-card-body {
    padding: 16px 18px 18px;
  }

  .train-card-body p {
    min-height: 0;
  }

  .train-name h3 {
    font-size: 24px;
  }

  .train-specs dd {
    font-size: 23px;
  }

  .train-viewport {
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    padding-left: var(--pad);
    padding-right: 0;
  }

  .speed-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .speed-value {
    font-size: 78px;
  }

  .speed-readouts {
    gap: 8px;
  }

  .speed-readouts b {
    font-size: 22px;
  }

  .speed-readouts span {
    font-size: 8.5px;
  }

  .speed-readouts small {
    font-size: 6.5px;
  }

  .speed-quote {
    font-size: 25px;
  }

  .speed-copy > p:not(.speed-quote) {
    margin-top: 16px;
    font-size: 12.5px;
  }

  .formula {
    margin: 20px 0;
    padding: 14px 16px;
    font-size: 18px;
  }

  .physics-card {
    display: block;
    padding: 20px;
  }

  .physics-card h3 {
    margin-top: 16px;
  }

  .physics-card p {
    margin-top: 8px;
  }

  .timeline-viewport {
    margin: 0 calc(var(--pad) * -1);
    padding: 0 var(--pad);
  }

  .timeline-inner {
    padding-bottom: 4px;
  }

  .timeline-line {
    top: 64px;
  }

  .timeline-item {
    flex-basis: 246px;
    width: 246px;
    padding-top: 80px;
  }

  .timeline-year {
    font-size: 35px;
  }

  .timeline-dot {
    top: 58px;
  }

  .timeline-card {
    min-height: 218px;
    padding: 18px;
  }

  .timeline-card h3 {
    font-size: 20px;
  }

  .timeline-card p {
    font-size: 11.5px;
  }

  .quiz-shell {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .quiz-shell::before,
  .quiz-shell::after {
    display: none;
  }

  .quiz-top {
    gap: 10px;
    font-size: 8px;
  }

  .quiz-body {
    padding: 22px 0;
    min-height: 0;
  }

  .quiz-question {
    font-size: 23px;
  }

  .quiz-option {
    min-height: 52px;
    font-size: 12px;
  }

  .quiz-feedback {
    font-size: 11.5px;
  }

  .quiz-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .quiz-next {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    padding-top: 56px;
  }

  .footer-top {
    padding-bottom: 40px;
  }

  .footer-top h2 {
    font-size: clamp(38px, 11vw, 58px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0;
  }

  .footer-about {
    grid-column: auto;
  }

  .footer-col--note {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 18px;
    font-size: 7px;
  }

  .footer-col h3 {
    margin-bottom: 12px;
  }

  .footer-col a {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 43px;
  }

  .hero-stats dt {
    font-size: 24px;
  }

  .stage {
    min-height: 360px;
  }

  .view-btn {
    padding: 0 7px;
  }

  .speed-value {
    font-size: 68px;
  }

  .speed-readouts b {
    font-size: 20px;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .spec-line {
    animation: none;
  }
}

/* ==========================================================================
   Data wall / mobile navigation / fallback additions
   ========================================================================== */

.data-wall {
  position: relative;
  margin-top: clamp(44px, 5vw, 66px);
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 22px;
  background:
    radial-gradient(620px 320px at 100% 0%, rgba(216, 68, 53, 0.16), transparent 70%),
    var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.data-wall::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
}

.data-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.data-wall-head p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 22px);
  letter-spacing: -0.01em;
}

.data-wall-head p span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-right: 10px;
  vertical-align: 0.22em;
}

.data-wall-source {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242, 238, 229, 0.34);
  white-space: nowrap;
}

.data-wall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

.data-cell strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(35px, 4.2vw, 62px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-cell strong small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-left: 5px;
  vertical-align: 0.5em;
}

.data-cell > span {
  display: block;
  margin-top: 10px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(242, 238, 229, 0.42);
}

.data-wall-note {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: rgba(242, 238, 229, 0.25);
}

.stage.is-fallback .hotspots,
.stage.is-fallback .stage-views,
.stage.is-fallback .stage-tools,
.stage.is-fallback .stage-hint {
  display: none;
}

.stage.is-fallback .stage-fallback {
  display: flex;
}

@media (max-width: 1020px) {
  .site-nav {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 96px var(--pad) 44px;
    background:
      radial-gradient(700px 480px at 92% 8%, rgba(55, 84, 86, 0.28), transparent 66%),
      #080c0d;
    opacity: 1;
    visibility: hidden;
    transform: none;
    transition: visibility 0.01s linear;
    pointer-events: none;
  }

  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid var(--line-light);
    font-family: var(--serif);
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: rgba(242, 238, 229, 0.74);
  }

  .site-nav a:first-child {
    border-top: 1px solid var(--line-light);
    margin-top: 12px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a.is-active {
    color: var(--red);
  }

  .nav-open .site-header {
    background: #080c0d;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav-open .site-header::before {
    opacity: 0;
  }

  .nav-open .header-side {
    z-index: 2;
  }
}

@media (max-width: 880px) {
  .data-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .data-cell strong {
    font-size: clamp(36px, 6vw, 52px);
  }
}

@media (max-width: 720px) {
  .data-wall {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .data-wall-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .data-wall-head p {
    font-size: 17px;
  }

  .data-wall-source {
    white-space: normal;
  }

  .data-wall-grid {
    margin-top: 18px;
    padding-top: 18px;
    gap: 20px 14px;
  }

  .data-cell strong {
    font-size: clamp(31px, 9vw, 42px);
  }

  .data-cell strong small {
    font-size: 8px;
  }

  .data-cell > span {
    margin-top: 7px;
    font-size: 9.5px;
  }

  .data-wall-note {
    margin-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav {
    transition: none;
  }
}

@keyframes detail-in {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.layer-detail.is-swap {
  animation: detail-in 0.38s var(--ease);
}

.track-svg.has-selection .track-layer {
  cursor: pointer;
}
