:root {
  --bg: #edf2f5;
  --ink: #0f171e;
  --muted: #2b3d4d;
  --accent: #a61c24;
  --accent-hover: #82141b;
  --accent-ink: #ffffff;

  --ch-sky-bg: #d4e5ef;
  --ch-sky-surface: #c1d8e6;
  --ch-sky-ink: #0f171e;
  --ch-sky-muted: #263847;
  --ch-sky-link: #9e1f28;

  --ch-mist-bg: #edf2f5;
  --ch-mist-surface: #dce6ec;
  --ch-mist-ink: #0f171e;
  --ch-mist-muted: #2b3d4d;
  --ch-mist-link: #9e1f28;

  --ch-amber-bg: #efc43b;
  --ch-amber-surface: #e0b225;
  --ch-amber-ink: #0f171e;
  --ch-amber-muted: #241d06;
  --ch-amber-link: #0f171e;

  --ch-sage-bg: #cfe0d6;
  --ch-sage-surface: #bbd1c4;
  --ch-sage-ink: #0f171e;
  --ch-sage-muted: #243a2e;
  --ch-sage-link: #9e1f28;

  --ch-dark-bg: #101921;
  --ch-dark-surface: #192632;
  --ch-dark-ink: #f3f7fa;
  --ch-dark-muted: #c3d2de;
  --ch-dark-link: #efc43b;

  --font-sans: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --step-small: clamp(0.84rem, 0.81rem + 0.1vw, 0.9rem);
  --step-body: clamp(1.04rem, 1rem + 0.22vw, 1.15rem);
  --step-lead: clamp(1.22rem, 1.08rem + 0.55vw, 1.5rem);
  --step-h2: clamp(1.75rem, 1.32rem + 2vw, 2.75rem);
  --step-display: clamp(2.5rem, 1.85rem + 3.2vw, 4.4rem);

  --max-w: 1360px;
  --pad-x: 24px;
  --gap: 20px;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.52;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

a {
  color: var(--ch-mist-link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
  transition: color 160ms ease-out, background-color 160ms ease-out, opacity 160ms ease-out;
}

a:hover {
  opacity: 0.84;
}

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

.ch-dark a:focus-visible,
[data-ui] a:focus-visible,
[data-ui] button:focus-visible,
[data-ui] select:focus-visible,
[data-ui] input:focus-visible {
  outline: 2px solid #efc43b;
}

h1, h2, h3, h4 {
  margin: 0 0 0.45em;
  font-family: var(--font-sans);
  font-weight: 600;
  color: inherit;
}

h1 {
  font-size: var(--step-display);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

h2 {
  font-size: var(--step-h2);
  line-height: 0.98;
  letter-spacing: -0.034em;
}

h3, h4 {
  font-size: var(--step-lead);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p, ul, ol, dl, table, pre, blockquote {
  margin: 0 0 1rem;
}

p, li {
  max-width: 62ch;
  overflow-wrap: anywhere;
}

p:last-child, ul:last-child, ol:last-child {
  margin-bottom: 0;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--step-small);
}

p code, li code, td code {
  background: rgba(15, 23, 30, 0.09);
  color: inherit;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ch-dark p code,
.ch-dark li code,
.ch-dark td code {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

pre {
  max-width: 100%;
  background: #101921;
  color: #f3f7fa;
  padding: 1rem 1.15rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.48;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Top Chapter Header */
.site-header {
  position: relative;
  width: 100%;
  background: var(--ch-sky-bg);
  color: var(--ch-sky-ink);
}

.site-header[data-active-tone="mist"] {
  background: var(--ch-mist-bg);
  color: var(--ch-mist-ink);
}

.site-header[data-active-tone="amber"] {
  background: var(--ch-amber-bg);
  color: var(--ch-amber-ink);
}

.site-header[data-active-tone="sage"] {
  background: var(--ch-sage-bg);
  color: var(--ch-sage-ink);
}

.site-header[data-active-tone="dark"] {
  background: var(--ch-dark-bg);
  color: var(--ch-dark-ink);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px var(--pad-x);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand-mark {
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
}

.primary-nav a {
  color: inherit;
  text-decoration: none;
  font-size: var(--step-small);
  font-weight: 500;
  padding: 6px 2px;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.header-cta {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--step-small);
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}

.header-cta:hover {
  background: var(--accent-hover);
  color: #ffffff;
  opacity: 1;
}

.site-header[data-active-tone="dark"] .header-cta {
  background: #efc43b;
  color: #0f171e;
}

/* Full-Bleed Colour Chapters (butted together, zero divider lines) */
.chapter {
  width: 100%;
  padding: clamp(56px, 6.8vw, 96px) 0;
}

.chapter--hero {
  padding: clamp(36px, 4.5vw, 68px) 0 clamp(56px, 6.5vw, 88px);
}

.ch-sky {
  background: var(--ch-sky-bg);
  color: var(--ch-sky-ink);
  --field-surface: var(--ch-sky-surface);
  --field-muted: var(--ch-sky-muted);
  --field-link: var(--ch-sky-link);
}

.ch-mist {
  background: var(--ch-mist-bg);
  color: var(--ch-mist-ink);
  --field-surface: var(--ch-mist-surface);
  --field-muted: var(--ch-mist-muted);
  --field-link: var(--ch-mist-link);
}

.ch-amber {
  background: var(--ch-amber-bg);
  color: var(--ch-amber-ink);
  --field-surface: var(--ch-amber-surface);
  --field-muted: var(--ch-amber-muted);
  --field-link: var(--ch-amber-link);
}

.ch-sage {
  background: var(--ch-sage-bg);
  color: var(--ch-sage-ink);
  --field-surface: var(--ch-sage-surface);
  --field-muted: var(--ch-sage-muted);
  --field-link: var(--ch-sage-link);
}

.ch-dark {
  background: var(--ch-dark-bg);
  color: var(--ch-dark-ink);
  --field-surface: var(--ch-dark-surface);
  --field-muted: var(--ch-dark-muted);
  --field-link: var(--ch-dark-link);
}

.chapter a:not(.btn-primary):not(.btn-secondary):not(.header-cta) {
  color: var(--field-link);
}

.chapter-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Shared 12-Column Symmetric Grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.grid-12--stretch {
  align-items: stretch;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }

.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gap);
  align-items: end;
  margin-bottom: 28px;
}

.chapter-head p {
  color: var(--field-muted);
  margin: 0;
}

/* Hero Typography & Composition */
.hero-sub {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.25;
  color: var(--field-ink, inherit);
  margin: 0.35rem 0 0.85rem;
  max-width: 48ch;
}

.hero-lead {
  font-size: var(--step-body);
  line-height: 1.52;
  color: inherit;
  margin: 0 0 1.4rem;
  max-width: 60ch;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  padding: 13px 22px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--step-small);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  opacity: 1;
}

.ch-dark .btn-primary {
  background: #efc43b;
  color: #0f171e;
}

.ch-dark .btn-primary:hover {
  background: #ffd659;
  color: #0f171e;
}

.btn-secondary {
  background: var(--field-surface);
  color: inherit;
  padding: 13px 20px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--step-small);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 120ms ease-out;
}

.btn-secondary:hover {
  background: #0f171e;
  color: #ffffff;
  opacity: 1;
}

.ch-dark .btn-secondary:hover {
  background: #ffffff;
  color: #0f171e;
}

.btn-primary:active,
.btn-secondary:active,
.header-cta:active {
  transform: scale(0.98);
}

/* Tone blocks (surfaces separated by tone step, zero borders/shadows) */
.tone-block {
  background: var(--field-surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.tone-block--top {
  justify-content: flex-start;
}

.hero-facts {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: var(--step-small);
  color: var(--field-muted);
}

.hero-facts strong {
  color: var(--ch-sky-ink);
  font-weight: 600;
}

/* Real Photographs & Moving Hero Drift */
.photo-frame {
  margin: 0;
  background: #101921;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-frame__media {
  overflow: hidden;
  width: 100%;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.photo-frame--drift img {
  transform: scale(1.04);
  animation: facadeDrift 20s ease-in-out infinite alternate;
}

@keyframes facadeDrift {
  0%   { transform: scale(1.03) translate3d(0, 0, 0); }
  100% { transform: scale(1.09) translate3d(-1.6%, -1.1%, 0); }
}

.photo-caption {
  background: #101921;
  color: #f3f7fa;
  padding: 10px 14px;
  font-size: var(--step-small);
  line-height: 1.35;
}

.ch-dark .photo-caption {
  background: #192632;
}

/* Interactive Tool Panels ([data-ui]) */
[data-ui].tool-shell {
  background: #101921;
  color: #f3f7fa;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ch-dark [data-ui].tool-shell {
  background: #192632;
}

[data-ui] .tool-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 22px;
  align-items: start;
}

[data-ui] .ctrl-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

[data-ui] .ctrl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[data-ui] .ctrl-field label {
  font-size: var(--step-small);
  font-weight: 500;
  color: #d7e3ec;
}

[data-ui] select,
[data-ui] input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  background: #0a1016;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--font-sans);
  font-size: var(--step-small);
}

[data-ui] .toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

[data-ui] .toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #182531;
  padding: 10px 12px;
  cursor: pointer;
  font-size: var(--step-small);
}

[data-ui] .toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #efc43b;
  flex-shrink: 0;
}

[data-ui] .readout-grid {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  gap: 10px;
  margin-bottom: 14px;
}

[data-ui] .readout-box {
  padding: 12px 14px;
}

[data-ui] .readout-lbl {
  display: block;
  font-size: var(--step-small);
  color: #c3d2de;
  margin-bottom: 4px;
}

[data-ui] .readout-val {
  display: block;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #efc43b;
}

[data-ui] .readout-sub {
  display: block;
  font-size: var(--step-small);
  color: #d7e3ec;
  margin-top: 4px;
}

[data-ui] .plan-verdict {
  background: #0a1016;
  padding: 16px 18px;
  border-left: 4px solid #efc43b;
}

[data-ui] .plan-verdict strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
}

[data-ui] .plan-verdict p {
  font-size: var(--step-small);
  color: #d7e3ec;
  margin: 0 0 8px;
  max-width: none;
}

[data-ui] .plan-verdict p:last-child {
  margin-bottom: 0;
}

/* Class Selector ([data-ui]) */
[data-ui] .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

[data-ui] .filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

[data-ui] .filter-btn {
  background: #182531;
  color: #f3f7fa;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 9px 14px;
  min-height: 40px;
  font-family: var(--font-sans);
  font-size: var(--step-small);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

[data-ui] .filter-btn.is-active,
[data-ui] .filter-btn:hover {
  background: #efc43b;
  border-color: #efc43b;
  color: #0f171e;
}

[data-ui] .squad-summary {
  background: #0a1016;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: var(--step-small);
}

[data-ui] .class-roster {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  gap: 10px;
}

[data-ui] .class-row {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

[data-ui] .class-row[hidden] {
  display: none;
}

[data-ui] .class-row.is-picked {
  background: #1f3040;
}

[data-ui] .class-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

[data-ui] .class-tier {
  background: #efc43b;
  color: #0f171e;
  padding: 2px 8px;
  font-size: var(--step-small);
  font-weight: 600;
}

[data-ui] .class-pick-btn {
  align-self: flex-start;
  background: #0a1016;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 12px;
  min-height: 38px;
  font-family: var(--font-sans);
  font-size: var(--step-small);
  font-weight: 500;
  cursor: pointer;
}

[data-ui] .class-row.is-picked .class-pick-btn {
  background: #efc43b;
  color: #0f171e;
  border-color: #efc43b;
}

/* Checklist ([data-ui]) */
[data-ui] .checklist-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

[data-ui] .meter-track {
  width: 100%;
  height: 12px;
  background: #0a1016;
  margin-bottom: 16px;
  overflow: hidden;
}

[data-ui] .meter-fill {
  height: 100%;
  width: 0%;
  background: #efc43b;
  transition: width 220ms ease-out;
}

[data-ui] .check-columns {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  gap: 14px 22px;
}

[data-ui] .check-group {
  padding: 4px 0;
}

[data-ui] .check-group strong {
  display: block;
  margin-bottom: 6px;
  color: #efc43b;
}

[data-ui] .check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 0;
  cursor: pointer;
  font-size: var(--step-small);
  line-height: 1.35;
  color: #f3f7fa;
}

[data-ui] .check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #efc43b;
  flex-shrink: 0;
}

[data-ui] .check-item.is-done span {
  text-decoration: line-through;
  color: #9fb4c4;
}

/* Promo Code Copy Rows ([data-ui]) */
[data-ui].code-vault {
  background: #101921;
  color: #f3f7fa;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ch-dark [data-ui].code-vault {
  background: #192632;
}

[data-ui] .code-row {
  padding: 8px 0;
  display: grid;
  grid-template-columns: minmax(136px, auto) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

[data-ui] .code-token {
  font-size: 1.15rem;
  font-weight: 600;
  color: #efc43b;
}

[data-ui] .check-group[hidden] {
  display: none;
}

/* Real Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  color: #0f171e;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
  margin: 0;
}

th, td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid #d5e0e7;
  vertical-align: top;
}

th {
  background: #dce6ec;
  font-weight: 600;
  color: #0f171e;
}

/* Banded Timeline / Floor Stack (Blueprint: alternating tone bands, zero borders) */
.band-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.band-row {
  background: var(--field-surface);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: minmax(140px, 3fr) minmax(0, 9fr);
  gap: 18px;
  align-items: baseline;
}

.band-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.55);
}

