:root {
  color-scheme: light dark;
  --bg: #f4f5f2;
  --bg-soft: #e9ebe6;
  --surface: rgba(255, 255, 255, .66);
  --surface-solid: #fbfcf9;
  --text: #111411;
  --muted: #666d67;
  --faint: #979d97;
  --line: rgba(17, 20, 17, .13);
  --line-strong: rgba(17, 20, 17, .25);
  --accent: #79b900;
  --accent-bright: #a6e51f;
  --accent-ink: #243500;
  --danger: #e65243;
  --observe: #c58100;
  --header: rgba(244, 245, 242, .78);
  --shadow: 0 30px 80px rgba(20, 24, 20, .10);
  --max: 1240px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090b0a;
    --bg-soft: #111411;
    --surface: rgba(19, 23, 20, .72);
    --surface-solid: #121512;
    --text: #f2f5ef;
    --muted: #9ba39c;
    --faint: #6e756f;
    --line: rgba(242, 245, 239, .11);
    --line-strong: rgba(242, 245, 239, .22);
    --accent: #b7ff3c;
    --accent-bright: #cbff73;
    --accent-ink: #1d2e00;
    --danger: #ff6b5c;
    --observe: #f0b340;
    --header: rgba(9, 11, 10, .76);
    --shadow: 0 34px 90px rgba(0, 0, 0, .32);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  scrollbar-color: var(--faint) transparent;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }
::selection { background: var(--accent); color: #101800; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

.noise {
  position: fixed;
  z-index: 30;
  inset: 0;
  opacity: .025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: var(--header);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(120%);
  transition: height .35s var(--ease), border-color .35s ease;
}

.site-header.is-scrolled { height: 60px; border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; text-decoration: none; font-weight: 740; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--text); color: var(--bg); font-size: 10px; letter-spacing: -.05em; border-radius: 6px; }
.nav-links { display: flex; gap: 34px; font-size: 13px; color: var(--muted); }
.nav-links a, .nav-github { text-decoration: none; transition: color .2s ease; }
.nav-links a:hover, .nav-github:hover { color: var(--text); }
.nav-github { justify-self: end; font-size: 13px; font-weight: 650; }

section, footer { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }

.hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding: clamp(128px, 17vh, 190px) max(24px, calc((100vw - var(--max)) / 2)) 54px;
  display: grid;
  align-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .36;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 4%, black 35%, black 68%, transparent 100%);
}

