:root {
  --paper: #f3f4ef;
  --surface: #ffffff;
  --ink: #121713;
  --muted: #69706a;
  --line: #cfd5ce;
  --line-strong: #9ca79f;
  --teal: #14796e;
  --teal-soft: #dcece8;
  --red: #c94736;
  --red-soft: #f4dfdb;
  --blue: #315fa8;
  --blue-soft: #e1e8f3;
  --amber: #ad7620;
  --amber-soft: #f2e8d2;
  --header-height: 68px;
  color-scheme: light;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 244, 239, 0.96);
  backdrop-filter: blur(14px);
}

.brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 14px;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  align-items: center;
  height: 100%;
}

.topnav a {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 17px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.topnav a:hover,
.topnav a.is-active {
  color: var(--ink);
}

.topnav a.is-active::after {
  background: var(--teal);
}

.source-link {
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

main > section {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
}

.report-intro {
  padding: 70px 0 46px;
}

.section-number {
  margin-bottom: 22px;
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.65fr);
  gap: 72px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  font-weight: 700;
}

h1 {
  max-width: 900px;
  margin-bottom: 22px;
  font-size: 50px;
  line-height: 1.14;
  letter-spacing: 0;
  text-wrap: balance;
}

.lead {
  max-width: 820px;
  margin-bottom: 0;
  color: #38413b;
  font-size: 19px;
  line-height: 1.75;
}

.evidence-boundary {
  padding: 22px 0 3px 24px;
  border-left: 3px solid var(--amber);
}

.evidence-boundary p {
  margin-bottom: 10px;
  font-size: 13px;
}

.evidence-boundary .boundary-label {
  margin-bottom: 12px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-boundary .boundary-warning {
  margin-bottom: 0;
  color: var(--red);
  font-weight: 700;
}

.headline-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 64px 0 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.headline-stats > div {
  min-width: 0;
  padding: 22px 24px 24px 0;
}

.headline-stats > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.headline-stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.headline-stats dd {
  margin: 3px 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1.2;
}

.headline-stats small {
  display: block;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.method-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 34px;
}

.method-rail > div {
  position: relative;
  min-width: 0;
  padding-right: 22px;
}

.method-rail > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 34px;
  right: 10px;
  border-top: 1px solid var(--line-strong);
}

.method-rail span {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--teal);
  background: var(--paper);
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}

.method-rail strong,
.method-rail small {
  display: block;
}

.method-rail strong {
  font-size: 14px;
}

.method-rail small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.decision-section,
.task-section {
  width: 100%;
  max-width: none;
  padding: 68px max(32px, calc((100vw - 1360px) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 450px);
  gap: 48px;
  align-items: end;
  margin-bottom: 38px;
}

.section-heading .section-number {
  margin-bottom: 10px;
}

.section-heading h2,
.implementation-layout h2 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.25;
}

.section-heading > p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
}

