:root {
  --ink: #101820;
  --ink-soft: #26333d;
  --cloud: #f5f7f8;
  --paper: #ffffff;
  --edge: #00a6a6;
  --edge-dark: #007c7c;
  --verify: #3857d6;
  --verify-light: #dfe5ff;
  --mismatch: #e65b4e;
  --rule: #cbd5df;
  --rule-dark: #586772;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page-pad: clamp(1.25rem, 4vw, 4.5rem);
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cloud);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  overflow-x: clip;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 24, 32, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--edge);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
}

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

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  min-height: 78px;
  padding: 0 var(--page-pad);
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  fill: var(--ink);
}

.brand-mark .brand-signal {
  fill: none;
  stroke: var(--edge);
  stroke-linecap: square;
  stroke-width: 2.4px;
}

nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.045em;
}

nav a:not(.nav-source) {
  position: relative;
}

nav a:not(.nav-source)::after {
  position: absolute;
  right: 0;
  bottom: -0.4rem;
  left: 0;
  height: 2px;
  content: "";
  background: var(--edge);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

.nav-source {
  padding: 0.58rem 0.85rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(560px, 1.14fr);
  gap: clamp(2.5rem, 5vw, 6rem);
  align-items: center;
  max-width: var(--max-width);
  min-height: 690px;
  padding: clamp(4rem, 8vw, 7.5rem) var(--page-pad);
  margin: 0 auto;
}

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

.eyebrow,
.console-kicker,
.phase-label,
.file-type,
.readout-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--edge-dark);
}

.eyebrow::before {
  width: 22px;
  height: 2px;
  content: "";
  background: var(--edge);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
}

h1 {
  max-width: 760px;
  margin: 1.2rem 0 1.45rem;
  font-size: clamp(3.45rem, 6.2vw, 6.45rem);
  font-weight: 800;
  line-height: 0.87;
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--verify);
}

.lede {
  max-width: 620px;
  margin-bottom: 1.8rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

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

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

.button-primary:hover {
  background: var(--verify);
  border-color: var(--verify);
}

.button-quiet {
  background: transparent;
}

.button-quiet:hover {
  color: var(--verify);
  border-color: var(--verify);
}

.scope-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.scope-strip div {
  min-width: 0;
  padding: 0.85rem 0.65rem 0 0;
}

.scope-strip div + div {
  padding-left: 0.75rem;
  border-left: 1px solid var(--rule);
}

.scope-strip dt {
  margin-bottom: 0.18rem;
  color: var(--rule-dark);
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.scope-strip dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.trace-console {
  position: relative;
  min-width: 0;
  padding: clamp(1.2rem, 2.4vw, 2rem);
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid #36414b;
  box-shadow: 18px 20px 0 rgba(56, 87, 214, 0.11), -12px -12px 0 rgba(0, 166, 166, 0.07);
}

.trace-console::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.console-header,
.outcome-switch,
.timeline-stage,
.trace-readout {
  position: relative;
  z-index: 1;
}

.console-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3b4650;
}

.console-kicker {
  margin-bottom: 0.35rem;
  color: #8e9ba6;
}

.console-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: 0.015em;
}

.round-id {
  color: var(--edge);
  font-family: var(--mono);
  font-size: 0.83em;
}

.replay-button {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  color: #d7dfe5;
  cursor: pointer;
  background: transparent;
  border: 1px solid #596671;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.replay-button:hover {
  color: var(--paper);
  border-color: var(--edge);
}

.replay-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.8px;
}

.outcome-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin: 1.2rem 0 0.7rem;
  border: 1px solid #4b5863;
}

.outcome-switch button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  color: #9eabb6;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 0.72rem;
  font-weight: 650;
}

.outcome-switch button + button {
  border-left: 1px solid #4b5863;
}

.outcome-switch button[aria-pressed="true"] {
  color: var(--paper);
  background: #26313a;
}

.switch-dot,
.signal-pip {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
}

.match-dot,
.signal-pip.blue {
  background: var(--verify);
}

.mismatch-dot,
.signal-pip.coral {
  background: var(--mismatch);
}

.signal-pip.teal {
  background: var(--edge);
}

.timeline-stage {
  --feedback-position: 51.5%;
  --lane-offset: 100px;

  position: relative;
  min-height: 274px;
  padding: 2.5rem 0 1rem;
}

