:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #172533;
  --muted: #5b6873;
  --line: #d8d3c8;
  --line-strong: #b8b0a3;
  --control-line: #746b60;
  --navy: #18354d;
  --navy-soft: #dfe8ed;
  --teal: #087a70;
  --teal-soft: #dbeeea;
  --coral: #a9432a;
  --coral-soft: #f5e2d9;
  --gold: #84570a;
  --gold-soft: #f5e9c8;
  --success: #2f7659;
  --focus-inner: #fffdf8;
  --shadow: 0 18px 50px rgba(29, 38, 44, 0.08);
  --shadow-small: 0 8px 24px rgba(29, 38, 44, 0.07);
  --radius-small: 0.55rem;
  --radius: 1rem;
  --radius-large: 1.5rem;
  --header-height: 4.75rem;
  --content-width: 74rem;
  --reading-width: 56rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #10171d;
  --surface: #151f27;
  --surface-strong: #1a2630;
  --ink: #edf1f3;
  --muted: #a9b4bc;
  --line: #34434e;
  --line-strong: #52636e;
  --control-line: #60737f;
  --navy: #8fc0dd;
  --navy-soft: #203a49;
  --teal: #6bd1c2;
  --teal-soft: #173b39;
  --coral: #ee9475;
  --coral-soft: #432a24;
  --gold: #ecc573;
  --gold-soft: #3d3420;
  --success: #8ad5b1;
  --focus-inner: #10171d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.rail-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

a {
  color: var(--teal);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.12em;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.12;
  text-wrap: balance;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 6.25rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.65rem);
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
  box-shadow: 0 0 0 3px var(--focus-inner);
}

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-150%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-small);
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
  transition: transform 160ms ease;
}

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

.reading-progress {
  position: fixed;
  z-index: 160;
  inset: 0 0 auto;
  height: 0.22rem;
  background: transparent;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
}

.site-header {
  position: sticky;
  z-index: 120;
  top: 0;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.search-wrap {
  display: flex;
  min-width: min(19rem, 34vw);
  min-height: 2.8rem;
  align-items: center;
  gap: 0.45rem;
  padding-inline: 0.75rem;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.search-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent);
}

.search-wrap input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-wrap input::placeholder {
  color: var(--muted);
}

.clear-search {
  min-width: 1.8rem;
  min-height: 1.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.25rem;
}

.icon-button,
.menu-button {
  min-height: 2.8rem;
  border: 1px solid var(--control-line);
  background: var(--surface);
  cursor: pointer;
}

.icon-button {
  min-width: 2.8rem;
  border-radius: 50%;
  font-size: 1.15rem;
}

