:root {
  color-scheme: light;
  --paper: #faf8f4;
  --paper-warm: #f3eee6;
  --surface: #ffffff;
  --surface-tint: #f6f2eb;
  --ink: #1e1b18;
  --ink-soft: #433d37;
  --muted: #6f675f;
  --muted-light: #968d83;
  --line: #e6dfd5;
  --line-strong: #d7cdc0;

  --orange: #e65d19;
  --orange-bright: #ff6b00;
  --orange-deep: #b8440a;
  --orange-soft: #fff2ea;
  --green: #16794b;
  --green-soft: #eaf6ef;

  --stage-bg: #171513;
  --stage-card: #211e1b;
  --stage-line: rgba(255, 255, 255, 0.1);
  --stage-ink: #f5f1ea;
  --stage-muted: #aba297;

  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-soft: 0 12px 32px rgba(30, 27, 24, 0.06);
  --shadow-card: 0 18px 48px rgba(30, 27, 24, 0.09);
  --shadow-photo: 0 22px 54px rgba(30, 27, 24, 0.14);

  --measure: 680px;
  --wide: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--orange-bright));
  z-index: 60;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230, 223, 213, 0.72);
}

.nav {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(230, 93, 25, 0.24);
}

.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--orange);
  transform: translateY(-1px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lang-switch:hover {
  border-color: var(--orange);
  color: var(--orange-deep) !important;
  background: var(--orange-soft);
}

/* Opening Hero */
.story-hero {
  position: relative;
  padding: 76px 0 88px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(640px 360px at 82% 8%, rgba(255, 107, 0, 0.08), transparent 72%),
    radial-gradient(520px 320px at 12% 92%, rgba(230, 93, 25, 0.05), transparent 70%),
    var(--paper);
}

.hero-wrap {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
}

.hero-intro {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.story-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.story-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.story-title .accent-underline {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.story-title .accent-underline::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.08em;
  height: 0.24em;
  background: rgba(255, 107, 0, 0.2);
  border-radius: 4px;
  z-index: -1;
}

.story-lead {
  max-width: 610px;
  margin: 24px auto 0;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: var(--muted-light);
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(230, 93, 25, 0.26);
}

.btn-primary:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
  box-shadow: 0 14px 28px rgba(230, 93, 25, 0.34);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #332e29;
  border-color: #332e29;
}

/* Diptych: Then & Now */
.diptych {
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: 0.74fr 1.26fr;
  gap: 24px;
  align-items: stretch;
}

.photo-frame {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.photo-frame .photo-viewport {
  position: relative;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: #ebe4da;
  cursor: zoom-in;
  flex: 1;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-frame .photo-viewport:hover img {
  transform: scale(1.025);
}

.photo-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(24, 22, 20, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.photo-frame figcaption {
  padding: 13px 6px 4px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.photo-frame figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.diptych-left .photo-viewport {
  min-height: 360px;
  max-height: 440px;
}

.diptych-left img {
  object-position: center 22%;
}

.diptych-right .photo-viewport {
  min-height: 360px;
  max-height: 440px;
}

.diptych-right img {
  object-position: center center;
}

/* Chapter Navigation Strip */
.chapter-strip {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.chapter-strip a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.chapter-strip a:hover {
  color: var(--orange);
}

.chapter-strip .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
}

/* Editorial Story Chapters */
.chapter {
  padding: 88px 0;
  position: relative;
}

.chapter + .chapter {
  border-top: 1px solid var(--line);
}

.chapter--tinted {
  background: var(--paper-warm);
}

.chapter-inner {
  width: min(var(--measure), calc(100% - 40px));
  margin: 0 auto;
}

.chapter-wide {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.chapter-meta .chapter-num {
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.chapter h2 {
  margin: 0 0 28px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
}

.prose p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose a.text-link {
  color: var(--orange-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(230, 93, 25, 0.38);
  transition: text-decoration-color 0.2s ease;
}

.prose a.text-link:hover {
  text-decoration-color: var(--orange-deep);
}

/* Pull Quote */
.pull-quote {
  margin: 44px 0;
  padding: 28px 32px;
  border-left: 3px solid var(--orange);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-soft);
}

.pull-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.65;
  color: var(--ink);
  font-weight: 600;
}

.pull-quote footer {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

/* Era Chips (Chapter 1) */
.era-strip {
  margin: 36px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.era-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.era-card .era-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

.era-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.era-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* Split Story + Vintage Photo */
.story-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.vintage-polaroid {
  margin: 0;
  padding: 14px 14px 20px;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-photo);
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}

.vintage-polaroid:hover {
  transform: rotate(0deg);
}

.vintage-polaroid .photo-viewport {
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  background: #dfd7cc;
}

.vintage-polaroid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
}

.vintage-polaroid figcaption {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
}

/* Turning Point Band (Chapter 2) */
.turn-statement {
  margin: 44px auto 0;
  max-width: 780px;
  padding: 40px 44px;
  border-radius: var(--radius-xl);
  background: var(--stage-bg);
  color: var(--stage-ink);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.turn-statement::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(460px 220px at 50% 0%, rgba(255, 107, 0, 0.2), transparent 72%);
  pointer-events: none;
}

.turn-statement blockquote {
  position: relative;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.58;
  font-weight: 600;
}

.turn-statement .turn-note {
  position: relative;
  margin: 16px 0 0;
  font-size: 14.5px;
  color: var(--stage-muted);
}

/* Chapter 2: Spring Return Photo + Moments Memory */
.spring-memory {
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  align-items: center;
}

.spring-ball-card .photo-viewport {
  aspect-ratio: 3 / 4;
  max-height: 440px;
}

.moments-card {
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.moments-card .moments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.moments-card .moments-date {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--orange-deep);
  background: var(--orange-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.moments-card .photo-viewport {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #f5f5f5;
}

.moments-card img {
  width: 100%;
  height: auto;
  display: block;
}

.moments-card figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* Interactive Rhythm Lab (Chapter 3) */
.rhythm-lab {
  margin-top: 48px;
  border-radius: var(--radius-xl);
  background: var(--stage-bg);
  color: var(--stage-ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(23, 21, 19, 0.24);
  overflow: hidden;
}

.rhythm-lab-head {
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--stage-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rhythm-lab-title .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #ff9c5c;
  margin-bottom: 6px;
}

.rhythm-lab-title .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-bright);
}

.rhythm-lab-title h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}

.rhythm-lab-title p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--stage-muted);
}

.model-switcher {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.model-btn {
  border: 0;
  background: transparent;
  color: var(--stage-muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.model-btn.is-active {
  background: var(--orange);
  color: #fff;
}

.rhythm-lab-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}

.canvas-pane {
  padding: 24px 26px;
  border-right: 1px solid var(--stage-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.canvas-box {
  position: relative;
  border-radius: 16px;
  background: #121519;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.canvas-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-hud {
  position: absolute;
  left: 14px;
  top: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.phase-pill {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.2);
  border: 1px solid rgba(255, 107, 0, 0.45);
  color: #ffb889;
  font-size: 12px;
  font-weight: 600;
}

.time-readout {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 9px;
  border-radius: 999px;
}

.canvas-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.play-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.scrubber {
  flex: 1;
  accent-color: var(--orange-bright);
  cursor: pointer;
}

.phase-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.phase-jump {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--stage-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.phase-jump:hover,
.phase-jump.is-current {
  border-color: rgba(255, 107, 0, 0.65);
  background: rgba(255, 107, 0, 0.18);
  color: #fff;
}

/* Right pane: Dual-track rhythm explanation */
.rhythm-explain {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.dual-track-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dual-track-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dual-track-head span {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.dual-track-head small {
  font-size: 12px;
  color: var(--stage-muted);
}

.track-row {
  margin-bottom: 14px;
}

.track-row:last-of-type {
  margin-bottom: 0;
}

.track-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--stage-muted);
  margin-bottom: 7px;
}

.track-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.track-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.track-seg--load {
  background: #4e6ef2;
}

.track-seg--rise {
  background: #b64bc8;
}

.track-seg--release {
  background: #e65d19;
}

.track-seg--follow {
  background: #27a86b;
}

.track-seg--ball {
  background: linear-gradient(90deg, #3b82f6, #f59e0b 52%, #ff6b00);
}

.track-playhead {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-callout {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(230, 93, 25, 0.11);
  border: 1px solid rgba(255, 107, 0, 0.25);
}

.compare-callout strong {
  display: block;
  font-size: 14px;
  color: #ffb889;
  margin-bottom: 6px;
}

.compare-callout p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #dfd6cc;
}

.model-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.mini-stat span {
  display: block;
  font-size: 11.5px;
  color: var(--stage-muted);
}

.mini-stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  color: #fff;
}

/* Chapter 4: Park Photo + Open Source Alchemy */
.park-feature {
  margin: 44px 0 52px;
}

.park-feature .photo-frame .photo-viewport {
  aspect-ratio: 16 / 9;
}

.easter-egg-note {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--orange-soft);
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.75;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.easter-egg-note .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 9px;
  flex-shrink: 0;
}

.opensource-box {
  margin-top: 44px;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.opensource-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.opensource-head .repo-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--orange-deep);
  font-weight: 600;
  margin-bottom: 6px;
}

.opensource-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.opensource-head p {
  margin: 8px 0 0;
  max-width: 600px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
}

.opensource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.opensource-grid figure {
  margin: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.opensource-grid .photo-viewport {
  cursor: zoom-in;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 16 / 10;
}

.opensource-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s ease;
}

.opensource-grid .photo-viewport:hover img {
  transform: scale(1.02);
}

.opensource-grid figcaption {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Chapter 5: Milestones + App Gallery */
.milestone-row {
  margin: 38px 0 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.milestone-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.milestone-card .val {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--orange-deep);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.milestone-card .lbl {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.milestone-card p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* App Real Screenshots Showcase */
.app-showcase {
  margin-top: 52px;
}

.app-showcase-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 36px;
}

.app-showcase-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink);
}

.app-showcase-head p {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.phone-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.phone-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phone-bezel {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  border-radius: 34px;
  background: #1b1917;
  box-shadow: 0 24px 50px rgba(30, 27, 24, 0.18);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.phone-bezel:hover {
  transform: translateY(-4px);
}

.phone-screen {
  border-radius: 25px;
  overflow: hidden;
  background: #f7f9fc;
  aspect-ratio: 9 / 19.2;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone-item h4 {
  margin: 18px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.phone-item p {
  margin: 0;
  max-width: 270px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* Epilogue & Download Card */
.epilogue {
  padding: 96px 0 104px;
  background:
    radial-gradient(600px 320px at 50% 0%, rgba(255, 107, 0, 0.08), transparent 72%),
    var(--paper);
  border-top: 1px solid var(--line);
}

.epilogue-quote {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.epilogue-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.6;
  color: var(--ink);
  font-weight: 600;
}

.epilogue-quote .sub {
  margin-top: 18px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 400;
  color: var(--muted);
}

.download-card {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

.download-icon {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(230, 93, 25, 0.28);
}

.download-body h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.download-tagline {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.download-pills {
  margin: 18px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-pills span {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.download-note {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.download-note a {
  color: var(--orange-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Subpages (Support, Policy, Terms) */
.page-hero {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 36px;
}

.page-hero .eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.24;
  color: var(--ink);
}

.page-hero p {
  margin: 16px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.8;
}

.content {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0 88px;
}

.content-section {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--ink);
}

.content-section h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  color: var(--ink);
}

.content-section p,
.content-section li {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

.content-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.notice {
  padding: 16px 18px;
  border-left: 3.5px solid var(--orange);
  background: var(--orange-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--orange-deep);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.icp-link {
  color: var(--muted);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 16, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lightbox img {
  max-width: min(1040px, 94vw);
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
  background: #111;
}

.lightbox-caption {
  margin-top: 14px;
  max-width: 720px;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.65;
}

/* Subtle Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .diptych,
  .story-split,
  .spring-memory,
  .rhythm-lab-body,
  .opensource-grid {
    grid-template-columns: 1fr;
  }

  .canvas-pane {
    border-right: 0;
    border-bottom: 1px solid var(--stage-line);
  }

  .diptych-left .photo-viewport,
  .diptych-right .photo-viewport {
    min-height: 260px;
    max-height: none;
    aspect-ratio: 4 / 3;
  }

  .diptych-left .photo-viewport {
    aspect-ratio: 3 / 4;
    max-height: 460px;
  }

  .era-strip,
  .milestone-row,
  .phone-gallery,
  .grid,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .download-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 24px;
  }

  .download-icon {
    margin: 0 auto;
  }

  .download-body h3,
  .download-pills,
  .download-actions {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .brand-sub {
    display: none;
  }

  .nav {
    min-height: 58px;
    gap: 12px;
  }

  .nav-links {
    gap: 14px;
    font-size: 13.5px;
  }

  .nav-links .hide-sm {
    display: none;
  }

  .story-hero {
    padding: 48px 0 60px;
  }

  .chapter {
    padding: 60px 0;
  }

  .turn-statement {
    padding: 28px 22px;
  }

  .rhythm-lab-head,
  .canvas-pane,
  .rhythm-explain,
  .opensource-box {
    padding: 20px;
  }

  .pull-quote {
    padding: 20px 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
