:root {
  color-scheme: dark;
  --night: #071019;
  --deep: #091621;
  --panel: #0c1824;
  --panel-raised: #102131;
  --panel-light: #132a3a;
  --line: #22384b;
  --line-soft: rgba(91, 129, 154, 0.28);
  --text: #eaf3ff;
  --pale: #c2d1df;
  --muted: #7f96aa;
  --cyan: #49d6d0;
  --blue: #65a8ff;
  --green: #75df9b;
  --amber: #ffb84a;
  --red: #ff6b6b;
  --page-x: max(24px, calc((100vw - 1240px) / 2));
  --radius: 18px;
  --mono: "IBM Plex Mono", monospace;
  --display: "Oxanium", sans-serif;
  --body: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    linear-gradient(rgba(73, 214, 208, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 214, 208, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 80% 3%, rgba(44, 125, 164, 0.18), transparent 30%), var(--night);
  background-size:
    32px 32px,
    32px 32px,
    auto,
    auto;
  font-family: var(--body);
  font-synthesis: none;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

code {
  font-family: var(--mono);
}

::selection {
  color: var(--night);
  background: var(--cyan);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--night);
  background: var(--cyan);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  border-bottom: 1px solid transparent;
  background: rgba(7, 16, 25, 0.7);
  backdrop-filter: blur(20px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    height 180ms ease;
}

.site-header.is-scrolled {
  height: 66px;
  border-color: var(--line);
  background: rgba(7, 16, 25, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 38px;
  height: 38px;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
}

.primary-nav > a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease;
}

.primary-nav > a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}

.primary-nav > a:hover,
.primary-nav > a:focus-visible {
  color: var(--text);
}

.primary-nav > a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: var(--text) !important;
  background: rgba(101, 168, 255, 0.06);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 86px;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: -10%;
  right: -14%;
  width: min(58vw, 820px);
  aspect-ratio: 1;
  border: 1px solid rgba(73, 214, 208, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(73, 214, 208, 0.018),
    0 0 0 160px rgba(101, 168, 255, 0.012);
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(470px, 0.97fr);
  gap: clamp(48px, 6vw, 92px);
  align-items: center;
}

.eyebrow,
.section-kicker,
.section-index,
.proof-label {
  font-family: var(--mono);
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 5.4vw, 76px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero h1 span {
  color: var(--cyan);
}

.hero-lead {
  max-width: 670px;
  margin: 30px 0 0;
  color: var(--pale);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.8;
}

.hero-lead strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--cyan);
  color: var(--night);
  background: var(--cyan);
}

.button-primary:hover {
  background: #6be8e1;
}

.button-secondary {
  color: var(--text);
  background: rgba(16, 33, 49, 0.7);
}

.button-secondary:hover {
  border-color: var(--blue);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 58px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.hero-metrics div {
  min-width: 0;
  padding: 18px 16px;
  background: rgba(7, 16, 25, 0.94);
}

.hero-metrics dt {
  color: var(--text);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
}

.hero-metrics dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.flight-recorder {
  position: relative;
  border: 1px solid #2d5269;
  background:
    linear-gradient(rgba(73, 214, 208, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 214, 208, 0.035) 1px, transparent 1px), rgba(9, 22, 33, 0.96);
  background-size: 24px 24px;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.flight-recorder::before,
.flight-recorder::after {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--cyan);
  content: "";
}

.flight-recorder::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.flight-recorder::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.recorder-head,
.recorder-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
}

.recorder-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.recorder-head > div:first-child {
  display: grid;
  gap: 3px;
}

.recorder-head span,
.recorder-foot span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.recorder-head strong {
  font-size: 11px;
  letter-spacing: 0.07em;
}

.recorder-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 8px;
}

.recorder-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.trace-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 24px 22px;
}

.trace-rail::before {
  position: absolute;
  top: 44px;
  right: 42px;
  left: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--line));
  content: "";
}

.trace-node {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 11px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--deep);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    background 150ms ease;
}

.trace-node:hover {
  transform: translateY(-3px);
}

.trace-node.is-active {
  border-color: var(--cyan);
  color: var(--text);
  background: #0d2431;
  box-shadow: 0 0 20px rgba(73, 214, 208, 0.1);
}

.trace-node span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 7px;
}

.trace-node strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 10px;
  text-overflow: ellipsis;
}

.trace-node small {
  overflow: hidden;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-detail {
  min-height: 244px;
  margin: 0 22px 22px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 25, 0.9);
}

.trace-detail-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.trace-detail-meta span {
  color: var(--cyan);
}

.trace-detail h2 {
  max-width: 420px;
  margin: 22px 0 14px;
  font-size: 21px;
  line-height: 1.35;
}

.trace-detail p {
  min-height: 70px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.trace-detail code {
  color: var(--pale);
}

.hash-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.hash-row code {
  color: #62849a;
}

.recorder-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--line);
}

