:root {
  /* ---- type ---------------------------------------------------------- */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.3125rem;
  --fs-2xl: 1.625rem;
  --fs-3xl: 2.125rem;
  --fs-h2: clamp(1.75rem, 2.8vw, 2.375rem);
  --fs-h1: clamp(2.25rem, 4vw, 3.25rem);
  --fs-display: clamp(2.85rem, 5.2vw, 4.8rem);

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-black: 800;

  --ls-display: -0.03em;
  --ls-wide: 0.1em;

  /* ---- colour -------------------------------------------------------- */
  --paper: #f5f4f7;
  --paper-deep: #ece9ef;
  --surface: #ffffff;

  --ink: #202027;
  --ink-soft: #696671;
  --ink-faint: #9a96a0;

  --line: rgba(32, 32, 39, 0.13);

  /* One brand hue; secondary hues are reserved for figure semantics. */
  --inner: #6659c7;
  --inner-soft: #eeebfb;
  --outer: #39766c;
  --outer-deep: #244e48;
  --outer-soft: #e8f2ef;
  --accent: #854f7d;
  --accent-bright: #b37aa9;
  --accent-soft: #f1e8ef;

  --stage: #77717d;
  --accept: #4f7c67;
  --reject: #b15f70;

  /* ---- shape --------------------------------------------------------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 12px 36px rgba(32, 32, 39, 0.06);
  --shadow-lg: 0 20px 54px rgba(32, 32, 39, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.65rem 1rem;
  color: var(--surface);
  background: var(--ink);
  border-radius: var(--r-pill);
  transform: translateY(-180%);
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 0.72rem;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 52px;
  aspect-ratio: 1;
  color: var(--accent);
}

.brand-evolution-loops {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-loop,
.brand-loop-signal {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
}

.brand-loop-inner {
  opacity: 0.42;
  stroke-width: 1.75;
}

.brand-loop-outer {
  opacity: 0.22;
  stroke-width: 1.5;
}

.brand-loop-signal {
  stroke-dashoffset: 0;
}

.brand-loop-signal-inner {
  opacity: 0.96;
  stroke-dasharray: 0.18 0.82;
  stroke-width: 2.5;
  animation: brand-inner-cycle 3200ms linear infinite;
}

.brand-loop-signal-outer {
  opacity: 0.78;
  stroke-dasharray: 0.12 0.88;
  stroke-width: 2.25;
  animation: brand-outer-cycle 22400ms linear infinite;
}

.brand-stage-tick {
  fill: currentColor;
  opacity: 0.72;
}

.brand-agent-halo {
  fill: currentColor;
  opacity: 0.12;
}

.brand-agent-core {
  fill: currentColor;
}

.brand:hover .brand-loop-signal-inner {
  animation-duration: 2400ms;
}

.brand:hover .brand-loop-signal-outer {
  animation-duration: 16800ms;
}

@keyframes brand-inner-cycle {
  to {
    stroke-dashoffset: -1;
  }
}

@keyframes brand-outer-cycle {
  to {
    stroke-dashoffset: -1;
  }
}

.brand-copy {
  display: grid;
  gap: 0.12rem;
}

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

.brand strong {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-display);
  line-height: 1.15;
}

.brand small {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 1.7rem;
  align-items: center;
}

nav a {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

nav .nav-github {
  padding: 0.62rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: 0 6px 18px rgba(32, 32, 39, 0.045);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 0;
  padding: 0 0 2.5rem;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  padding: clamp(2.8rem, 6vw, 5rem) 0 2.4rem;
  align-items: start;
}

.hero-statement h1,
.hero-support > :last-child {
  margin-bottom: 0;
}

.hero-support {
  padding-bottom: 0.35rem;
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.hero .eyebrow {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.hero .eyebrow span {
  width: 26px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-display);
  line-height: 0.98;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: var(--fs-display);
  line-height: 1.08;
}

h1 em {
  color: var(--accent);
  font-weight: var(--fw-regular);
}

h2 {
  margin-bottom: 1rem;
  font-size: var(--fs-h1);
}

.hero-summary {
  max-width: 480px;
  margin-bottom: 1.6rem;
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.7;
}

.hero-actions,
.closing-callout > div {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

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

.button-primary {
  color: var(--surface);
  background: var(--ink);
}

.button-primary:hover {
  background: var(--accent);
}

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

.button-secondary:hover {
  background: var(--surface);
}

.snapshot-line {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 1.3rem 0 0;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent);
}

.hero-system {
  --system-surface: var(--surface);
  position: relative;
  overflow: hidden;
  padding: 1.45rem clamp(1.2rem, 3vw, 2.4rem) 1.65rem;
  color: var(--ink);
  background: var(--system-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: none;
}

.system-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.system-label {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

#loop-control {
  display: inline-flex;
  gap: 0.45rem;
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  align-items: center;
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-2xs);
}

#loop-control span {
  width: 6px;
  height: 6px;
  background: var(--outer);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--outer) 12%, transparent);
}

#loop-control[aria-pressed="true"] span {
  background: var(--stage);
}

#loop-control b {
  font-weight: var(--fw-bold);
}

.loop-status {
  display: flex;
  gap: 0.28rem;
  min-height: 0;
  padding: 0;
  margin: 0.32rem 0 0;
  align-items: center;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
}

.loop-status > strong {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border-radius: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}

.loop-status .status-iteration,
.loop-status #evolution-detail {
  color: var(--ink-soft);
  font-size: inherit;
}

.loop-status .status-iteration strong {
  color: var(--ink);
  font-size: inherit;
  font-variant-numeric: tabular-nums;
}

.loop-status .status-separator {
  color: color-mix(in srgb, var(--ink-soft) 52%, transparent);
}

/* Simulator scaffolding shared by the stage nodes. */
.stage-nodes {
  padding: 0;
  margin: 0;
  list-style: none;
}

.loop-stage strong {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

/* Integrated taxonomy simulator: four-stage inner loop with a slower outer band. */
.hero-system {
  --inner-accent: var(--inner);
  --inner-soft: var(--inner-soft);
  --outer-accent: var(--outer);
  --outer-soft: var(--outer-soft);
  --accept-accent: var(--accept);
  --reject-accent: var(--reject);
  --stage-tone: var(--stage);
  --stage-active: var(--accent);
  --node-active: var(--stage-active);
  --arrival-active: var(--stage-active);
  --sim-text: var(--ink);
  --sim-muted: var(--ink-soft);
  --sim-panel: color-mix(in srgb, var(--surface) 90%, transparent);
  --sim-line: var(--line);
  --sim-stage: color-mix(in srgb, var(--surface) 96%, transparent);
  background: var(--system-surface);
  border: 1px solid var(--line);
}

.simulator-timing {
  display: flex;
  gap: 0.55rem 0.9rem;
  margin: 0 0 0.72rem;
  color: var(--sim-muted);
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--fs-2xs);
}

.simulator-timing span {
  display: inline-flex;
  gap: 0.32rem;
  align-items: center;
}

.simulator-timing i {
  width: 8px;
  height: 8px;
  border-radius: var(--r-xs);
}

.legend-inner {
  background: var(--inner-accent);
}

.legend-outer {
  background: var(--outer-accent);
}

.evolution-simulator {
  overflow: visible;
  color: var(--sim-text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.simulator-canvas {
  --panel-w: 30cqw;
  --stage-w: max(56px, 12.9cqw);
  --node-w: max(84px, 16.5cqw);
  position: relative;
  container-type: inline-size;
  max-width: 720px;
  margin-inline: auto;
  aspect-ratio: 600 / 480;
  isolation: isolate;
}

.simulator-canvas::before {
  position: absolute;
  z-index: -1;
  inset: 4.6% 7.9%;
  content: "";
  border: 1px dashed color-mix(in srgb, var(--outer-accent) 25%, transparent);
  border-radius: var(--r-xl);
}

.loop-arcs,
.governance-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.loop-arcs {
  z-index: 0;
}

.loop-arcs > .loop-arc,
.loop-arcs > .transition-arc {
  fill: none;
  stroke-linecap: round;
}

.loop-arcs > .loop-arc {
  marker-mid: url("#loop-arrow");
  stroke: color-mix(in srgb, var(--stage-tone) 76%, transparent);
  stroke-width: 1.4;
  opacity: 0.62;
}

.loop-arcs > .transition-arc {
  marker-mid: url("#loop-arrow-active");
  stroke: var(--stage-tone);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-width: 1.4;
  opacity: 0;
}

.loop-arcs #loop-arrow path {
  fill: var(--stage-tone);
  marker-mid: none;
  stroke: none;
  opacity: 1;
  transition: none;
}

.loop-arcs #loop-arrow-active path {
  fill: var(--stage-tone);
  marker-mid: none;
  stroke: none;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 100% 50%;
  transition: none;
}

.transition-arc.is-transition-active {
  animation: transition-flow 1500ms linear both;
}

.hero-system[data-visual-phase="transition"] .loop-arcs #loop-arrow-active path {
  animation: transition-arrow-arrival 1500ms linear both;
}

