:root {
  color-scheme: dark;
  --paper: #08090b;
  --paper-soft: #101317;
  --ink: #f3efe6;
  --muted: #a9b0a6;
  --quiet: #6f766e;
  --line: rgba(229, 224, 212, 0.13);
  --line-strong: rgba(229, 224, 212, 0.26);
  --panel: rgba(18, 21, 24, 0.78);
  --panel-solid: #121519;
  --panel-raised: #171c20;
  --dark: #f3efe6;
  --accent: #67e8b5;
  --accent-deep: #3dd6a1;
  --accent-blue: #7aa7ff;
  --accent-gold: #d7b46a;
  --accent-rose: #d66f86;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 56px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --sans: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(103, 232, 181, 0.11), transparent 28%),
    linear-gradient(245deg, rgba(122, 167, 255, 0.1), transparent 30%),
    radial-gradient(1200px 760px at 72% -16%, rgba(215, 180, 106, 0.1), transparent 60%),
    radial-gradient(900px 620px at 10% 100%, rgba(214, 111, 134, 0.08), transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.48;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.62;
  background-image:
    linear-gradient(rgba(243, 239, 230, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 230, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, rgba(103, 232, 181, 0.06) 50%, transparent 52% 100%);
  background-size: 56px 56px, 56px 56px, 180px 180px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(320px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 44px rgba(0, 0, 0, 0.24);
}

.site-header::after {
  content: "";
  position: absolute;
  right: clamp(16px, 4vw, 54px);
  bottom: -1px;
  left: clamp(16px, 4vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-blue), transparent);
  opacity: 0.42;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(103, 232, 181, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, rgba(103, 232, 181, 0.35), transparent 38%),
    linear-gradient(145deg, rgba(243, 239, 230, 0.12), rgba(243, 239, 230, 0.02));
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 0 22px rgba(103, 232, 181, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

nav a,
.header-link,
.primary-action,
.secondary-action,
.doc-links a,
.phase-button,
.state-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(243, 239, 230, 0.045);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    background 280ms cubic-bezier(0.16, 1, 0.3, 1),
    color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

nav a {
  padding: 8px 12px;
  color: var(--muted);
}

nav a.is-active {
  color: var(--ink);
  border-color: rgba(103, 232, 181, 0.48);
  background: rgba(103, 232, 181, 0.1);
}

.header-link,
.primary-action {
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
  box-shadow: 0 10px 34px rgba(243, 239, 230, 0.08);
}

.secondary-action,
.doc-links a {
  padding: 10px 16px;
}

nav a:hover,
.header-link:hover,
.primary-action:hover,
.secondary-action:hover,
.doc-links a:hover,
.phase-button:hover,
.state-button:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 181, 0.5);
  background: rgba(103, 232, 181, 0.08);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}

nav a:active,
.header-link:active,
.primary-action:active,
.secondary-action:active,
.doc-links a:active,
.phase-button:active,
.state-button:active {
  transform: translateY(1px) scale(0.99);
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  padding: 22px clamp(12px, 4vw, 54px) 60px;
}

.hero,
.section-shell {
  position: relative;
  width: min(1480px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(243, 239, 230, 0.08), rgba(243, 239, 230, 0.026) 46%, rgba(103, 232, 181, 0.028)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: clip;
}

.hero::before,
.section-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(103, 232, 181, 0.28), transparent 30% 70%, rgba(122, 167, 255, 0.2)) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(243, 239, 230, 0.055), transparent 42%);
}

.hero {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: stretch;
  padding: clamp(30px, 5vw, 80px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  align-self: center;
}

.site-header > *,
.hero > *,
.section-shell > *,
.phase-workbench > *,
.decision-layout > *,
.funnel-layout > *,
.state-lab > *,
.docs-panel > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
strong,
li,
summary {
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: min(100%, var(--headline-width, 900px));
  margin: 0;
  font-size: var(--headline-size, clamp(44px, 6.1vw, 92px));
  font-weight: 700;
  line-height: var(--headline-line, 0.94);
}

.pretext-line {
  display: block;
  max-width: 100%;
  animation: text-rise 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--line-index, 0) * 72ms);
}

.pretext-line:last-child {
  color: var(--accent);
  text-shadow: 0 0 28px rgba(103, 232, 181, 0.16);
}