.hero-copy { position: relative; z-index: 3; width: min(860px, 76vw); }
.eyebrow, .kicker { margin: 0 0 24px; color: var(--muted); font-size: 12px; font-weight: 760; letter-spacing: .16em; }
.hero h1 { margin: 0; font-weight: 820; letter-spacing: -.075em; line-height: .78; }
.hero h1 > span { display: block; font-size: clamp(105px, 17.2vw, 252px); }
.hero h1 small { display: block; margin-top: 38px; font-size: clamp(33px, 5vw, 72px); line-height: .94; letter-spacing: -.055em; font-weight: 690; }
.hero-description { width: min(640px, 100%); margin: 38px 0 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; letter-spacing: -.02em; }
.hero-actions, .start-actions { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 14px; font-weight: 690; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button-primary:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button-quiet { background: transparent; }
.button-quiet:hover { border-color: var(--text); }

.hero-signal {
  position: absolute;
  z-index: 1;
  width: min(52vw, 720px);
  aspect-ratio: 1;
  right: -7vw;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 64%);
}
.signal-ring { position: absolute; inset: 12%; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 50%; }
.ring-b { inset: 27%; }
.ring-c { inset: 41%; }
.signal-core { position: absolute; inset: 50% auto auto 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 18px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 56px var(--accent); transform: translate(-50%, -50%); }
.ring-a::after, .ring-b::after, .ring-c::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); top: 50%; left: -4px; box-shadow: 0 0 20px var(--accent); transform: translateY(-50%); }
.ring-a { animation: spin 14s linear infinite; }
.ring-b { animation: spin 10s linear infinite reverse; }
.ring-c { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-meta { position: absolute; z-index: 4; right: max(24px, calc((100vw - var(--max)) / 2)); bottom: 48px; display: flex; gap: 34px; }
.meta-item { min-width: 110px; border-top: 1px solid var(--line-strong); padding-top: 12px; }
.meta-item strong { display: block; font-size: 30px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.meta-item span { color: var(--muted); font-size: 12px; }
.scroll-mark { position: absolute; z-index: 3; left: max(24px, calc((100vw - var(--max)) / 2)); bottom: 48px; display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.scroll-mark > span:first-child { width: 36px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-mark > span:first-child::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: scroll-line 2.4s var(--ease) infinite; }
@keyframes scroll-line { 50%, 100% { transform: translateX(100%); } }

.section-index { padding-top: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; letter-spacing: .15em; }
.manifesto { min-height: 88vh; display: grid; grid-template-columns: 1fr 3.4fr; gap: 40px; padding: 120px 0 150px; }
.manifesto .section-index { border: 0; padding: 2px 0; }
.manifesto-body { max-width: 1020px; }
.statement { margin: 0; max-width: 1000px; font-size: clamp(48px, 7.5vw, 104px); line-height: .97; letter-spacing: -.065em; font-weight: 760; }
.section-copy { max-width: 610px; margin: 30px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; letter-spacing: -.015em; }

.architecture, .modes, .capabilities, .get-started { padding: 34px 0 120px; }
.section-heading { display: grid; grid-template-columns: 1.6fr .8fr; align-items: end; gap: 80px; margin: 82px 0 54px; }
.section-heading h2, .modes h2, .console h2, .get-started h2 { margin: 0; font-size: clamp(56px, 8.2vw, 116px); line-height: .9; letter-spacing: -.07em; font-weight: 790; }
.section-heading .section-copy { margin: 0; }

.scenario-control { display: flex; border-bottom: 1px solid var(--line); }
.scenario-button { position: relative; min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 24px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; transition: color .2s, border-color .2s; }
.scenario-button:hover, .scenario-button.is-active { color: var(--text); }
.scenario-button.is-active { border-color: var(--accent); }
.scenario-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.scenario-button.is-active .scenario-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }

.flow-stage { position: relative; min-height: 390px; border-bottom: 1px solid var(--line); padding: 80px 30px 38px; overflow: hidden; }
.flow-track { position: absolute; left: 10%; right: 10%; top: 130px; height: 2px; }
.track-base, .track-progress { position: absolute; inset: 0; background: var(--line-strong); }
.track-progress { background: var(--accent); transform-origin: left; animation: progress-loop 4s var(--ease) infinite; }
@keyframes progress-loop { 0% { transform: scaleX(0); } 75%, 100% { transform: scaleX(1); } }
.packet { position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent); animation: packet-run 4s var(--ease) infinite; }
.packet-b { animation-delay: 1.4s; opacity: 0; }
@keyframes packet-run { 0% { left: 0; opacity: 0; transform: scale(.5); } 8% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; transform: scale(1); } }
.flow-nodes { position: relative; z-index: 2; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; }
.flow-node { text-align: center; }
.flow-node::before { content: ""; display: block; width: 16px; height: 16px; margin: 42px auto 34px; border: 2px solid var(--bg); outline: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-solid); transition: background .3s ease, box-shadow .3s ease; }
.flow-stage[data-state="allow"] .flow-node:last-child::before { background: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent); }
.flow-stage[data-state="block"] .flow-node:last-child::before { background: var(--danger); box-shadow: 0 0 18px color-mix(in srgb, var(--danger) 60%, transparent); }
.flow-stage[data-state="observe"] .flow-node:last-child::before { background: var(--observe); box-shadow: 0 0 18px color-mix(in srgb, var(--observe) 60%, transparent); }
.node-number { display: block; margin-bottom: 8px; color: var(--faint); font-size: 10px; letter-spacing: .16em; }
.flow-node strong { display: block; font-size: 15px; font-weight: 680; }
.flow-node small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.flow-stage[data-state="block"] .verdict-text { color: var(--danger); }
.flow-stage[data-state="observe"] .verdict-text { color: var(--observe); }
.flow-stage[data-state="allow"] .verdict-text { color: var(--accent); }
.trace-line { position: absolute; left: 30px; right: 30px; bottom: 30px; display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; letter-spacing: .12em; }
.trace-line code { color: var(--muted); font-size: 12px; letter-spacing: 0; text-align: right; }

