:root {
  --bg: #0b0d10;
  --bg-alt: #11141a;
  --surface: #151922;
  --surface-2: #1b2030;
  --border: #232935;
  --border-soft: #1a1f2a;
  --text: #e6e9ef;
  --text-dim: #9aa3b2;
  --text-faint: #6b7280;
  --accent: #ffb020;
  --accent-hot: #ffcc4d;
  --main: #ffb020;
  --feat: #5ac8ff;
  --fix: #ff6b9d;
  --ok: #7ee787;
  --del: #f85149;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
  z-index: 200;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* overflow-x on body breaks position:sticky descendants, so scope clipping to each section that needs it */
body { position: relative; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hot); }

code, pre { font-family: var(--mono); }
code { font-size: 0.92em; color: var(--accent-hot); }
h1 code { color: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───── NAV ───── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.8);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: block;
  object-fit: contain;
}
.brand-name { font-size: 17px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active.nav-cta { color: var(--text) !important; border-color: var(--accent); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
}
.nav-cta:hover { border-color: var(--accent); }

/* ───── HERO ───── */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(1200px 500px at 80% -50px, rgba(255, 176, 32, 0.12), transparent 60%),
    radial-gradient(900px 400px at 10% 400px, rgba(90, 200, 255, 0.07), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.hero-copy h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  max-width: 20ch;
}
.lede {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 28px;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.cta-note { color: var(--text-dim); font-size: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover { background: var(--accent-hot); color: #1a1205; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.stat-lede {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stat-row {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 24px; letter-spacing: -0.01em; color: var(--text); }
.stat span { color: var(--text-dim); font-size: 13px; }

/* ───── HERO MOCKUP (hover-reactive app window) ───── */
.hero-visual { position: relative; }
.mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.6),
    0 10px 30px -10px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  container: mockup / inline-size;
  transform: perspective(1400px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.6s ease;
}
.mockup:hover {
  transform: perspective(1400px) rotateY(-1deg) rotateX(1deg);
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1a2030, #151a24);
  border-bottom: 1px solid var(--border);
}
.traffic { display: flex; gap: 6px; }
.traffic span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #3a4152;
}
.traffic span:nth-child(1) { background: #ff5f57; }
.traffic span:nth-child(2) { background: #febc2e; }
.traffic span:nth-child(3) { background: #28c840; }

.titlebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.mockup.loaded .status-dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-text { white-space: nowrap; }
.status-progress {
  flex: 1;
  max-width: 160px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.status-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  transition: width 0.1s linear;
}
.status-percent { width: 36px; text-align: right; }

.mockup.loaded .status-progress { opacity: 0; transition: opacity 0.4s ease; }
.mockup.loaded .status-percent { opacity: 0; transition: opacity 0.4s ease; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.mockup-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 224px;
  min-height: 300px;
}
.mockup-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  font-size: 12px;
}
.sidebar-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 8px 8px 4px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  padding: 6px 8px;
  border-radius: 5px;
  text-align: left;
  font: inherit;
}
.sb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.sb-dot-main { background: var(--main); }
.sb-dot-feat { background: var(--feat); }
.sb-dot-fix { background: var(--fix); }

/* Graph + commit rows (graph overlays the rows so active highlights extend full width) */
.mockup-graph {
  position: relative;
  min-height: 240px;
  container: graph / inline-size;
}
.graph-rail {
  position: absolute;
  top: 8px;
  left: 0;
  width: 90px;
  height: 224px;
  pointer-events: none;
  z-index: 2;
}
.graph-svg { width: 100%; height: 100%; display: block; }

.lane {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: opacity 0.25s ease, stroke-width 0.2s ease;
}
.lane-main { stroke: var(--main); }
.lane-feat { stroke: var(--feat); }
.lane-fix  { stroke: var(--fix); }

.mockup.loaded .lane { animation: lane-draw 0.9s cubic-bezier(.65,.05,.36,1) forwards; }
.mockup.loaded .lane-feat { animation-delay: 0.15s; }
.mockup.loaded .lane-fix  { animation-delay: 0.30s; }
@keyframes lane-draw {
  to { stroke-dashoffset: 0; }
}

.node circle {
  fill: var(--bg);
  stroke-width: 2;
  transform: scale(0);
  transform-origin: center;
  transform-box: fill-box;
  transition: stroke-width 0.15s ease, filter 0.2s ease;
}
.node-main circle { stroke: var(--main); }
.node-feat circle { stroke: var(--feat); }
.node-fix  circle { stroke: var(--fix); }
.node-merge circle:first-child { fill: var(--main); stroke: var(--main); }
.node-merge .merge-inner { fill: var(--bg); stroke: none; }

.commit-rows {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
}
.commit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4ch 7ch;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 8px 0 84px;
  color: var(--text-dim);
  position: relative;
}
.commit-row.active {
  background: rgba(255, 176, 32, 0.10);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--main);
}
.commit-row[data-lane="feat"].active { background: rgba(90, 200, 255, 0.10); box-shadow: inset 2px 0 0 var(--feat); }
.commit-row[data-lane="fix"].active  { background: rgba(255, 107, 157, 0.10); box-shadow: inset 2px 0 0 var(--fix); }
.cr-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-author { color: var(--text-faint); white-space: nowrap; }
.cr-hash { color: var(--text-faint); white-space: nowrap; text-align: right; }
/* Drop the author column before it squeezes the commit messages */
@container graph (max-width: 364px) {
  .commit-row { grid-template-columns: minmax(0, 1fr) 7ch; }
  .cr-author { display: none; }
}

.mockup.loaded .node circle {
  animation: node-pop 0.35s cubic-bezier(.2,1.4,.4,1) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes node-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}


/* Diff pane */
.mockup-diff {
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10.5px;
  display: flex;
  flex-direction: column;
}
.diff-head {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.diff-body {
  margin: 0;
  padding: 10px;
  font-size: 10.5px;
  line-height: 1.55;
  overflow: hidden;
}
.dl { display: block; white-space: pre; }
/* Each .dl line is its own block, so collapse the markup newlines between them (they render as blank lines) */
.diff-body, .stage-diff { white-space: normal; }
.diff-body .dl { overflow: hidden; text-overflow: ellipsis; }
.dl-ctx { color: var(--text-dim); }
.dl-add { color: var(--ok); background: rgba(126, 231, 135, 0.06); }
.dl-del { color: var(--del); background: rgba(248, 81, 73, 0.06); }

/* The mockup is ~450-555px wide in the desktop hero column but spans the page on tablets,
   so it sizes off its own width: the sidebar goes first, then the diff pane.
   Cutoffs keep the longest commit message (26ch) whole in SF Mono, the widest mono visitors get */
@container mockup (max-width: 701px) {
  .mockup-body { grid-template-columns: minmax(0, 1fr) 224px; }
  .mockup-sidebar { display: none; }
}
@container mockup (max-width: 551px) {
  .mockup-body { grid-template-columns: minmax(0, 1fr); }
  .mockup-diff { display: none; }
}

.node { pointer-events: none; }
.sb-item { pointer-events: none; }
.commit-row { pointer-events: none; }

/* Commit row stagger: rows fade + slide in top-down after load */
.commit-row {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mockup.loaded .commit-row {
  opacity: 1;
  transform: none;
}
.mockup.loaded .commit-row:nth-child(1) { transition-delay: 0.05s; }
.mockup.loaded .commit-row:nth-child(2) { transition-delay: 0.12s; }
.mockup.loaded .commit-row:nth-child(3) { transition-delay: 0.19s; }
.mockup.loaded .commit-row:nth-child(4) { transition-delay: 0.26s; }
.mockup.loaded .commit-row:nth-child(5) { transition-delay: 0.33s; }
.mockup.loaded .commit-row:nth-child(6) { transition-delay: 0.40s; }
.mockup.loaded .commit-row:nth-child(7) { transition-delay: 0.47s; }
.mockup.loaded .commit-row:nth-child(8) { transition-delay: 0.54s; }

/* ───── KINETIC MARQUEE ───── */
.marquee {
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--text-faint);
  letter-spacing: -0.01em;
}
.marquee-track span { transition: color 0.2s ease; }
.marquee-track span:hover { color: var(--accent); }
.marquee-track em { color: var(--accent); font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ───── PINNED SCROLL-CHAPTERED TOUR ───── */
.tour {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
/* Driver = the tall scroll container that advances the active chapter as the user scrolls it.
   Height = 300vh gives ~40vh of scroll per chapter (roughly 4 wheel ticks). */
.tour-driver {
  position: relative;
  height: 300vh;
}
/* Sticky = the viewport-sized stage that pins while the driver scrolls past.
   Full viewport height with centered content so empty space is symmetric above/below. */
.tour-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0 48px;
  overflow: hidden;
}
.tour-intro {
  text-align: center;
  margin-bottom: 36px;
}
.tour-intro h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.tour-intro p {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0;
}
.tour-container {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  width: 100%;
}
.tour-spine {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}
.tour-spine-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.chapter-label {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0 10px 14px;
  color: var(--text-faint);
  transition: color 0.3s ease, border-color 0.3s ease;
  border-left: 2px solid var(--border);
  cursor: pointer;
}
.chapter-label .ch-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}
.chapter-label .ch-title {
  font-size: 14px;
  font-weight: 500;
}
.chapter-label:hover { color: var(--text-dim); }
.chapter-label.active {
  color: var(--text);
  border-left-color: var(--accent);
}
.chapter-label.active .ch-num { color: var(--accent); }

/* Tour progress bar under the spine */
.tour-progress {
  margin: 8px 0 0 14px;
  width: calc(100% - 14px);
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tour-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  transition: width 0.2s ease;
}

/* Stage = the area where only one chapter is visible at a time */
.tour-stage {
  position: relative;
  min-height: 420px;
}
.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  pointer-events: none;
}
.chapter.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}
.chapter-head { max-width: 62ch; }
.chapter-index {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.chapter-head h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
  max-width: 20ch;
}
.chapter-head p {
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 52ch;
  margin: 0;
}

