:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --surface: #f7f6f3;
  --surface-2: #e9e8e5;
  --ink: #10100f;
  --muted: #706f6b;
  --line: rgba(16, 16, 15, 0.2);
  --line-strong: rgba(16, 16, 15, 0.42);
  --accent: #ff4b24;
  --accent-soft: #ffe7df;
  --accent-ink: #ffffff;
  --focus: #151515;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input { font: inherit; }

a { color: inherit; text-underline-offset: 0.2em; }
button { border: 0; cursor: pointer; }
code, pre { font-family: var(--mono); }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 9px 13px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

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

.site-header {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-size: 1.35rem;
  font-weight: 720;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 25px;
  height: 18px;
  display: inline-block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 22px;
  height: 5px;
  background: var(--ink);
  transform: skew(-24deg);
}

.brand-mark::before { top: 1px; }
.brand-mark::after { bottom: 1px; width: 15px; background: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}

.site-nav a {
  position: relative;
  font-size: 0.79rem;
  font-weight: 560;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

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

.header-meta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent);
}

main {
  position: relative;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.intro {
  position: relative;
  min-height: clamp(490px, 58vw, 660px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 38px 88px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.intro::before,
.intro::after,
.app-shell::before,
.proof::before {
  content: "+";
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  color: var(--muted);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 20px;
  text-align: center;
}

.intro::before { bottom: -10px; left: -10px; }
.intro::after { right: -10px; bottom: -10px; }

.eyebrow {
  margin: 0 0 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 14em;
  margin-bottom: 36px;
  font-size: clamp(3.2rem, 6.25vw, 6.7rem);
  font-weight: 470;
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.lede {
  max-width: 720px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.65vw, 1.35rem);
  line-height: 1.45;
}

.hero-action-shell {
  padding: 8px;
  border: 1px solid var(--line);
  text-decoration: none;
}

.hero-action-shell > span {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 21px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.hero-action-shell:hover > span { transform: scale(1.025); background: #f13e18; }
.hero-action-shell:active > span { transform: scale(0.985); }

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.43fr) minmax(0, 1.57fr);
  min-height: 810px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.app-shell::before { top: -10px; left: calc(27.4% - 10px); }

.input-pane,
.result-pane {
  min-width: 0;
  padding: 24px;
}

.input-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.pane-heading,
.section-label,
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}

.pane-heading {
  margin: -24px -24px 27px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.pane-heading h2,
.section-label h3,
.panel-heading h4 {
  margin-bottom: 0;
  font-size: 0.7rem;
  font-weight: 580;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.pane-heading span,
.section-label span,
.panel-heading span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
}

form { display: grid; gap: 13px; }

label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

textarea {
  width: 100%;
  min-height: 185px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 17px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.75;
  tab-size: 2;
}

textarea:focus,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.help {
  max-width: 42ch;
  margin: -5px 0 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.check-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 450;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.primary-button,
.download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-radius: 0;
  padding: 0 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.69rem;
  font-weight: 660;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-button:hover,
.download-button:hover { background: #f13e18; }
.primary-button:active,
.scenario-button:active,
.download-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: 0.56; }

.scenario-block {
  margin-top: 35px;
  border-top: 1px solid var(--line);
}

.section-label {
  margin: 0;
  padding: 17px 0 12px;
}

.scenario-list { border-top: 1px solid var(--line); }

.scenario-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: color 160ms ease, padding 160ms ease;
}

.scenario-button:hover { padding-left: 7px; color: var(--accent); }
.scenario-button span { display: flex; gap: 10px; align-items: center; font-size: 0.69rem; }
.scenario-button b { color: var(--muted); font-family: var(--mono); font-size: 0.55rem; font-weight: 450; }
.scenario-button small { color: var(--muted); font-family: var(--mono); font-size: 0.57rem; }

.compiler-contract {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 12px;
  margin-top: auto;
  padding-top: 34px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.compiler-contract span { color: var(--accent); font-weight: 700; letter-spacing: 0.08em; }
.compiler-contract code { overflow-wrap: anywhere; }

.result { min-height: 710px; }

.empty-state {
  min-height: 660px;
  display: grid;
  place-content: center;
  max-width: 48ch;
  margin-inline: auto;
  text-align: center;
}

.empty-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.empty-diagram span {
  min-width: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
}

.empty-diagram i { width: 48px; height: 1px; background: var(--line); }

.empty-state h3 {
  margin-bottom: 13px;
  font-size: clamp(1.55rem, 3vw, 2.7rem);
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.empty-state > p:last-child { color: var(--muted); font-size: 0.84rem; }

.empty-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-state { padding-top: 8px; }
.loading-heading,
.loading-metrics,
.loading-panel { display: grid; gap: 1px; background: var(--line); }
.loading-heading { grid-template-columns: 2fr 0.4fr; margin-bottom: 24px; }
.loading-metrics { grid-template-columns: repeat(4, 1fr); margin-bottom: 32px; }
.loading-panel { grid-template-columns: 1fr; }
.loading-heading span,
.loading-metrics span,
.loading-panel span {
  display: block;
  border-radius: 0;
  background: var(--surface-2);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
.loading-heading span { height: 94px; }
.loading-metrics span { height: 84px; }
.loading-panel span { height: 58px; }
.loading-panel span:nth-child(2) { width: 88%; }
.loading-panel span:nth-child(3) { width: 76%; }
.loading-panel span:nth-child(4) { width: 62%; }
@keyframes pulse { to { background: var(--accent-soft); } }

.gate-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 8px 0 26px;
  border-bottom: 1px solid var(--line-strong);
}

.gate-copy { min-width: 0; }

.gate-copy > p {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gate-copy h3 {
  max-width: 18em;
  margin-bottom: 3px;
  font-size: clamp(2.5rem, 5.15vw, 5.7rem);
  font-weight: 660;
  line-height: 0.9;
  letter-spacing: -0.066em;
  text-transform: uppercase;
  text-wrap: balance;
}

.gate-impact {
  display: block;
  margin: 10px 0 16px;
  color: var(--accent);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 420;
  letter-spacing: -0.035em;
}

.gate-rationale {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.gate-copy code {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  overflow-wrap: anywhere;
}

.risk-score {
  min-width: 82px;
  padding-bottom: 3px;
  text-align: right;
}

.risk-score strong {
  display: block;
  font-size: 3.5rem;
  font-weight: 430;
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.risk-score span { color: var(--muted); font-family: var(--mono); font-size: 0.57rem; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 27px;
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 18px 14px 19px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.metric:first-child { padding-left: 0; }
.metric:last-child { border-right: 0; }
.metric span,
.metric small { display: block; color: var(--muted); font-size: 0.56rem; text-transform: uppercase; }
.metric strong { display: block; margin: 8px 0 4px; font-size: 2.4rem; font-weight: 420; line-height: 0.9; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.metric small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }

.tab-bar {
  display: flex;
  gap: clamp(10px, 2.6vw, 40px);
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: thin;
}

.tab-bar button {
  position: relative;
  flex: 0 0 auto;
  padding: 12px 0 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tab-bar button[aria-selected="true"] { color: var(--ink); font-weight: 650; }
.tab-bar button[aria-selected="true"]::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.tab-bar button span { display: inline; margin-left: 4px; color: var(--accent); font-family: var(--mono); font-size: 0.56rem; }

.tab-panel { padding-top: 22px; }
.tab-panel[hidden] { display: none; }
.panel-heading { margin-bottom: 12px; }

.state-diff {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  margin-bottom: 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.state-diff > div { padding: 15px 13px; }
.state-diff > div:first-child { padding-left: 0; }
.state-diff > div.projected { background: var(--accent-soft); }
.state-diff div span,
.state-diff div small { display: block; color: var(--muted); font-size: 0.54rem; text-transform: uppercase; }
.state-diff div strong { display: block; margin: 5px 0; font-family: var(--mono); font-size: 0.72rem; overflow-wrap: anywhere; }
.state-diff > i { display: grid; place-content: center; padding: 0 14px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--accent); font-style: normal; }
.state-diff > code { position: absolute; right: 0; top: -18px; color: var(--muted); font-size: 0.5rem; }

.failure-list,
.policy-list,
.dag-list,
.trace-list,
.artifact-list { margin: 0; padding: 0; list-style: none; }

.failure-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.failure-item {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.failure-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.failure-heading strong { min-width: 0; font-size: 0.68rem; overflow-wrap: anywhere; }
.severity { flex: 0 0 auto; color: var(--muted); font-family: var(--mono); font-size: 0.49rem; text-transform: uppercase; }
.severity.critical { color: var(--accent); }
.failure-item p { margin: 8px 0 10px; color: var(--muted); font-size: 0.62rem; }
.failure-item small { display: block; margin-top: 9px; color: var(--muted); font-size: 0.52rem; overflow-wrap: anywhere; }
.lineage-path { display: flex; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.lineage-path code { flex: 0 0 auto; max-width: 165px; overflow: hidden; text-overflow: ellipsis; color: var(--accent); font-size: 0.5rem; }
.lineage-path i { color: var(--muted); font-size: 0.56rem; font-style: normal; }

.policy-list { border-top: 1px solid var(--line); }
.policy-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.policy-item > code { color: var(--accent); font-size: 0.61rem; }
.policy-item strong { display: block; font-size: 0.68rem; }
.policy-item p { margin: 3px 0 0; color: var(--muted); font-size: 0.61rem; }
.policy-status { min-width: 45px; padding: 3px 5px; border: 1px solid var(--line-strong); color: var(--ink); font-family: var(--mono); font-size: 0.49rem; text-align: center; }
.policy-status.fail { border-color: var(--accent); color: var(--accent); }
.policy-status.warn { color: var(--muted); }
.policy-status.pass { color: var(--ink); }
.release-condition { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-top: 14px; padding: 13px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.release-condition strong { font-size: 0.65rem; text-transform: uppercase; }
.release-condition p { margin: 0; color: var(--muted); font-size: 0.63rem; }

.dag-list { border-top: 1px solid var(--line); }
.dag-node { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.node-id { width: 30px; height: 30px; display: grid; place-content: center; border: 1px solid var(--line-strong); color: var(--accent); font-family: var(--mono); font-size: 0.55rem; }
.node-title { display: flex; justify-content: space-between; gap: 12px; }
.node-title strong { font-size: 0.66rem; }
.node-title span { color: var(--muted); font-family: var(--mono); font-size: 0.51rem; text-transform: uppercase; }
.node-body p { margin: 3px 0; color: var(--muted); font-size: 0.59rem; }
.node-body small { color: var(--accent); font-size: 0.52rem; overflow-wrap: anywhere; }
.dag-node > code { color: var(--muted); font-size: 0.5rem; }

.trace-list { border-top: 1px solid var(--line); }
.trace-item { display: grid; grid-template-columns: 26px minmax(150px, 0.72fr) minmax(180px, 1fr); gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trace-item > span { color: var(--muted); font-family: var(--mono); font-size: 0.53rem; }
.trace-item code { color: var(--accent); font-size: 0.63rem; }
.trace-item p { margin: 3px 0 0; color: var(--muted); font-size: 0.57rem; }
.trace-item pre { max-height: 78px; margin: 0; overflow: auto; color: var(--muted); font-size: 0.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.writeback { display: grid; grid-template-columns: auto 1fr; gap: 14px; margin-top: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.61rem; }
.writeback strong { text-transform: uppercase; }
.writeback span { color: var(--muted); }

.artifact-section { margin-top: 32px; padding-top: 23px; border-top: 1px solid var(--line-strong); }
.artifact-heading { display: flex; justify-content: space-between; gap: 22px; align-items: flex-end; margin-bottom: 14px; }
.artifact-heading .empty-kicker { margin-bottom: 5px; }
.artifact-heading h4 { margin-bottom: 0; font-size: 1rem; font-weight: 530; letter-spacing: -0.025em; }
.artifact-actions { display: flex; gap: 8px; }
.secondary-button,
.download-button { min-height: 40px; padding: 0 13px; font-size: 0.59rem; }
.secondary-button { border: 1px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--ink); text-transform: uppercase; }
.secondary-button:hover { border-color: var(--ink); }
.download-button { gap: 17px; }

.artifact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.artifact-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.artifact-list .file-icon { color: var(--accent); }
.artifact-list div { min-width: 0; }
.artifact-list code,
.artifact-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-list code { color: var(--ink); font-size: 0.56rem; }
.artifact-list small { margin-top: 2px; color: var(--muted); font-size: 0.49rem; }
.artifact-list b { color: var(--accent); font-family: var(--mono); font-size: 0.45rem; }
.capsule-line { display: flex; gap: 13px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 0.52rem; }
.capsule-line code { color: var(--accent); overflow-wrap: anywhere; }

.error-state { margin-top: 28px; padding: 25px 0; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.error-state h3 { margin-bottom: 8px; color: var(--accent); font-size: 1.8rem; font-weight: 500; letter-spacing: -0.04em; }
.error-state p:last-child { margin-bottom: 0; color: var(--muted); }

.proof {
  position: relative;
  padding: clamp(88px, 10vw, 150px) 42px 0;
  border-bottom: 1px solid var(--line);
}

.proof::before { top: -10px; left: -10px; }
.proof > .eyebrow { margin-bottom: 20px; }
.proof h2 { max-width: 11ch; margin-bottom: 55px; font-size: clamp(2.8rem, 5vw, 5.5rem); font-weight: 470; line-height: 0.95; letter-spacing: -0.065em; text-wrap: balance; }
.proof-grid { display: grid; grid-template-columns: 1.12fr 0.88fr 1fr; margin-inline: -42px; border-top: 1px solid var(--line); }
.proof-grid > div { min-height: 235px; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; padding: 25px 42px 30px; border-right: 1px solid var(--line); background: transparent; }
.proof-grid > div:last-child { border-right: 0; }
.proof-number { color: var(--muted); font-family: var(--mono); font-size: 0.58rem; }
.proof-grid strong { align-self: end; color: var(--ink); font-size: 1rem; font-weight: 620; }
.proof-grid p { max-width: 30ch; margin-bottom: 0; color: var(--muted); font-size: 0.78rem; }

footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

footer p { margin-bottom: 0; }
footer div span { margin-inline: 5px; }

@media (max-width: 1080px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .app-shell { grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1.48fr); }
  .app-shell::before { left: calc(34.6% - 10px); }
  .failure-list { grid-template-columns: 1fr; }
  .artifact-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 820px) {
  .site-header,
  main,
  footer { width: min(100% - 30px, 1500px); }
  .intro { min-height: 520px; padding-inline: 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .app-shell::before { left: -10px; }
  .input-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .compiler-contract { margin-top: 32px; }
  .proof { padding-inline: 24px; }
  .proof-grid { grid-template-columns: 1fr; margin-inline: -24px; }
  .proof-grid > div { min-height: 160px; padding-inline: 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 600px) {
  .site-header { min-height: 68px; }
  .brand { font-size: 1.05rem; }
  .brand-mark { transform: scale(0.8); transform-origin: left; }
  .header-meta { min-height: 36px; padding-inline: 10px; }
  .header-meta span:last-child { display: none; }
  .intro { min-height: 500px; padding: 58px 18px 68px; }
  .eyebrow { margin-bottom: 22px; font-size: 0.56rem; }
  h1 { margin-bottom: 28px; font-size: clamp(2.75rem, 13.8vw, 4.6rem); line-height: 0.94; }
  .lede { font-size: 0.94rem; }
  .input-pane,
  .result-pane { padding: 18px; }
  .pane-heading { margin: -18px -18px 24px; padding: 15px 18px; }
  .gate-summary { grid-template-columns: 1fr auto; gap: 12px; }
  .gate-copy h3 { font-size: clamp(2.45rem, 13vw, 4.2rem); }
  .gate-impact { font-size: 1.1rem; }
  .risk-score strong { font-size: 2.7rem; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(3) { padding-left: 0; }
  .state-diff { grid-template-columns: 1fr; }
  .state-diff > i { min-height: 38px; transform: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .state-diff > div:first-child { padding-left: 13px; }
  .state-diff > code { display: none; }
  .policy-item { grid-template-columns: 48px minmax(0, 1fr); }
  .policy-status { grid-column: 2; justify-self: start; }
  .release-condition { grid-template-columns: 1fr; gap: 5px; }
  .dag-node { grid-template-columns: 36px minmax(0, 1fr); }
  .dag-node > code { grid-column: 2; }
  .trace-item { grid-template-columns: 24px 1fr; }
  .trace-item pre { grid-column: 2; }
  .artifact-actions { width: 100%; flex-direction: column; }
  .secondary-button,
  .download-button { width: 100%; }
  .artifact-list { grid-template-columns: 1fr; }
  .capsule-line { align-items: flex-start; flex-direction: column; }
  footer { padding: 22px 0; align-items: flex-start; flex-direction: column; }
}

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