:root {
  color-scheme: light;
  --canvas: #0a0e13;
  --panel: #10161d;
  --panel-2: #151c25;
  --control: #1d2632;
  --control-hover: #273342;
  --paper: #e9ece8;
  --paper-panel: #f7f9f6;
  --ink: #11161c;
  --ink-muted: #687078;
  --white: #f4f7fb;
  --muted: #98a5b3;
  --line: #cbd1cc;
  --line-dark: #27313e;
  --green: #69dfb3;
  --green-dim: #193d34;
  --blue: #6f8cff;
  --blue-dim: #1c2c51;
  --amber: #e2b55d;
  --amber-dim: #3d2f18;
  --red: #f29aa7;
  --violet: #b09aff;
  --cyan: #72cad6;
  --radius-sm: 7px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --font-ui: "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Code", Consolas, monospace;
  --shadow: 0 28px 80px rgba(12, 17, 21, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-bottom: 104px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-ui);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.shell { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  color: var(--white);
  background: var(--blue);
  font-weight: 800;
}
.skip-link:focus { transform: none; }

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .1em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 14px/1 var(--font-mono);
  letter-spacing: -.04em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--canvas);
}
.topbar-meta { display: flex; align-items: center; gap: 28px; }
.topbar-meta .live { display: flex; align-items: center; gap: 8px; }
.topbar-meta .live i,
.signal-icon {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(105, 223, 179, .16);
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 66px;
  align-items: center;
  overflow: hidden;
  padding: 72px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--canvas);
  box-shadow: var(--shadow);
}
.hero-copy { min-width: 0; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--green);
  font: 750 10px/1.4 var(--font-mono);
  letter-spacing: .16em;
}
.eyebrow.dark { color: var(--ink); }
.hero h1,
.section-heading h2,
.recommendation h2,
.pause-dialog h2 {
  margin: 0;
  font-weight: 780;
  letter-spacing: -.057em;
  line-height: .98;
}
.hero h1 { font-size: clamp(55px, 5.7vw, 88px); }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-lede {
  max-width: 610px;
  margin: 32px 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}
kbd {
  padding: 4px 7px;
  border: 1px solid var(--line-dark);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--white);
  background: var(--panel);
  font: 700 9px/1 var(--font-mono);
}
.key-plus { margin-inline: 5px; color: var(--muted); font: 700 10px/1 var(--font-mono); }
.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--white);
  text-decoration: none;
  font-weight: 750;
}
.primary-link span { color: var(--green); font-size: 20px; }

.hero-diagram {
  position: relative;
  min-width: 0;
  min-height: 470px;
  padding: 24px;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
}
.loop-label {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 700 9px/1 var(--font-mono);
  letter-spacing: .12em;
}
.loop-label b { color: var(--green); }
.loop-track {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 42px;
}
.loop-node {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  padding: 12px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--canvas);
}
.loop-node.active { border-color: var(--blue); background: var(--blue-dim); }
.loop-node > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--blue);
  font: 700 8px/1 var(--font-mono);
  font-style: normal;
}
.loop-node span { min-width: 0; display: grid; gap: 4px; }
.loop-node b { overflow: hidden; color: var(--white); font-size: 10px; text-overflow: ellipsis; }
.loop-node small { color: var(--muted); font: 600 8px/1 var(--font-mono); }
.loop-arrow { color: var(--blue); text-align: center; }
.loop-line {
  position: absolute;
  z-index: 1;
  inset: 62px 18px auto;
  width: calc(100% - 36px);
  height: 160px;
  overflow: visible;
}
.loop-line path { fill: none; stroke: var(--line-dark); stroke-width: 1.5; stroke-dasharray: 5 7; }
.pocket-diagram {
  position: absolute;
  z-index: 3;
  left: 54px;
  right: 54px;
  bottom: 40px;
  padding: 8px;
  border: 1px solid #4d4128;
  border-radius: 11px 11px 16px 16px;
  background: #171711;
  box-shadow: inset 0 -12px 24px rgba(226, 181, 93, .04);
}
.pocket-tab {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #343021;
}
.pocket-tab > i {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--amber);
  background: var(--amber-dim);
  font: 700 11px/1 var(--font-mono);
  font-style: normal;
}
.pocket-tab span { display: grid; gap: 4px; }
.pocket-tab b { color: var(--amber); font: 700 9px/1 var(--font-mono); letter-spacing: .08em; }
.pocket-tab small { color: var(--muted); font: 600 8px/1 var(--font-mono); }
.pocket-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 9px;
  color: var(--muted);
  font-size: 10px;
}
.pocket-item + .pocket-item { border-top: 1px solid #28271e; }
.pocket-item b { color: var(--red); font: 700 7px/1 var(--font-mono); letter-spacing: .08em; }
.pocket-item:last-child b { color: var(--muted); }

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 80px;
}
.principles article {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 0 24px;
  border-right: 1px solid var(--line);
}
.principles article:first-child { padding-left: 0; }
.principles article:last-child { padding-right: 0; border-right: 0; }
.principles article > span { color: var(--blue); font: 800 10px/1.5 var(--font-mono); }
.principles b { font-size: 14px; }
.principles p { margin: 7px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 1.48; }