.recorder-foot span:last-child {
  color: var(--green);
}

.problem-section,
.team-section,
.skills-section,
.proof-section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.section-index {
  margin-bottom: 18px;
  color: #547086;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.problem-layout,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: end;
}

.problem-layout h2,
.section-heading h2,
.opensource-layout h2,
.final-cta h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.problem-layout > p,
.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.problem-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.problem-ledger article {
  min-height: 230px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.problem-ledger article:last-child {
  border-right: 0;
}

.problem-ledger span {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
}

.problem-ledger h3 {
  margin: 52px 0 12px;
  font-size: 16px;
}

.problem-ledger p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.problem-ledger .is-risk span {
  color: var(--red);
}

.loop-section,
.architecture-section,
.safety-section,
.opensource-section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 20, 30, 0.72);
}

.section-heading {
  margin-bottom: 58px;
}

.loop-workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--deep);
}

.loop-tabs {
  display: grid;
  border-right: 1px solid var(--line);
}

.loop-tabs button {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    color 150ms ease,
    background 150ms ease,
    padding-left 150ms ease;
}

.loop-tabs button:last-child {
  border-bottom: 0;
}

.loop-tabs button:hover,
.loop-tabs button[aria-selected="true"] {
  padding-left: 29px;
  color: var(--text);
  background: rgba(73, 214, 208, 0.07);
}

.loop-tabs button[aria-selected="true"] {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.loop-tabs span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
}

.loop-panel {
  display: grid;
  min-height: 500px;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 32px;
  align-content: center;
  padding: 56px clamp(34px, 6vw, 84px);
}

.loop-panel-index {
  color: rgba(73, 214, 208, 0.17);
  font-family: var(--display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
}

.loop-owner {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.loop-panel h3 {
  margin: 12px 0 16px;
  font-family: var(--display);
  font-size: 34px;
}

.loop-panel p {
  max-width: 700px;
  margin: 0;
  color: var(--pale);
  font-size: 16px;
  line-height: 1.9;
}

.loop-panel dl {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 48px 0 0;
  background: var(--line);
}

.loop-panel dl div {
  padding: 18px;
  background: var(--panel);
}

.loop-panel dt,
.agent-card dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.loop-panel dd {
  margin: 9px 0 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.6;
}

.agent-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.agent-card {
  position: relative;
  min-height: 370px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 36, 0.76);
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.agent-card:hover {
  border-color: var(--cyan);
  transform: translateY(-6px);
}

.agent-card::after {
  position: absolute;
  right: -40px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(73, 214, 208, 0.08);
  border-radius: 50%;
  content: "";
}

.agent-monogram {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--display);
  font-size: 24px;
}

.agent-order {
  position: absolute;
  top: 24px;
  right: 20px;
  color: #46677c;
  font-family: var(--mono);
  font-size: 8px;
}

.agent-card h3 {
  margin: 66px 0 12px;
  font-family: var(--display);
  font-size: 18px;
}

.agent-card > p {
  min-height: 76px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.agent-card dl {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
}

.agent-card dl div {
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.agent-card dd {
  margin: 4px 0 0;
  color: var(--pale);
  font-size: 10px;
}

.architecture-stack {
  display: grid;
  gap: 10px;
}

.architecture-stack article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 150px;
  gap: 24px;
  align-items: center;
  min-height: 94px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

.architecture-stack article:hover {
  border-color: var(--cyan);
  transform: translateX(6px);
}

.architecture-stack article > span {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 22px;
}

.architecture-stack h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.architecture-stack p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.architecture-stack strong {
  color: #4f7085;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-align: right;
}

.architecture-tags,
.safety-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.architecture-tags span,
.safety-controls span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 60px;
  align-items: stretch;
}

.skill-ledger {
  display: grid;
  align-content: start;
  gap: 9px;
}

.skill-ledger article {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) minmax(160px, 0.85fr);
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 36, 0.74);
}

.skill-ledger span {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 18px;
}

.skill-ledger code {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.skill-ledger p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.mcp-orbit {
  position: relative;
  min-height: 432px;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(73, 214, 208, 0.07), transparent 43%), var(--deep);
}

.mcp-orbit::before,
.mcp-orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(73, 214, 208, 0.14);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.mcp-orbit::before {
  width: 230px;
  height: 230px;
}

.mcp-orbit::after {
  width: 330px;
  height: 330px;
}

.orbit-core {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  background: #0c202c;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 38px rgba(73, 214, 208, 0.12);
}

.orbit-core strong {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 26px;
}

.orbit-core small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.orbit-item {
  position: absolute;
  z-index: 4;
  padding: 6px 9px;
  border: 1px solid var(--line);
  color: var(--pale);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 7px;
}