.hero-text {
  max-width: 700px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.constraint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.constraint-strip span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(243, 239, 230, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(243, 239, 230, 0.04);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-panel {
  display: grid;
  gap: 16px;
}

.mission-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(260px, 0.88fr) auto;
  gap: 14px;
}

.flow-panel img,
.mission-panel img {
  width: 100%;
  object-fit: contain;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 28%, rgba(103, 232, 181, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(243, 239, 230, 0.08), rgba(243, 239, 230, 0.02)),
    var(--panel-solid);
  box-shadow: var(--shadow-soft);
  filter: saturate(1.08) contrast(1.08);
  transition:
    transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 560ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 560ms cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-panel img {
  min-height: 390px;
  border-radius: 48% 52% 44% 56% / 42% 38% 62% 58%;
}

.mission-panel img {
  height: 100%;
  min-height: 310px;
  border-radius: 48% 52% 44% 56% / 42% 38% 62% 58%;
}

.flow-panel:hover img,
.mission-panel:hover img {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: rgba(103, 232, 181, 0.42);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.4);
}

.mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 12, 14, 0.54);
}

.mission-grid article {
  display: grid;
  grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.mission-grid article:last-child {
  border-bottom: 0;
}

.flow-caption {
  display: grid;
  grid-template-columns: 0.34fr 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}

.flow-caption span,
.phase-focus dt,
.phase-button span,
.decision-stack span,
.funnel-card span,
.ops-grid span,
.artifact-grid span,
.source-matrix span,
.rule-board span,
.mission-grid span,
.phase-table span,
.build-lanes span,
.media-grid span {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-caption strong {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.08;
}

.section-shell {
  padding: clamp(24px, 4vw, 58px);
}

.section-intro {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-bottom: 30px;
}

.split-intro {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(260px, 0.42fr);
  gap: clamp(22px, 5vw, 76px);
  align-items: end;
}

.section-intro p:not(.eyebrow),
.funnel-layout p,
.state-card p,
.split-intro > p,
.artifact-grid p,
.source-matrix p,
.rule-board p,
.phase-table p,
.build-lanes p,
.build-lanes li,
.media-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

h2 {
  max-width: 980px;
  margin: 0 0 18px;
  font-size: clamp(31px, 4.8vw, 68px);
  line-height: 0.98;
}

h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.35vw, 34px);
  line-height: 1.02;
}

.artifact-grid,
.source-matrix,
.phase-table,
.media-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.artifact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.source-matrix {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-grid {
  grid-template-columns: 1.05fr 0.95fr 0.9fr 1.08fr 1.12fr;
}

.artifact-grid article,
.source-matrix article,
.phase-table article,
.build-lanes article,
.media-grid article,
.rule-board article,
.decision-stack article,
.ops-grid article,
.agent-grid details,
.state-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(243, 239, 230, 0.07), rgba(243, 239, 230, 0.024)),
    rgba(14, 17, 20, 0.72);
  box-shadow: 0 1px 0 rgba(243, 239, 230, 0.04) inset;
  transition:
    transform 340ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 340ms cubic-bezier(0.16, 1, 0.3, 1),
    background 340ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.artifact-grid article::before,
.source-matrix article::before,
.phase-table article::before,
.media-grid article::before,
.ops-grid article::before,
.agent-grid details::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(103, 232, 181, 0.5), transparent 72%);
  opacity: 0;
  transition: opacity 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.artifact-grid article:hover,
.source-matrix article:hover,
.phase-table article:hover,
.media-grid article:hover,
.decision-stack article:hover,
.ops-grid article:hover,
.agent-grid details:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 181, 0.38);
  background:
    linear-gradient(160deg, rgba(103, 232, 181, 0.09), rgba(122, 167, 255, 0.04)),
    rgba(17, 21, 24, 0.88);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3);
}

.artifact-grid article:hover::before,
.source-matrix article:hover::before,
.phase-table article:hover::before,
.media-grid article:hover::before,
.ops-grid article:hover::before,
.agent-grid details:hover::before {
  opacity: 1;
}

.artifact-grid article,
.source-matrix article,
.media-grid article {
  min-height: 186px;
  padding: 18px;
}

.artifact-grid article:nth-child(4n + 2)::before,
.source-matrix article:nth-child(2n)::before,
.media-grid article:nth-child(2)::before {
  background: linear-gradient(90deg, rgba(122, 167, 255, 0.55), transparent 72%);
}

.artifact-grid article:nth-child(4n + 3)::before,
.source-matrix article:nth-child(3n)::before,
.media-grid article:nth-child(4)::before {
  background: linear-gradient(90deg, rgba(215, 180, 106, 0.58), transparent 72%);
}

.artifact-grid strong,
.source-matrix strong,
.media-grid h3,
.build-lanes h3,
.mission-grid strong,
.rule-board strong,
.phase-table strong {
  display: block;
  margin: 10px 0 9px;
  color: var(--ink);
  line-height: 1.08;
}

.artifact-grid strong,
.source-matrix strong {
  font-size: 20px;
}

.rule-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rule-board article {
  min-height: 150px;
  padding: 20px;
}

.rule-board article:nth-child(3) {
  border-color: rgba(214, 111, 134, 0.26);
}

.phase-workbench {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  gap: 24px;
  align-items: stretch;
}