.ch-dark .band-row:nth-child(even) {
  background: #0c131a;
}

.band-tag {
  font-weight: 600;
  font-size: var(--step-lead);
  font-variant-numeric: tabular-nums;
}

/* FAQ Blueprint: A band per question (all visible, alternating flat tones, zero toggles) */
.faq-bands {
  width: 100%;
}

.faq-band {
  width: 100%;
  padding: 36px 0;
  background: var(--ch-mist-bg);
  color: var(--ch-mist-ink);
}

.faq-band:nth-child(even) {
  background: var(--ch-sky-bg);
  color: var(--ch-sky-ink);
}

.faq-band-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
}

/* Asymmetric Amazon Hardware Mosaic (zero uniform card rows) */
.gear-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.gear-item {
  background: var(--field-surface);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  grid-column: span 5;
}

.gear-item:nth-child(2),
.gear-item:nth-child(3) {
  grid-column: span 7;
  background: rgba(255, 255, 255, 0.65);
}

.ch-dark .gear-item:nth-child(2),
.ch-dark .gear-item:nth-child(3) {
  background: #0c131a;
}

.disclosure-line {
  margin-top: 14px;
  font-size: var(--step-small);
  color: var(--field-muted);
  max-width: 82ch;
}

/* Adsterra Static Slots (3 compliant static slots, zero popunders) */
.ad-slot {
  max-width: var(--max-w);
  margin: 18px auto;
  padding: 10px var(--pad-x);
  background: var(--field-surface, #dce6ec);
  overflow: hidden;
}

.ad-leader,
.ad-300 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82px;
}

