/* Validation Lab. One stylesheet for every page, phone first.
   Colours and type follow docs/design. Fonts are self-hosted (ADR-030). */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --panel: #121821;
  --box: #18202b;
  --line: #263040;
  --line-soft: #1c2532;
  --fg: #e8eef5;
  --fg-soft: #c9d3df;
  --muted: #9aa6b5;
  --faint: #6b7787;
  --accent: #7cc0ff;
  --accent-soft: #b3dbff;
  --blue: #5ab0ff;
  --green: #34c77b;
  --amber: #e3b341;
  --orange: #ff8a3d;
  --orange-soft: #ffb27a;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
pre {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent-soft);
}

.h {
  font-family: var(--head);
  letter-spacing: -0.01em;
  font-weight: 600;
}

.m {
  font-family: var(--mono);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 10px 14px;
  background: var(--blue);
  color: #06111d;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

/* Without JS the pickers have nothing to do; with JS, site.js adds class "js". */
html:not(.js) .js-only {
  display: none !important;
}

[hidden] {
  display: none !important;
}

/* Text colours */
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.accent-soft { color: var(--accent-soft); }
.blue { color: var(--blue); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.orange { color: var(--orange); }
.orange-soft { color: var(--orange-soft); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }

/* Layout */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  min-width: 0;
}

.box {
  background: var(--box);
  border-radius: 10px;
  padding: 14px;
  min-width: 0;
}

.box p + p {
  margin-top: 4px;
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  padding-top: 24px;
}

.split > * {
  min-width: 0;
}

.col-narrow { flex: 1 1 340px; }
.col-wide { flex: 999 1 560px; }
.col-half { flex: 1 1 480px; }
.split.three > .panel { flex: 1 1 320px; }

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.panel-head.start {
  justify-content: flex-start;
}

.panel > * + * {
  margin-top: 10px;
}

.panel > .panel-head + * {
  margin-top: 0;
}

/* Header and stage rail */
.site-head {
  border-bottom: 1px solid var(--line-soft);
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.head-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.bench-name {
  font-size: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-soft);
  background: var(--box);
}

.chip.blue { color: var(--accent-soft); border-color: #2e4a6b; }
.chip.green { color: var(--green); border-color: #1f5b3d; }
.chip.amber { color: var(--amber); border-color: #5a4a1e; }

a.chip.status {
  text-decoration: none;
  min-height: 32px;
}

.status.ok { color: var(--green); border-color: #1f5b3d; background: #10241a; }
.status.bad { color: var(--orange); border-color: #6b3a16; background: #2a1a0e; }

.rail {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rail a {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.rail a:hover,
.rail a.on {
  color: var(--fg);
  background: var(--panel);
}

.rail a.on {
  border-color: #2e4a6b;
}

.rail a.on .m {
  color: var(--accent);
}

/* Page intro */
.intro {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro-row {
  flex-flow: row wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.intro-row > div:first-child {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 820px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker.amber { color: var(--amber); }
.kicker.orange { color: var(--orange); }

h1.h {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.15;
}

.block h2.h,
h2.h {
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.2;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 760px;
}

.idcard {
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg-soft);
}

.next {
  padding-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.next.two {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #06111d;
  font-weight: 600;
}

.btn.primary:hover {
  color: #06111d;
  background: var(--accent-soft);
}

.pill {
  flex: none;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg-soft);
}

.lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.note {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--box);
  font-size: 14px;
  color: var(--fg-soft);
}

.empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

ul.plain,
ol.plain {
  list-style: none;
  padding: 0;
}

ol.num {
  padding-left: 1.3em;
}

/* Tables */
.scroll {
  overflow-x: auto;
  max-width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.table thead th {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border-bottom-color: var(--line);
}

.table tbody th {
  font-weight: 400;
}

.table.reqs { min-width: 520px; }
.table.cases { min-width: 720px; }
.table.results { min-width: 760px; }
.table.builds { min-width: 760px; }
.table.gates { min-width: 600px; }
.table.adrs { min-width: 480px; }

.tag-changed { color: var(--accent-soft); }
.tag-new { color: var(--green); }
.tag-same,
.tag-clarified { color: var(--muted); }
.tag-open { color: var(--amber); }

/* Verdicts */
.v-passed { color: var(--green); }
.v-failed { color: var(--orange); font-weight: 600; }
.v-error { color: var(--amber); font-weight: 600; }
.v-not-run { color: var(--muted); }

/* Page 01 */
.brief {
  font-size: 18px;
  line-height: 1.7;
  color: #dde5ee;
}

.ask {
  font-size: 20px;
  color: var(--amber);
}

details.q {
  padding: 0;
}

details.q > summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-height: 56px;
  padding: 12px 16px;
  cursor: pointer;
}

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

details.q > summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--muted);
  margin-left: auto;
}

details.q[open] > summary::after {
  content: "\2212";
}

details.q[open] {
  border-color: #2e4a6b;
}

.qid {
  flex: none;
  width: 34px;
}

.qtext {
  flex: 1 1 220px;
  font-size: 16px;
  font-weight: 500;
}

.q-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

/* Page 02 */
.side-nav {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
}

.side-nav a[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #06111d;
  font-weight: 600;
}

.stp-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stp-sec {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sec-title {
  font-size: 24px;
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.rows > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

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

.rows dt {
  color: var(--muted);
}

.li-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.li-list li:last-child {
  border-bottom: 0;
}

.assumptions li {
  padding-top: 8px;
  font-size: 14px;
}

.risk-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.risk-grid {
  flex: 1 1 300px;
  border-collapse: separate;
  border-spacing: 6px;
  font-size: 11px;
}

.risk-grid th {
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
}

.risk-grid td {
  height: 84px;
  width: 30%;
  border-radius: 10px;
  padding: 6px;
  vertical-align: top;
}

.zone-p1 { background: #2a1a0e; border: 1px solid #6b3a16; }
.zone-p2 { background: #221c0d; border: 1px solid #5a4a1e; }
.zone-p3 { background: var(--panel); border: 1px solid var(--line); }

.risk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  margin: 2px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid #3a4658;
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
}

.risk-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.grid-note {
  flex-basis: 100%;
}

.risk-details {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk > * + * {
  margin-top: 6px;
}

.risk-title {
  font-size: 17px;
}

.prio-p1 { color: var(--orange); border-color: #6b3a16; }
.prio-p2 { color: var(--amber); border-color: #5a4a1e; }
.prio-p3 { color: var(--muted); }

/* Page 03 */
.change-btn {
  color: var(--orange-soft);
  border-color: #6b3a16;
  font-weight: 600;
}

.change-btn[aria-pressed="true"] {
  background: var(--orange);
  color: #1a0e05;
}

.matrix {
  min-width: 720px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 12px;
}

.matrix th {
  font-weight: 400;
  text-align: center;
}

.matrix .grp {
  background: var(--box);
  color: var(--fg-soft);
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11px;
  text-transform: uppercase;
}

.matrix abbr {
  text-decoration: none;
}

.matrix .req-col {
  text-align: left;
  width: 150px;
}

.matrix tbody .req-col {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
}

a.cell.covered,
span.cell.covered { background: #15243a; color: var(--blue); border: 1px solid #2e4a6b; }
a.cell.gap,
span.cell.gap { background: transparent; color: var(--amber); border: 1px dashed #5a4a1e; }
a.cell.na,
span.cell.na { background: transparent; color: var(--faint); border: 1px dashed #222b38; }

a.cell[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--fg);
}

.is-on .impacted .req-col {
  background: #2a1a0e;
  border-color: #6b3a16;
}

.is-on .impacted a.cell.covered,
span.cell.impact-mark {
  background: #2a1a0e;
  color: var(--orange);
  border: 2px solid var(--orange);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend .cell {
  min-height: 22px;
  min-width: 22px;
  font-size: 12px;
}

.cell-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cell-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cell-detail > * + * {
  margin-top: 8px;
}

.cell-detail h2.h {
  font-size: 22px;
}

.st-covered { color: var(--blue); border-color: #2e4a6b; }
.st-gap { color: var(--amber); border-color: #5a4a1e; }
.st-na { color: var(--muted); }

.impact {
  padding: 14px;
  border-radius: 10px;
  background: #2a1a0e;
  border: 1px solid #6b3a16;
  font-size: 14px;
}

.impact > * + * {
  margin-top: 6px;
}

.tc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 12px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
}

.tc-title {
  grid-column: 1 / -1;
  font-size: 14px;
}

/* Page 04 */
.big-id {
  font-size: 20px;
}

.card-title {
  font-size: 19px;
}

.fields > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

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

.fields dt {
  color: var(--muted);
}

.code {
  padding: 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  color: #dde5ee;
  white-space: pre;
  tab-size: 4;
}

.code .kw { color: #ff9e64; }
.code .dec { color: var(--amber); }
.code .str,
.code .num { color: #7ee0a8; }
.code .fn { color: var(--accent); }
.code .cm { color: #8a96a6; }

.notes .box {
  font-size: 13px;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.thread li {
  position: relative;
}

.thread li + li::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -14px;
  width: 2px;
  height: 14px;
  background: #2e4a6b;
}

.node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}

.node.here {
  border-color: #2e4a6b;
  background: #15243a;
}

.filter {
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--box);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-family: var(--mono);
  cursor: pointer;
}

.chip-btn[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #06111d;
  font-weight: 600;
}

.std-card > * + * {
  margin-top: 8px;
}

.std-card h3 {
  font-size: 16px;
  font-weight: 500;
}

.code-box summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg-soft);
}

/* Page 05 */
.layers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  font-size: 14px;
}

.layer.hal {
  background: #15243a;
  border-color: #2e4a6b;
}

.targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 13px;
}

.targets div {
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed #3a4658;
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}

.step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.step-btn[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #06111d;
  font-weight: 600;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.step-head .h {
  font-size: 24px;
}

.box.problem { background: #2a1a0e; border: 1px solid #6b3a16; }
.box.change { background: #10241a; border: 1px solid #1f5b3d; }

.step-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Page 06 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px 16px;
  flex: 1 1 320px;
  max-width: 600px;
}

.stats > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

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

.stats dd {
  font-size: 28px;
}

.bug-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bug {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}

.bug[aria-pressed="true"] {
  background: #2a1a0e;
  border-color: #6b3a16;
}

.knob {
  flex: none;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #2c3645;
}

.knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg);
}

.bug[aria-pressed="true"] .knob {
  background: var(--orange);
}

.bug[aria-pressed="true"] .knob::after {
  left: 21px;
}

html:not(.js) .knob {
  display: none;
}

.bug-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bug-title {
  font-size: 15px;
  font-weight: 500;
}

.run-title {
  font-size: 22px;
}

.term {
  background: #070a0e;
  font-size: 12px;
  color: var(--fg-soft);
}

.defect > * + * {
  margin-top: 8px;
}

.defect h4 {
  font-size: 15px;
}

.bars li {
  padding: 4px 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #2a1a0e;
  overflow: hidden;
  margin-top: 4px;
}

.fill {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--green);
  width: 0;
}

.w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; }
.w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; }
.w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; }
.w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; }
.w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

.verdict {
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
}

.verdict.ok { background: #10241a; border: 1px solid #1f5b3d; }
.verdict.bad { background: #2a1a0e; border: 1px solid #6b3a16; }

.criteria li {
  font-size: 14px;
  padding: 4px 0;
}

.st-met { color: var(--green); }
.st-not-met { color: var(--orange); }
.st-manual { color: var(--muted); }

.pipe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 8px;
}

.pipe li,
.lane li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  font-size: 14px;
}

/* Page 07 */
.lane {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 8px;
}

.lane li {
  padding: 0;
  border: 0;
  background: none;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--box);
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
}

.stage[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #06111d;
}

.stage-name {
  font-weight: 600;
  font-size: 14px;
}

.stage-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.gate {
  color: var(--orange);
  border-color: #6b3a16;
}

.principles {
  padding-top: 16px;
}

.principles .panel p + p {
  margin-top: 4px;
  font-size: 14px;
}

.chart {
  width: 100%;
  max-height: 140px;
}

.chart rect {
  fill: var(--blue);
}

.hygiene .inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--fg-soft);
}

/* Footer and the plain pages */
.site-foot {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page p {
  color: var(--muted);
  margin-top: 1rem;
}

.page a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 720px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }

  .panel {
    padding: 22px;
  }

  .rows > div {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
  }

  .fields > div {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .intro {
    padding-top: 48px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .knob::after {
    transition: left 0.15s ease;
  }
}

/* Long paths and IDs wrap on a phone instead of widening the page. */
.code-box summary,
.panel-head .m,
.node .small {
  overflow-wrap: anywhere;
}

.table tbody th[scope="row"] {
  white-space: nowrap;
}

.stack.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  align-items: start;
}