@keyframes transition-flow {
  0% {
    stroke-dashoffset: 1;
    stroke: var(--stage-tone);
    stroke-width: 1.4;
    opacity: 0;
  }

  8% {
    stroke: color-mix(in srgb, var(--stage-active) 40%, var(--stage-tone));
    stroke-width: 2;
    opacity: 1;
  }

  53% {
    stroke-dashoffset: 0;
    stroke: var(--stage-active);
    stroke-width: 3.2;
    opacity: 1;
  }

  60% {
    stroke-dashoffset: 0;
    stroke: var(--stage-active);
    stroke-width: 3.2;
    opacity: 1;
  }

  76% {
    stroke-dashoffset: -0.28;
    stroke: color-mix(in srgb, var(--stage-active) 68%, var(--stage-tone));
    stroke-width: 2.7;
    opacity: 0.9;
  }

  92% {
    stroke-dashoffset: -0.78;
    stroke: color-mix(in srgb, var(--stage-active) 24%, var(--stage-tone));
    stroke-width: 1.8;
    opacity: 0.5;
  }

  100% {
    stroke-dashoffset: -1;
    stroke: var(--stage-tone);
    stroke-width: 1.4;
    opacity: 0;
  }
}

@keyframes transition-arrow-arrival {
  0% {
    fill: var(--stage-tone);
    opacity: 0;
    transform: scale(1);
  }

  14% {
    fill: var(--stage-tone);
    opacity: 0;
    transform: scale(1);
  }

  20% {
    fill: var(--stage-tone);
    opacity: 1;
    transform: scale(1);
  }

  34% {
    fill: var(--stage-active);
    opacity: 1;
    transform: scale(1.32);
  }

  60% {
    fill: var(--stage-active);
    opacity: 1;
    transform: scale(1.32);
  }

  76% {
    fill: color-mix(in srgb, var(--stage-active) 68%, var(--stage-tone));
    opacity: 0.9;
    transform: scale(1.22);
  }

  92% {
    fill: color-mix(in srgb, var(--stage-active) 24%, var(--stage-tone));
    opacity: 0.5;
    transform: scale(1.06);
  }

  100% {
    fill: var(--stage-tone);
    opacity: 0;
    transform: scale(1);
  }
}