.study { padding-block: 42px 88px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}
.section-heading.compact { margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(45px, 5.3vw, 76px); }
.section-heading > p {
  max-width: 400px;
  margin: 0 0 3px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.variant-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.variant-tab {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-muted);
  background: rgba(247, 249, 246, .6);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.variant-tab:hover { transform: translateY(-2px); border-color: var(--blue); }
.variant-tab[aria-selected="true"] { color: var(--ink); border-color: var(--ink); background: var(--paper-panel); box-shadow: inset 0 0 0 1px var(--ink); }
.variant-tab > span:first-child { color: var(--blue); font: 800 10px/1 var(--font-mono); }
.variant-tab > span:nth-child(2) { display: grid; gap: 5px; }
.variant-tab b { font-size: 13px; }
.variant-tab small { color: var(--ink-muted); font: 650 8px/1.2 var(--font-mono); letter-spacing: .06em; }
.variant-tab em {
  position: absolute;
  top: -8px;
  right: 9px;
  padding: 4px 7px;
  border-radius: 99px;
  color: var(--canvas);
  background: var(--green);
  font: 800 7px/1 var(--font-mono);
  font-style: normal;
  letter-spacing: .08em;
}

.prototype-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
}
.app-window {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  border-radius: 15px;
  background: var(--canvas);
  box-shadow: var(--shadow);
}
.window-bar {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--muted);
  background: #11161d;
  font: 700 8px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.window-bar b { color: var(--green); }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--control-hover); }
.window-dots i:first-child { background: var(--red); }
.window-dots i:nth-child(2) { background: var(--amber); }
.window-dots i:last-child { background: var(--green); }
.app-body { min-height: 610px; display: grid; grid-template-columns: 300px 1fr; }

