/* ── AI-NATIVE QUALITY STRATEGY ──
   Page-specific components for /reference/ai-native-qa-strategy.html.
   Builds on the tokens in design.css; adds one semantic colour (--danger)
   for defects that escape and time that is wasted. */

:root {
  --danger: #ff5f56;
  --danger-dim: #a0403a;
  --line: #2a2a2a;
  --panel: #0d0d0d;
  --nav-h: 61px;
  --bar-h: 42px;
}

.js .st-panel-title { display: none; }

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

/* ── HERO ── */
.st-hero-meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 0;
  margin-top: 1.8rem;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.st-hero-meta li + li::before { content: '·'; color: var(--accent); margin: 0 0.9rem; }

.st-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.st-actions--tight { gap: 0.6rem; margin-top: 0; }
.st-btn-sm { padding: 0.65rem 1.2rem; font-size: 0.68rem; cursor: pointer; font-family: var(--mono); }
button.btn { cursor: pointer; }

/* ── CHAPTER BAR ── */
.st-chapters {
  position: sticky; top: var(--nav-h); z-index: 90;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.st-chapters ol {
  position: relative; list-style: none; display: flex; justify-content: space-between;
  padding: 0 3rem; overflow-x: auto; scrollbar-width: none;
}
.st-chapters ol::-webkit-scrollbar { display: none; }
.st-chapters li:last-child a { padding-right: 0; }
.st-chapters a {
  display: block; padding: 0.9rem 0.5rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  white-space: nowrap; transition: color 0.2s;
}
.st-chapters li:first-child a { padding-left: 0; }
.st-chapters a span { color: #555; margin-right: 0.4rem; transition: color 0.2s; }
.st-chapters a:hover { color: var(--fg); }
.st-chapters a[aria-current="true"] { color: var(--fg); }
.st-chapters a[aria-current="true"] span { color: var(--accent); }
.st-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.st-progress span {
  display: block; height: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ── CHAPTERS & TYPE ── */
.st-content .back-link { margin-bottom: 2.5rem; }
.st-chapter {
  padding-top: 4.5rem; margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + var(--bar-h) - 1px);
}
.st-content > .st-chapter:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.st-h2 {
  font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 900;
  line-height: 1.02; letter-spacing: -0.03em; text-transform: uppercase;
  margin-bottom: 1.6rem; max-width: 920px; text-wrap: balance;
}
.st-h2 span { color: var(--accent); }
.st-h3 {
  font-size: 1.35rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.01em; margin: 3rem 0 0.8rem;
}
.st-lede { font-size: 1.12rem; line-height: 1.75; color: #bbb; max-width: 760px; margin-bottom: 1.4rem; }
.st-body { font-size: 1rem; line-height: 1.8; color: #999; max-width: 760px; margin-bottom: 1.4rem; }
.st-lede strong, .st-body strong { color: var(--fg); }
.st-note { margin-top: 1.2rem; font-size: 0.85rem; }

.st-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.st-quote { border-left: 3px solid var(--accent); padding: 0.3rem 0 0.3rem 1.6rem; margin: 0 0 2rem; }
.st-quote p {
  font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.2;
  letter-spacing: -0.02em; color: var(--fg); text-wrap: balance;
}
.st-quote--soft p { font-size: 1.05rem; font-weight: 400; line-height: 1.75; color: #bbb; letter-spacing: 0; }
.st-chapter > .st-quote { margin: 2.4rem 0; max-width: 820px; }

.st-mini-label, .st-field-label {
  display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.55rem;
}

/* ── BORDERED GRID (mirrors the home capability grid) ── */
.st-grid {
  list-style: none; display: grid;
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
  margin: 1.4rem 0 2.4rem;
}
.st-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-cell {
  padding: 2rem 1.8rem; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border); transition: background 0.2s;
}
.st-cell:hover { background: #111; }
.st-num {
  font-family: var(--mono); font-size: 0.65rem; color: var(--accent);
  letter-spacing: 0.15em; margin-bottom: 1rem; text-transform: uppercase;
}
.st-cell h3 {
  font-size: 1rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 0.8rem;
}
.st-cell p:not(.st-num) { color: #999; font-size: 0.92rem; line-height: 1.65; }

/* ── LISTS & CALLOUTS ── */
.st-list { list-style: none; }
.st-list li {
  position: relative; padding: 0.5rem 0 0.5rem 1.2rem;
  color: #bbb; font-size: 0.92rem; line-height: 1.55;
  border-bottom: 1px solid var(--border);
}
.st-list li:last-child { border-bottom: 0; }
.st-list li::before { content: '—'; position: absolute; left: 0; color: #555; }
.st-list strong { color: var(--fg); }

.st-callout {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid var(--border); background: var(--panel);
  padding: 1.3rem 1.5rem; margin: 1.6rem 0;
  color: #bbb; font-size: 0.95rem; line-height: 1.65; max-width: 860px;
}
.st-callout::before {
  content: '!'; flex: none; width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 0.75rem;
  color: #000; background: var(--accent);
}

.st-deflist { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.4rem; }
.st-deflist li { padding: 0.9rem 0; border-bottom: 1px solid var(--border); color: #999; font-size: 0.9rem; line-height: 1.6; }
.st-deflist strong { color: var(--fg); }

.st-levers { list-style: none; counter-reset: lever; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.4rem; }
.st-levers li {
  counter-increment: lever; position: relative;
  padding: 0.9rem 0 0.9rem 2.4rem; border-bottom: 1px solid var(--border);
  color: #999; font-size: 0.9rem; line-height: 1.6;
}
.st-levers li::before {
  content: counter(lever, decimal-leading-zero); position: absolute; left: 0; top: 0.95rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--accent);
}
.st-levers strong { color: var(--fg); }

.st-table-wrap { overflow-x: auto; }
.st-table-wide { min-width: 760px; }
.data-table th[scope="row"] {
  font-family: var(--sans); font-size: 0.9rem; letter-spacing: 0; text-transform: none;
  color: var(--fg); background: transparent; font-weight: 700;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top;
}
.data-table td { vertical-align: top; line-height: 1.5; }
.st-dir { display: inline-block; width: 1.3em; color: var(--accent); font-family: var(--mono); }

/* ── DISCLOSURE ── */
.st-details { border-top: 1px solid var(--border); margin-top: 1.4rem; }
.st-details + .st-details { margin-top: 0; }
.st-details > summary {
  list-style: none; cursor: pointer; padding: 1rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); transition: color 0.2s;
}
.st-details > summary::-webkit-details-marker { display: none; }
.st-details > summary::after { content: '+'; color: var(--accent); font-size: 0.95rem; }
.st-details[open] > summary::after { content: '−'; }
.st-details > summary:hover { color: var(--fg); }
.st-details-body { padding-bottom: 1.2rem; color: #999; font-size: 0.9rem; line-height: 1.7; }
.st-details-body > p { margin-bottom: 0.8rem; max-width: 760px; }

/* ── INTERACTIVE LAB CARD ── */
.st-content .page-card { margin: 1.6rem 0 0; }
.st-lab { position: relative; background: #0f0f0f; border-color: #262626; margin: 2.2rem 0 2.4rem !important; }
.st-lab::before {
  content: ''; position: absolute; left: -1px; top: -1px;
  width: 72px; height: 2px; background: var(--accent);
}
.st-lab-head { margin-bottom: 1.8rem; max-width: 740px; }
.st-chip {
  display: inline-block; margin-bottom: 1rem;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); padding: 0.2rem 0.6rem;
}
.st-lab-head h3 {
  font-size: 1.35rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.01em; margin-bottom: 0.5rem;
}
.st-lab-head p { color: #999; font-size: 0.95rem; line-height: 1.65; }

.st-verdict {
  border-left: 2px solid var(--accent); padding: 0.2rem 0 0.2rem 1rem;
  margin: 1.4rem 0; max-width: 840px;
  color: #ccc; font-size: 0.98rem; line-height: 1.65;
}
.st-verdict:empty { display: none; }
.st-verdict.is-bad { border-left-color: var(--danger); }
.st-verdict strong { color: var(--fg); }

/* ── CONTROLS ── */
.st-toggle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.st-toggle {
  font: inherit; text-align: left; cursor: pointer;
  background: transparent; color: var(--fg);
  border: 1px solid var(--line); padding: 0.8rem 1rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.st-toggle strong {
  display: block; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.st-toggle strong::before { content: '+ '; color: var(--accent); }
.st-toggle span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.st-toggle:hover { border-color: #555; }
.st-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #000; }
.st-toggle[aria-pressed="true"] strong::before { content: '✓ '; color: #000; }
.st-toggle[aria-pressed="true"] span { color: #222; }

.st-segmented {
  display: inline-flex; flex-wrap: wrap; gap: 1px; max-width: 100%;
  background: var(--line); border: 1px solid var(--line); margin-bottom: 1.4rem;
}
.st-segmented button {
  flex: 1 1 auto;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: #0f0f0f; color: var(--muted); border: 0;
  padding: 0.7rem 1rem; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.st-segmented button:hover { color: var(--fg); }
.st-segmented button[aria-pressed="true"] { background: var(--accent); color: #000; }

.st-slider label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.st-slider label .st-field-label { margin-bottom: 0.3rem; }
.st-slider output { font-family: var(--mono); font-size: 0.85rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.st-range {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0;
}
.st-range::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), #2e2e2e var(--fill, 50%));
}
.st-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -7px;
  background: var(--accent); border: 0;
}
.st-range::-moz-range-track { height: 2px; background: #2e2e2e; }
.st-range::-moz-range-progress { height: 2px; background: var(--accent); }
.st-range::-moz-range-thumb { width: 16px; height: 16px; background: var(--accent); border: 0; border-radius: 0; }

.st-select {
  background: #0a0a0a; color: var(--fg); border: 1px solid var(--line);
  font: inherit; font-size: 0.88rem; padding: 0.55rem 0.7rem;
}

.st-switch {
  display: inline-flex; align-items: center; gap: 0.7rem; cursor: pointer;
  background: transparent; border: 0; color: #bbb; padding: 0.4rem 0;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.st-switch-track {
  position: relative; width: 36px; height: 18px; flex: none;
  border: 1px solid #555; transition: background 0.2s, border-color 0.2s;
}
.st-switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px;
  background: #777; transition: transform 0.2s, background 0.2s;
}
.st-switch[aria-checked="true"] { color: var(--fg); }
.st-switch[aria-checked="true"] .st-switch-track { border-color: var(--accent); background: rgba(232,255,74,0.12); }
.st-switch[aria-checked="true"] .st-switch-track::after { transform: translateX(18px); background: var(--accent); }

.st-content :is(button, a, summary, input, select, textarea, [tabindex]):focus-visible,
.st-hero a:focus-visible,
.st-chapters a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; transition: none;
}

/* ── STAT TILES ── */
.st-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px; margin: 1.6rem 0; }
.st-stat { background: var(--panel); border: 1px solid var(--border); padding: 1.15rem 1.3rem; min-width: 0; }
.st-stat-label {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem;
}
.st-stat-value { font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; color: var(--fg); overflow-wrap: anywhere; }
.st-stat-value small { font-size: 0.85rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 0.25rem; }
.st-stat-note { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.04em; color: var(--muted); margin-top: 0.5rem; line-height: 1.5; }
.st-stat-note.is-good { color: var(--accent); }
.st-stat-note.is-bad { color: var(--danger); }

/* ── 01 SPEED PARADOX — stacked lead-time bars ── */
.st-speed-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 2rem; align-items: end; }
.st-stack { position: relative; margin-top: 2.2rem; }
.st-stack-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 76px; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.st-stack-name { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-stack-track { position: relative; display: flex; height: 34px; }
.st-seg {
  flex: none; height: 100%; margin-right: 2px; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
  transition: flex-basis 0.35s ease;
}
.st-seg span { pointer-events: none; }
.st-seg.is-tight span { visibility: hidden; }
.st-seg--build { background: var(--accent); color: #000; }
.st-seg--work { background: #5a5a5a; color: var(--fg); }
.st-seg--wait { background: var(--danger); color: #000; }
.st-seg--rework { background: var(--danger-dim); color: var(--fg); }
.st-seg:hover { filter: brightness(1.15); }
.st-stack-total { font-family: var(--mono); font-size: 0.8rem; text-align: right; font-variant-numeric: tabular-nums; }
.st-axis {
  position: relative; height: 24px; border-top: 1px solid #2c2c2a;
  margin: 0.2rem calc(76px + 1rem) 0 calc(130px + 1rem);
}
.st-axis span {
  position: absolute; top: 6px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.58rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.st-axis span::before { content: ''; position: absolute; left: 50%; top: -7px; height: 5px; width: 1px; background: #3a3a3a; }
.st-axis span:last-child { transform: translateX(-100%); }
.st-axis span:last-child::before { left: auto; right: 0; }
.st-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1rem; font-size: 0.8rem; color: #aaa; }
.st-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 0.5rem; vertical-align: -1px; }

.st-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: #1a1a1a; border: 1px solid #333; padding: 0.5rem 0.7rem;
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.st-tip strong { display: block; font-size: 0.95rem; color: var(--fg); }
.st-tip span { display: block; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.15rem; }

/* ── 02 PRINCIPLES ── */
.st-principles { list-style: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.st-principle {
  transition: background 0.2s, box-shadow 0.2s;
  scroll-margin-top: calc(var(--nav-h) + var(--bar-h) + 12px);
}
.st-principles li { border-bottom: 1px solid var(--border); }
.st-principle > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 18px; gap: 1.2rem;
  align-items: start; padding: 1.5rem 0.6rem;
}
.st-principle > summary::-webkit-details-marker { display: none; }
.st-principle > summary::after { content: '+'; color: var(--accent); font-family: var(--mono); padding-top: 0.3rem; }
.st-principle[open] > summary::after { content: '−'; }
.st-p-num { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.12em; padding-top: 0.4rem; }
.st-p-title {
  display: block; font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.15; transition: color 0.2s;
}
.st-p-text { display: block; margin-top: 0.5rem; color: #999; font-size: 0.95rem; line-height: 1.6; max-width: 700px; }
.st-p-tag {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); padding: 0.2rem 0.6rem;
  margin-top: 0.35rem; white-space: nowrap;
}
.st-principle > summary:hover .st-p-title { color: var(--accent); }
.st-principle[open] { background: #0f0f0f; }
.st-p-body {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem;
  padding: 0 0.6rem 1.6rem calc(52px + 1.2rem + 0.6rem);
}
.st-p-body p:not(.st-mini-label) { color: #aaa; font-size: 0.9rem; line-height: 1.65; }
.st-principle.is-at-stake { background: rgba(232,255,74,0.05); box-shadow: inset 3px 0 0 var(--accent); }
.st-principle.is-at-stake .st-p-title { color: var(--accent); }

.st-game { border: 1px solid var(--line); background: var(--panel); padding: 1.8rem; }
.st-game-top {
  display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.st-game-text { font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; line-height: 1.45; color: var(--fg); margin-bottom: 1.6rem; max-width: 820px; }
.st-game-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.st-answer {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; color: var(--fg); border: 1px solid var(--line);
  padding: 0.85rem 1.8rem; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.st-answer:hover:not(:disabled) { border-color: var(--fg); }
.st-answer:disabled { cursor: default; opacity: 0.45; }
.st-answer.is-right { opacity: 1; border-color: var(--accent); color: var(--accent); }
.st-answer.is-wrong { opacity: 1; border-color: var(--danger); color: var(--danger); }
.st-game-result:not(:empty) { margin-top: 1.6rem; border-top: 1px solid var(--border); padding-top: 1.4rem; }
.st-result-title { font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.9rem; font-size: 1rem; }
.st-result-title.is-good { color: var(--accent); }
.st-result-title.is-bad { color: var(--danger); }
.st-game-result p { color: #bbb; font-size: 0.93rem; line-height: 1.65; margin-bottom: 0.8rem; max-width: 820px; }
.st-game-result p strong { color: var(--fg); }
.st-pchips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.st-pchip {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); border: 1px solid var(--accent); padding: 0.35rem 0.65rem; text-decoration: none;
}
.st-pchip:hover { background: var(--accent); color: #000; }

/* ── 03 STAGES — tabs ── */
.st-tabs {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin-bottom: 1.6rem;
}
.st-tab {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: #0f0f0f; border: 0; padding: 0.95rem 0.5rem;
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.st-tab:hover { color: var(--fg); }
.st-tab--wait { color: #d98a84; }
.st-tab[aria-selected="true"] { background: var(--accent); color: #000; }
.st-tab--wait[aria-selected="true"] { background: var(--danger); color: #000; }
.st-tabpanel[hidden] { display: none; }
.st-panel-title { font-weight: 900; text-transform: uppercase; margin: 1.2rem 0 0.8rem; }
.st-triple { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 2px; }
.st-triple > div { background: var(--panel); border: 1px solid var(--border); padding: 1.4rem; }
.st-decision { font-size: 1.1rem; font-weight: 700; line-height: 1.4; color: var(--fg); }

/* ── 04 CAPABILITIES ── */
.st-goal {
  border: 1px solid var(--accent); text-align: center; padding: 0.9rem 1rem; margin-bottom: 2px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg);
}
.st-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.st-pillar, .st-foundation { border: 1px solid var(--border); background: var(--panel); padding: 1.4rem; min-width: 0; margin: 0; }
.st-pillar legend, .st-foundation legend {
  float: left; width: 100%; padding: 0; margin-bottom: 0.8rem;
  font-weight: 900; text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.03em;
}
.st-foundation { margin-top: 2px; background: #141414; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.st-foundation legend {
  grid-column: 1 / -1; font-family: var(--mono); font-size: 0.64rem; font-weight: 400;
  letter-spacing: 0.12em; color: var(--muted);
}
.st-check {
  display: flex; gap: 0.7rem; align-items: flex-start; clear: both;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 0.9rem; color: #bbb; line-height: 1.45;
}
.st-check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 16px; height: 16px; margin: 0.15rem 0 0; border: 1px solid #555;
  background: transparent; display: grid; place-items: center; cursor: pointer;
}
.st-check input:checked { background: var(--accent); border-color: var(--accent); }
.st-check input:checked::after {
  content: ''; width: 8px; height: 4px; margin-top: -2px;
  border-left: 2px solid #000; border-bottom: 2px solid #000; transform: rotate(-45deg);
}
.st-check input:checked + span { color: var(--fg); }
.st-check strong { color: var(--fg); }
.st-meter { height: 4px; background: #222; margin-top: 1.2rem; clear: both; }
.st-meter-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.st-measure {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 0.6rem;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.st-meter-count { color: var(--fg); }

/* ── 05 ENVIRONMENTS ── */
.st-envpath { list-style: none; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0.6rem 0 0.6rem; }
.st-envpath::before { content: ''; position: absolute; left: 7%; right: 7%; top: 22px; height: 1px; background: var(--line); }
.st-env-node {
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  width: 100%; padding: 0 0.2rem 0.6rem; background: transparent; border: 0;
  color: var(--fg); font: inherit; text-align: center; cursor: pointer;
}
.st-env-dot {
  position: relative; z-index: 1; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); background: #0f0f0f;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted); transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.st-env-name { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: #bbb; }
.st-env-state { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-env-node.is-visit .st-env-dot { border-color: var(--accent); color: var(--accent); }
.st-env-node.is-visit .st-env-state { color: var(--accent); }
.st-env-node.is-optional .st-env-dot { border-style: dashed; border-color: #777; color: #bbb; }
.st-env-node.is-skip { opacity: 0.35; }
.st-env-node.is-skip .st-env-name { text-decoration: line-through; }
.st-env-node[aria-pressed="true"] .st-env-dot { background: var(--accent); border-color: var(--accent); color: #000; border-style: solid; }
.st-env-node:hover .st-env-name { color: var(--fg); }
.st-env-detail { border: 1px solid var(--border); background: var(--panel); padding: 1.6rem; }
.st-env-detail:empty { display: none; }
.st-env-detail h4 { font-size: 1.05rem; font-weight: 900; text-transform: uppercase; margin-bottom: 1.2rem; }
.st-env-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem 2rem; }
.st-env-grid p:not(.st-mini-label) { color: #bbb; font-size: 0.9rem; line-height: 1.55; }

.st-envstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1.6rem; }
.st-envstrip .st-mini-label { width: 100%; }
.st-envstrip span.st-pill {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 0.35rem 0.6rem; color: var(--muted);
}
.st-envstrip span.st-pill.is-visit { border-color: var(--accent); color: var(--fg); }
.st-envstrip span.st-pill.is-optional { border-style: dashed; color: #bbb; }
.st-envstrip span.st-pill.is-skip { opacity: 0.4; text-decoration: line-through; }
.st-envstrip .st-arrow { color: #555; font-family: var(--mono); font-size: 0.7rem; }

/* ── 06 SWISS CHEESE ── */
.st-cheese-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.st-cheese-stage { position: relative; margin: 1.4rem 0 1rem; }
.st-cheese-stage svg { display: block; width: 100%; overflow: visible; font-family: var(--sans); }
.st-slice { cursor: pointer; outline: none; }
.st-slice rect { fill: rgba(232,255,74,0.07); stroke: rgba(232,255,74,0.38); stroke-width: 1; transition: fill 0.2s, stroke 0.2s; }
.st-slice:hover rect { fill: rgba(232,255,74,0.12); }
.st-slice.is-off rect { fill: transparent; stroke: #2e2e2e; }
.st-slice.is-inspected rect, .st-slice:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.st-slice-name { fill: var(--fg); font-size: 11px; font-weight: 700; }
.st-slice-sub { fill: var(--muted); font-size: 10px; }
.st-slice.is-off .st-slice-name, .st-slice.is-off .st-slice-sub { fill: #555; }
.st-hole { fill: #0a0a0a; stroke: #4a4a4a; stroke-width: 1; }
.st-shot-line { fill: none; stroke: var(--danger); stroke-width: 2; stroke-linecap: round; }
.st-shot-line.is-drawing { transition: stroke-dashoffset 0.7s ease-out; }
.st-shot-head { fill: var(--danger); }
.st-shot-stop { fill: var(--accent); }
.st-shot-tag { fill: var(--fg); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.st-shot-escape { fill: var(--danger); }
.st-shot-x { fill: #000; font-family: var(--mono); font-size: 10px; font-weight: 700; }
.st-cheese-target { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; }
.st-cheese-origin { fill: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; }

.st-layer-toggles { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.st-layer-toggle {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 0.5rem 0.75rem; cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.st-layer-toggle::before { content: '□ '; }
.st-layer-toggle[aria-pressed="true"] { border-color: rgba(232,255,74,0.5); color: var(--fg); }
.st-layer-toggle[aria-pressed="true"]::before { content: '■ '; color: var(--accent); }
.st-layer-toggle:hover { border-color: var(--fg); }

.st-layer-detail { border: 1px solid var(--border); background: var(--panel); padding: 1.4rem 1.6rem; margin: 1rem 0; }
.st-layer-detail:empty { display: none; }
.st-layer-detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem; margin-bottom: 1.1rem; }
.st-layer-detail h4 { font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.st-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem 1.8rem; }
.st-detail-grid p:not(.st-mini-label) { color: #bbb; font-size: 0.88rem; line-height: 1.55; }

.st-cheese-results { margin-top: 1.6rem; }
.st-cheese-results .st-stats { margin-top: 0.4rem; }
.st-hbars { display: grid; gap: 0.5rem; }
.st-hbar { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 0.9rem; font-size: 0.82rem; color: #bbb; }
.st-hbar-track { position: relative; height: 14px; display: flex; align-items: center; gap: 0.6rem; }
.st-hbar-fill { display: block; flex: none; height: 100%; width: 0; background: var(--accent); transition: width 0.35s; }
.st-hbar.is-escape .st-hbar-name { color: var(--fg); }
.st-hbar.is-escape .st-hbar-fill { background: var(--danger); }
.st-hbar.is-off { opacity: 0.4; }
.st-hbar-val { font-family: var(--mono); font-size: 0.72rem; font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; }

/* ── 07 PYRAMID ── */
.st-pyr-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr); gap: 2.4rem; align-items: start; }
.st-pyr { display: grid; gap: 4px; }
.st-pyr-row {
  display: grid; grid-template-columns: 138px minmax(0, 1fr) 96px; align-items: center; gap: 0.9rem;
  width: 100%; padding: 0; background: transparent; border: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.st-pyr-name { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: #bbb; transition: color 0.2s; }
.st-pyr-area { position: relative; height: 34px; display: flex; justify-content: center; }
.st-pyr-ghost { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); border: 1px solid #444; }
.st-pyr-fill { position: relative; height: 100%; min-width: 2px; background: var(--accent); transition: width 0.35s; }
.st-pyr-val { font-family: var(--mono); font-size: 0.66rem; color: #bbb; text-align: right; font-variant-numeric: tabular-nums; }
.st-pyr-row:hover .st-pyr-name, .st-pyr-row[aria-pressed="true"] .st-pyr-name { color: var(--accent); }
.st-pyr-row--note .st-pyr-area { align-items: center; }
.st-pyr-note { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.st-pyr-row--base .st-pyr-area {
  align-items: center; justify-content: center; border: 1px solid #3a3a3a; background: #1a1a1a;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; color: #bbb;
}
.st-pyr-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.9rem; font-size: 0.78rem; color: #999; }
.st-pyr-legend i { display: inline-block; width: 12px; height: 10px; margin-right: 0.45rem; vertical-align: -1px; }
.st-sliders { display: grid; gap: 1rem; }

/* ── 08 RISK TIERS ── */
.st-examples { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.st-example {
  font: inherit; font-size: 0.82rem; background: transparent; border: 1px solid var(--line);
  color: #bbb; padding: 0.5rem 0.8rem; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.st-example:hover { border-color: #666; color: var(--fg); }
.st-example[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); background: rgba(232,255,74,0.08); }
.st-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-bottom: 2rem; }
.st-tier {
  display: flex; flex-direction: column; text-align: left; font: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--border); padding: 1.3rem;
  cursor: pointer; opacity: 0.5; transition: opacity 0.2s, border-color 0.2s;
}
.st-tier:hover { opacity: 0.8; }
.st-tier[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.st-tier-name { font-weight: 900; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.02em; margin-bottom: 1rem; }
.st-tier[aria-pressed="true"] .st-tier-name { color: var(--accent); }
.st-tier .st-mini-label { margin: 0.7rem 0 0.25rem; }
.st-tier-text { font-size: 0.86rem; color: #bbb; line-height: 1.5; }
.st-tier-approval { color: var(--fg); font-weight: 700; }
.st-steps-label { margin-top: 0.4rem; }
.st-steps { list-style: none; border-top: 1px solid var(--border); }
.st-step { display: grid; grid-template-columns: 36px minmax(0, 1fr) 92px; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.st-step-num { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; padding-top: 0.1rem; }
.st-step-title { font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.03em; margin-bottom: 0.25rem; }
.st-step-text { color: #888; font-size: 0.86rem; line-height: 1.6; }
.st-step-tier { color: var(--fg); font-size: 0.9rem; line-height: 1.55; margin-top: 0.4rem; }
.st-step-tier:empty { display: none; }
.st-step-tier::before { content: '→ '; color: var(--accent); font-family: var(--mono); }
.st-depth { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.st-depth-bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.st-depth-bars i { display: block; width: 6px; background: #2a2a2a; }
.st-depth-bars i:nth-child(1) { height: 7px; }
.st-depth-bars i:nth-child(2) { height: 11px; }
.st-depth-bars i:nth-child(3) { height: 16px; }
.st-depth-bars i.is-on { background: var(--accent); }
.st-depth-label { font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.st-anti { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.st-anti-card { background: var(--panel); border: 1px solid var(--border); padding: 1.4rem; }
.st-anti-card h4 { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.3; margin-bottom: 0.6rem; }
.st-anti-card h4::before {
  content: 'Stop'; display: inline-block; margin-right: 0.6rem; vertical-align: 2px;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.14em; font-weight: 400;
  color: var(--danger); border: 1px solid var(--danger); padding: 0.1rem 0.45rem;
}
.st-anti-why { color: #999; font-size: 0.88rem; line-height: 1.55; margin-bottom: 0.9rem; }
.st-anti-do { border-top: 1px solid var(--border); padding-top: 0.8rem; color: var(--fg); font-size: 0.9rem; line-height: 1.5; }
.st-anti-do::before {
  content: 'Instead'; display: block; margin-bottom: 0.3rem;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}

/* ── 09 SCORECARD ── */
.st-rhythm { list-style: none; }
.st-rhythm li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); color: #bbb; font-size: 0.95rem; line-height: 1.55; }
.st-rhythm li:first-child { border-top: 1px solid var(--border); }
.st-rhythm-when { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding-top: 0.2rem; }

/* ── 10 MATURITY & ROADMAP ── */
.st-mat { display: grid; gap: 2px; }
.st-mat-row {
  display: grid; grid-template-columns: 150px auto minmax(0, 1fr); gap: 1.4rem; align-items: center;
  background: var(--panel); border: 1px solid var(--border); padding: 1.1rem 1.3rem;
}
.st-mat-name { font-weight: 800; text-transform: uppercase; font-size: 0.88rem; letter-spacing: 0.03em; }
.st-mat-levels { display: inline-flex; border: 1px solid var(--line); }
.st-mat-levels button {
  position: relative; width: 40px; height: 40px; cursor: pointer;
  font-family: var(--mono); font-size: 0.8rem; background: transparent; color: var(--muted);
  border: 0; border-right: 1px solid var(--line); transition: background 0.2s, color 0.2s;
}
.st-mat-levels button:last-child { border-right: 0; }
.st-mat-levels button:hover { color: var(--fg); }
.st-mat-levels button.is-below { background: rgba(232,255,74,0.14); color: var(--fg); }
.st-mat-levels button[aria-pressed="true"] { background: var(--accent); color: #000; }
.st-mat-levels button.is-target::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 2px; background: var(--fg);
}
.st-mat-levels button[aria-pressed="true"].is-target::after { background: #000; }
.st-mat-desc { font-size: 0.88rem; color: #bbb; line-height: 1.5; }
.st-mat-desc strong { color: var(--fg); }
.st-mat-next { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; }
.st-mat-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 1.4rem; }
.st-mat-tier .st-field-label { margin: 0; }

.st-roadmap { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: 2px; margin: 1.4rem 0 1rem; }
.st-phase { background: var(--panel); border: 1px solid var(--border); padding: 1.3rem; grid-row: 1; }
.st-phase--1 { grid-column: 1 / 3; border-color: rgba(232,255,74,0.5); }
.st-phase--2 { grid-column: 3 / 5; }
.st-phase--3 { grid-column: 5 / 7; }
.st-phase--4 { grid-column: 7 / 9; }
.st-phase-num { font-family: var(--mono); font-size: 0.62rem; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; }
.st-phase h4 { font-size: 1.05rem; font-weight: 900; text-transform: uppercase; margin: 0.35rem 0 0.2rem; }
.st-phase-date { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.st-phase ul { list-style: none; }
.st-phase li { padding: 0.45rem 0; border-top: 1px solid var(--border); font-size: 0.86rem; color: #bbb; }
.st-roadmap-line { grid-row: 2; grid-column: 1 / -1; height: 1px; background: var(--line); margin-top: 1.4rem; align-self: start; }
.st-gate {
  grid-row: 2; position: relative; z-index: 1; text-align: center; padding-top: 2.2rem;
  font-size: 0.8rem; color: #bbb;
}
.st-gate::before {
  content: ''; position: absolute; left: 50%; top: calc(1.4rem - 6px);
  width: 12px; height: 12px; background: var(--accent); transform: translateX(-50%) rotate(45deg);
}
.st-gate strong { display: block; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg); }
.st-gate span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; }
.st-gate--a { grid-column: 2 / 4; }
.st-gate--b { grid-column: 4 / 6; }
.st-gate--c { grid-column: 6 / 8; }

.st-gate-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.st-gate-controls .st-segmented { margin-bottom: 0; }
.st-gate-result {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.4rem; align-items: center;
  border: 1px solid var(--line); background: var(--panel); padding: 1.4rem; margin-top: 1.6rem;
}
.st-gate-badge { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.08em; padding: 0.6rem 1rem; white-space: nowrap; }
.st-gate-badge.is-go { background: var(--accent); color: #000; }
.st-gate-badge.is-nogo { background: var(--danger); color: #000; }
.st-gate-result strong { display: block; font-size: 1.05rem; margin-bottom: 0.3rem; }
.st-gate-result p { color: #bbb; font-size: 0.92rem; line-height: 1.6; }

/* ── 11 WORKBOOK ── */
.st-wb-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 1.2rem;
  border: 1px solid var(--line); background: var(--panel); padding: 1rem 1.2rem;
}
.st-wb-progress { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-wb-progress strong { color: var(--accent); font-weight: 400; }
.st-wb-status { min-height: 1.4em; margin: 0.6rem 0 0.4rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--accent); }
.st-part { border-bottom: 1px solid var(--border); }
.st-part:first-child { border-top: 1px solid var(--border); }
.st-part > summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0;
}
.st-part > summary::-webkit-details-marker { display: none; }
.st-part > summary::after { content: '+'; font-family: var(--mono); color: var(--accent); margin-left: 0.8rem; }
.st-part[open] > summary::after { content: '−'; }
.st-part-title { flex: 1; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.92rem; transition: color 0.2s; }
.st-part > summary:hover .st-part-title { color: var(--accent); }
.st-part-count { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.st-part-count.is-done { color: var(--accent); }
.st-part-body { padding: 0.4rem 0 1.4rem; }
.st-part-intro { color: #999; font-size: 0.9rem; margin-bottom: 1rem; }
.st-q { margin-bottom: 1.1rem; }
.st-q label { display: block; font-size: 0.9rem; color: #ccc; margin-bottom: 0.45rem; line-height: 1.5; }
.st-q-id { font-family: var(--mono); color: var(--accent); font-size: 0.7rem; margin-right: 0.6rem; }
.st-q textarea, .st-bstage input {
  display: block; width: 100%; background: #0a0a0a; color: var(--fg);
  border: 1px solid var(--line); font: inherit; font-size: 0.9rem; line-height: 1.5;
  padding: 0.65rem 0.8rem; resize: vertical; transition: border-color 0.2s;
}
.st-q textarea:focus, .st-bstage input:focus, .st-select:focus { outline: none; border-color: var(--accent); }
.st-bstage {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 0.8rem;
  border: 0; border-bottom: 1px solid var(--border); padding: 0.9rem 0; margin: 0;
}
.st-bstage legend { float: left; width: 100%; grid-column: 1 / -1; font-weight: 800; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 0.2rem; padding: 0; }
.st-bstage label { display: flex; flex-direction: column; gap: 0.35rem; font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.st-bstage .st-select { width: 100%; }
.st-commitments { list-style: none; }

/* ── OPEN SOURCE ── */
.st-oss .st-actions { margin-top: 0.4rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .st-chapters ol { padding: 0 1.5rem; }
  .st-split { grid-template-columns: 1fr; gap: 0.6rem; }
  .st-grid-3, .st-pillars, .st-tiers, .st-toggle-row { grid-template-columns: 1fr; }
  .st-speed-controls { grid-template-columns: 1fr; gap: 1.2rem; }
  .st-pyr-layout { grid-template-columns: 1fr; gap: 1.8rem; }
  .st-triple { grid-template-columns: 1fr; }
  .st-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-tab--wait { grid-column: span 2; }
  .st-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-env-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-deflist, .st-levers { grid-template-columns: 1fr; }

  .st-envpath { grid-template-columns: 1fr; gap: 0.2rem; }
  .st-envpath::before { left: 21px; right: auto; top: 22px; bottom: 22px; width: 1px; height: auto; }
  .st-env-node { flex-direction: row; text-align: left; gap: 0.9rem; padding: 0; }
  .st-env-name { flex: 1; }

  .st-roadmap { grid-template-columns: 1fr; row-gap: 0; }
  .st-phase, .st-gate { grid-column: 1 !important; grid-row: auto !important; }
  .st-roadmap-line { display: none; }
  .st-gate { text-align: left; padding: 0.9rem 0 0.9rem 2.6rem; border-left: 1px solid var(--line); margin-left: 1.3rem; }
  .st-gate::before { left: -7px; top: 50%; transform: translateY(-50%) rotate(45deg); }
  .st-gate strong, .st-gate span { display: inline; }
  .st-gate span { margin-left: 0.6rem; }
}

@media (max-width: 768px) {
  .st-chapter { padding-top: 3.2rem; margin-top: 3.2rem; }
  .st-content .page-card { padding: 1.5rem 1.15rem; }
  .st-lede { font-size: 1.02rem; }
  .st-hero-meta li + li::before { margin: 0 0.6rem; }

  .st-stack-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.8rem; }
  .st-stack-name { grid-column: 1; }
  .st-stack-total { grid-column: 2; grid-row: 1; }
  .st-stack-track { grid-column: 1 / -1; }
  .st-axis { margin: 0.2rem 0 0; }

  .st-principle > summary { grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 0.8rem; padding: 1.2rem 0.3rem; }
  .st-p-tag { display: none; }
  .st-p-body { grid-template-columns: 1fr; gap: 1rem; padding: 0 0.3rem 1.4rem calc(34px + 0.8rem + 0.3rem); }
  .st-game { padding: 1.3rem; }

  .st-foundation, .st-anti, .st-gate-controls { grid-template-columns: 1fr; }
  .st-env-grid, .st-detail-grid { grid-template-columns: 1fr; }
  .st-hbar { grid-template-columns: 118px minmax(0, 1fr); gap: 0.6rem; font-size: 0.76rem; }
  .st-pyr-row { grid-template-columns: 84px minmax(0, 1fr) 68px; gap: 0.5rem; }
  .st-pyr-row--base .st-pyr-area { font-size: 0.5rem; }
  .st-step { grid-template-columns: 26px minmax(0, 1fr); }
  .st-depth { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.6rem; }
  .st-mat-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .st-gate-result { grid-template-columns: 1fr; }
  .st-rhythm li { grid-template-columns: 1fr; gap: 0.3rem; }
  .st-bstage { grid-template-columns: 1fr; }

  .st-toggle-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .st-toggle { padding: 0.7rem 0.6rem; }
  .st-toggle strong { font-size: 0.64rem; letter-spacing: 0.08em; }
  .st-toggle span { font-size: 0.72rem; }
  .st-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-stat { padding: 0.95rem 1rem; }
  .st-stat-value { font-size: 1.5rem; }
  .st-tier { padding: 0.9rem 1.1rem; }
  .st-tier-name { margin-bottom: 0; }
  .st-tier[aria-pressed="true"] .st-tier-name { margin-bottom: 0.6rem; }
  .st-tier:not([aria-pressed="true"]) .st-mini-label,
  .st-tier:not([aria-pressed="true"]) .st-tier-text { display: none; }
  .st-example { font-size: 0.78rem; padding: 0.45rem 0.7rem; }
}

@media (max-width: 600px) {
  .st-responsive, .st-responsive tbody, .st-responsive tr, .st-responsive td, .st-responsive th[scope="row"] { display: block; width: 100%; }
  .st-table-wide.st-responsive { min-width: 0; }
  .st-responsive thead { display: none; }
  .st-responsive tr { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .st-responsive tr:hover td { background: transparent; }
  .st-responsive td, .st-responsive th[scope="row"] { border: 0; padding: 0.2rem 0; }
  .st-responsive td:first-child, .st-responsive th[scope="row"] { color: var(--fg); font-weight: 700; }
  .st-responsive td[data-label]::before {
    content: attr(data-label); display: block; margin-top: 0.35rem;
    font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400;
  }
  .st-responsive td:first-child::before { display: none; }

  /* Metric tables: metric, then what it tells us, then → target. */
  .st-metrics td[data-label]::before { display: none; }
  .st-metrics td:nth-child(2):not(:last-child) { color: #999; font-size: 0.85rem; }
  .st-metrics td:last-child:not(:first-child) { color: var(--fg); }
  .st-metrics td:last-child:not(:first-child)::before { content: '→ '; display: inline; color: var(--accent); }

  /* Scorecard: dimension and direction on one line, the metric below. */
  .st-scorecard tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; row-gap: 0.2rem; }
  .st-scorecard td[data-label]::before { display: none; }
  .st-scorecard td:nth-child(1) {
    grid-row: 1; grid-column: 1; font-family: var(--mono); font-size: 0.58rem; font-weight: 400;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  }
  .st-scorecard td:nth-child(3) { grid-row: 1; grid-column: 2; width: auto; text-align: right; font-size: 0.8rem; color: var(--fg); }
  .st-scorecard td:nth-child(2) { grid-row: 2; grid-column: 1 / -1; color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .st-content *, .st-chapters * { transition: none !important; animation: none !important; }
}

/* ── PRINT / SAVE AS PDF ──
   A light, linear document: every chapter expanded, interactive-only controls hidden.
   The downloadable PDF is generated from this layout. */
@media print {
  @page { size: A4; margin: 16mm 15mm 18mm; }

  :root {
    --bg: #fff; --fg: #151515; --muted: #5c5c5c; --accent: #4a5f00;
    --border: #d9d9d9; --card: #fff; --line: #cfcfcf; --panel: #fff;
    --danger: #c0392b; --danger-dim: #a0403a;
  }
  html { scroll-behavior: auto; }
  body { background: #fff; color: var(--fg); font-size: 10pt; line-height: 1.55; overflow: visible; }

  /* Site chrome and interactive-only parts */
  body > nav, .st-chapters, .back-link, noscript, .st-screen-only, .st-chip,
  .st-hero .st-actions, .st-oss .st-actions, footer p + p,
  #speed-lab, #ship-game, #pyramid-lab,
  #stage-lab .st-lab-head, .st-tabs,
  #cap-verdict, .st-meter,
  #env-lab > :not(.st-details),
  #cheese-lab .st-lab-head, .st-cheese-bar, .st-layer-toggles, #cheese-detail, .st-cheese-results, #cheese-lab .st-details + .st-details,
  #risk-lab .st-lab-head, .st-examples, .st-step-tier, .st-depth, #risk-envstrip,
  #maturity-lab > :not(.st-details),
  .st-gate-controls, #gate-result,
  .st-wb-toolbar, #wb-status, .st-part-count,
  .st-details > summary::after, .st-part > summary::after, .st-principle > summary::after { display: none !important; }

  /* Page frame */
  .page-hero { padding: 0 0 1.2rem; border-bottom: 1px solid var(--border); }
  .page-hero h1 { font-size: 34pt; margin-bottom: 0.8rem; }
  .page-hero p { color: #333; max-width: none; }
  .st-content.page-content { max-width: none; padding: 0.6rem 0 0; }
  footer { padding: 1rem 0 0; border-top: 1px solid var(--border); justify-content: flex-start; }

  .st-chapter { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
  .st-content > .st-chapter:first-of-type { margin-top: 0; padding-top: 1rem; border-top: 0; }
  .st-h2 { font-size: 20pt; margin-bottom: 0.9rem; }
  .st-h3 { font-size: 13pt; margin-top: 1.4rem; }
  .st-h2, .st-h3, h3, h4, .section-label, .section-title, .st-mini-label, .st-details > summary, .st-part > summary { break-after: avoid; }
  .st-lede { font-size: 11pt; color: #222; max-width: none; }
  .st-body, .text-muted, .st-verdict, .st-callout, .st-details-body { color: #2a2a2a; max-width: none; }
  .st-quote p { font-size: 15pt; }
  .st-quote--soft p { font-size: 10.5pt; color: #2a2a2a; }

  /* Cards become plain blocks */
  .st-content .page-card, .st-content .st-lab { border: 0; padding: 0; margin: 1.1rem 0 0 !important; background: none; }
  .st-lab::before { display: none; }
  .st-lab-head { margin-bottom: 0.8rem; }
  .st-lab-head h3 { font-size: 12pt; }
  .st-lab-head p { color: #2a2a2a; }

  /* Keep blocks whole */
  .st-cell, .st-triple > div, .st-pillar, .st-foundation .st-check, .st-tier, .st-step, .st-anti-card,
  .st-phase, .st-gate, .st-callout, .st-quote, .st-principles li, .st-q, .st-bstage, .data-table tr,
  .st-deflist li, .st-levers li, .st-rhythm li, .st-tabpanel, .st-cheese-stage { break-inside: avoid; }

  /* Light surfaces */
  .st-cell:hover, .st-principle[open], .st-principle.is-at-stake { background: none; box-shadow: none; }
  .st-cell p:not(.st-num), .st-p-text, .st-p-body p:not(.st-mini-label), .st-list li, .st-deflist li, .st-levers li,
  .st-anti-why, .st-step-text, .st-tier-text, .st-check, .st-q label, .st-part-intro, .st-phase li, .st-rhythm li, .st-gate span { color: #2a2a2a; }
  .st-triple > div, .st-pillar, .st-foundation, .st-tier, .st-anti-card, .st-phase, .st-callout, .st-goal { background: #fff; border-color: var(--border); }
  .st-callout::before { color: #fff; background: var(--accent); }
  .st-goal { border-color: var(--accent); }
  .st-principle.is-at-stake .st-p-title { color: var(--fg); }

  /* Multi-column where A4 has the room (the page width triggers the phone rules otherwise) */
  .st-grid-3, .st-pillars, .st-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-triple { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); }
  .st-anti, .st-foundation, .st-deflist, .st-levers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6rem; }
  .st-cell { padding: 1.1rem 1rem; }

  /* Tables */
  .st-table-wrap { overflow: visible; }
  .st-table-wide { min-width: 0; table-layout: fixed; width: 100%; }
  .data-table { font-size: 8.5pt; }
  .data-table th, .data-table td { overflow-wrap: break-word; hyphens: auto; padding: 0.45rem 0.5rem; }
  #env-table { font-size: 7pt; }
  #env-table th, #env-table td { padding: 0.4rem 0.25rem; }
  #env-table thead th:first-child { width: 14%; }
  #layer-table thead th:first-child, #automate-table thead th:first-child { width: 17%; }
  .data-table th[scope="row"] { overflow-wrap: normal; }
  .st-grid { break-inside: avoid; }
  .st-body:has(+ .st-grid), .st-body:has(+ .st-roadmap), .section-title:has(+ .st-table-wrap) { break-after: avoid; }
  .data-table thead th { letter-spacing: 0.06em; }
  .data-table th[scope="row"] { font-size: 8.5pt; }
  .data-table th, .data-table th[scope="row"] { background: #f2f2f2; color: #151515; }
  .data-table th[scope="row"] { background: none; }
  .data-table td { color: #2a2a2a; }
  .data-table tr:hover td { background: none; }
  .st-details { border-top: 0; margin-top: 0.6rem; }
  .st-details > summary { padding: 0.3rem 0; color: var(--muted); }
  .st-details-body { padding-bottom: 0.4rem; }

  /* Principles: statement plus "in practice" and "proven by" */
  .st-principle > summary { padding: 0.7rem 0; }
  .st-p-body { padding: 0 0 0.8rem calc(34px + 0.8rem); gap: 0.4rem 1.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Stages: every panel, one after another */
  .js .st-panel-title { display: block; }
  .st-tabpanel[hidden] { display: block !important; }
  .st-tabpanel { margin-bottom: 0.9rem; }
  .st-panel-title { margin: 0.6rem 0 0.4rem; font-size: 11pt; }
  .st-triple > div { padding: 0.8rem; }
  .st-decision { font-size: 10pt; }

  /* Capabilities read as a paper checklist */
  .st-check { border-color: var(--border); }
  .st-check input { border-color: #777; }
  .st-measure { color: var(--muted); }

  /* Swiss cheese diagram on white */
  .st-cheese-stage svg { width: 100%; height: auto; }
  .st-slice rect { fill: #f3f6e4; stroke: #8a9a3a; stroke-width: 1; }
  .st-slice.is-off rect { fill: #fff; stroke: #cccccc; }
  .st-hole { fill: #fff; stroke: #9a9a9a; }
  .st-slice-name, .st-shot-tag { fill: #151515; }
  .st-slice-sub, .st-cheese-target { fill: #5c5c5c; }
  .st-shot-x { fill: #fff; }

  /* Risk tiers: all three at full strength */
  .st-tier { opacity: 1 !important; border-color: var(--border) !important; padding: 0.9rem; }
  .st-tier .st-mini-label, .st-tier .st-tier-text { display: block !important; }
  .st-tier-name, .st-tier[aria-pressed="true"] .st-tier-name { color: var(--fg); margin-bottom: 0.4rem !important; }
  .st-step { grid-template-columns: 26px minmax(0, 1fr); padding: 0.6rem 0; }

  /* Roadmap: four phases in a row, gates beneath (overrides the narrow-screen stack) */
  .st-roadmap { grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: 2px; }
  .st-roadmap .st-phase { padding: 0.8rem; grid-row: 1 !important; }
  .st-roadmap .st-phase--1 { grid-column: 1 / 3 !important; }
  .st-roadmap .st-phase--2 { grid-column: 3 / 5 !important; }
  .st-roadmap .st-phase--3 { grid-column: 5 / 7 !important; }
  .st-roadmap .st-phase--4 { grid-column: 7 / 9 !important; }
  .st-roadmap .st-gate { grid-row: 2 !important; text-align: center; padding: 2rem 0 0; border-left: 0; margin-left: 0; }
  .st-roadmap .st-gate--a { grid-column: 2 / 4 !important; }
  .st-roadmap .st-gate--b { grid-column: 4 / 6 !important; }
  .st-roadmap .st-gate--c { grid-column: 6 / 8 !important; }
  .st-roadmap .st-gate::before { left: 50%; top: calc(1.4rem - 6px); transform: translateX(-50%) rotate(45deg); background: var(--accent); }
  .st-roadmap .st-gate strong, .st-roadmap .st-gate span { display: block; margin-left: 0; }
  .st-roadmap .st-roadmap-line { display: block; grid-row: 2; grid-column: 1 / -1; }
  .st-phase li { font-size: 9pt; }

  /* Questionnaire as a worksheet */
  .st-part > summary { padding: 0.6rem 0; }
  .st-part-body { padding-bottom: 0.6rem; }
  .st-q textarea, .st-bstage input, .st-bstage select { background: #fff; border-color: #bdbdbd; color: #151515; }
  .st-q { margin-bottom: 0.55rem; }
  .st-q label { font-size: 9pt; margin-bottom: 0.25rem; }
  .st-q textarea { min-height: 2.2rem; padding: 0.3rem 0.5rem; }
  .st-bstage { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); padding: 0.6rem 0; }
  .st-bstage label { color: var(--muted); }
}