.time-axis {
  position: absolute;
  inset: 0 0 auto var(--lane-offset);
  display: grid;
  grid-template-columns: 1fr 1.45fr 0.9fr;
  color: #75838e;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.035em;
}

.time-axis span:nth-child(2) {
  color: #b5c0c9;
  text-align: center;
}

.time-axis span:last-child {
  text-align: right;
}

.lane {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 94px;
}

.lane + .lane {
  border-top: 1px solid #303c45;
}

.lane-label strong,
.lane-label span {
  display: block;
}

.lane-label strong {
  margin-bottom: 0.2rem;
  color: #e9eef2;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.lane-label span {
  color: #77848f;
  font-size: 0.55rem;
  line-height: 1.25;
}

.lane-track {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 48px;
}

.lane-track::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  content: "";
  background: #44515b;
}

.send-block {
  display: flex;
  flex: 0 0 12%;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--edge);
  border-right: 4px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 800;
  transform-origin: left;
}

.expansion-sequence {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.exp-step {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  color: #b9c5ce;
  background: #293640;
  border: 1px solid #4b5964;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.exp-step::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--verify);
  opacity: 0.88;
  transform: scaleX(0);
  transform-origin: left;
}

.verify-block {
  display: flex;
  width: var(--feedback-position);
  align-items: center;
  justify-content: center;
  color: var(--verify-light);
  background: rgba(56, 87, 214, 0.25);
  border: 1px solid #6f83de;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  transform-origin: left;
}

.feedback-marker {
  position: absolute;
  top: 2rem;
  right: 0;
  bottom: 0.4rem;
  left: var(--lane-offset);
  z-index: 4;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: var(--feedback-position) 1fr;
  pointer-events: none;
  opacity: 0;
}

.feedback-label {
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
  padding: 0.2rem 0.38rem;
  color: var(--ink);
  background: var(--mismatch);
  font-family: var(--mono);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(50%);
}

.feedback-marker i {
  grid-row: 2;
  grid-column: 1;
  justify-self: end;
  width: 1px;
  height: 100%;
  background: var(--mismatch);
}

.trace-console[data-outcome="match"] .feedback-label {
  background: var(--verify);
}

.trace-console[data-outcome="match"] .feedback-marker i {
  background: var(--verify);
}

.stop-gate {
  position: absolute;
  top: -15px;
  bottom: -13px;
  left: 56%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.stop-gate i {
  flex: 1;
  width: 2px;
  background: var(--mismatch);
}

.stop-gate b {
  padding: 0.12rem 0.3rem;
  color: var(--mismatch);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.51rem;
  letter-spacing: 0.08em;
}

.trace-readout {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 1rem;
  align-items: start;
  min-height: 72px;
  padding-top: 1rem;
  border-top: 1px solid #3b4650;
}

.readout-code {
  padding: 0.26rem 0.38rem;
  color: var(--edge);
  border: 1px solid #3b7779;
}

.trace-readout p {
  margin: 0;
  color: #bdc7cf;
  font-size: 0.73rem;
  line-height: 1.52;
}

.noscript-trace {
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  color: #bdc7cf;
  border: 1px solid #3b4650;
}

.noscript-trace strong {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.noscript-trace p {
  margin: 0.35rem 0 0;
  font-size: 0.73rem;
  line-height: 1.52;
}

.no-js .outcome-switch,
.no-js .replay-button {
  pointer-events: none;
  visibility: hidden;
}

.no-js .trace-console .feedback-marker,
.no-js .trace-console[data-outcome="mismatch"] .stop-gate {
  opacity: 1;
}

.no-js .trace-console .exp-step::before {
  transform: scaleX(1);
}

.no-js .trace-console[data-outcome="mismatch"] .after-feedback::before {
  transform: scaleX(0);
}

.trace-console.running .send-block {
  animation: reveal-block 280ms both;
}

.trace-console.running .verify-block {
  animation: verify-progress 1.07s 180ms both linear;
}

.trace-console.running .feedback-marker {
  animation: feedback-in 170ms 1.25s both ease-out;
}

.trace-console.running .exp-step::before {
  animation: step-fill 330ms both ease-out;
}

/* The trace intentionally uses the six E1--E6 steps defined in index.html. */
.trace-console.running .exp-step:nth-child(1)::before { animation-delay: 260ms; }
.trace-console.running .exp-step:nth-child(2)::before { animation-delay: 670ms; }
.trace-console.running .exp-step:nth-child(3)::before { animation-delay: 1.08s; }
.trace-console.running .exp-step:nth-child(4)::before { animation-delay: 1.68s; }
.trace-console.running .exp-step:nth-child(5)::before { animation-delay: 2.09s; }
.trace-console.running .exp-step:nth-child(6)::before { animation-delay: 2.5s; }

.trace-console.running[data-outcome="mismatch"] .after-feedback::before {
  animation: none;
}

.trace-console[data-outcome="mismatch"] .after-feedback {
  opacity: 0.28;
  border-style: dashed;
}

.trace-console.running[data-outcome="mismatch"] .active-at-feedback {
  animation: mark-boundary 220ms 1.41s both;
}

.trace-console.running[data-outcome="mismatch"] .stop-gate {
  animation: stop-in 180ms 1.48s both ease-out;
}

.trace-console[data-outcome="match"] .stop-gate {
  display: none;
}

@keyframes reveal-block {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes verify-progress {
  from { opacity: 0.35; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes step-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes stop-in {
  from { opacity: 0; transform: scaleY(0.5); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes mark-boundary {
  from { border-color: #4b5964; }
  to { border-color: var(--mismatch); }
}

.control-band {
  display: flex;
  gap: clamp(1rem, 3vw, 2.8rem);
  align-items: center;
  justify-content: center;
  padding: 1.05rem var(--page-pad);
  color: #dbe2e7;
  background: var(--ink);
  border-top: 1px solid #303a43;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.control-band p {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0;
}

.flow-arrow {
  color: #64727d;
}

.speculative-section {
  padding-bottom: clamp(4.5rem, 7vw, 7rem);
}

.overview-heading {
  padding-bottom: clamp(2rem, 4vw, 3.2rem);
}

.speculative-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(0.65rem, 1.4vw, 1.25rem);
  align-items: center;
}

.spec-step {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
}

.spec-step-heading {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.spec-step-heading > span {
  display: flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.spec-step-heading strong,
.spec-step-heading small {
  display: block;
}

.spec-step-heading strong {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1;
}

.spec-step-heading small {
  margin-top: 0.28rem;
  color: #687782;
  font-size: 0.65rem;
}

.token-sequence,
.parallel-checks,
.accepted-prefix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin: 1.6rem 0 1.35rem;
}

.token-sequence i,
.parallel-checks i,
.accepted-prefix i {
  display: flex;
  min-width: 0;
  height: 46px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #e8f7f6;
  border: 1px solid #8bcfcb;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.token-sequence i + i {
  position: relative;
}

.token-sequence i + i::before {
  position: absolute;
  left: -0.4rem;
  color: var(--edge-dark);
  content: "›";
  font-size: 0.85rem;
}

.parallel-checks i {
  color: var(--verify);
  background: var(--verify-light);
  border-color: #a5b2ed;
}

.parallel-checks i:last-child {
  color: var(--mismatch);
  background: #fff0ed;
  border-color: #ebb3ac;
}

.accepted-prefix i {
  color: var(--paper);
  background: var(--verify);
  border-color: var(--verify);
}

.accepted-prefix i:last-child {
  background: transparent;
  border-color: #d4a19b;
  border-style: dashed;
}

.accepted-prefix i:last-child::after {
  color: var(--mismatch);
  content: "discard";
  font-family: var(--mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-step > p {
  margin: auto 0 0;
  color: #5e6d78;
  font-size: 0.78rem;
  line-height: 1.55;
}

.spec-flow-arrow {
  color: #7b8993;
  font-family: var(--mono);
  font-size: 1.35rem;
}

.pdg-note {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
  color: var(--paper);
  background: var(--ink);
}

.pdg-note > span {
  color: var(--edge);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pdg-note p {
  margin: 0;
  color: #c3cdd4;
  font-size: 0.82rem;
  line-height: 1.6;
}

.section-shell {
  max-width: var(--max-width);
  padding: clamp(5rem, 9vw, 9rem) var(--page-pad);
  margin: 0 auto;
}

.mechanisms {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr);
  gap: 1.25rem;
}

.section-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 2rem;
  align-items: end;
  padding-bottom: 2rem;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.section-heading h2,
.round-copy h2 {
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 5.4rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child,
.round-copy > p {
  margin: 0;
  color: #4e5d68;
  font-size: 1.02rem;
  line-height: 1.7;
}

.mechanism-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.35rem, 2.7vw, 2.4rem);
  background: var(--paper);
  border: 1px solid var(--rule);
}

.mechanism-card > header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.phase-label {
  color: var(--rule-dark);
}

.mechanism-card h3 {
  margin: 0.3rem 0 0;
  font-size: clamp(2.6rem, 4.3vw, 4.6rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.caac-card h3 {
  color: var(--edge-dark);
}

.ipdg-card h3 {
  color: var(--verify);
}

.mechanism-card > header p {
  max-width: 215px;
  margin: 0;
  color: #667581;
  font-size: 0.73rem;
  line-height: 1.45;
  text-align: right;
}

.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.5rem;
  border: 1px solid var(--rule);
}

.problem-solution > div {
  min-width: 0;
  padding: 1rem;
}

.problem-solution > div + div {
  border-left: 1px solid var(--rule);
}

.problem-solution span {
  display: block;
  margin-bottom: 0.48rem;
  color: var(--mismatch);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-solution p {
  margin: 0;
  color: #53616c;
  font-size: 0.72rem;
  line-height: 1.55;
}

.solution-block {
  background: #f3f7ff;
}

.caac-card .solution-block {
  background: #eff9f8;
}

.solution-block span,
.caac-card .solution-block span {
  color: var(--verify);
}

.caac-card .solution-block span {
  color: var(--edge-dark);
}

.signal-board {
  overflow: hidden;
  background: #f9fbfb;
  border: 1px solid var(--rule);
}

.board-row {
  display: grid;
  grid-template-columns: minmax(132px, 1.05fr) minmax(90px, 0.65fr) minmax(30px, 0.28fr) minmax(125px, 0.9fr) minmax(30px, 0.28fr) minmax(95px, 0.7fr);
  gap: 0.5rem;
  align-items: center;
  min-height: 108px;
  padding: 1rem;
}

.board-row + .board-row {
  border-top: 1px solid var(--rule);
}

.board-label span,
.board-label small,
.sensor-node small,
.gate-node small,
.controller-node small {
  display: block;
}

.board-label span {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.board-label small,
.sensor-node small,
.gate-node small,
.controller-node small {
  color: #53616c;
  font-size: 0.62rem;
  line-height: 1.35;
}

.sensor-node,
.gate-node,
.controller-node,
.dual-meter {
  min-width: 0;
  padding: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.node-code {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 800;
}

.board-wire {
  position: relative;
  height: 1px;
  background: var(--rule-dark);
}

.board-wire::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--rule-dark);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.dual-meter {
  display: grid;
  gap: 0.5rem;
}

.dual-meter div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.45rem;
  align-items: center;
}

.dual-meter span {
  display: block;
  height: 6px;
  transform-origin: left;
}

.meter-fast {
  width: 100%;
  background: var(--edge);
}

.meter-slow {
  width: 72%;
  background: #91a1ac;
}

.dual-meter small {
  color: #65747f;
  font-size: 0.58rem;
  line-height: 1.2;
}

.teal-node {
  color: var(--edge-dark);
  border-color: var(--edge);
}

.blue-node {
  color: var(--verify);
  border-color: var(--verify);
}

.controller-node {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.6rem;
  align-items: center;
}

.controller-node small {
  grid-column: 1 / -1;
}

.pid-label {
  color: var(--verify);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.pid-bars {
  display: flex;
  gap: 2px;
  align-items: end;
  height: 23px;
}

.pid-bars i {
  flex: 1;
  background: var(--verify);
}

.pid-bars i:nth-child(1) { height: 45%; }
.pid-bars i:nth-child(2) { height: 85%; }
.pid-bars i:nth-child(3) { height: 62%; }

.fusion-row {
  display: grid;
  grid-template-columns: auto minmax(30px, 0.3fr) minmax(160px, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 1rem;
  color: var(--paper);
  background: var(--ink);
}

.fusion-row > span {
  color: var(--edge);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.fusion-line {
  height: 1px;
  background: #667681;
}

.fusion-row p {
  margin: 0;
  color: #b8c3cb;
  font-size: 0.64rem;
}

.depth-output {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 0.7rem;
  align-items: center;
  padding-left: 0.8rem;
  border-left: 1px solid #52616c;
}

.depth-output small {
  grid-column: 1 / -1;
  color: #83929d;
  font-family: var(--mono);
  font-size: 0.53rem;
  text-transform: uppercase;
}

.depth-output strong {
  color: var(--edge);
  font-family: var(--mono);
  font-size: 1rem;
}

.depth-output span {
  color: #c7d0d7;
  font-family: var(--mono);
  font-size: 0.67rem;
}

.card-note {
  margin: 1.35rem 0 1.1rem;
  color: #4e5d68;
  font-size: 0.84rem;
  line-height: 1.65;
}

.text-link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 750;
  border-bottom: 1px solid currentColor;
}

.text-link:hover {
  color: var(--verify);
}

.text-link code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.boundary-flow {
  position: relative;
  padding: 0;
  margin: 0 0 1.2rem;
  list-style: none;
}

.boundary-flow::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 16px;
  width: 1px;
  content: "";
  background: var(--rule);
}

.boundary-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 0.7rem 0;
}

.flow-index {
  position: relative;
  z-index: 1;
  display: flex;
  width: 33px;
  height: 33px;
  align-items: center;
  justify-content: center;
  color: #687782;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.decision-step .flow-index {
  color: var(--paper);
  background: var(--verify);
  border-color: var(--verify);
}

.boundary-flow strong {
  display: block;
  margin: 0.05rem 0 0.15rem;
  font-family: var(--display);
  font-size: 0.98rem;
  letter-spacing: 0.015em;
}

.boundary-flow p {
  margin: 0;
  color: #687782;
  font-size: 0.72rem;
  line-height: 1.45;
}

.branch-legend {
  padding: 0.85rem 0;
  margin-bottom: 1.2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.branch-legend p {
  display: grid;
  grid-template-columns: 7px 60px 1fr;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  color: #63717c;
  font-size: 0.68rem;
}

.branch-legend p + p {
  margin-top: 0.48rem;
}

.branch-legend strong {
  color: var(--ink);
}

.round-section {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(0, 680px);
  gap: clamp(3rem, 7vw, 8rem);
  justify-content: center;
  padding: clamp(5rem, 9vw, 8rem) var(--page-pad);
  color: var(--paper);
  background: var(--ink);
}

.round-copy {
  max-width: 560px;
}

.round-copy .eyebrow {
  color: var(--edge);
}

.round-copy h2 {
  margin: 1rem 0 1.5rem;
}

.round-copy > p {
  margin-bottom: 1.7rem;
  color: #abb7c0;
}

.button-light {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.button-light:hover {
  color: var(--paper);
  background: var(--verify);
  border-color: var(--verify);
}

.round-rail {
  position: relative;
  max-width: 680px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.round-rail::before {
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 41px;
  width: 1px;
  content: "";
  background: #4a5964;
}

.round-rail li {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.2rem;
  min-height: 105px;
}

.rail-time {
  position: relative;
  z-index: 1;
  display: flex;
  width: 84px;
  height: 50px;
  align-items: center;
  justify-content: center;
  color: var(--edge);
  background: var(--ink);
  border: 1px solid #53636e;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.round-rail .feedback-step .rail-time {
  color: var(--ink);
  background: var(--mismatch);
  border-color: var(--mismatch);
}

.round-rail strong {
  display: block;
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}

.round-rail p {
  max-width: 460px;
  margin: 0;
  color: #9cabb5;
  font-size: 0.8rem;
}

.results-section {
  padding-top: clamp(5rem, 9vw, 8rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
}

.results-heading h2 {
  max-width: 850px;
}

.result-ledger {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.35fr;
  gap: 1px;
  margin-bottom: 1.25rem;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.result-ledger article {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: clamp(1.4rem, 2.8vw, 2.35rem);
  background: var(--paper);
}

.result-label {
  color: var(--rule-dark);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.result-ledger article > strong {
  margin: auto 0 1.15rem;
  color: var(--verify);
  font-family: var(--display);
  font-size: clamp(3.6rem, 6vw, 6.8rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.045em;
}

.result-ledger article > strong > span {
  margin-left: 0.08em;
  font-size: 0.48em;
  letter-spacing: -0.02em;
}

.result-ledger article > p {
  max-width: 300px;
  margin: 0;
  color: #5e6d78;
  font-size: 0.76rem;
  line-height: 1.55;
}

.result-ledger .range-result > strong {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.55rem;
  align-items: center;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.7vw, 2.75rem);
  letter-spacing: -0.055em;
}

.range-result strong span:last-child {
  color: var(--edge-dark);
}

.range-result strong small {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--rule-dark);
  font-size: 0.26em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-result strong b {
  color: var(--mismatch);
  font-size: 0.7em;
}

.ablation-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  padding: clamp(1.6rem, 3.6vw, 3.4rem);
  color: var(--paper);
  background: var(--ink);
}

.ablation-copy h3 {
  max-width: 440px;
  margin: 0.8rem 0 1rem;
  font-size: clamp(2rem, 3.8vw, 4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.ablation-copy > p:not(.eyebrow) {
  max-width: 500px;
  margin-bottom: 1.2rem;
  color: #b6c1c9;
  font-size: 0.83rem;
  line-height: 1.62;
}

.ablation-copy small {
  display: block;
  max-width: 500px;
  color: #7f8e99;
  font-family: var(--mono);
  font-size: 0.56rem;
  line-height: 1.5;
}

.ablation-chart {
  align-self: center;
}

.chart-scale {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.6rem;
  color: #7f8e99;
  border-bottom: 1px solid #3c4852;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(94px, 0.42fr) minmax(170px, 1fr) 42px;
  gap: 0.85rem;
  align-items: center;
  min-height: 55px;
  border-bottom: 1px solid #303c45;
}

.bar-row > span {
  color: #b9c4cc;
  font-size: 0.67rem;
}

.bar-row i {
  position: relative;
  display: block;
  width: 100%;
  height: 11px;
  background: #293640;
}

.bar-row i::after {
  display: block;
  width: var(--bar-size);
  height: 100%;
  content: "";
  background: #73818b;
}

.ipdg-bar i::after {
  background: var(--verify);
}

.caac-bar i::after {
  background: var(--edge);
}

.rapid-bar i::after {
  background: var(--paper);
}

.bar-row strong {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: right;
}

.result-note {
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 0;
  color: #4e5d68;
  background: #edf1f4;
  border-left: 3px solid var(--edge);
  font-size: 0.78rem;
  line-height: 1.6;
}

.compact-heading {
  max-width: 1080px;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.code-grid a {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: clamp(1.3rem, 2.8vw, 2.25rem);
  background: var(--paper);
  transition: color 150ms ease, background-color 150ms ease;
}

.code-grid a:hover {
  color: var(--paper);
  background: var(--verify);
}

.file-type {
  margin-bottom: auto;
  color: var(--edge-dark);
}

.code-grid a:hover .file-type,
.code-grid a:hover p {
  color: #e4e9ff;
}

.code-grid strong {
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 1.15rem;
}

.code-grid p {
  max-width: 250px;
  margin: 0.35rem 0 0;
  color: #65747f;
  font-size: 0.75rem;
}

.file-arrow {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  font-size: 1.15rem;
}

footer {
  display: flex;
  gap: 3rem;
  align-items: flex-end;
  justify-content: space-between;
  max-width: var(--max-width);
  padding: 2.3rem var(--page-pad) 3.2rem;
  margin: 0 auto;
  border-top: 1px solid var(--rule);
}

.footer-brand {
  margin-bottom: 0.35rem;
}

footer p {
  margin: 0;
  color: #5d6d78;
  font-size: 0.7rem;
}

.footer-links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--verify);
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero > * {
    width: 100%;
    min-width: 0;
    max-width: 820px;
  }

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

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

  .speculative-flow {
    gap: 0.7rem;
  }

  .result-ledger {
    grid-template-columns: 1fr 1fr;
  }

  .result-ledger .range-result {
    grid-column: 1 / -1;
    min-height: 220px;
  }
}

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

  nav a:not(.nav-source) {
    display: none;
  }

  .hero {
    padding-top: 4rem;
  }

  .scope-strip {
    grid-template-columns: 1fr;
  }

  .scope-strip div + div {
    padding-left: 0;
    border-left: 0;
  }

  .scope-strip div {
    display: grid;
    grid-template-columns: minmax(105px, 0.5fr) 1fr;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .control-band {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .control-band p {
    flex: 0 0 auto;
  }

  .speculative-flow {
    grid-template-columns: 1fr;
  }

  .spec-flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .spec-step {
    min-height: 220px;
  }

  .pdg-note,
  .ablation-panel {
    grid-template-columns: 1fr;
  }

  .result-ledger {
    grid-template-columns: 1fr;
  }

  .result-ledger .range-result {
    grid-column: auto;
  }

  .board-row {
    grid-template-columns: minmax(110px, 0.9fr) minmax(80px, 0.65fr) 24px minmax(105px, 0.8fr) 24px minmax(82px, 0.65fr);
    min-width: 620px;
  }

  .signal-board {
    overflow-x: auto;
  }

  .round-section {
    grid-template-columns: 1fr;
  }

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

  .code-grid a {
    min-height: 180px;
  }
}

@media (max-width: 560px) {
  :root {
    --page-pad: 1rem;
  }

  .brand-mark {
    width: 26px;
  }

  .nav-source {
    padding: 0.48rem 0.68rem;
    font-size: 0.72rem;
  }

  .hero {
    gap: 2.8rem;
    padding-top: 3.2rem;
    padding-bottom: 4rem;
  }

  h1 {
    font-size: clamp(2.85rem, 13.5vw, 3.7rem);
    overflow-wrap: normal;
  }

  .lede {
    font-size: 1rem;
  }

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

  .trace-console {
    padding: 1rem;
    box-shadow: 8px 10px 0 rgba(56, 87, 214, 0.12);
  }

  .console-header {
    align-items: center;
  }

  .console-title {
    font-size: 1.08rem;
  }

  .outcome-switch {
    display: grid;
    width: 100%;
  }

  .outcome-switch button {
    justify-content: center;
    padding-inline: 0.4rem;
    font-size: 0.65rem;
  }

  .timeline-stage {
    --lane-offset: 62px;

    min-height: 252px;
  }

  .time-axis {
    left: var(--lane-offset);
  }

  .time-axis span:first-child,
  .time-axis span:last-child {
    visibility: hidden;
  }

  .lane {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
  }

  .lane-label span {
    display: none;
  }

  .expansion-sequence {
    gap: 2px;
  }

  .exp-step,
  .verify-block,
  .send-block {
    font-size: 0.54rem;
  }

  .trace-readout {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .readout-code {
    justify-self: start;
  }

  .section-shell {
    padding-top: 4.7rem;
    padding-bottom: 4.7rem;
  }

  .section-heading h2,
  .round-copy h2 {
    font-size: clamp(2.45rem, 12.5vw, 3.65rem);
  }

  .mechanism-card > header {
    display: block;
  }

  .mechanism-card > header p {
    margin-top: 0.75rem;
    text-align: left;
  }

  .problem-solution {
    grid-template-columns: 1fr;
  }

  .problem-solution > div + div {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .fusion-row {
    grid-template-columns: auto 1fr;
  }

  .fusion-row p {
    grid-column: 1 / -1;
  }

  .depth-output {
    grid-column: 1 / -1;
    padding-top: 0.6rem;
    padding-left: 0;
    border-top: 1px solid #52616c;
    border-left: 0;
  }

  .round-section {
    gap: 3rem;
  }

  .ablation-panel {
    gap: 2rem;
  }

  .bar-row {
    grid-template-columns: 82px minmax(120px, 1fr) 36px;
    gap: 0.55rem;
  }

  .round-rail li {
    grid-template-columns: 62px 1fr;
  }

  .round-rail::before {
    left: 30px;
  }

  .rail-time {
    width: 62px;
  }

  footer {
    display: block;
  }

  .footer-links {
    margin-top: 1.5rem;
  }
}

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

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

  .trace-console .feedback-marker {
    opacity: 1;
  }

  .trace-console .exp-step::before {
    transform: scaleX(1);
  }

  .trace-console[data-outcome="mismatch"] .after-feedback::before {
    transform: scaleX(0);
  }

  .trace-console[data-outcome="mismatch"] .stop-gate {
    opacity: 1;
  }
}