.fleet-rail {
  min-width: 0;
  padding: 13px 9px;
  border-right: 1px solid var(--line-dark);
  background: #10151c;
}
.rail-head {
  min-height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 9px 10px;
  color: var(--muted);
  font: 700 8px/1 var(--font-mono);
  letter-spacing: .13em;
}
.rail-head b { color: var(--green); }
.server-block { margin-bottom: 10px; }
.server-head {
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  color: var(--muted);
}
.server-head > i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--white);
  font: 700 8px/1 var(--font-mono);
  font-style: normal;
}
.server-head b { color: var(--white); font-size: 11px; }
.server-head small { color: var(--green); font: 700 7px/1 var(--font-mono); }
.space-list { display: grid; gap: 3px; margin-left: 19px; padding-left: 10px; border-left: 1px solid var(--line-dark); }
.space-row {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 5px 6px 5px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.space-row:hover { color: var(--white); background: var(--panel-2); }
.space-row.active { color: var(--white); border-color: #314a73; background: var(--blue-dim); box-shadow: inset 2px 0 var(--blue); }
.space-row.paused { opacity: .62; color: var(--muted); }
.space-row.just-cycled { animation: cycle-pulse 420ms ease; }
.space-state { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.space-state.waiting { background: var(--red); box-shadow: 0 0 0 4px rgba(242, 154, 167, .1); }
.space-state.quiet { background: #5e6975; }
.space-copy { min-width: 0; display: grid; gap: 4px; }
.space-copy b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.space-copy small { color: var(--muted); font: 600 7px/1 var(--font-mono); letter-spacing: .04em; }
.space-actions { display: flex; align-items: center; gap: 4px; }
.state-badge { color: var(--red); font: 750 6px/1 var(--font-mono); letter-spacing: .06em; }
.pause-action,
.resume-action,
.pocket-toggle {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.pause-action,
.resume-action {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font: 750 9px/1 var(--font-mono);
}
.pause-action:hover { color: var(--amber); background: var(--amber-dim); }
.resume-action { width: auto; padding-inline: 7px; color: var(--green); font-size: 7px; letter-spacing: .05em; }
.resume-action:hover { background: var(--green-dim); }
.pause-pocket {
  margin: 5px 0 5px 18px;
  overflow: hidden;
  border: 1px solid #383424;
  border-radius: 8px 8px 12px 12px;
  background: #161711;
}
.pause-pocket.global { margin: 14px 2px 0; border-color: #4c4027; }
.pause-pocket.inline-note { margin-top: 14px; border-style: dashed; }
.pocket-toggle {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  gap: 7px;
  align-items: center;
  padding: 5px 8px;
  text-align: left;
}
.pocket-toggle > i {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-dim);
  font: 700 8px/1 var(--font-mono);
  font-style: normal;
}
.pocket-toggle span { display: grid; gap: 3px; }
.pocket-toggle b { color: var(--amber); font: 700 7px/1 var(--font-mono); letter-spacing: .07em; }
.pocket-toggle small { color: var(--muted); font: 600 6px/1 var(--font-mono); }
.pocket-toggle > em { color: var(--muted); font: 700 8px/1 var(--font-mono); font-style: normal; }
.pocket-contents { padding: 0 3px 4px; }
.pause-pocket.collapsed .pocket-contents { display: none; }
.pause-pocket .space-list { margin: 0; padding: 0; border: 0; }
.pause-pocket .space-row { min-height: 38px; }
.pause-pocket .space-state { background: var(--amber); }
.pause-pocket .space-state.waiting { background: var(--red); }
.wake-badge { color: var(--amber); font: 700 6px/1 var(--font-mono); white-space: nowrap; }
.global-pocket-label { padding: 7px 8px 2px; color: var(--muted); font: 650 6px/1 var(--font-mono); letter-spacing: .08em; }

.terminal-stage { min-width: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr) 104px; background: var(--canvas); }
.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 10px;
}
.terminal-head > span:first-child { display: flex; align-items: center; gap: 8px; }
.terminal-head > span:first-child i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.terminal-head b { color: var(--white); }
.terminal-head small { font: 600 8px/1 var(--font-mono); }
.terminal-state { color: var(--green); font: 750 7px/1 var(--font-mono); letter-spacing: .1em; }
.terminal-content { position: relative; padding: 34px 34px; overflow: hidden; }
.terminal-path { margin: 0 0 20px; color: var(--green); font: 600 10px/1 var(--font-mono); }
.terminal-path span { color: var(--muted); }
.terminal-content code { color: var(--white); font: 12px/1.9 var(--font-mono); }
.terminal-content code i { color: var(--muted); font-style: normal; }
.terminal-content code b { color: var(--green); font-weight: 500; }
.terminal-content code em { color: var(--white); font-style: normal; animation: blink 1s steps(1) infinite; }
.stage-note {
  position: absolute;
  right: 22px;
  bottom: 22px;
  max-width: 270px;
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel);
  font: 650 8px/1.5 var(--font-mono);
}
.stage-note b { display: block; margin-bottom: 4px; color: var(--amber); font-size: 7px; letter-spacing: .08em; }
.cycle-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line-dark);
  background: #11161d;
}
.console-label { display: block; margin-bottom: 9px; color: var(--muted); font: 700 7px/1 var(--font-mono); letter-spacing: .12em; }
.cycle-trail { min-height: 25px; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.trail-chip { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 650 7px/1 var(--font-mono); white-space: nowrap; }
.trail-chip::after { content: "→"; color: #4a5664; }
.trail-chip:last-child { color: var(--blue); }
.trail-chip:last-child::after { display: none; }
.trail-chip i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cycle-button {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto auto 18px;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: 9px;
  color: var(--white);
  background: var(--blue-dim);
  cursor: pointer;
}
.cycle-button:hover { background: #243967; }
.cycle-button span { color: var(--muted); font-size: 9px; }
.cycle-button b { font: 750 9px/1 var(--font-mono); }
.cycle-button i { color: var(--blue); font-style: normal; }

.variant-brief {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-panel);
}
.brief-number { color: var(--blue); font: 800 10px/1 var(--font-mono); }
.variant-brief h3 { margin: 24px 0 12px; font-size: 30px; letter-spacing: -.045em; }
.variant-brief > p { min-height: 92px; margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.55; }
.brief-rule { height: 1px; margin: 22px 0; background: var(--line); }
.brief-facts { display: grid; gap: 15px; }
.brief-facts div { display: grid; gap: 5px; }
.brief-facts span { color: var(--ink-muted); font: 700 7px/1 var(--font-mono); letter-spacing: .1em; }
.brief-facts b { font-size: 12px; line-height: 1.35; }
.brief-verdict { margin-top: 24px; padding: 12px; border-radius: 9px; color: var(--ink); background: #e5ebe5; font-size: 11px; line-height: 1.45; }
.brief-verdict.recommended { background: #d7f0e5; }
.brief-verdict strong { display: block; margin-bottom: 4px; font: 800 7px/1 var(--font-mono); letter-spacing: .09em; }
.choose-brief {
  width: 100%;
  min-height: 45px;
  margin-top: 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font-weight: 750;
}
.choose-brief.selected { border-color: var(--green); color: var(--canvas); background: var(--green); }
.prototype-help {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  color: var(--ink-muted);
  background: rgba(247, 249, 246, .7);
}
.prototype-help > span { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-right: 1px solid var(--line); font-size: 11px; }
.prototype-help > span:last-child { border-right: 0; }
.prototype-help i { color: var(--blue); font-style: normal; }
.prototype-help .signal-icon { box-shadow: none; }

.directions { padding-block: 40px 88px; }
.direction-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.direction-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-panel);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.direction-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 18px 45px rgba(15, 20, 24, .08); }
.direction-card.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.direction-card .card-top { display: flex; justify-content: space-between; color: var(--ink-muted); font: 750 8px/1 var(--font-mono); letter-spacing: .09em; }
.direction-card .card-top span:first-child { color: var(--blue); }
.direction-card h3 { margin: 38px 0 12px; font-size: 28px; letter-spacing: -.045em; }
.direction-card > p { min-height: 70px; margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.52; }
.score-list { display: grid; gap: 11px; margin: 24px 0; }
.score-row { display: grid; grid-template-columns: 72px 1fr 22px; gap: 8px; align-items: center; color: var(--ink-muted); font: 700 7px/1 var(--font-mono); }
.score-track { height: 4px; overflow: hidden; border-radius: 99px; background: #dfe3df; }
.score-track i { display: block; height: 100%; background: var(--blue); }
.direction-card button {
  min-height: 43px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
}
.direction-card button:hover { border-color: var(--ink); }
.direction-card.selected button { border-color: var(--green); color: var(--canvas); background: var(--green); }

.recommendation {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  padding: 52px;
  border-radius: 20px;
  color: var(--white);
  background: var(--canvas);
  box-shadow: var(--shadow);
}
.recommendation-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--green);
  font: 800 12px/1 var(--font-mono);
}
.recommendation h2 { font-size: 52px; }
.recommendation p:not(.eyebrow) { max-width: 760px; margin: 16px 0 0; color: var(--muted); line-height: 1.55; }
.recommendation button {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--canvas);
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
}
.recommendation button span { margin-left: 14px; }