.menu-button {
  display: none;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.docs-shell {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  width: min(100%, 102rem);
  margin-inline: auto;
}

.docs-rail {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 2rem 1.3rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: thin;
}

.rail-intro {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.rail-intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.eyebrow,
.note-label {
  margin-bottom: 0.65rem;
  color: var(--coral);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}


.section-nav {
  display: grid;
  gap: 0.25rem;
  margin: 1.3rem 0;
  padding: 0;
  list-style: none;
}

.section-nav a {
  display: grid;
  min-height: 2.7rem;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-small);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.section-nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.section-nav a[aria-current="location"] {
  background: var(--navy-soft);
  color: var(--navy);
}


.section-nav a span {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.64rem;
}

.rail-footer {
  display: grid;
  gap: 0.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.rail-footer a,
.rail-footer button {
  min-height: 2.25rem;
  padding: 0.3rem 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  text-align: left;
  text-decoration: none;
}

.rail-footer a:hover,
.rail-footer button:hover {
  color: var(--teal);
}

main {
  min-width: 0;
}

.hero,
.docs-orientation,
.documentation-section,
.resources-section,
.finish-panel {
  width: min(calc(100% - clamp(2rem, 8vw, 7rem)), var(--content-width));
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(4rem, 9vw, 8rem);
}

.hero h1 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
}

.hero-lede {
  max-width: 42rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.4rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

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

.button-primary:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.button-secondary {
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.hero-facts strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.hero-facts span {
  max-width: 5.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.signal-map {
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-title {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-step {
  position: relative;
  display: grid;
  grid-template-columns: 2.3rem 1fr;
  column-gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-left: 0.28rem solid var(--teal);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--teal-soft);
}

.signal-step-2 {
  border-color: var(--navy);
  background: var(--navy-soft);
}

.signal-step-3 {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.signal-step-4 {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.signal-step > span {
  grid-row: 1 / 3;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.signal-step strong,
.signal-step small {
  display: block;
}

.signal-step small {
  color: var(--muted);
}

.signal-arrow {
  height: 1.5rem;
  padding-left: 1.35rem;
  color: var(--line-strong);
  line-height: 1.5rem;
}

.docs-orientation {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(22rem, 1.3fr);
  gap: 2rem 5rem;
  padding-block: 4.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.docs-orientation h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.docs-orientation > p {
  grid-column: 2;
  margin-bottom: 0;
  color: var(--muted);
}

.coverage-loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coverage-loop li {
  min-height: 7rem;
  padding: 1rem;
  border-top: 0.22rem solid var(--teal);
  background: var(--surface);
}

.coverage-loop li:nth-child(2) { border-color: var(--navy); }
.coverage-loop li:nth-child(3) { border-color: var(--gold); }
.coverage-loop li:nth-child(4) { border-color: var(--coral); }

.coverage-loop span,
.coverage-loop small {
  display: block;
}

.coverage-loop span {
  font-weight: 800;
}

.coverage-loop small {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.35;
}

.search-status {
  min-height: 1.5rem;
  color: var(--coral) !important;
  font-weight: 700;
}

.documentation-section {
  padding-block: clamp(5rem, 10vw, 8.5rem);
  border-bottom: 1px solid var(--line);
}

.documentation-section[hidden] {
  display: none;
}

.section-header {
  max-width: var(--reading-width);
  margin: 0 auto 2.8rem;
}

.section-header h2 {
  max-width: 18ch;
  margin-bottom: 0.9rem;
}

.section-header > div:last-child > p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.section-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.section-meta span {
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outcomes {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  padding: 1.5rem;
  border-left: 0.3rem solid var(--teal);
  background: var(--teal-soft);
}

.outcomes h3 {
  margin-bottom: 0;
}

.outcomes ul {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.documentation-section > h3,
.documentation-section > p,
.documentation-section > .table-wrap,
.documentation-section > .section-grid,
.documentation-section > .worked-example,
.documentation-section > .portfolio-stack,
.documentation-section > .flow-line,
.documentation-section > .principle-grid,
.documentation-section > .automation-scorecard,
.documentation-section > .classification-line,
.documentation-section > .numbered-process,
.documentation-section > .pipeline,
.documentation-section > .gate-formula,
.documentation-section > .specialization-tabs,
.documentation-section > .question-strip,
.documentation-section > .evidence-triad,
.documentation-section > .report-anatomy,
.documentation-section > .career-ladder,
.documentation-section > .career-sequence,
.documentation-section > .tool-lens,
.documentation-section > .interview-grid,
.documentation-section > .risk-board,
.documentation-section > .chip-list,
.documentation-section > .technique-list,
.documentation-section > .mini-model,
.documentation-section > .myth-callout,
.documentation-section > .salary-note,
.documentation-section > .org-shape-grid,
.documentation-section > .cadence-grid,
.documentation-section > .unity-lifecycle,
.documentation-section > .game-risk-grid,
.documentation-section > .frame-budget,
.documentation-section > .rca-flow,
.documentation-section > .classification-table,
.documentation-section > .working-day,
.documentation-section > .portfolio-projects {
  max-width: var(--reading-width);
  margin-inline: auto;
}

.documentation-section > p {
  color: var(--muted);
}

.section-grid {
  display: grid;
  gap: 1.25rem;
  margin-block: 2rem 3rem;
}

.two-column {
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
}

blockquote {
  margin-bottom: 1.4rem;
  padding-left: 1.2rem;
  border-left: 0.25rem solid var(--coral);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1.45;
}

.concept-note,
.worked-example,
.myth-callout,
.salary-note {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.concept-note h3,
.worked-example h3 {
  margin-bottom: 0.8rem;
}

.concept-note p:last-child,
.worked-example p:last-child,
.myth-callout p:last-child,
.salary-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.worked-example {
  margin-block: 2.5rem;
  border-top: 0.3rem solid var(--gold);
}

.myth-callout {
  margin-block: 2.5rem;
  border-color: var(--coral);
  background: var(--coral-soft);
  box-shadow: none;
}

.salary-note {
  margin-block: 2.5rem;
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: none;
}

.table-wrap {
  margin-block: 2.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: 0.91rem;
}

caption {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

td {
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--teal-soft) 45%, transparent);
}

.mini-model,
.evidence-triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-block: 2.5rem;
}

.mini-model div,
.evidence-triad div {
  min-height: 7.5rem;
  padding: 1.1rem;
  border-top: 0.25rem solid var(--teal);
  background: var(--surface);
}

.mini-model div:nth-child(2),
.evidence-triad div:nth-child(2) { border-color: var(--gold); }
.mini-model div:nth-child(3),
.evidence-triad div:nth-child(3) { border-color: var(--coral); }

.mini-model strong,
.mini-model span,
.evidence-triad span,
.evidence-triad strong,
.evidence-triad small {
  display: block;
}

.mini-model span,
.evidence-triad span,
.evidence-triad small {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.interview-grid details {
  border-top: 1px solid var(--line);
}

details summary {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

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

details summary::after {
  content: "+";
  color: var(--coral);
  font-size: 1.5rem;
  font-weight: 400;
}

details[open] summary::after {
  content: "−";
}

.interview-grid details > p {
  padding: 0 0 1.25rem;
  color: var(--muted);
}


.risk-board {
  position: relative;
  margin-block: 2rem 3rem;
  padding: 0 0 1.7rem 1.7rem;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.risk-cell {
  min-height: 8rem;
  padding: 1.1rem;
  background: var(--surface);
}

.risk-cell strong,
.risk-cell span {
  display: block;
}

.risk-cell span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.risk-cell.low { border-left: 0.28rem solid var(--teal); }
.risk-cell.medium { border-left: 0.28rem solid var(--gold); }
.risk-cell.high { border-left: 0.28rem solid var(--coral); }
.risk-cell.critical { border-left: 0.28rem solid var(--ink); }

.risk-axis {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vertical-label {
  position: absolute;
  inset: 2.7rem auto 1.8rem 0;
  width: 1rem;
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.chip-list,
.classification-line,
.report-anatomy,
.tool-lens,
.question-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-block: 1rem 2.5rem;
}

.chip-list span,
.classification-line span,
.report-anatomy span,
.tool-lens span,
.question-strip span {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.technique-list,
.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-block: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.technique-list article,
.principle-grid article {
  min-height: 12rem;
  padding: 1.25rem;
  background: var(--surface);
}

.technique-list p,
.principle-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.principle-grid article > span {
  display: block;
  margin-bottom: 1.8rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 800;
}

.portfolio-stack {
  display: grid;
  gap: 0.55rem;
  margin-block: 2rem 3rem;
}

.portfolio-row {
  display: grid;
  grid-template-columns: minmax(8rem, 0.6fr) minmax(10rem, 0.7fr) minmax(12rem, 1.3fr);
  gap: 1rem;
  align-items: center;
  width: 88%;
  margin-inline: auto;
  padding: 0.85rem 1rem;
  border-left: 0.28rem solid var(--navy);
  background: var(--navy-soft);
}

.portfolio-row:nth-child(2) { width: 96%; border-color: var(--teal); background: var(--teal-soft); }
.portfolio-row:nth-child(3) { width: 84%; border-color: var(--gold); background: var(--gold-soft); }
.portfolio-row:nth-child(4) { width: 64%; border-color: var(--coral); background: var(--coral-soft); }

.portfolio-row span,
.portfolio-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.portfolio-human {
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.portfolio-human strong,
.portfolio-human span {
  display: block;
}

.portfolio-human span {
  color: var(--muted);
  font-size: 0.85rem;
}

.check-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.45rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 800;
}

.flow-line,
.gate-formula,
.career-sequence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-block: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

.flow-line span,
.gate-formula span {
  padding: 0.35rem 0.55rem;
  font-weight: 750;
}

.flow-line b,
.gate-formula strong,
.career-sequence b {
  color: var(--coral);
}

.automation-scorecard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-block: 2rem 3rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.automation-scorecard > .note-label,
.automation-scorecard > p:last-child {
  grid-column: 1 / -1;
}

.automation-scorecard > div {
  min-height: 6.5rem;
  padding: 0.85rem;
  background: var(--teal-soft);
}

.automation-scorecard span,
.automation-scorecard strong {
  display: block;
}

.automation-scorecard strong {
  margin-top: 0.3rem;
  color: var(--teal);
  font-size: 1.5rem;
}

.automation-scorecard > p:last-child {
  margin: 0.25rem 0 0;
  color: var(--muted);
  text-align: center;
}

.numbered-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-block: 1.2rem 2.5rem;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.numbered-process li {
  min-height: 9rem;
  padding: 1rem;
  border-top: 0.25rem solid var(--navy);
  background: var(--surface);
  counter-increment: process;
}

.numbered-process li::before {
  content: "0" counter(process);
  display: block;
  margin-bottom: 1rem;
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 800;
}

.numbered-process strong,
.numbered-process span {
  display: block;
}

.numbered-process span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.pipeline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-block: 2rem 3rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
}

.pipeline div {
  min-width: 8.5rem;
  min-height: 7.5rem;
  padding: 0.9rem;
  border-top: 0.25rem solid var(--teal);
  background: var(--surface);
}

.pipeline div:nth-of-type(2),
.pipeline div:nth-of-type(5) { border-color: var(--navy); }
.pipeline div:nth-of-type(3),
.pipeline div:nth-of-type(6) { border-color: var(--gold); }
.pipeline div:nth-of-type(4) { border-color: var(--coral); }

.pipeline span,
.pipeline strong,
.pipeline small {
  display: block;
}

.pipeline span {
  margin-bottom: 0.7rem;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 800;
}

.pipeline small {
  margin-top: 0.25rem;
  color: var(--muted);
}

.pipeline b {
  color: var(--line-strong);
}

.specialization-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-block: 2rem 3rem;
}

.specialization-tabs article {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-top: 0.3rem solid var(--teal);
  border-radius: var(--radius);
  background: var(--surface);
}

.specialization-tabs article:nth-child(2) { border-top-color: var(--coral); }
.specialization-tabs article:nth-child(3) { border-top-color: var(--navy); }

.specialization-tabs p:not(.note-label) {
  color: var(--muted);
}

.specialization-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.specialization-tabs li {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
}

.career-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-block: 2rem;
}

.career-ladder div {
  min-height: 10rem;
  padding: 1rem;
  border-top: 0.3rem solid var(--teal);
  background: var(--surface);
}

.career-ladder div:nth-child(2) { border-color: var(--navy); }
.career-ladder div:nth-child(3) { border-color: var(--gold); }
.career-ladder div:nth-child(4) { border-color: var(--coral); }

.career-ladder span,
.career-ladder strong,
.career-ladder small {
  display: block;
}

.career-ladder span {
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.career-ladder small {
  margin-top: 0.4rem;
  color: var(--muted);
}

.interview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1.5rem;
  margin-block: 1rem 2.5rem;
}

.resources-section {
  padding-block: clamp(5rem, 10vw, 8.5rem);
  border-bottom: 1px solid var(--line);
}

.resources-section > header {
  max-width: var(--reading-width);
  margin: 0 auto 3rem;
}

.resources-section h2,
.finish-panel h2 {
  margin-bottom: 1rem;
}

.resources-section header > p:last-child {
  color: var(--muted);
}


.resource-list {
  display: grid;
  max-width: var(--reading-width);
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.resource-list a {
  display: block;
  min-height: 7rem;
  padding: 1.2rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.resource-list a:hover {
  background: var(--teal-soft);
}

.resource-list strong,
.resource-list span {
  display: block;
}

.resource-list span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.finish-panel {
  margin-block: clamp(5rem, 10vw, 8.5rem);
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: var(--radius-large);
  background: var(--navy);
  color: var(--surface);
  text-align: center;
}

.finish-panel h2,
.finish-panel p {
  max-width: 46rem;
  margin-inline: auto;
  color: inherit;
}

.finish-panel .eyebrow {
  color: color-mix(in srgb, var(--surface) 75%, transparent);
}

.finish-panel .button {
  margin-top: 1rem;
  border-color: var(--surface);
  background: var(--surface);
  color: var(--navy);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.rail-overlay {
  position: fixed;
  z-index: 129;
  inset: var(--header-height) 0 0;
  background: rgba(7, 15, 21, 0.48);
}

.research-summary {
  grid-column: 1 / -1;
  padding: 1.25rem 1.4rem;
  border-left: 0.3rem solid var(--gold);
  background: var(--gold-soft);
}

.research-summary p {
  max-width: 62rem;
  margin-bottom: 0.55rem;
}

.research-summary a {
  font-weight: 800;
}

.org-shape-grid,
.game-risk-grid,
.portfolio-projects,
.atlas-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-block: 1.25rem 2.7rem;
}

.org-shape-grid article,
.game-risk-grid article,
.portfolio-projects article,
.atlas-preview-grid article {
  padding: 1.15rem;
  border-top: 0.25rem solid var(--teal);
  background: var(--surface);
}

.org-shape-grid article:nth-child(2),
.game-risk-grid article:nth-child(3n + 2),
.portfolio-projects article:nth-child(3n + 2),
.atlas-preview-grid article:nth-child(2) {
  border-color: var(--gold);
}

.org-shape-grid article:nth-child(3),
.game-risk-grid article:nth-child(3n),
.portfolio-projects article:nth-child(3n),
.atlas-preview-grid article:nth-child(3) {
  border-color: var(--coral);
}

.org-shape-grid span,
.org-shape-grid strong,
.atlas-preview-grid span,
.atlas-preview-grid strong {
  display: block;
}

.org-shape-grid span,
.atlas-preview-grid span {
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-shape-grid p,
.game-risk-grid p,
.portfolio-projects p,
.atlas-preview-grid p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.game-risk-grid,
.portfolio-projects {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cadence-grid,
.classification-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-block: 1.25rem 2.7rem;
}

.cadence-grid div,
.classification-table div {
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.cadence-grid span,
.classification-table strong,
.classification-table span {
  display: block;
}

.cadence-grid span {
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cadence-grid p,
.classification-table span {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.classification-table {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.unity-lifecycle,
.rca-flow,
.working-day {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-block: 1.3rem 2.7rem;
  padding: 0;
  list-style: none;
}

.unity-lifecycle li,
.rca-flow li,
.working-day li {
  position: relative;
  min-height: 7.3rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.unity-lifecycle li:not(:last-child)::after,
.rca-flow li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -0.72rem;
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--coral);
  font-weight: 900;
  transform: translateY(-50%);
}

.unity-lifecycle span,
.unity-lifecycle strong,
.unity-lifecycle small {
  display: block;
}

.unity-lifecycle span {
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 850;
}

.unity-lifecycle small {
  margin-top: 0.35rem;
  color: var(--muted);
}

.rca-flow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rca-flow li {
  min-height: 5.5rem;
  display: grid;
  align-content: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.frame-budget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2rem 2.7rem;
}

.frame-budget > div {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.frame-budget strong,
.frame-budget small,
.budget-track {
  display: block;
}

.frame-budget strong {
  margin-bottom: 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.frame-budget small {
  margin-top: 0.65rem;
  color: var(--muted);
}

.budget-track {
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--navy-soft);
}

.budget-track i {
  display: block;
  height: 100%;
  background: var(--coral);
}

.fill-14 { width: 14%; }
.fill-17 { width: 17%; }
.fill-18 { width: 18%; }
.fill-26 { width: 26%; }
.fill-33 { width: 33%; }
.fill-50 { width: 50%; }
.fill-52 { width: 52%; }
.fill-67 { width: 67%; }
.fill-94 { width: 94%; }
.fill-100 { width: 100%; }

.working-day {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.working-day li {
  min-height: 0;
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: center;
  gap: 1rem;
  border-width: 0 0 1px;
  background: transparent;
}

.working-day time {
  color: var(--coral);
  font-weight: 850;
}

.visual-atlas-preview {
  width: min(calc(100% - 4rem), var(--content-width));
  margin: clamp(5rem, 10vw, 9rem) auto;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.visual-atlas-preview header {
  max-width: 52rem;
}

.visual-atlas-preview header > p:last-child {
  color: var(--muted);
}

.atlas-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.atlas-preview-actions > a:last-child {
  font-weight: 800;
}

.atlas-header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.atlas-header-nav a,
.atlas-header-nav button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.atlas-header-nav a:hover,
.atlas-header-nav button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.visual-page {
  width: min(calc(100% - 3rem), 80rem);
  margin-inline: auto;
}

.visual-hero {
  min-height: 37rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(4rem, 9vw, 8rem);
}

.visual-hero h1 {
  max-width: 10ch;
  margin-bottom: 1.4rem;
}

.visual-summary {
  padding: 1.5rem;
  border-left: 0.35rem solid var(--coral);
  background: var(--coral-soft);
}

.visual-summary strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.visual-summary p {
  color: var(--muted);
}

.visual-summary a {
  font-weight: 850;
}

.diagram-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding-block: 1.6rem;
  border-block: 1px solid var(--line);
}

.diagram-index a {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-small);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.diagram-index a:hover {
  background: var(--teal-soft);
}

.diagram-index span {
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.visual-chapter {
  padding-block: clamp(5rem, 9vw, 8.5rem);
  border-bottom: 1px solid var(--line);
}

.visual-chapter > header {
  max-width: 57rem;
  margin-bottom: 2.2rem;
}

.visual-chapter > header > p:last-child {
  max-width: 47rem;
  color: var(--muted);
  font-size: 1.06rem;
}

.diagram-kicker {
  margin-bottom: 0.55rem;
  color: var(--coral);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.diagram-panel {
  margin: 0;
  padding: clamp(1.25rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.diagram-panel figcaption {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.loop-flow,
.system-flow,
.automation-cycle,
.pipeline-grid,
.rca-lanes,
.unity-runtime {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 1.6rem;
}

.loop-flow li,
.system-flow li,
.automation-cycle li,
.pipeline-grid li,
.rca-lanes li,
.unity-runtime li {
  position: relative;
  min-width: 0;
  padding: 1.1rem;
  border-top: 0.25rem solid var(--teal);
  background: var(--paper);
}

.loop-flow li:nth-child(3n + 2),
.automation-cycle li:nth-child(3n + 2),
.unity-runtime li:nth-child(3n + 2) {
  border-color: var(--gold);
}

.loop-flow li:nth-child(3n),
.automation-cycle li:nth-child(3n),
.unity-runtime li:nth-child(3n) {
  border-color: var(--coral);
}

.loop-flow span,
.loop-flow strong,
.loop-flow small,
.system-flow span,
.system-flow strong,
.system-flow small,
.automation-cycle span,
.automation-cycle strong,
.automation-cycle small,
.pipeline-grid span,
.pipeline-grid strong,
.pipeline-grid small,
.rca-lanes span,
.rca-lanes strong,
.rca-lanes small,
.unity-runtime span,
.unity-runtime strong,
.unity-runtime small {
  display: block;
}

.loop-flow span,
.system-flow span,
.automation-cycle span,
.pipeline-grid span,
.rca-lanes span,
.unity-runtime span {
  margin-bottom: 0.3rem;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loop-flow small,
.system-flow small,
.automation-cycle small,
.pipeline-grid small,
.rca-lanes small,
.unity-runtime small {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.loop-flow li:not(:last-child)::after,
.system-flow li:not(:last-child)::after,
.automation-cycle li:not(:last-child)::after,
.pipeline-grid li:not(:last-child)::after,
.rca-lanes li:not(:last-child)::after,
.unity-runtime li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -1.2rem;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--coral);
  font-weight: 900;
  transform: translateY(-50%);
}

.decision-flow {
  display: grid;
  gap: 1.1rem;
}

.decision-node {
  width: min(100%, 39rem);
  margin-inline: auto;
  padding: 1.2rem;
  border: 1px solid var(--line-strong);
  border-left: 0.35rem solid var(--teal);
  background: var(--paper);
  text-align: center;
}

.decision-node span,
.decision-node strong,
.decision-node small {
  display: block;
}

.decision-node span {
  color: var(--coral);
  font-weight: 850;
}

.decision-node small {
  margin-top: 0.35rem;
  color: var(--muted);
}

.decision-start {
  border-left-color: var(--gold);
}

.decision-end {
  border-left-color: var(--coral);
}

.decision-split {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding-block: 1.2rem;
}

.decision-split::before,
.decision-split::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 1.2rem;
  background: var(--line-strong);
}

.decision-split::before {
  top: 0;
}

.decision-split::after {
  bottom: 0;
}

.decision-split > div {
  padding: 1rem;
  border-top: 0.22rem solid var(--gold);
  background: var(--gold-soft);
}

.decision-split span,
.decision-split strong,
.decision-split small {
  display: block;
}

.decision-split span {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.decision-split small {
  margin-top: 0.35rem;
  color: var(--muted);
}

.portfolio-visual {
  display: grid;
  gap: 0.55rem;
}

.portfolio-layer {
  min-height: 4.5rem;
  display: grid;
  align-content: center;
  margin-inline: auto;
  padding: 0.85rem 1.1rem;
  border-left: 0.35rem solid var(--teal);
  background: var(--teal-soft);
  text-align: center;
}

.portfolio-layer span,
.portfolio-layer small {
  display: block;
}

.portfolio-layer small {
  margin-top: 0.2rem;
  color: var(--muted);
}

.layer-production { width: 52%; border-color: var(--coral); background: var(--coral-soft); }
.layer-e2e { width: 62%; border-color: var(--gold); background: var(--gold-soft); }
.layer-component { width: 72%; }
.layer-api { width: 86%; }
.layer-unit { width: 100%; }

.portfolio-axes {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.system-flow {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.assertion-band,
.flake-causes,
.gate-legend,
.performance-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.assertion-band span,
.flake-causes span,
.gate-legend span,
.performance-signals span {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.76rem;
  font-weight: 750;
}

.automation-cycle {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.4rem;
}

.flake-causes strong {
  width: 100%;
}

.pipeline-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem 1.25rem;
}

.gate-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--teal);
}

.gate-legend .gate-deep {
  background: var(--gold);
}

.gate-legend .gate-live {
  background: var(--coral);
}

.rca-lanes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
}

.failure-language,
.unity-probes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.failure-language div,
.unity-probes div {
  padding: 0.85rem;
  border: 1px solid var(--line);
}

.failure-language strong,
.failure-language span,
.unity-probes strong,
.unity-probes span {
  display: block;
}

.failure-language span,
.unity-probes span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.graph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.bar-graph h3 {
  min-height: 3rem;
  margin-bottom: 1.2rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(4rem, 1fr) 4.4rem;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.6rem;
}

.bar-row > span,
.bar-row > strong {
  font-size: 0.74rem;
}

.bar-row > strong {
  text-align: right;
}

.bar-row i {
  display: block;
  height: 0.8rem;
  border-radius: 0 999px 999px 0;
  background: var(--teal);
}

.threshold-row i {
  background: var(--gold);
}

.danger-row i {
  background: var(--coral);
}

.frame-graph .bar-row i {
  background: var(--navy);
}

.graph-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.unity-runtime {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem 1.2rem;
}

.unity-probes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cadence-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.cadence-board > div {
  padding: 1rem;
  border-top: 0.25rem solid var(--teal);
  background: var(--paper);
}

.cadence-board span,
.cadence-board strong,
.cadence-board small {
  display: block;
}

.cadence-board span {
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cadence-board small {
  margin-top: 0.3rem;
  color: var(--muted);
}

.collaboration-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.collaboration-map > div {
  padding: 0.9rem;
  border: 1px solid var(--line);
  text-align: center;
}

.collaboration-map .collaboration-core {
  grid-column: 1 / -1;
  border-color: var(--teal);
  background: var(--teal-soft);
}

.collaboration-map strong,
.collaboration-map span {
  display: block;
}

.collaboration-map span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.competency-table {
  min-width: 0;
}

.competency-table td:not(:first-child) {
  text-align: center;
}

.career-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.career-flow span {
  position: relative;
  padding: 0.85rem;
  border-top: 0.25rem solid var(--coral);
  background: var(--coral-soft);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.career-flow span:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -1rem;
  color: var(--coral);
  transform: translateY(-50%);
}

.atlas-finish {
  width: 100%;
}

.atlas-finish .hero-actions {
  justify-content: center;
}

.atlas-finish .button-secondary {
  background: transparent;
  color: var(--surface);
}

@media (max-width: 72rem) {
  .docs-shell {
    grid-template-columns: 15.5rem minmax(0, 1fr);
  }

  .hero,
  .docs-orientation,
  .documentation-section,
  .resources-section,
  .finish-panel {
    width: min(calc(100% - 3rem), var(--content-width));
  }

  .technique-list,
  .principle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .diagram-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-grid,
  .rca-lanes,
  .unity-runtime {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cadence-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 58rem) {
  :root {
    --header-height: 4.25rem;
  }

  .site-header {
    padding-block: 0.55rem;
  }

  .brand small,
  .icon-button {
    display: none;
  }

  .search-wrap {
    min-width: 0;
    width: min(15rem, 42vw);
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .docs-shell {
    display: block;
  }

  .docs-rail {
    position: fixed;
    z-index: 130;
    top: var(--header-height);
    left: 0;
    width: min(22rem, 88vw);
    height: calc(100vh - var(--header-height));
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    border-right: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    transition: transform 180ms ease, visibility 0s linear 180ms;
  }

  .docs-rail.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .signal-map {
    max-width: 34rem;
  }

  .docs-orientation {
    grid-template-columns: 1fr;
  }

  .docs-orientation > p {
    grid-column: 1;
  }

  .coverage-loop {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column,
  .specialization-tabs {
    grid-template-columns: 1fr;
  }

  .outcomes {
    grid-template-columns: 1fr;
  }

  .numbered-process,
  .career-ladder {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline {
    align-items: stretch;
  }

  .visual-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .visual-summary {
    max-width: 42rem;
  }

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

  .org-shape-grid,
  .game-risk-grid,
  .portfolio-projects,
  .atlas-preview-grid,
  .cadence-grid,
  .classification-table,
  .unity-lifecycle,
  .rca-flow,
  .loop-flow,
  .system-flow,
  .automation-cycle,
  .pipeline-grid,
  .rca-lanes,
  .unity-runtime,
  .cadence-board,
  .failure-language,
  .unity-probes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unity-lifecycle li:not(:last-child)::after,
  .rca-flow li:not(:last-child)::after,
  .loop-flow li:not(:last-child)::after,
  .system-flow li:not(:last-child)::after,
  .automation-cycle li:not(:last-child)::after,
  .pipeline-grid li:not(:last-child)::after,
  .rca-lanes li:not(:last-child)::after,
  .unity-runtime li:not(:last-child)::after {
    display: none;
  }

  .decision-split,
  .graph-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 40rem) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .search-wrap {
    order: 3;
    width: 100%;
  }

  :root {
    --header-height: 7.6rem;
  }

  .hero,
  .docs-orientation,
  .documentation-section,
  .resources-section,
  .finish-panel {
    width: min(calc(100% - 2rem), var(--content-width));
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-facts {
    gap: 1rem;
  }

  .hero-facts li {
    width: calc(50% - 0.5rem);
  }

  .coverage-loop,
  .technique-list,
  .principle-grid,
  .mini-model,
  .evidence-triad,
  .automation-scorecard,
  .numbered-process,
  .career-ladder,
  .interview-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }

  .org-shape-grid,
  .game-risk-grid,
  .portfolio-projects,
  .atlas-preview-grid,
  .cadence-grid,
  .classification-table,
  .unity-lifecycle,
  .rca-flow,
  .loop-flow,
  .system-flow,
  .automation-cycle,
  .pipeline-grid,
  .rca-lanes,
  .unity-runtime,
  .cadence-board,
  .failure-language,
  .unity-probes,
  .collaboration-map,
  .career-flow,
  .frame-budget {
    grid-template-columns: 1fr;
  }

  .unity-lifecycle li:not(:last-child)::after,
  .rca-flow li:not(:last-child)::after,
  .loop-flow li:not(:last-child)::after,
  .system-flow li:not(:last-child)::after,
  .automation-cycle li:not(:last-child)::after,
  .pipeline-grid li:not(:last-child)::after,
  .rca-lanes li:not(:last-child)::after,
  .unity-runtime li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -1.2rem;
    display: grid;
    transform: translateX(50%);
  }

  .career-flow span:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -1rem;
    transform: translateX(50%);
  }

  .atlas-header {
    position: relative;
  }

  .atlas-header-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .atlas-header-nav a,
  .atlas-header-nav button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .visual-page {
    width: min(calc(100% - 2rem), 80rem);
  }

  .visual-hero {
    padding-top: 3.5rem;
  }

  .visual-hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.2rem);
  }

  .diagram-index {
    grid-template-columns: 1fr;
  }

  .diagram-panel {
    padding: 1rem;
  }

  .portfolio-layer {
    width: 100%;
  }

  .portfolio-axes,
  .atlas-preview-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.7rem;
    padding-block: 0.35rem;
  }

  .bar-row i {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .bar-row > strong {
    grid-column: 2;
    grid-row: 1;
  }

  .responsive-table,
  .competency-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .responsive-table table,
  .competency-table {
    display: block;
  }

  .responsive-table thead,
  .competency-table thead {
    display: none;
  }

  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td,
  .competency-table tbody,
  .competency-table tr,
  .competency-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr,
  .competency-table tr {
    margin-bottom: 0.8rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .responsive-table td,
  .competency-table td,
  .competency-table td:not(:first-child) {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }

  .responsive-table td:last-child,
  .competency-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before,
  .competency-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--ink);
    font-weight: 800;
    text-align: left;
  }

  .visual-atlas-preview {
    width: min(calc(100% - 2rem), var(--content-width));
    padding: 1.25rem;
  }


  .section-header h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .portfolio-row {
    width: 100% !important;
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .risk-board {
    padding-left: 0;
  }

  .vertical-label {
    display: none;
  }

  .risk-grid {
    grid-template-columns: 1fr;
  }


  table {
    min-width: 0;
    font-size: 0.78rem;
  }

  th,
  td {
    padding: 0.65rem 0.5rem;
  }

  .site-footer {
    display: grid;
  }
}

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

@media print {
  :root {
    --paper: #ffffff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --ink: #111111;
    --muted: #444444;
    --line: #cccccc;
  }

  .site-header,
  .docs-rail,
  .reading-progress,
  .hero-actions,
  .rail-overlay,
  .site-footer {
    display: none !important;
  }

  .docs-shell {
    display: block;
  }

  .hero,
  .docs-orientation,
  .documentation-section,
  .resources-section,
  .finish-panel {
    width: 100%;
  }

  .hero {
    min-height: auto;
    page-break-after: always;
  }

  .documentation-section,
  .resources-section {
    page-break-before: always;
  }

  .visual-atlas-preview,
  .visual-chapter {
    width: 100%;
    page-break-before: always;
  }

  .diagram-panel {
    box-shadow: none;
  }

  .documentation-section[hidden] {
    display: block;
  }

  .concept-note,
  .worked-example,
  .myth-callout,
  .salary-note,
  .signal-map {
    box-shadow: none;
  }

  details > *:not(summary) {
    display: block !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