.phase-arc {
  min-height: 500px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(68px, 1fr));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(103, 232, 181, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(122, 167, 255, 0.08), transparent 32%),
    url("./assets/curved-launch-map.svg") center / contain no-repeat,
    rgba(12, 15, 18, 0.78);
  overflow: hidden;
}

.phase-arc::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(243, 239, 230, 0.12);
  border-radius: 46% 54% 48% 52% / 44% 40% 60% 56%;
  pointer-events: none;
}

.phase-button {
  width: 100%;
  min-height: 64px;
  position: relative;
  z-index: 1;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  cursor: pointer;
}

.phase-button.is-active {
  background:
    linear-gradient(135deg, rgba(103, 232, 181, 0.22), rgba(122, 167, 255, 0.12)),
    rgba(243, 239, 230, 0.08);
  color: var(--ink);
  border-color: rgba(103, 232, 181, 0.5);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(103, 232, 181, 0.12) inset;
}

.phase-button:nth-child(1) { grid-column: 1 / 4; grid-row: 1; }
.phase-button:nth-child(2) { grid-column: 4 / 7; grid-row: 2; }
.phase-button:nth-child(3) { grid-column: 8 / 12; grid-row: 1; }
.phase-button:nth-child(4) { grid-column: 10 / 13; grid-row: 3; }
.phase-button:nth-child(5) { grid-column: 6 / 10; grid-row: 4; }
.phase-button:nth-child(6) { grid-column: 2 / 5; grid-row: 3; }
.phase-button:nth-child(7) { grid-column: 1 / 4; grid-row: 5; }
.phase-button:nth-child(8) { grid-column: 5 / 8; grid-row: 6; }
.phase-button:nth-child(9) { grid-column: 9 / 13; grid-row: 5; }

.phase-focus {
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(103, 232, 181, 0.25);
  border-radius: 42% 58% 48% 52% / 28% 32% 68% 72%;
  background:
    radial-gradient(circle at 18% 18%, rgba(103, 232, 181, 0.16), transparent 34%),
    linear-gradient(140deg, #171c20, #0b0d0f 72%);
  color: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.phase-focus::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(243, 239, 230, 0.12);
  border-radius: inherit;
  pointer-events: none;
}

.phase-focus.is-updating {
  animation: focus-pulse 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-meter {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(243, 239, 230, 0.12);
}

.meter-line {
  display: block;
  width: var(--meter-width, 12%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue), var(--accent-gold));
  transition: width 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.focus-time {
  margin: auto 0 18px;
  color: rgba(243, 239, 230, 0.62);
  font-family: var(--mono);
  font-weight: 700;
}

.phase-focus h3 {
  font-size: clamp(34px, 4vw, 56px);
}

.phase-focus p:not(.focus-time) {
  max-width: 52ch;
  margin: 0;
  color: rgba(243, 239, 230, 0.72);
}

.phase-focus dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 36px 0 0;
  border: 1px solid rgba(243, 239, 230, 0.13);
  background: rgba(0, 0, 0, 0.18);
}

.phase-focus div {
  padding: 14px;
}

.phase-focus dd {
  margin: 8px 0 0;
  color: var(--ink);
}

.phase-table {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.phase-table article {
  min-height: 178px;
  padding: 18px;
}

.phase-table strong {
  font-size: 21px;
}

.decision-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.sticky-copy {
  position: sticky;
  top: 96px;
}

.decision-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.decision-stack article {
  min-height: 220px;
  padding: 24px;
}

.decision-stack article:nth-child(2) {
  margin-left: 9vw;
}

.decision-stack article:nth-child(3) {
  margin-left: 3vw;
  border-color: rgba(214, 111, 134, 0.28);
}

.decision-stack p,
.ops-grid p,
.agent-grid p {
  margin: 0;
  color: var(--muted);
}

.agent-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.92fr 1fr;
  gap: 12px;
}

.agent-grid details {
  min-height: 150px;
  padding: 18px;
}

.agent-grid summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  list-style: none;
}

.agent-grid summary::-webkit-details-marker {
  display: none;
}

.agent-grid summary::after {
  content: "open";
  float: right;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.agent-grid details[open] {
  border-color: rgba(103, 232, 181, 0.36);
  background:
    linear-gradient(160deg, rgba(103, 232, 181, 0.1), rgba(243, 239, 230, 0.03)),
    rgba(14, 17, 20, 0.84);
}

.agent-grid details[open] summary::after {
  content: "active";
  color: var(--accent);
}

.agent-grid p {
  margin-top: 18px;
}

.agent-grid .compliance {
  border-color: rgba(214, 111, 134, 0.36);
  background:
    linear-gradient(160deg, rgba(214, 111, 134, 0.1), rgba(243, 239, 230, 0.03)),
    rgba(14, 17, 20, 0.78);
}

.build-lanes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.build-lanes article {
  min-height: 360px;
  padding: clamp(22px, 3vw, 34px);
}

.build-lanes article:first-child {
  border-color: rgba(122, 167, 255, 0.24);
}

.build-lanes article:last-child {
  border-color: rgba(103, 232, 181, 0.24);
}

.build-lanes ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding-left: 18px;
}