.chapter-art {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.chapter-art-clone .fake-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 10px 0;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 13px;
}
.chapter-art-clone .fake-field-label { color: var(--text-faint); }
.chapter-art-clone .fake-field-value { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.fake-progress {
  margin-top: 16px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.fake-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
}
.fake-log {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fake-log .ok { color: var(--ok); }

.mini-graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-main { background: var(--main); }
.legend-feat { background: var(--feat); }
.legend-fix  { background: var(--fix); }

.mini-graph-rows {
  display: flex;
  flex-direction: column;
}
.mgr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  border-radius: 6px;
  transition: background 0.12s ease;
}
.mgr:hover { background: var(--surface-2); }
.mg-node {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--bg);
}
.mg-main   { color: var(--main); }
.mg-feat   { color: var(--feat); }
.mg-fix    { color: var(--fix); }
.mg-merge  { color: var(--main); background: var(--main); }

.stage-diff {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  background: var(--bg-alt);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: auto;
}

.chapter-art-rebase { padding: 14px; }
.rebase-row {
  display: grid;
  grid-template-columns: 80px 70px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 0.12s ease, transform 0.15s ease;
  cursor: default;
  font-family: var(--mono);
  font-size: 13px;
}
.r-op {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 176, 32, 0.15);
  color: var(--accent);
  text-align: center;
}
.r-squash { background: rgba(90, 200, 255, 0.15); color: var(--feat); }
.r-reword { background: rgba(126, 231, 135, 0.15); color: var(--ok); }
.r-drop   { background: rgba(248, 81, 73, 0.15); color: var(--del); }
.r-sha { color: var(--text-faint); }
.r-msg { color: var(--text); }