.path-explainer { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 50px; align-items: center; padding: 80px 0 0; }
.path-copy > span { color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .16em; }
.path-copy h3 { margin: 15px 0 12px; font-size: clamp(28px, 3vw, 42px); line-height: 1; letter-spacing: -.05em; }
.path-copy p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.path-switch { position: relative; height: 130px; }
.path-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-strong); }
.path-pulse { position: absolute; left: 0; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent); animation: path-hop 3s var(--ease) infinite alternate; }
@keyframes path-hop { to { left: calc(100% - 10px); } }
.path-label { position: absolute; top: calc(50% + 14px); font-size: 9px; letter-spacing: .16em; color: var(--faint); }
.path-label-fast { left: 0; }
.path-label-slow { right: 0; }

.modes { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.modes > .section-index { grid-column: 1 / -1; }
.modes-intro { padding-top: 76px; }
.modes-intro .section-copy { max-width: 470px; }
.mode-demo { margin-top: 76px; border-left: 1px solid var(--line); padding-left: 46px; }
.mode-status { min-height: 66px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.mode-status strong { margin-left: auto; color: var(--accent); font-size: 11px; letter-spacing: .16em; }
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mode-selector { display: grid; }
.mode-selector button { min-height: 120px; display: grid; grid-template-columns: 50px 1fr; grid-template-rows: auto auto; align-content: center; gap: 3px 16px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; opacity: .45; transition: opacity .25s ease, transform .25s var(--ease); }
.mode-selector button:hover, .mode-selector button.is-active { opacity: 1; transform: translateX(8px); }
.mode-selector button > span { grid-row: 1 / 3; color: var(--faint); font-size: 10px; }
.mode-selector strong { font-size: 24px; letter-spacing: -.04em; }
.mode-selector small { color: var(--muted); font-size: 13px; }
.mode-event { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; color: var(--faint); font-size: 10px; }
.mode-event code { color: var(--accent); }

.capability-heading { margin-bottom: 90px; }
.feature-list { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.feature-brief { min-width: 0; padding: 28px 22px 32px; border-right: 1px solid var(--line); }
.feature-brief:first-child { padding-left: 0; }
.feature-brief:last-child { border-right: 0; padding-right: 0; }
.feature-brief > span { color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .13em; }
.feature-brief h3 { min-height: 3.1em; margin: 18px 0 14px; font-size: clamp(22px, 2.1vw, 31px); line-height: 1.02; letter-spacing: -.045em; }
.feature-brief p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.feature-stream { border-top: 1px solid var(--line); }
.feature-row { min-height: 340px; display: grid; grid-template-columns: 70px 1.05fr .95fr 1fr; gap: 42px; align-items: center; padding: 50px 0; border-bottom: 1px solid var(--line); }
.feature-number { align-self: start; color: var(--faint); font-size: 11px; letter-spacing: .16em; }
.feature-title > span { color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .14em; }
.feature-title h3 { margin: 16px 0 0; font-size: clamp(33px, 3.8vw, 54px); line-height: .97; letter-spacing: -.055em; }
.feature-row > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.feature-visual { min-height: 170px; border-left: 1px solid var(--line); padding-left: 36px; }
.rule-stack { display: flex; flex-direction: column; justify-content: center; }
.rule-stack span { display: flex; align-items: center; min-height: 34px; border-bottom: 1px solid var(--line); color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rule-stack span:first-child { color: var(--accent); font-weight: 700; }
.confidence { display: flex; flex-direction: column; justify-content: center; }
.confidence-axis { display: flex; justify-content: space-between; color: var(--faint); font: 9px ui-monospace, monospace; }
.confidence-bar { position: relative; height: 6px; margin: 14px 0 24px; background: var(--line); }
.confidence-bar span { display: block; width: 85%; height: 100%; background: linear-gradient(90deg, var(--observe), var(--accent)); }
.confidence-bar i { position: absolute; width: 1px; height: 24px; left: 85%; top: -9px; background: var(--text); }
.confidence small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.sample-grid { display: grid; grid-template-columns: repeat(10, 1fr); align-content: center; gap: 7px; }
.sample-grid span { aspect-ratio: 1; background: var(--line); }
.sample-grid .sampled { background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 48%, transparent); }
.log-line { display: flex; align-items: center; justify-content: center; }
.log-line span { color: var(--muted); font: 10px ui-monospace, monospace; }
.log-line i { flex: 1; height: 1px; margin: 0 7px; background: var(--line-strong); position: relative; overflow: hidden; }
.log-line i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: log-run 2.5s var(--ease) infinite; }
.log-line i:nth-of-type(2)::after { animation-delay: .45s; }
.log-line i:nth-of-type(3)::after { animation-delay: .9s; }
@keyframes log-run { 45%, 100% { transform: translateX(100%); } }

.console { display: grid; grid-template-columns: .72fr 1.28fr; gap: 80px; }
.console > .section-index { grid-column: 1 / -1; }
.console-copy { padding-top: 84px; }
.console h2 { font-size: clamp(52px, 6.2vw, 90px); }
.console-window { margin-top: 84px; align-self: start; border: 1px solid var(--line-strong); background: var(--surface-solid); box-shadow: var(--shadow); min-width: 0; }
.console-chrome { height: 46px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.console-chrome > span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.console-chrome strong { margin-left: 10px; color: var(--muted); font-weight: 600; }
.console-chrome small { margin-left: auto; }
.console-shell { display: grid; grid-template-columns: 110px 1fr; min-height: 470px; }
.console-shell aside { padding: 20px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.console-logo { width: 27px; height: 27px; display: grid; place-items: center; margin: 0 7px 16px; background: var(--text); color: var(--bg); border-radius: 5px; font-size: 9px; }
.console-shell aside span { padding: 7px; color: var(--faint); font-size: 9px; }
.console-shell aside span.is-active { background: var(--bg-soft); color: var(--text); }
.console-main { min-width: 0; padding: 25px; }
.console-top { display: flex; align-items: center; justify-content: space-between; }
.console-top small, .metric-line small { display: block; margin-bottom: 6px; color: var(--faint); font-size: 7px; letter-spacing: .13em; }
.console-top strong { font-size: 13px; }
.console-top i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.console-top button { border: 1px solid var(--line); background: var(--bg-soft); padding: 7px 10px; font-size: 8px; color: var(--accent); }
.metric-line { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border-block: 1px solid var(--line); }
.metric-line > div { padding: 15px 8px; border-right: 1px solid var(--line); }
.metric-line > div:last-child { border-right: 0; }
.metric-line strong { font-size: 17px; letter-spacing: -.04em; }
.chart { position: relative; height: 175px; margin-top: 22px; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 44px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart path { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .chart-fill { fill: color-mix(in srgb, var(--accent) 8%, transparent); stroke: none; }
.event-table { display: grid; grid-template-columns: .7fr 1.2fr .8fr 1.2fr; gap: 0; margin-top: 20px; font-size: 8px; }
.event-table > * { padding: 8px 5px; border-bottom: 1px solid var(--line); }
.event-table span { color: var(--faint); }
.event-table strong { font-weight: 600; }
.event-table code { color: var(--accent); }
.console-note { grid-column: 2; margin: -56px 0 0; color: var(--faint); font-size: 11px; }

.get-started { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; padding-bottom: 170px; }
.get-started > .section-index { grid-column: 1 / -1; }
.start-copy { padding-top: 84px; }
.get-started h2 span { color: var(--accent); }
.terminal { margin-top: 84px; align-self: center; background: #0e110e; color: #e8ede6; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.terminal-head { height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #7e877f; font-size: 11px; }
.copy-button { border: 1px solid rgba(255, 255, 255, .13); background: transparent; color: #aeb6af; padding: 6px 10px; cursor: pointer; font-size: 10px; }
.copy-button:hover { color: #fff; border-color: rgba(255, 255, 255, .28); }
.terminal pre { margin: 0; padding: 34px; overflow: auto; font-size: 13px; line-height: 2; }
.terminal code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.terminal .prompt { color: var(--accent); }
.terminal .comment { color: #6f7a70; }

footer { min-height: 180px; display: grid; grid-template-columns: .7fr 1.3fr .6fr; gap: 50px; align-items: center; border-top: 1px solid var(--line); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { letter-spacing: -.03em; }
footer p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer-links { justify-self: end; display: flex; gap: 22px; }
.footer-links a { color: var(--muted); font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .85s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero-signal { width: 65vw; right: -30vw; opacity: .7; }
  .hero-meta { position: relative; right: auto; bottom: auto; margin-top: 72px; }
  .scroll-mark { display: none; }
  .manifesto { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .section-heading { grid-template-columns: 1fr; gap: 30px; }
  .path-explainer { grid-template-columns: 1fr; }
  .path-switch { height: 42px; }
  .modes, .console, .get-started { grid-template-columns: 1fr; gap: 24px; }
  .mode-demo { border-left: 0; padding-left: 0; }
  .feature-row { grid-template-columns: 45px 1fr 1fr; }
  .feature-visual { grid-column: 2 / -1; border-left: 0; padding-left: 0; min-height: 110px; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .feature-brief { border-bottom: 1px solid var(--line); }
  .feature-brief:nth-child(2n) { border-right: 0; }
  .feature-brief:first-child { padding-left: 22px; }
  .feature-brief:last-child { padding-right: 22px; border-bottom: 0; }
  .console-window, .terminal { margin-top: 24px; }
  .console-note { grid-column: 1; margin: 0; }
}

@media (max-width: 680px) {
  section, footer { width: min(calc(100% - 28px), var(--max)); }
  .site-header { height: 58px; padding-inline: 14px; }
  .brand-mark { width: 27px; height: 27px; }
  .nav-github { font-size: 12px; }
  .hero { padding: 118px 14px 44px; }
  .hero-copy { width: 100%; }
  .hero h1 > span { font-size: clamp(88px, 28vw, 160px); }
  .hero h1 small { margin-top: 28px; font-size: clamp(34px, 10.5vw, 58px); }
  .hero-description { margin-top: 28px; font-size: 16px; }
  .hero-meta { gap: 15px; display: grid; grid-template-columns: repeat(3, 1fr); }
  .meta-item { min-width: 0; }
  .meta-item strong { font-size: 25px; }
  .meta-item span { font-size: 10px; }
  .manifesto { padding: 90px 0 110px; }
  .statement { font-size: clamp(43px, 13vw, 66px); }
  .section-copy { font-size: 16px; }
  .architecture, .modes, .capabilities, .get-started { padding-bottom: 92px; }
  .section-heading { margin-top: 64px; }
  .section-heading h2, .modes h2, .console h2, .get-started h2 { font-size: clamp(52px, 15vw, 78px); }
  .scenario-control { overflow-x: auto; }
  .scenario-button { flex: 0 0 auto; padding-inline: 14px; font-size: 12px; }
  .flow-stage { min-height: 540px; padding: 40px 0 24px; }
  .flow-track { left: 15px; right: auto; top: 62px; bottom: 82px; width: 2px; height: auto; }
  .track-progress { transform-origin: top; animation-name: progress-loop-y; }
  @keyframes progress-loop-y { 0% { transform: scaleY(0); } 75%, 100% { transform: scaleY(1); } }
  .packet { top: 0; left: -4px; animation-name: packet-run-y; }
  @keyframes packet-run-y { 0% { top: 0; opacity: 0; transform: scale(.5); } 8% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; transform: scale(1); } }
  .flow-nodes { grid-template-columns: 1fr; gap: 0; }
  .flow-node { min-height: 78px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; text-align: left; align-content: center; padding-left: 34px; }
  .flow-node::before { position: absolute; left: 8px; width: 14px; height: 14px; margin: 0; }
  .node-number { grid-row: 1 / 3; align-self: center; margin: 0; }
  .flow-node small { margin: 0; }
  .trace-line { left: 0; right: 0; bottom: 20px; flex-direction: column; gap: 6px; }
  .trace-line code { text-align: left; overflow-wrap: anywhere; }
  .path-explainer { padding-top: 62px; gap: 28px; }
  .modes { gap: 0; }
  .modes-intro, .mode-demo, .console-copy, .start-copy { padding-top: 62px; }
  .feature-row { grid-template-columns: 35px 1fr; gap: 26px 16px; padding: 44px 0; }
  .feature-title { grid-column: 2; }
  .feature-row > p, .feature-visual { grid-column: 2; }
  .feature-title h3 { font-size: 36px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-brief, .feature-brief:first-child, .feature-brief:last-child { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-brief h3 { min-height: 0; margin: 12px 0 8px; }
  .console-shell { grid-template-columns: 72px 1fr; min-height: 400px; }
  .console-shell aside { padding: 14px 7px; }
  .console-main { padding: 16px; }
  .metric-line strong { font-size: 13px; }
  .event-table { grid-template-columns: .8fr 1.2fr .8fr; }
  .event-table > span:last-child, .event-table > span:nth-of-type(2) { display: none; }
  .chart { height: 130px; }
  .terminal pre { padding: 24px 18px; font-size: 11px; }
  footer { grid-template-columns: 1fr; gap: 20px; padding: 48px 0; }
  .footer-links { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