.decision-workbench {
  display: grid;
  grid-template-columns: minmax(380px, 0.8fr) minmax(560px, 1.2fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.simulation-controls {
  padding: 28px 42px 32px 0;
  border-right: 1px solid var(--line);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset + fieldset {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

legend {
  width: 100%;
  margin-bottom: 18px;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.9fr) 38px;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  border-top: 1px solid #e3e6e1;
}

.range-row:last-child {
  border-bottom: 1px solid #e3e6e1;
}

.range-row strong,
.range-row small {
  display: block;
}

.range-row strong {
  font-size: 13px;
}

.range-row small {
  color: var(--muted);
  font-size: 10px;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.range-row output,
.latency-control output {
  width: 38px;
  text-align: right;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.gate-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 18px;
}

.gate-controls legend {
  grid-column: 1 / -1;
}

.gate-controls label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.gate-controls input[type="number"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
}

.latency-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 14px;
  align-items: center;
}

.latency-control span {
  margin-bottom: 0 !important;
}

.latency-control output {
  width: 48px;
}

.decision-output {
  min-width: 0;
  padding: 30px 0 32px 42px;
}

.decision-status {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
}

.decision-output[data-state="reject"] .status-dot {
  background: var(--red);
}

.decision-output[data-state="continue"] .status-dot {
  background: var(--amber);
}

.decision-status small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.decision-status h3 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 30px;
  line-height: 1.2;
}

.sample-count {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.decision-reason {
  min-height: 52px;
  margin: 12px 0 24px 26px;
  color: var(--muted);
  font-size: 13px;
}

.outcome-matrix {
  display: grid;
  grid-template-columns: 94px repeat(2, minmax(130px, 1fr));
  grid-template-rows: 34px repeat(2, 82px);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.outcome-matrix > div {
  min-width: 0;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.matrix-corner,
.matrix-axis {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.matrix-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}

.matrix-cell span {
  font-size: 12px;
  font-weight: 700;
}

.matrix-cell strong {
  font-family: Georgia, serif;
  font-size: 30px;
}

.matrix-cell.positive {
  background: var(--teal-soft);
  color: #0c5b52;
}

.matrix-cell.negative {
  background: var(--red-soft);
  color: #9d3023;
}

.matrix-cell.stable {
  background: var(--blue-soft);
  color: #284d87;
}

.matrix-cell.neutral {
  background: #eceeea;
  color: #535d55;
}

.rate-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rate-comparison > div {
  min-width: 0;
  padding: 16px 14px 16px 0;
}

.rate-comparison > div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.rate-comparison span,
.rate-comparison strong,
.rate-comparison small {
  display: block;
}

.rate-comparison span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.rate-comparison strong {
  margin: 2px 0;
  font-size: 20px;
}

.rate-comparison small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.blocker-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--teal-soft);
  color: #0c5b52;
  font-size: 11px;
}

.blocker-line.is-blocked {
  background: var(--red-soft);
  color: #942c21;
}

.layer-section,
.artifact-section,
.implementation-section {
  padding: 72px 0;
}

.layer-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.layer-tabs button {
  height: 50px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.layer-tabs button:last-child {
  border-right: 0;
}

.layer-tabs button:hover,
.layer-tabs button.is-active {
  background: var(--ink);
  color: #fff;
}

.layer-detail {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 36px;
  min-height: 220px;
  padding: 38px 0 30px;
  border-bottom: 1px solid var(--line-strong);
  outline: none;
}

.layer-code {
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 48px;
  line-height: 1;
}

.layer-purpose {
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.layer-detail h3 {
  margin-bottom: 12px;
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 26px;
  line-height: 1.35;
}

.layer-detail p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.layer-detail dl {
  margin: 0;
}

.layer-detail dl > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.layer-detail dl > div:last-child {
  border-bottom: 1px solid var(--line);
}

.layer-detail dt {
  color: var(--muted);
  font-size: 11px;
}

.layer-detail dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.task-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.search-field {
  width: min(420px, 42%);
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder {
  color: #8a918b;
}

.segmented {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}

.segmented button {
  min-width: 104px;
  height: 40px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--ink);
  color: #fff;
}

.segmented span {
  margin-left: 4px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.task-list-header,
.task-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(130px, 0.55fr) minmax(180px, 0.7fr) 34px;
  gap: 22px;
  align-items: center;
}

.task-list-header {
  min-height: 36px;
  padding: 0 12px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-item {
  border-top: 1px solid var(--line);
}

.task-item:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.task-summary {
  min-height: 72px;
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
}

.task-summary::-webkit-details-marker {
  display: none;
}

.task-summary strong,
.task-summary small {
  display: block;
}

.task-summary strong {
  font-size: 13px;
}

.task-summary small {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.family-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.runner-state {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--amber);
  border-radius: 3px;
  color: #825715;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.runner-state.current {
  border-color: var(--teal);
  color: #0c5b52;
}

.details-toggle {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

details[open] .details-toggle {
  transform: rotate(45deg);
}

.task-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 18px 56px 24px 12px;
  background: #f7f8f4;
  border-top: 1px solid var(--line);
}

.task-details h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
}

.task-details p {
  margin-bottom: 0;
  font-size: 12px;
}

.empty-state {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

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

.artifact-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 90px;
  gap: 20px;
  align-items: center;
  min-height: 82px;
  padding: 13px 12px 13px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.artifact-list a:hover {
  background: var(--surface);
}

.artifact-index {
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.artifact-list strong,
.artifact-list small {
  display: block;
}

.artifact-list strong {
  font-size: 14px;
}

.artifact-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.artifact-list em {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.command-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 30px;
  background: var(--ink);
  color: #edf2ed;
}

.command-line code {
  min-width: 0;
  overflow-x: auto;
  padding: 17px 18px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.command-line button {
  align-self: stretch;
  min-width: 100px;
  border: 0;
  border-left: 1px solid #4a534c;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.command-line button:hover {
  background: #273029;
}

.implementation-section {
  border-top: 1px solid var(--line-strong);
}

.implementation-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(520px, 1.25fr);
  gap: 80px;
}

.implementation-layout ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.implementation-layout li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.implementation-layout li > span {
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.implementation-layout li p {
  margin-bottom: 0;
  font-size: 13px;
}

.implementation-layout li strong {
  margin-right: 9px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

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

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

@media (max-width: 1020px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 22px;
  }

  .topnav {
    justify-self: center;
  }

  .topnav a {
    padding: 0 10px;
  }

  .topnav a::after {
    left: 10px;
    right: 10px;
  }

  main > section {
    width: min(100% - 44px, 1360px);
  }

  .intro-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .evidence-boundary {
    max-width: 680px;
  }

  h1 {
    font-size: 48px;
  }

  .decision-section,
  .task-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .decision-workbench {
    grid-template-columns: minmax(340px, 0.75fr) minmax(430px, 1.25fr);
  }

  .simulation-controls {
    padding-right: 28px;
  }

  .decision-output {
    padding-left: 28px;
  }

  .range-row {
    grid-template-columns: minmax(130px, 1fr) 90px 32px;
    gap: 10px;
  }

  .task-list-header,
  .task-summary {
    grid-template-columns: minmax(220px, 1.3fr) 120px 170px 34px;
    gap: 14px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 58px;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small,
  .source-link {
    display: none;
  }

  .topnav {
    justify-self: end;
    max-width: 100%;
    overflow-x: auto;
  }

  .topnav a {
    flex: 0 0 auto;
    padding: 0 8px;
    font-size: 11px;
  }

  .topnav a::after {
    left: 8px;
    right: 8px;
  }

  main > section {
    width: calc(100% - 32px);
  }

  .report-intro {
    padding-top: 44px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.22;
  }

  .lead {
    font-size: 16px;
  }

  .headline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .headline-stats > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .headline-stats > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .method-rail {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .method-rail > div {
    display: grid;
    grid-template-columns: 34px 70px 1fr;
    align-items: center;
    min-height: 52px;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-rail > div::after {
    display: none;
  }

  .method-rail span {
    margin: 0;
  }

  .method-rail small {
    margin: 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-heading h2,
  .implementation-layout h2 {
    font-size: 28px;
  }

  .decision-section,
  .task-section {
    width: 100%;
    padding: 54px 16px;
  }

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

  .simulation-controls {
    padding: 24px 0 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .decision-output {
    padding: 30px 0;
  }

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

  .layer-tabs button:nth-child(3) {
    border-right: 0;
  }

  .layer-tabs button:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .layer-detail {
    grid-template-columns: 72px 1fr;
    gap: 20px;
  }

  .layer-detail dl {
    grid-column: 1 / -1;
  }

  .task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
    min-width: 0;
  }

  .task-list-header {
    display: none;
  }

  .task-summary {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 14px;
    min-height: 88px;
    padding: 12px 4px;
  }

  .task-summary > :nth-child(2),
  .task-summary > :nth-child(3) {
    grid-column: 1;
  }

  .task-summary .details-toggle {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .family-label {
    margin-top: -6px;
  }

  .task-details {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px;
  }

  .implementation-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 520px) {
  .topnav a:nth-child(3),
  .topnav a:nth-child(4) {
    display: none;
  }

  .report-intro {
    padding-bottom: 36px;
  }

  h1 {
    font-size: 34px;
  }

  .headline-stats {
    margin-top: 42px;
  }

  .headline-stats > div {
    padding: 17px 12px 18px 0;
  }

  .headline-stats > div + div {
    padding-left: 12px;
  }

  .headline-stats dd {
    font-size: 34px;
  }

  .range-row {
    grid-template-columns: 1fr 34px;
    gap: 8px;
    padding: 10px 0;
  }

  .range-row input {
    grid-column: 1;
  }

  .range-row output {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .gate-controls {
    gap: 12px;
  }

  .latency-control {
    grid-template-columns: 1fr 46px;
  }

  .latency-control input {
    grid-column: 1;
  }

  .latency-control output {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .decision-status {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .sample-count {
    grid-column: 2;
  }

  .decision-reason {
    margin-left: 24px;
  }

  .outcome-matrix {
    grid-template-columns: 68px repeat(2, minmax(0, 1fr));
    grid-template-rows: 34px repeat(2, 76px);
  }

  .matrix-cell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 8px 10px;
  }

  .matrix-cell span {
    font-size: 10px;
  }

  .matrix-cell strong {
    font-size: 25px;
  }

  .rate-comparison {
    grid-template-columns: 1fr;
  }

  .rate-comparison > div,
  .rate-comparison > div + div {
    padding: 12px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .rate-comparison > div:last-child {
    border-bottom: 0;
  }

  .blocker-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .artifact-list a {
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding-right: 0;
  }

  .artifact-list em {
    grid-column: 2;
    justify-self: start;
    margin-top: -8px;
  }

  .command-line {
    grid-template-columns: 1fr;
  }

  .command-line button {
    min-height: 42px;
    border-top: 1px solid #4a534c;
    border-left: 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 20px 16px;
  }
}

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

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