:root {
  --ink: #111820;
  --ink-soft: #1a2530;
  --paper: #f1f4f3;
  --paper-deep: #e4e9e7;
  --surface: #f9fbfa;
  --line: #c7d0ce;
  --muted: #56636a;
  --cyan: #2e7483;
  --cyan-bright: #a8e4e4;
  --oxide: #a64232;
  --oxide-soft: #f0cdc5;
  --moss: #386b55;
  --moss-soft: #cde5d8;
  --display: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Code", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, transparent 0 49.9%, rgba(46, 116, 131, 0.055) 50%, transparent 50.1%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(17, 24, 32, 0.035) 32px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

button,
a {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-180%);
}

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

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

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 22px;
}

.header-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

.header-meta span {
  color: var(--muted);
}

.header-meta strong {
  grid-column: 2;
  color: var(--cyan);
}

main {
  overflow: hidden;
}

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

.hero {
  min-height: 580px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 220px;
  gap: 44px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}

.hero-index {
  align-self: start;
  margin-top: 108px;
  font-family: var(--display);
  font-size: 86px;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
}

.hero-copy {
  padding: 90px 0;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: clamp(48px, 7.4vw, 100px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.93;
}

h1 em {
  display: block;
  color: var(--cyan);
  font-weight: 400;
}

.lede {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.48;
}

.hero-receipt {
  align-self: end;
  margin-bottom: 94px;
  padding-top: 18px;
  border-top: 4px solid var(--ink);
  display: grid;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.hero-receipt span {
  margin-top: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.hero-receipt strong {
  color: var(--moss);
}

.instrument {
  padding: 84px 0 94px;
  border-bottom: 1px solid var(--ink);
}

.instrument-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.mode-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

.mode-button {
  min-height: 44px;
  padding: 9px 17px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.trace-shell {
  position: relative;
  padding: 42px;
  overflow: hidden;
  background: var(--ink);
  color: var(--surface);
  border-radius: 2px;
}

.trace-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 7px,
    rgba(168, 228, 228, 0.025) 8px
  );
}

.signal-rail {
  position: absolute;
  top: 79px;
  right: 11%;
  left: 11%;
  height: 2px;
}

.signal-line {
  position: absolute;
  inset: 0;
  background: var(--cyan-bright);
}

.signal-break {
  position: absolute;
  left: 49%;
  width: 46px;
  height: 14px;
  transform: translate(-50%, -6px) skewX(-28deg);
  background: var(--oxide);
  box-shadow: 0 0 0 7px var(--ink);
}

.boundary-trace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-stage {
  min-width: 0;
  padding-top: 4px;
}

.stage-marker {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  border: 2px solid var(--cyan-bright);
  border-radius: 50%;
  background: var(--ink);
  color: var(--cyan-bright);
  font-family: var(--display);
  font-size: 30px;
}

.stage-type {
  margin-bottom: 5px;
  color: var(--cyan-bright);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.trace-stage h3 {
  min-height: 58px;
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.trace-stage dl {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
}

.trace-stage dl div {
  display: grid;
  grid-template-columns: minmax(95px, 0.8fr) 1.2fr;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid rgba(249, 251, 250, 0.14);
}

.trace-stage dt {
  color: #a9b5b8;
}

.trace-stage dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.authority-row dd {
  color: var(--cyan-bright);
  font-weight: 700;
}

.trace-shell[data-state="observed"] .transition-row dd,
.trace-shell[data-state="observed"] .result-row dd {
  color: #f3a18f;
}

.trace-verdict {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid rgba(249, 251, 250, 0.26);
}

.verdict-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--oxide);
  color: var(--surface);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
}

.trace-verdict .eyebrow {
  margin-bottom: 3px;
  color: #a9b5b8;
}

.trace-verdict strong {
  display: block;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
}

.trace-verdict p:last-child {
  max-width: 700px;
  margin: 5px 0 0;
  color: #c2cbcd;
}

.verdict-code {
  padding: 8px 11px;
  border: 1px solid var(--oxide);
  color: #f3a18f;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.trace-shell[data-state="repaired"] .signal-break {
  width: 14px;
  height: 14px;
  border: 3px solid var(--moss-soft);
  border-radius: 50%;
  transform: translate(-50%, -6px);
  background: var(--moss);
  box-shadow: 0 0 0 7px var(--ink);
}

.trace-shell[data-state="repaired"] .verdict-mark {
  background: var(--moss);
}

.trace-shell[data-state="repaired"] .verdict-code {
  border-color: var(--moss-soft);
  color: var(--moss-soft);
}

.finding {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 42px;
  padding: 92px 0;
  border-bottom: 1px solid var(--ink);
}

.finding-number {
  font-family: var(--mono);
  color: var(--oxide);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.finding-body h2 {
  max-width: 650px;
  margin-bottom: 25px;
}

.finding-body > p:last-child {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 20px;
}

.finding-contract {
  margin: 0;
  border-top: 4px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.finding-contract div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.finding-contract dt {
  color: var(--muted);
  text-transform: uppercase;
}

.finding-contract dd {
  margin: 0;
}

.two-channel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--ink);
}

.two-channel > div {
  min-height: 420px;
  padding: 82px 7vw 82px 0;
}

.two-channel > div + div {
  padding-right: 0;
  padding-left: 7vw;
  border-left: 1px solid var(--ink);
}

.two-channel h2 {
  margin-bottom: 28px;
}

.two-channel p,
.two-channel li {
  color: var(--muted);
}

blockquote {
  margin: 38px 0 24px;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 39px);
  font-style: italic;
  line-height: 1.2;
}

.question-channel ul {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.question-channel li {
  padding: 14px 0 14px 25px;
  border-top: 1px solid var(--line);
  position: relative;
}

.question-channel li::before {
  content: "?";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-family: var(--mono);
  font-weight: 700;
}

.scope-band {
  padding: 104px max(24px, 8vw);
  background: var(--cyan);
  color: var(--surface);
  text-align: center;
}

.scope-band .eyebrow {
  color: var(--cyan-bright);
}

.scope-band h2 {
  max-width: 780px;
  margin: 0 auto 28px;
  font-size: clamp(42px, 6vw, 78px);
}

.scope-band > p:not(.eyebrow) {
  max-width: 770px;
  margin: 0 auto;
  color: #e4f0ee;
  font-family: var(--display);
  font-size: 21px;
}

.scope-status {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.scope-status span {
  padding: 8px 12px;
  border: 1px solid rgba(249, 251, 250, 0.55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer {
  min-height: 94px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 72px 1fr;
  }

  .hero-receipt {
    grid-column: 2;
    align-self: start;
    margin: -54px 0 70px;
    max-width: 360px;
  }

  .boundary-trace {
    grid-template-columns: 1fr;
  }

  .signal-rail {
    top: 70px;
    bottom: 160px;
    left: 74px;
    width: 2px;
    height: auto;
  }

  .signal-break {
    top: 49%;
    left: -21px;
    transform: translateY(-50%) skewY(-28deg);
  }

  .trace-stage {
    padding-left: 92px;
  }

  .stage-marker {
    position: absolute;
    left: 0;
  }

  .trace-stage h3 {
    min-height: 0;
  }

  .finding {
    grid-template-columns: 76px 1fr;
  }

  .finding-contract {
    grid-column: 2;
  }
}

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

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

  .header-meta {
    display: none;
  }

  .hero {
    display: block;
    min-height: 0;
  }

  .hero-index {
    margin: 72px 0 0;
    font-size: 56px;
  }

  .hero-copy {
    padding: 28px 0 70px;
  }

  h1 {
    font-size: clamp(44px, 14vw, 70px);
  }

  .hero-receipt {
    margin: 0 0 70px;
  }

  .instrument {
    padding: 70px 0;
  }

  .instrument-heading {
    display: block;
  }

  .mode-switch {
    width: 100%;
    margin-top: 26px;
  }

  .mode-button {
    flex: 1;
  }

  .trace-shell {
    padding: 28px 22px;
  }

  .signal-rail {
    left: 47px;
  }

  .trace-stage {
    padding-left: 66px;
  }

  .stage-marker {
    width: 48px;
    height: 48px;
    font-size: 21px;
  }

  .trace-stage dl div {
    display: block;
  }

  .trace-stage dd {
    margin-top: 4px;
  }

  .trace-verdict {
    grid-template-columns: 42px 1fr;
  }

  .verdict-mark {
    width: 40px;
    height: 40px;
  }

  .verdict-code {
    grid-column: 2;
    justify-self: start;
  }

  .finding {
    display: block;
    padding: 70px 0;
  }

  .finding-number {
    margin-bottom: 28px;
  }

  .finding-contract {
    margin-top: 40px;
  }

  .two-channel {
    display: block;
  }

  .two-channel > div {
    min-height: 0;
    padding: 70px 0;
  }

  .two-channel > div + div {
    padding-left: 0;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .scope-band {
    padding: 76px 20px;
  }

  footer {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 440px) {
  .mode-switch {
    display: grid;
  }

  .scope-status {
    display: grid;
  }
}

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

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