.orbit-item-1 {
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.orbit-item-2 {
  top: 98px;
  right: 31px;
}

.orbit-item-3 {
  right: 16px;
  bottom: 102px;
}

.orbit-item-4 {
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.orbit-item-5 {
  bottom: 102px;
  left: 20px;
}

.orbit-item-6 {
  top: 98px;
  left: 36px;
}

.orbit-caption {
  position: absolute;
  right: 18px;
  bottom: 15px;
  left: 18px;
  display: flex;
  justify-content: space-between;
  color: #4f7085;
  font-family: var(--mono);
  font-size: 7px;
}

.safety-gates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.allow-gate,
.approval-gate {
  min-height: 360px;
  padding: 30px;
  border: 1px solid;
  background: var(--panel);
}

.allow-gate {
  border-color: rgba(117, 223, 155, 0.5);
}

.approval-gate {
  border-color: rgba(255, 107, 107, 0.52);
}

.allow-gate header,
.approval-gate header {
  display: grid;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.allow-gate header span,
.approval-gate header span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.allow-gate header span {
  color: var(--green);
}

.approval-gate header span {
  color: var(--red);
}

.allow-gate header strong,
.approval-gate header strong {
  font-family: var(--display);
  font-size: 19px;
}

.allow-gate ul,
.approval-gate ul {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.allow-gate li,
.approval-gate li {
  position: relative;
  padding-left: 25px;
  color: var(--pale);
  font-size: 12px;
}

.allow-gate li::before,
.approval-gate li::before {
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
}

.allow-gate li::before {
  background: var(--green);
  box-shadow: 0 0 10px rgba(117, 223, 155, 0.5);
}

.approval-gate li::before {
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.45);
}

.gate-control {
  display: grid;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  font-family: var(--mono);
  text-align: center;
}

.gate-control > span {
  font-size: 8px;
  letter-spacing: 0.12em;
}

.gate-control > strong {
  margin-top: 7px;
  color: var(--amber);
  font-family: var(--display);
  font-size: 20px;
}

.gate-control i {
  display: block;
  width: 1px;
  height: 100px;
  margin: 18px 0;
  background: linear-gradient(var(--green), var(--amber), var(--red));
}

.gate-control small {
  font-size: 7px;
}

.proof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 28px;
}

.issue-window {
  border: 1px solid var(--line);
  background: var(--deep);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.window-bar > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #365166;
}

.window-bar > span:first-child {
  background: var(--red);
}

.window-bar > span:nth-child(2) {
  background: var(--amber);
}

.window-bar > span:nth-child(3) {
  background: var(--green);
}

.window-bar strong {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.window-body {
  padding: clamp(28px, 5vw, 54px);
}

.issue-state {
  display: inline-flex;
  padding: 4px 9px;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--mono);
  font-size: 7px;
}

.window-body h3 {
  max-width: 680px;
  margin: 28px 0 16px;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.25;
}

.window-body > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.diff-block {
  display: grid;
  gap: 8px;
  margin: 36px 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: #061019;
  font-family: var(--mono);
  font-size: 10px;
}

.diff-block span:first-child {
  color: var(--green);
}

.diff-block span:last-child {
  color: var(--red);
}

.window-body > a,
.proof-card > a,
.opensource-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  text-decoration: none;
}

.proof-evidence {
  display: grid;
  gap: 14px;
}

.proof-card {
  display: grid;
  align-content: start;
  min-height: 194px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.proof-card-live {
  border-color: rgba(73, 214, 208, 0.4);
}

.proof-label {
  color: var(--cyan);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.proof-card > strong {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 16px;
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 22px;
}

.check-list span {
  padding: 4px 7px;
  border: 1px solid;
  font-family: var(--mono);
  font-size: 7px;
}

.is-pass {
  border-color: rgba(117, 223, 155, 0.45) !important;
  color: var(--green);
  background: rgba(117, 223, 155, 0.04);
}

.is-fail {
  border-color: rgba(255, 107, 107, 0.45) !important;
  color: var(--red);
  background: rgba(255, 107, 107, 0.04);
}

.repo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 20px;
  background: var(--line);
}

.repo-stats div {
  display: grid;
  padding: 10px;
  background: var(--deep);
}

.repo-stats span {
  color: var(--text);
  font-family: var(--display);
  font-size: 19px;
}

.repo-stats small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.live-source {
  align-self: end;
  margin-top: 15px;
  color: #4f7085;
  font-family: var(--mono);
  font-size: 7px;
}

.opensource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.8fr);
  gap: 90px;
  align-items: center;
}

.opensource-layout > div:first-child > p:not(.section-kicker) {
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
}

.opensource-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.clone-command {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--pale);
  background: var(--night);
  cursor: pointer;
}

.clone-command code {
  font-size: 9px;
}