.governance-lines {
  z-index: 1;
}

.governance-lines line {
  stroke: var(--outer-accent);
  stroke-dasharray: 3 4;
  stroke-linecap: round;
  stroke-width: 1.2;
  opacity: 0.52;
  transition: opacity 260ms ease, stroke-width 260ms ease;
}

.governance-lines line.is-active {
  stroke-width: 1.8;
  opacity: 0.9;
}

.loop-stage {
  position: absolute;
  z-index: 4;
  display: flex;
  padding: 0.45rem 0.6rem;
  align-items: center;
  justify-content: center;
  width: var(--stage-w);
  min-height: 40px;
  color: var(--sim-muted);
  background: var(--sim-stage);
  border: 1px solid color-mix(in srgb, var(--stage-tone) 48%, transparent);
  border-radius: var(--r-md);
  box-shadow: 0 4px 12px rgba(32, 32, 39, 0.035);
  transition:
    color 240ms cubic-bezier(0.4, 0, 0.2, 1),
    background 240ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 240ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.evolution-simulator .stage-act {
  top: 18.75%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.evolution-simulator .stage-assess {
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%);
}

.evolution-simulator .stage-revise {
  top: 81.25%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.evolution-simulator .stage-retain {
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
}

.loop-stage.is-active {
  color: white;
  background: var(--stage-active);
  border-color: var(--stage-active);
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow:
    0 9px 22px color-mix(in srgb, var(--stage-active) 22%, transparent),
    0 0 0 4px color-mix(in srgb, var(--stage-active) 12%, transparent);
  animation: stage-arrival 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-system[data-next-stage="retain"][data-next-verdict="accepted"] {
  --arrival-active: var(--accept-accent);
}

.hero-system[data-next-stage="retain"][data-next-verdict="rejected"] {
  --arrival-active: var(--reject-accent);
}

.loop-stage.is-arriving {
  animation: stage-approach 1500ms linear both;
}

@keyframes stage-approach {
  0% {
    color: var(--sim-muted);
    background: var(--sim-stage);
    border-color: color-mix(in srgb, var(--stage-tone) 48%, transparent);
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 12px rgba(32, 32, 39, 0.035);
  }

  48% {
    color: var(--sim-muted);
    background: var(--sim-stage);
    border-color: color-mix(in srgb, var(--stage-tone) 48%, transparent);
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 12px rgba(32, 32, 39, 0.035);
  }

  76% {
    color: color-mix(in srgb, var(--arrival-active) 46%, var(--sim-muted));
    background: color-mix(in srgb, var(--arrival-active) 10%, var(--sim-stage));
    border-color: color-mix(in srgb, var(--arrival-active) 58%, transparent);
    transform: translate(-50%, -50%) scale(1.015);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--arrival-active) 5%, transparent);
  }

  100% {
    color: var(--arrival-active);
    background: color-mix(in srgb, var(--arrival-active) 28%, var(--sim-stage));
    border-color: var(--arrival-active);
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--arrival-active) 12%, transparent);
  }
}