.build-lanes li::marker {
  color: var(--accent);
}

.funnel-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(440px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.funnel-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 52% 48% 49% 51% / 18% 20% 80% 82%;
  background: var(--panel-solid);
}

.funnel-card::before {
  content: "";
  position: absolute;
  inset: 34px 48px auto;
  height: 42px;
  border-top: 1px solid rgba(103, 232, 181, 0.45);
  border-radius: 50%;
  pointer-events: none;
}

.funnel-card div {
  min-height: 230px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.funnel-card div:last-child {
  border-right: 0;
}

.funnel-card strong {
  display: block;
  margin-top: 74px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.02;
}

.ops-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ops-grid article {
  min-height: 230px;
  padding: 20px;
}

.state-lab {
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: center;
}

.state-console {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.state-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.state-button {
  padding: 10px 14px;
  cursor: pointer;
}

.state-button.is-active {
  background: rgba(103, 232, 181, 0.14);
  color: var(--ink);
  border-color: rgba(103, 232, 181, 0.4);
}

.state-card {
  min-height: 210px;
  padding: 22px;
}

.state-card strong {
  display: block;
  margin-top: 22px;
  font-size: 24px;
}

.state-card.state-loading span {
  display: block;
  height: 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(103, 232, 181, 0.06), rgba(103, 232, 181, 0.34), rgba(122, 167, 255, 0.14), rgba(103, 232, 181, 0.06));
  background-size: 260% 100%;
  animation: shimmer 1.8s linear infinite;
}

.state-card.state-loading span:nth-child(1) { width: 84%; }
.state-card.state-loading span:nth-child(2) { width: 58%; }
.state-card.state-loading span:nth-child(3) { width: 72%; }

.state-card.state-empty,
.state-card.state-error {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.state-card.state-error {
  border-color: rgba(214, 111, 134, 0.32);
}

.docs-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.doc-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.js .reveal-surface {
  opacity: 0;
  transform: translateY(22px);
}

.js .reveal-surface.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 760ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes text-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 260% 0;
  }
  to {
    background-position: -260% 0;
  }
}

@keyframes focus-pulse {
  0% {
    transform: scale(0.992);
  }
  100% {
    transform: scale(1);
  }
}

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

@media (max-width: 1120px) {
  .site-header,
  .hero,
  .split-intro,
  .phase-workbench,
  .decision-layout,
  .funnel-layout,
  .build-lanes,
  .state-lab,
  .docs-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  nav {
    justify-content: start;
  }

  .sticky-copy {
    position: static;
  }

  .phase-arc {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    background:
      linear-gradient(130deg, rgba(103, 232, 181, 0.09), transparent 58%),
      rgba(12, 15, 18, 0.82);
  }

  .phase-button:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .phase-focus {
    min-height: 420px;
  }

  .artifact-grid,
  .source-matrix,
  .phase-table,
  .media-grid,
  .agent-grid,
  .rule-board,
  .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  main {
    padding-inline: 12px;
  }

  .site-header {
    position: static;
    padding: 12px;
  }

  nav a,
  .primary-action,
  .secondary-action,
  .doc-links a {
    width: 100%;
  }

  nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  nav a {
    width: auto;
    min-height: 38px;
    padding: 8px 6px;
    font-size: 11px;
  }

  .header-link {
    width: 100%;
  }

  h1 {
    font-size: var(--headline-size, clamp(38px, 11vw, 48px));
    line-height: var(--headline-line, 0.96);
  }

  h2 {
    font-size: clamp(31px, 11vw, 48px);
  }

  .hero,
  .section-shell {
    padding: 18px;
  }

  .flow-panel img,
  .mission-panel img {
    min-height: 280px;
  }

  .mission-grid article {
    grid-template-columns: 1fr;
  }

  .flow-caption,
  .phase-arc,
  .phase-focus dl,
  .artifact-grid,
  .source-matrix,
  .phase-table,
  .build-lanes,
  .media-grid,
  .agent-grid,
  .funnel-card,
  .rule-board,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .decision-stack article:nth-child(n) {
    margin-left: 0;
  }

  .funnel-card {
    border-radius: var(--radius);
  }

  .funnel-card::before {
    display: none;
  }

  .funnel-card div {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .funnel-card div:last-child {
    border-bottom: 0;
  }

  .funnel-card strong {
    margin-top: 28px;
  }
}