.decision-rules { padding-block: 86px 96px; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rules-grid article { min-height: 170px; padding: 23px; border-top: 2px solid var(--ink); background: rgba(247, 249, 246, .55); }
.rules-grid b { font-size: 15px; }
.rules-grid p { margin: 22px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 1.53; }
.footer {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font: 700 8px/1 var(--font-mono);
  letter-spacing: .1em;
}

.decision-dock {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 28px));
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px 10px 20px;
  border: 1px solid #313b48;
  border-radius: 13px;
  color: var(--white);
  background: rgba(10, 14, 19, .96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}
.decision-dock > div { display: grid; gap: 6px; }
.decision-dock span { color: var(--muted); font: 700 7px/1 var(--font-mono); letter-spacing: .11em; }
.decision-dock b { font-size: 14px; }
.decision-dock button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: var(--canvas);
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
}
.decision-dock button:disabled { border-color: var(--line-dark); color: #6f7b88; background: var(--control); cursor: not-allowed; }
.decision-dock button span { margin-left: 12px; color: inherit; }

.pause-dialog {
  width: min(510px, calc(100% - 30px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper-panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .35);
}
.pause-dialog::backdrop { background: rgba(7, 10, 14, .74); backdrop-filter: blur(4px); }
.pause-dialog h2 { font-size: 38px; }
.pause-dialog > p:not(.eyebrow) { margin: 12px 0 22px; color: var(--ink-muted); }
.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-muted);
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}
.snooze-options { display: grid; gap: 8px; }
.snooze-options button {
  min-height: 66px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.snooze-options button:hover { border-color: var(--blue); background: #eef1f8; }
.snooze-options b { font-size: 13px; }
.snooze-options span { color: var(--ink-muted); font-size: 11px; }
.toast {
  position: fixed;
  z-index: 50;
  top: 22px;
  left: 50%;
  transform: translate(-50%, -18px);
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font: 750 8px/1 var(--font-mono);
  letter-spacing: .07em;
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; }

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes cycle-pulse {
  0% { box-shadow: inset 2px 0 var(--blue), 0 0 0 0 rgba(111, 140, 255, .55); }
  100% { box-shadow: inset 2px 0 var(--blue), 0 0 0 10px rgba(111, 140, 255, 0); }
}

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; }
  .hero-diagram { min-height: 420px; }
  .principles { grid-template-columns: repeat(2, 1fr); gap: 30px 0; }
  .principles article:nth-child(2) { border-right: 0; }
  .prototype-layout { grid-template-columns: 1fr; }
  .variant-brief { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 18px; align-items: start; }
  .variant-brief h3 { margin-top: 22px; }
  .variant-brief > p { min-height: 0; }
  .brief-rule { display: none; }
  .brief-verdict, .choose-brief { grid-column: 2 / -1; }
  .direction-grid { grid-template-columns: repeat(2, 1fr); }
  .recommendation { grid-template-columns: 68px 1fr; }
  .recommendation button { grid-column: 2; justify-self: start; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: 122px; }
  .shell { width: min(100% - 26px, 1320px); }
  .topbar { height: 66px; }
  .topbar-meta > span:first-child { display: none; }
  .hero { min-height: auto; padding: 38px 24px 28px; gap: 42px; border-radius: 18px; }
  .hero h1 { font-size: clamp(42px, 11vw, 62px); }
  .hero-lede { font-size: 16px; }
  .hero-diagram { min-height: 455px; padding: 18px; }
  .loop-track { grid-template-columns: 1fr; gap: 7px; margin-top: 28px; }
  .loop-arrow { transform: rotate(90deg); }
  .loop-line { display: none; }
  .pocket-diagram { left: 20px; right: 20px; bottom: 20px; }
  .principles { grid-template-columns: 1fr; padding-block: 54px; gap: 0; }
  .principles article { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .principles article:last-child { border-bottom: 0; }
  .section-heading { display: grid; gap: 18px; }
  .section-heading h2 { font-size: 48px; }
  .variant-tabs { display: flex; overflow-x: auto; padding: 8px 1px; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .variant-tabs::-webkit-scrollbar { display: none; }
  .variant-tab { min-width: 220px; scroll-snap-align: start; }
  .app-body { min-height: 760px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .fleet-rail { max-height: 440px; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .terminal-stage { min-height: 320px; grid-template-rows: 44px minmax(0, 1fr) auto; }
  .terminal-content { padding: 24px 18px; }
  .stage-note { display: none; }
  .cycle-console { grid-template-columns: 1fr; }
  .cycle-button { justify-content: center; }
  .variant-brief { display: block; }
  .variant-brief > p { min-height: 0; }
  .brief-rule { display: block; }
  .prototype-help { grid-template-columns: 1fr; }
  .prototype-help > span { border-right: 0; border-bottom: 1px solid var(--line); }
  .prototype-help > span:last-child { border-bottom: 0; }
  .direction-grid, .rules-grid { grid-template-columns: 1fr; }
  .recommendation { grid-template-columns: 1fr; padding: 34px 26px; }
  .recommendation-mark { width: 54px; height: 54px; }
  .recommendation h2 { font-size: 46px; }
  .recommendation button { grid-column: 1; justify-self: stretch; }
  .footer { height: 100px; display: grid; align-content: center; gap: 10px; }
  .decision-dock { min-height: 92px; align-items: stretch; padding: 10px; }
  .decision-dock > div { justify-content: center; }
  .decision-dock button { max-width: 190px; }
  .snooze-options button { grid-template-columns: 1fr; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