@keyframes stage-arrival {
  0% {
    color: var(--node-active);
    background: color-mix(in srgb, var(--node-active) 28%, var(--sim-stage));
    border-color: var(--node-active);
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--node-active) 12%, transparent);
  }

  48% {
    color: white;
    background: color-mix(in srgb, var(--node-active) 78%, var(--sim-stage));
    border-color: var(--node-active);
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow:
      0 7px 18px color-mix(in srgb, var(--node-active) 16%, transparent),
      0 0 0 2px color-mix(in srgb, var(--node-active) 8%, transparent);
  }

  100% {
    color: white;
    background: var(--node-active);
    border-color: var(--node-active);
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow:
      0 9px 22px color-mix(in srgb, var(--node-active) 22%, transparent),
      0 0 0 4px color-mix(in srgb, var(--node-active) 12%, transparent);
  }
}

.loop-stage.is-active strong {
  font-weight: var(--fw-black);
}

.hero-system[data-visual-phase="stage"] #evolution-stage {
  color: var(--stage-active);
  font-weight: var(--fw-black);
}

.hero-system[data-stage="retain"][data-verdict="accepted"] {
  --retain-accent: var(--accept-accent);
  --node-active: var(--accept-accent);
}

.hero-system[data-stage="retain"][data-verdict="rejected"] {
  --retain-accent: var(--reject-accent);
  --node-active: var(--reject-accent);
}

.hero-system[data-stage="retain"][data-visual-phase="stage"] .stage-retain {
  color: white;
  background: var(--retain-accent);
  border-color: var(--retain-accent);
  box-shadow:
    0 9px 22px color-mix(in srgb, var(--retain-accent) 22%, transparent),
    0 0 0 4px color-mix(in srgb, var(--retain-accent) 12%, transparent);
}

.hero-system[data-stage="retain"][data-visual-phase="stage"] #evolution-stage {
  color: var(--retain-accent);
}


.target-button {
  font: inherit;
  cursor: pointer;
}

.ecosystem-node {
  position: absolute;
  z-index: 5;
  display: flex;
  gap: 0.35rem;
  min-width: var(--node-w);
  min-height: 44px;
  padding: 0.34rem 0.5rem;
  color: var(--outer-accent);
  background: var(--system-surface);
  border: 1px solid color-mix(in srgb, var(--outer-accent) 56%, transparent);
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  transition:
    border-width 260ms ease,
    box-shadow 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

.ecosystem-node > span,
.ecosystem-node strong,
.ecosystem-node small {
  display: block;
  line-height: 1.25;
}

.ecosystem-node strong {
  color: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

.ecosystem-node small {
  margin-top: 0.08rem;
  color: color-mix(in srgb, var(--outer-accent) 68%, transparent);
  font-size: var(--fs-2xs);
  line-height: 1.15;
}

.ecosystem-node.is-governing {
  border-color: var(--outer-accent);
  border-width: 1.5px;
  box-shadow:
    0 6px 16px color-mix(in srgb, var(--outer-accent) 9%, transparent),
    0 0 0 3px color-mix(in srgb, var(--outer-accent) 6%, transparent);
}

.ecosystem-node.is-coevolving {
  border-width: 1.5px;
  border-style: dashed;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--outer-accent) 6%, transparent);
}