.chapter-art-push .push-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 13px;
}
.chapter-art-push .push-label { color: var(--text-faint); }
.chapter-art-push .push-val { color: var(--text); }
.chapter-art-push .push-ok .push-label { color: var(--ok); }

/* ───── SECTIONS ───── */
.section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.section-lede {
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 0 40px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { font-size: 16px; margin: 0 0 8px; letter-spacing: -0.005em; }
.card p { color: var(--text-dim); margin: 0; font-size: 14.5px; }

/* Download section: platform cards reuse .grid/.card; the single CTA goes to GitHub Releases */
#download .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#download .card:hover { transform: none; border-color: var(--border); }
.download-format {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
}
.download-cta { margin: 28px 0 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.two-col h3 { margin: 0 0 14px; font-size: 17px; }
.check-list { list-style: none; padding: 0; margin: 0; color: var(--text-dim); }
.check-list li {
  padding: 8px 0 8px 26px;
  position: relative;
  border-bottom: 1px dashed var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  color: var(--accent); font-weight: 700;
}

/* ───── ARCHITECTURE DIAGRAM ───── */
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  position: relative;
}
.arch-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px;
  position: relative;
}
.arch-layer:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 1px;
  height: 12px;
  background: linear-gradient(180deg, var(--border), transparent);
  pointer-events: none;
}
.arch-mods {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.arch-mod {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.arch-mod:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.arch-layer[data-tier="foundation"] .arch-mod {
  border-color: rgba(90, 200, 255, 0.35);
  color: var(--feat);
}
.arch-layer[data-tier="top"] .arch-mod {
  border-color: rgba(255, 176, 32, 0.5);
  background: rgba(255, 176, 32, 0.08);
  color: var(--accent);
}
.arch-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}
.code-block code { color: var(--text); }
.code-block-lg { font-size: 14px; padding: 22px 24px; }

.fineprint { color: var(--text-dim); font-size: 14px; margin-top: 18px; }

/* ───── FOOTER ───── */
.footer { padding: 40px 0; background: var(--bg); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { padding: 48px 0; }
  .mockup { transform: none; }
  /* Fall back to a normal stacked layout on mobile; pinned sticky is awkward on touch */
  .tour-driver { height: auto; }
  .tour-sticky {
    position: static;
    height: auto;
    padding: 56px 0;
    overflow: visible;
  }
  .tour-container { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tour-spine-inner { flex-direction: row; overflow-x: auto; gap: 4px; margin-bottom: 16px; }
  .tour-progress { display: none; }
  .chapter-label { border-left: none; border-bottom: 2px solid var(--border); padding: 8px 12px; }
  .chapter-label.active { border-left: none; border-bottom-color: var(--accent); }
  .tour-stage { position: static; min-height: 0; display: flex; flex-direction: column; gap: 40px; }
  .chapter {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
}

@media (max-width: 720px) {
  #download .grid { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 64px 0; }
  .two-col { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; text-align: left; }
  .stat-row { gap: 20px; }
  .arch-layer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .arch-caption { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .lane { stroke-dashoffset: 0; animation: none; }
  .node circle { transform: scale(1); animation: none; }
  .status-dot { animation: none; }
  .commit-row { opacity: 1; transform: none; transition: none; }
}