.ad-n,
.ad-native {
  display: block;
  width: 100%;
}

.ad-slot-label {
  display: block;
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 6px;
}

.ad-slot-pending {
  display: none;
}

/* Closing Full-Bleed Dark Footer Chapter */
.site-footer {
  background: var(--ch-dark-bg);
  color: var(--ch-dark-ink);
  padding: clamp(56px, 7vw, 96px) 0 44px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 28px;
  margin-bottom: 44px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--ch-dark-ink);
  text-decoration: none;
  font-size: var(--step-small);
}

.footer-links a:hover {
  color: #efc43b;
  text-decoration: underline;
}

.footer-poster-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.footer-wordmark {
  font-size: clamp(2.6rem, 7.2vw, 6.4rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: #f3f7fa;
}

.credits {
  font-size: var(--step-small);
  color: var(--ch-dark-muted);
  max-width: none;
  line-height: 1.5;
}

.credits a {
  color: #efc43b;
}

/* Staggered Reveal Motion Layer (>16 animated elements + reduced motion fallback) */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 460ms cubic-bezier(0.22, 1, 0.36, 1), transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .photo-frame--drift img {
    animation: none !important;
    transform: none !important;
  }
}

/* Tablet & Mobile Responsive Compositions */
@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }
  .primary-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }
  .chapter-head,
  [data-ui] .tool-split,
  .faq-band-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 6;
  }
  .col-12 {
    grid-column: span 12;
  }
  .gear-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gear-item,
  .gear-item:nth-child(2),
  .gear-item:nth-child(3) {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  :root {
    --pad-x: 18px;
    --gap: 14px;
    --step-display: clamp(2.05rem, 8.2vw, 2.65rem);
    --step-h2: clamp(1.48rem, 6.2vw, 1.95rem);
  }
  .col-12, .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 12;
  }
  [data-ui] .class-roster,
  [data-ui] .check-columns,
  .gear-mosaic {
    grid-template-columns: 1fr;
  }
  .band-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
  }
  [data-ui] .code-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  [data-ui].tool-shell {
    padding: 16px;
  }
  [data-ui] .ctrl-stack {
    gap: 10px;
  }
  [data-ui] .toggle-row {
    padding: 7px 10px;
  }
  [data-ui] .readout-box {
    padding: 8px 10px;
  }
  [data-ui] .plan-verdict {
    padding: 12px 14px;
  }
}