.outer-environment {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.outer-objectives {
  top: 28%;
  right: 0;
  transform: translateY(-50%);
}

.outer-evaluators {
  top: 72%;
  right: 0;
  transform: translateY(-50%);
}

.outer-mechanism {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.outer-population {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.agent-panel {
  position: absolute;
  z-index: 6;
  width: var(--panel-w);
  top: 50%;
  left: 50%;
  overflow: hidden;
  padding: 0.44rem 0.58rem;
  background: var(--sim-panel);
  border: 1px solid color-mix(in srgb, var(--inner-accent) 25%, var(--sim-line));
  border-radius: var(--r-lg);
  box-shadow:
    0 16px 34px rgba(32, 32, 39, 0.07),
    0 1px 0 color-mix(in srgb, var(--surface) 80%, transparent) inset;
  transform: translate(-50%, -50%);
}

.agent-panel header {
  display: flex;
  margin-bottom: 0.28rem;
  align-items: baseline;
  justify-content: space-between;
}

.agent-panel header span {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
}

.agent-panel header strong {
  color: var(--inner-accent);
  font-size: var(--fs-2xs);
}

.agent-state {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.agent-verdict {
  padding: 0.12rem 0.36rem;
  color: var(--stage-tone);
  background: color-mix(in srgb, var(--stage-tone) 7%, white);
  border: 1px solid color-mix(in srgb, var(--stage-tone) 46%, transparent);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.agent-verdict.is-accepted {
  color: var(--accept-accent);
  background: color-mix(in srgb, var(--accept-accent) 8%, white);
  border-color: var(--accept-accent);
  border-style: solid;
}

.agent-verdict.is-rejected {
  color: var(--reject-accent);
  background: color-mix(in srgb, var(--reject-accent) 6%, white);
  border-color: color-mix(in srgb, var(--reject-accent) 78%, transparent);
  border-style: dashed;
}

.component-list {
  display: grid;
  gap: 2px;
}

.component-row {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 26px;
  padding: 0.1rem 0.44rem;
  color: var(--inner-accent);
  background: color-mix(in srgb, var(--inner-soft) 72%, white);
  border: 1px solid color-mix(in srgb, var(--inner-accent) 48%, transparent);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: space-between;
  transition:
    border-width 260ms ease,
    box-shadow 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

.component-row span {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.component-row.is-candidate {
  background: var(--inner-soft);
  border-width: 1.5px;
  border-style: dashed;
}

.component-row.is-written {
  color: var(--accept-accent);
  background: color-mix(in srgb, var(--accept-accent) 7%, white);
  border-color: var(--accept-accent);
  border-width: 1.5px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accept-accent) 7%, transparent);
  animation: accepted-write 520ms ease-out both;
}

.component-row.is-rejected {
  color: var(--reject-accent);
  background: color-mix(in srgb, var(--reject-accent) 5%, white);
  border-color: color-mix(in srgb, var(--reject-accent) 72%, transparent);
  border-width: 1px;
  border-style: dashed;
  opacity: 0.72;
  animation: rejected-return 520ms ease-out both;
}

.component-row.is-written::after,
.component-row.is-rejected::after {
  position: absolute;
  right: -0.32rem;
  display: grid;
  width: 14px;
  height: 14px;
  color: currentColor;
  background: var(--sim-stage);
  border: 1px solid currentColor;
  border-radius: 50%;
  place-items: center;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}

.component-row.is-written::after {
  content: "✓";
  color: var(--accept-accent);
}

.component-row.is-rejected::after {
  content: "×";
  color: var(--reject-accent);
}

.hero-system[data-stage="revise"] .component-row {
  animation: target-ripple 400ms ease-out both;
  animation-delay: calc(var(--row-index) * 42ms);
}

.retained-badge {
  display: none;
  min-width: 20px;
  padding: 0.08rem 0.28rem;
  color: inherit;
  background: color-mix(in srgb, currentColor 9%, transparent);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  line-height: 1.4;
  text-align: center;
}

.retained-badge.has-count {
  display: inline-block;
}

.writeback-arrow {
  position: absolute;
  z-index: 7;
  display: block;
  width: 16px;
  height: 2px;
  top: 50%;
  right: calc(50% + var(--panel-w) / 2 + 3px);
  color: var(--inner-accent);
  background: var(--inner-accent);
  border: 0;
  border-radius: var(--r-xs);
  font-size: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 260ms ease;
  transform: translateY(-50%);
}

.writeback-arrow::after {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 0;
  height: 0;
  content: "";
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  transform: translateY(-50%);
}

.writeback-reject-icon {
  display: none;
  width: 32px;
  height: 28px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-system[data-stage="retain"][data-verdict="rejected"] .writeback-arrow {
  display: grid;
  width: 32px;
  height: 28px;
  color: var(--reject-accent);
  background: transparent;
  place-items: center;
}

.hero-system[data-stage="retain"][data-visual-phase="stage"][data-verdict="accepted"] .writeback-arrow {
  visibility: visible;
  opacity: 1;
  animation: writeback-accepted 520ms ease-out both;
}

.hero-system[data-stage="retain"][data-visual-phase="stage"][data-verdict="rejected"] .writeback-arrow {
  visibility: visible;
  opacity: 1;
  animation: writeback-rejected 520ms ease-out both;
}

.hero-system[data-stage="retain"][data-visual-phase="transition"][data-verdict] .writeback-arrow {
  visibility: visible;
  opacity: 0;
  animation: none;
}

.hero-system[data-stage="retain"][data-verdict="rejected"] .writeback-reject-icon {
  display: block;
}

.hero-system[data-stage="retain"][data-verdict="rejected"] .writeback-arrow::after {
  display: none;
}

.target-detail {
  display: grid;
  min-height: 92px;
  padding: 0.7rem 0.85rem;
  background: color-mix(in srgb, var(--sim-panel) 66%, transparent);
  border-top: 1px solid var(--sim-line);
}

.target-detail[hidden] {
  display: none;
}

.target-detail > span {
  color: var(--sim-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.target-detail strong {
  margin-top: 0.12rem;
  color: var(--sim-text);
  font-size: var(--fs-2xs);
}

.target-detail p,
.target-detail small {
  margin: 0.18rem 0 0;
  color: var(--sim-muted);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.target-detail small {
  color: var(--inner-accent);
}

.target-button.is-dimmed,
.hero-system.has-target-focus .loop-arcs,
.hero-system.has-target-focus .governance-lines,
.hero-system.has-target-focus .loop-stage {
  opacity: 0.4;
}

.target-button.is-focused {
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 10%, transparent);
}

.hero-system.is-paused .component-row,
.hero-system.is-paused .writeback-arrow {
  animation-play-state: paused;
}

@keyframes target-ripple {
  50% {
    transform: translateX(4px);
  }
}

@keyframes accepted-write {
  0% {
    opacity: 0.22;
    transform: translateX(-7px) scale(0.98);
  }

  55% {
    opacity: 1;
    transform: translateX(3px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes rejected-return {
  0% {
    opacity: 1;
    transform: translateX(5px);
  }

  35% {
    transform: translateX(-5px);
  }

  65% {
    transform: translateX(3px);
  }

  100% {
    opacity: 0.62;
    transform: translateX(0);
  }
}

@keyframes writeback-accepted {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0.15);
    transform-origin: left center;
  }

  100% {
    opacity: 0.94;
    transform: translateY(-50%) scaleX(1);
    transform-origin: left center;
  }
}

@keyframes writeback-rejected {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.72);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.metrics-section {
  padding: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.section-kicker,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-kicker {
  padding: 0.95rem 0.35rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.section-kicker p,
.section-kicker span {
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.section-kicker span {
  color: var(--ink-soft);
  font-weight: var(--fw-medium);
}

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

.metric-card {
  min-width: 0;
  padding: 1rem 1.1rem 1.15rem;
  border-right: 1px solid var(--line);
}

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

.metric-card span,
.metric-card small {
  display: block;
  color: var(--ink-soft);
}

.metric-card span {
  min-height: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin: 0.35rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-display);
}

.metric-card small {
  overflow: hidden;
  font-size: var(--fs-2xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landscape-section,
.roadmap-section {
  padding: 8rem 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 6rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 480px;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.landscape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.target-card {
  position: relative;
  min-height: 280px;
  padding: 1.5rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.target-card:first-child {
  grid-column: span 2;
}

.target-index {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
}

.target-card h3 {
  margin: 2.8rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-display);
}

.target-card > p {
  max-width: 300px;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.target-count {
  position: absolute;
  top: 1.25rem;
  right: 1.4rem;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  letter-spacing: var(--ls-display);
}

.target-links {
  display: grid;
  gap: 0.38rem;
  padding: 0;
  margin: 1.3rem 0 0;
  list-style: none;
}

.target-links a {
  display: block;
  overflow: hidden;
  color: var(--accent);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-note {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.7rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
  border-left: 2px solid var(--accent);
  border-radius: 0;
  font-size: var(--fs-sm);
}

.target-links a:hover {
  text-decoration: underline;
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.updates-panel,
.contribute-panel {
  padding: clamp(2rem, 4.5vw, 4rem);
}

.updates-panel {
  background: var(--surface);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
}

.panel-heading {
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.contribute-panel h2 {
  margin-bottom: 0;
  font-size: var(--fs-h2);
}

.panel-heading > a {
  flex: none;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

.update-list {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: updates;
}

.update-list li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  padding: 1.45rem 0;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  counter-increment: updates;
  font-size: var(--fs-sm);
}

.update-list li::before {
  content: "0" counter(updates);
  color: var(--accent);
  font-family: var(--font-display);
}

.contribute-panel {
  display: flex;
  flex-direction: column;
  color: var(--surface);
  background: var(--ink);
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
}

.contribute-panel .eyebrow {
  color: var(--accent-bright);
}

.contribute-panel > p:not(.eyebrow) {
  color: color-mix(in srgb, var(--surface) 72%, transparent);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.opportunity-list {
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 0 1.5rem;
}

.opportunity-card {
  display: block;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--surface) 18%, transparent);
  border-radius: var(--r-md);
  text-decoration: none;
}

.opportunity-card:hover {
  background: color-mix(in srgb, var(--surface) 8%, transparent);
}

.opportunity-card span,
.opportunity-card strong {
  display: block;
}

.opportunity-card span {
  margin-bottom: 0.25rem;
  color: var(--accent-bright);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.opportunity-card strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
}

.button-light {
  align-self: flex-start;
  margin-top: auto;
  color: var(--ink);
  background: var(--surface);
}

.contribute-panel > small {
  display: block;
  margin-top: 1.3rem;
  color: color-mix(in srgb, var(--surface) 58%, transparent);
  font-size: var(--fs-2xs);
  line-height: 1.55;
}

.roadmap-section {
  border-bottom: 1px solid var(--line);
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: roadmap;
}

.roadmap-card {
  position: relative;
  min-height: 265px;
  padding: 1.5rem 1.4rem;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  counter-increment: roadmap;
}

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

.roadmap-card::before {
  content: "0" counter(roadmap);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
}

.roadmap-card.is-active {
  color: var(--surface);
  background: var(--ink);
  border-radius: var(--r-lg);
  transform: translateY(-0.7rem);
}

.roadmap-card h3 {
  margin: 4rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
}

.roadmap-card p {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  line-height: 1.65;
}

.roadmap-card.is-active p {
  color: color-mix(in srgb, var(--surface) 63%, transparent);
}

.phase-label {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.32rem 0.55rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.roadmap-card.is-active .phase-label {
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent-bright) 16%, transparent);
}

.closing-callout {
  padding: 7rem 0;
}

.closing-callout > p {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.closing-callout h2 {
  max-width: 800px;
  font-size: var(--fs-display);
}

.text-link {
  padding: 0.8rem;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-decoration: none;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.2rem 0 3rem;
  border-top: 1px solid var(--line);
}

footer strong {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
}

footer p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
}

footer > div:last-child {
  display: flex;
  gap: 1.3rem;
}

footer a {
  color: var(--ink-soft);
  font-size: var(--fs-2xs);
}

.loading-message {
  color: var(--ink-soft);
  font-size: var(--fs-xs);
}

.contribute-panel .loading-message {
  color: color-mix(in srgb, var(--surface) 72%, transparent);
}

@media (max-width: 1180px) {
  .simulator-canvas {
    --panel-w: 27cqw;
    --stage-w: max(54px, 12.5cqw);
    --node-w: max(76px, 16cqw);
  }

  .component-row {
    min-height: 25px;
  }
}

@media (max-width: 1100px) {
  .hero {
    padding-top: 0;
  }

  .hero-system {
    max-width: none;
  }

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

  .metric-card:nth-child(3) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 3) {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
  }

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

  .target-card:first-child {
    grid-column: span 1;
  }

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

  .updates-panel {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  .contribute-panel {
    border-radius: 0 0 var(--r-xl) var(--r-xl);
  }

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

  .roadmap-card:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 78px;
  }

  .brand small,
  nav a:not(.nav-github) {
    display: none;
  }

  nav {
    gap: 0;
  }

  .hero {
    min-height: 0;
    padding: 0 0 3.8rem;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 3.2rem 0 2rem;
  }

  .hero-support {
    max-width: 560px;
    padding-bottom: 0;
  }

  h1 {
    font-size: var(--fs-h1);
  }

  .hero-system {
    padding: 1rem;
    border-radius: var(--r-lg);
  }

  .simulator-canvas {
    --node-w: max(78px, 16.5cqw);
    max-width: none;
  }

  .ecosystem-node small {
    display: none;
  }

  .ecosystem-node {
    min-height: 34px;
  }

  .loop-stage {
    min-height: 36px;
    padding: 0.35rem 0.3rem;
  }

  .metrics-section {
    padding: 0;
  }

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

  .metric-card:nth-child(2n) {
    border-right: 0;
  }

  .metric-card:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .metric-card:nth-child(4) {
    border-bottom: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .landscape-section,
  .roadmap-section {
    padding: 6rem 0;
  }

  .landscape-grid,
  .roadmap-list {
    grid-template-columns: 1fr;
  }

  .target-card,
  .roadmap-card {
    min-height: 235px;
    border-right: 1px solid var(--line);
  }

  .roadmap-card.is-active {
    transform: none;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .updates-panel,
  .contribute-panel {
    padding: 2rem 1.4rem;
  }

  .closing-callout h2 {
    font-size: var(--fs-display);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 560px) {
  .simulator-canvas {
    --panel-w: max(108px, 30cqw);
    --stage-w: max(50px, 12cqw);
    --node-w: max(66px, 15cqw);
    aspect-ratio: 600 / 700;
  }

  .simulator-canvas::before {
    display: block;
  }

  .loop-arcs {
    display: block;
    transform: scale(1.68);
    transform-origin: center;
  }

  .governance-lines {
    display: none;
  }

  .stage-nodes {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - var(--stage-w) - 4px);
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .evolution-simulator .stage-act {
    top: 0;
    left: 50%;
  }

  .evolution-simulator .stage-assess {
    top: 50%;
    left: 100%;
  }

  .evolution-simulator .stage-revise {
    top: 100%;
    left: 50%;
  }

  .evolution-simulator .stage-retain {
    top: 50%;
    left: 0;
  }

  .ecosystem-node {
    min-height: 32px;
    padding: 0.26rem 0.4rem;
    transform: none;
  }

  .outer-environment {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .outer-population {
    top: 0;
    left: 0;
  }

  .outer-objectives {
    top: 0;
    right: 0;
  }

  .outer-evaluators {
    top: auto;
    right: auto;
    bottom: 0;
    left: 27%;
    transform: translateX(-50%);
  }

  .outer-mechanism {
    bottom: 0;
    left: 73%;
    transform: translateX(-50%);
  }

  .writeback-arrow {
    width: 10px;
  }

  .agent-panel {
    padding: 0.45rem;
  }

  .component-row {
    min-height: 22px;
    padding: 0.06rem 0.32rem;
  }

  .component-list {
    gap: 2px;
  }

  .loop-stage {
    min-height: 32px;
  }
}

@media (max-width: 480px) {
  .simulator-timing span {
    width: 100%;
  }

  .simulator-timing b {
    margin-left: 0;
  }

}

@media (max-width: 320px) {
  .simulator-canvas {
    display: grid;
    gap: 0.5rem;
    aspect-ratio: auto;
    min-height: 0;
  }

  .simulator-canvas::before,
  .loop-arcs,
  .governance-lines,
  .writeback-arrow {
    display: none;
  }

  .stage-nodes {
    position: static;
    display: flex;
    width: auto;
    gap: 0.35rem;
    aspect-ratio: auto;
    border: 0;
    flex-wrap: wrap;
    transform: none;
  }

  .loop-stage,
  .ecosystem-node,
  .agent-panel {
    position: static;
    width: auto;
    min-width: 0;
    transform: none;
  }

  .loop-stage {
    flex: 1 1 0;
    min-height: 34px;
  }

  .ecosystem-node {
    min-height: 38px;
    padding: 0.3rem 0.5rem;
    justify-content: flex-start;
  }

  .simulator-canvas > .ecosystem-node {
    grid-column: span 1;
  }

  .agent-panel {
    order: -1;
    padding: 0.62rem;
  }

  .component-row {
    min-height: 30px;
  }
}

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

  .brand-loop-signal {
    animation: none;
  }

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