.clone-command span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 8px;
}

.asset-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.asset-matrix a {
  display: grid;
  min-height: 155px;
  align-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

.asset-matrix a:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
}

.asset-matrix span {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 17px;
}

.asset-matrix strong {
  margin-top: 28px;
  font-family: var(--display);
  font-size: 16px;
}

.asset-matrix small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.final-cta {
  padding: 140px 0;
  text-align: center;
}

.final-cta h2 {
  max-width: 960px;
  margin: 18px auto 0;
  font-size: clamp(43px, 6vw, 78px);
}

.final-cta .hero-actions {
  justify-content: center;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 34px var(--page-x);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #050d14;
}

.site-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.site-footer strong {
  color: var(--text);
  font-family: var(--display);
}

.site-footer span {
  font-family: var(--mono);
  font-size: 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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

@media (max-width: 1100px) {
  .primary-nav {
    gap: 18px;
  }

  .primary-nav > a {
    font-size: 11px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 900px;
  }

  .flight-recorder {
    max-width: 820px;
  }

  .agent-lanes {
    grid-template-columns: repeat(3, 1fr);
  }

  .skills-grid,
  .opensource-layout {
    grid-template-columns: 1fr;
  }

  .mcp-orbit {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  .site-header {
    height: 66px;
  }

  .nav-toggle {
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    background: var(--deep);
    cursor: pointer;
  }

  .nav-toggle span:not(.sr-only) {
    width: 18px;
    height: 1px;
    background: var(--text);
    transition:
      transform 160ms ease,
      opacity 160ms ease;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .primary-nav {
    position: fixed;
    top: 0;
    right: 0;
    display: grid;
    width: min(340px, 86vw);
    height: 100vh;
    align-content: start;
    gap: 0;
    padding: 100px 28px 32px;
    border-left: 1px solid var(--line);
    background: rgba(7, 16, 25, 0.98);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .primary-nav > a {
    padding: 18px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  .nav-cta {
    margin-top: 18px;
    border: 1px solid var(--cyan) !important;
  }

  .problem-layout,
  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .problem-ledger {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem-ledger article:nth-child(2) {
    border-right: 0;
  }

  .problem-ledger article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .loop-workbench {
    grid-template-columns: 1fr;
  }

  .loop-tabs {
    grid-template-columns: repeat(4, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loop-tabs button {
    min-height: 72px;
    justify-content: center;
    border-right: 1px solid var(--line);
    font-size: 10px;
  }

  .loop-tabs button:hover,
  .loop-tabs button[aria-selected="true"] {
    padding-left: 22px;
    box-shadow: inset 0 3px 0 var(--cyan);
  }

  .loop-panel {
    min-height: 0;
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .loop-panel dl {
    grid-column: 1 / -1;
  }

  .agent-lanes {
    grid-template-columns: repeat(2, 1fr);
  }

  .safety-gates {
    grid-template-columns: 1fr;
  }

  .gate-control {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
  }

  .gate-control i {
    width: 100%;
    height: 1px;
    margin: 0;
    background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  }

  .proof-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .section-shell {
    width: min(100% - 30px, 1240px);
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    padding-top: 108px;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .trace-rail {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    overflow-x: auto;
  }

  .trace-rail::before {
    right: 55px;
    left: 55px;
    width: 390px;
  }

  .trace-node {
    min-width: 82px;
  }

  .problem-section,
  .team-section,
  .skills-section,
  .proof-section,
  .loop-section,
  .architecture-section,
  .safety-section,
  .opensource-section {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .problem-ledger,
  .agent-lanes {
    grid-template-columns: 1fr;
  }

  .problem-ledger article {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .problem-ledger article:last-child {
    border-bottom: 0;
  }

  .problem-ledger h3 {
    margin-top: 30px;
  }

  .loop-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .loop-panel {
    grid-template-columns: 1fr;
    padding: 34px 22px;
  }

  .loop-panel-index {
    font-size: 48px;
  }

  .loop-panel dl {
    grid-template-columns: 1fr;
  }

  .architecture-stack article {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .architecture-stack strong {
    display: none;
  }

  .skill-ledger article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .skill-ledger p {
    grid-column: 2;
    text-align: left;
  }

  .mcp-orbit {
    min-height: 390px;
  }

  .mcp-orbit::before {
    width: 190px;
    height: 190px;
  }

  .mcp-orbit::after {
    width: 285px;
    height: 285px;
  }

  .orbit-item-2 {
    right: 12px;
  }

  .orbit-item-3 {
    right: 4px;
  }

  .orbit-item-5 {
    left: 4px;
  }

  .orbit-item-6 {
    left: 12px;
  }

  .asset-matrix {
    grid-template-columns: 1fr;
  }

  .opensource-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-command {
    overflow: hidden;
  }

  .clone-command code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
