:root {
  --bg: #f5f1e8;
  --bg-alt: #ece6d7;
  --surface: #fffdf7;
  --surface-strong: #fffaf0;
  --ink: #17212b;
  --ink-soft: #42515e;
  --line: #cdbfa7;
  --line-strong: #8d7c63;
  --navy: #17324d;
  --navy-deep: #0c2033;
  --teal: #2f6e73;
  --teal-soft: #d6ebea;
  --amber: #b36b1f;
  --amber-soft: #f5e1c5;
  --danger: #8a3d32;
  --danger-soft: #f6dfd8;
  --shadow: 0 18px 40px rgba(20, 28, 36, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --content-width: 1200px;
  --focus: 0 0 0 3px rgba(47, 110, 115, 0.28);
  --font-sans: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
  --theme-toggle-bg: rgba(255, 255, 255, 0.82);
  --theme-toggle-hover: rgba(238, 246, 247, 0.9);
  --theme-toggle-border: rgba(141, 124, 99, 0.28);
  --theme-toggle-text: var(--ink-soft);
  --theme-toggle-accent: var(--navy);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e151d;
  --bg-alt: #151e28;
  --surface: #18212b;
  --surface-strong: #1d2833;
  --ink: #edf2f8;
  --ink-soft: #b9c6d3;
  --line: #41505f;
  --line-strong: #7c8ea1;
  --navy: #90aec8;
  --navy-deep: #f2f6fb;
  --teal: #7fc7cc;
  --teal-soft: #14383a;
  --amber: #d6a04a;
  --amber-soft: #372a17;
  --danger: #e18f82;
  --danger-soft: #3a1f1d;
  --shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
  --focus: 0 0 0 3px rgba(127, 199, 204, 0.32);
  --theme-toggle-bg: rgba(255, 255, 255, 0.06);
  --theme-toggle-hover: rgba(255, 255, 255, 0.1);
  --theme-toggle-border: rgba(255, 255, 255, 0.14);
  --theme-toggle-text: #f6f8fc;
  --theme-toggle-accent: #dbe6f2;
}

/* ── Chapter accent colors and section canvas backgrounds ───────── */

[data-chapter="foundation"] {
  --chapter-accent: #4e5c6a;
  --chapter-accent-soft: rgba(78, 92, 106, 0.08);
  background: #e4e9ec;
}

[data-chapter="propane"] {
  --chapter-accent: #7c5c20;
  --chapter-accent-soft: rgba(124, 92, 32, 0.08);
  background: #ede3cf;
}

[data-chapter="natural-gas"] {
  --chapter-accent: #1e3f6a;
  --chapter-accent-soft: rgba(30, 63, 106, 0.08);
  background: #dce5f0;
}

[data-chapter="compare"] {
  --chapter-accent: #4a2f62;
  --chapter-accent-soft: rgba(74, 47, 98, 0.08);
  background: #e5dff0;
}

[data-chapter="troubleshooting"] {
  --chapter-accent: #6e2e22;
  --chapter-accent-soft: rgba(110, 46, 34, 0.08);
  background: #eddbd8;
}

[data-chapter="final-review"] {
  --chapter-accent: #2e5c3a;
  --chapter-accent-soft: rgba(46, 92, 58, 0.08);
  background: #dceae0;
}

html[data-theme="dark"] [data-chapter="foundation"] {
  --chapter-accent: #8fa0b0;
  --chapter-accent-soft: rgba(143, 160, 176, 0.10);
  background: #0c1620;
}

html[data-theme="dark"] [data-chapter="propane"] {
  --chapter-accent: #c49040;
  --chapter-accent-soft: rgba(196, 144, 64, 0.10);
  background: #181108;
}

html[data-theme="dark"] [data-chapter="natural-gas"] {
  --chapter-accent: #5080b8;
  --chapter-accent-soft: rgba(80, 128, 184, 0.10);
  background: #091322;
}

html[data-theme="dark"] [data-chapter="compare"] {
  --chapter-accent: #9068c0;
  --chapter-accent-soft: rgba(144, 104, 192, 0.10);
  background: #100d1e;
}

html[data-theme="dark"] [data-chapter="troubleshooting"] {
  --chapter-accent: #c46050;
  --chapter-accent-soft: rgba(196, 96, 80, 0.10);
  background: #1c0b09;
}

html[data-theme="dark"] [data-chapter="final-review"] {
  --chapter-accent: #60a870;
  --chapter-accent-soft: rgba(96, 168, 112, 0.10);
  background: #091510;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(179, 107, 31, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f3e9 0%, #f3eee5 44%, #f0eadf 100%);
  line-height: 1.6;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(214, 160, 74, 0.12), transparent 28%),
    linear-gradient(180deg, #111a23 0%, #0f171f 46%, #0c1319 100%);
}

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

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: rgba(247, 242, 233, 0.94);
}

.brand-shell,
.site-nav-shell,
.page-layout,
.site-footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

.brand-shell {
  padding: 1rem 0 0.9rem;
}

.page-layout {
  padding: 0 0 3rem;
}

.content {
  min-width: 0;
}

.site-nav-shell {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem 0 0.7rem;
  background: rgba(247, 242, 233, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(141, 124, 99, 0.22);
}

.site-nav-shell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.site-nav-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-deep);
}

.site-nav-shell .nav-toggle {
  flex: none;
  padding: 0.55rem 0.85rem;
  min-width: 4.5rem;
  border: 1px solid rgba(141, 124, 99, 0.3);
  background: rgba(255, 253, 247, 0.95);
  box-shadow: 0 8px 18px rgba(12, 32, 51, 0.08);
}

.toc-footer {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(141, 124, 99, 0.18);
}

.toc-theme-btn {
  width: 100%;
  appearance: none;
  background: var(--theme-toggle-bg);
  border: 1px solid var(--theme-toggle-border);
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-toggle-text);
  box-shadow: 0 8px 18px rgba(12, 32, 51, 0.08);
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.14s;
}

.toc-theme-btn:hover {
  background: var(--theme-toggle-hover);
  border-color: var(--theme-toggle-border);
  color: var(--theme-toggle-accent);
}

.toc-theme-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.toc-theme-btn__icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 15px;
}

.toc-theme-btn__icon svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
}

.toc-theme-btn .toc-theme-btn__icon--sun {
  display: none;
}

html[data-theme="dark"] .toc-theme-btn .toc-theme-btn__icon--moon {
  display: none;
}

html[data-theme="dark"] .toc-theme-btn .toc-theme-btn__icon--sun {
  display: inline-flex;
}

.toc-theme-btn__icon--moon {
  color: #f5c542;
}

.toc-theme-btn__icon--sun {
  color: #e8943a;
}

.site-nav-actions .toc-theme-btn {
  width: auto;
  min-width: 6.25rem;
  padding-inline: 0.8rem;
}

.eyebrow,
.kicker,
.section-kicker,
.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--teal);
  font-weight: 700;
}

.section-kicker {
  color: var(--chapter-accent, var(--teal));
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.site-header h1,
.section-heading h2,
.card h3,
.feature-card h3,
.interactive-heading h3,
.closing-panel h3 {
  line-height: 1.15;
}

.site-header h1 {
  margin: 0.25rem 0 0.2rem;
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  color: var(--navy-deep);
}

.subtitle {
  margin: 0;
  color: var(--ink-soft);
}

.nav-toggle {
  color: var(--navy-deep);
  border-radius: 999px;
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  display: block;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a[aria-current="location"] {
  background: rgba(47, 110, 115, 0.12);
  color: var(--navy-deep);
}

.sidebar {
  display: none;
}

.toc {
  background: var(--surface);
  border: 1px solid rgba(141, 124, 99, 0.22);
  border-radius: 14px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow);
}

.toc-title {
  margin-bottom: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(141, 124, 99, 0.18);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  margin: 0;
  counter-increment: toc;
  font-size: 0.88rem;
  line-height: 1.35;
}

.toc a {
  position: relative;
  display: block;
  padding: 0.45rem 0.6rem 0.45rem 2rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0.6rem;
  top: 0.48rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(61, 82, 121, 0.7);
}

.toc a:hover,
.toc a.is-active,
.toc a[aria-current="location"] {
  background: rgba(47, 110, 115, 0.1);
  color: var(--navy-deep);
  box-shadow: inset 3px 0 0 rgba(61, 82, 121, 0.9);
}

.toc a:hover::before,
.toc a.is-active::before,
.toc a[aria-current="location"]::before {
  color: var(--navy);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-nav-shell {
  background: rgba(13, 20, 27, 0.94);
}

html[data-theme="dark"] .site-nav-shell {
  border-bottom-color: rgba(124, 142, 161, 0.22);
}

html[data-theme="dark"] .site-nav-shell .nav-toggle {
  border-color: rgba(124, 142, 161, 0.28);
  background: rgba(24, 33, 43, 0.95);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color: var(--ink);
}

html[data-theme="dark"] .site-nav a:hover,
html[data-theme="dark"] .site-nav a.is-active,
html[data-theme="dark"] .site-nav a[aria-current="location"] {
  background: rgba(127, 199, 204, 0.16);
  color: var(--navy-deep);
}

html[data-theme="dark"] .toc a::before {
  color: rgba(185, 198, 211, 0.72);
}

html[data-theme="dark"] .toc a:hover,
html[data-theme="dark"] .toc a.is-active,
html[data-theme="dark"] .toc a[aria-current="location"] {
  background: rgba(127, 199, 204, 0.12);
  color: var(--navy-deep);
  box-shadow: inset 3px 0 0 rgba(144, 174, 200, 0.95);
}

.section {
  padding: 2.5rem 0;
  scroll-margin-top: 5.25rem;
}

.section + .section {
  border-top: 2px solid var(--chapter-accent);
}

.card,
.feature-card,
.interactive-block,
.closing-panel {
  background: var(--surface);
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: #fbf5e8;
  color: var(--navy-deep);
}

.button.secondary {
  border: 1px solid rgba(248, 251, 252, 0.4);
  color: #f8fbfc;
}

.compact-list {
  margin: 0;
  padding-left: 1.1rem;
}

.cards,
.foundation-grid,
.accordion-grid,
.takeaway-grid,
.review-grid {
  display: grid;
  gap: 1rem;
}

.accordion-grid {
  align-items: start;
}

.three-up {
  grid-template-columns: 1fr;
}

.two-up {
  grid-template-columns: 1fr;
}

.card,
.feature-card {
  padding: 1.35rem;
}

.card h3,
.feature-card h3 {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.25rem;
}

.card p:last-child,
.feature-card p:last-child {
  margin-bottom: 0;
}

.section-heading,
.section-subhead,
.interactive-heading,
.review-group h3 {
  max-width: 68ch;
}

.section-heading {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-heading::before {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--chapter-accent, var(--line-strong));
  margin-bottom: 0.65rem;
  border-radius: 2px;
}

.section-heading h2 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  color: var(--navy-deep);
}

.section-subhead {
  margin: 2rem 0 1rem;
}

.section-subhead h3,
.interactive-heading h3,
.review-group h3 {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
}

.pressure-callout {
  background: linear-gradient(160deg, var(--amber-soft), rgba(255, 250, 240, 0.9));
  border-color: rgba(179, 107, 31, 0.28);
}

.pressure-callout h3 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  max-width: 16ch;
}

.gauge-card {
  display: grid;
  gap: 1rem;
}

.gauge-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-group,
.filter-group,
.flow-controls,
.scenario-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.toggle,
.filter,
.flow-controls button,
.scenario-button {
  border: 1px solid var(--line);
  background: #fcf8ef;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  font-weight: 700;
}

.toggle.is-active,
.filter.is-active,
.scenario-button.is-active,
.flow-controls button:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.gauge-panel {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(47, 110, 115, 0.08);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tool-tags span,
.flow-step-meta span,
.flow-index,
.scenario-tag {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.08);
  color: var(--navy);
  font-size: 0.9rem;
}

.interactive-block {
  padding: 1.35rem;
  margin-top: 1.5rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 32rem;
}

th,
td {
  padding: 0.8rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(141, 124, 99, 0.22);
  vertical-align: top;
}

th {
  font-size: 0.9rem;
  color: var(--navy);
  background: rgba(23, 50, 77, 0.05);
}

.small-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.accordion-card {
  background: var(--surface);
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: clip;
  align-self: start;
}

.accordion-card summary {
  list-style: none;
  cursor: pointer;
  padding: 1.2rem 1.35rem;
  font-weight: 700;
  color: var(--navy-deep);
  position: relative;
}

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

.accordion-card summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 1rem;
  font-size: 1.4rem;
  color: var(--teal);
}

.accordion-card[open] summary::after {
  content: "-";
}

.accordion-body {
  padding: 0 1.35rem 1.2rem;
  border-top: 1px solid rgba(141, 124, 99, 0.16);
}

.flow-widget,
.scenario-widget,
.image-gallery-widget {
  display: grid;
  gap: 1rem;
}

.flow-shell,
.scenario-shell {
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(47, 110, 115, 0.07), rgba(255, 253, 247, 1));
  padding: 1.2rem;
}

.flow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.flow-header h4,
.scenario-panel h4 {
  margin: 0;
  font-size: 1.2rem;
}

.flow-progress {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.08);
  overflow: hidden;
}

.flow-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--teal));
}

.flow-step-card,
.scenario-panel {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid rgba(141, 124, 99, 0.24);
  padding: 1rem;
}

.flow-step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.flow-index {
  font-family: var(--font-mono);
  font-weight: 700;
}

.flow-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.flow-sequence-copy {
  display: grid;
  gap: 0.55rem;
}

.flow-sequence-copy p {
  margin: 0;
}

.sequence-list {
  margin: 0;
  padding-left: 1.1rem;
}

.scenario-shell {
  display: grid;
  gap: 1rem;
}

.gallery-shell {
  display: grid;
  gap: 1rem;
}

.gallery-stage,
.gallery-note {
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery-stage {
  padding: 1rem;
}

.gallery-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-stage-head h4 {
  margin: 0.3rem 0 0;
  font-size: 1.12rem;
}

.gallery-stage-actions {
  display: grid;
  gap: 0.7rem;
  justify-items: end;
}

.gallery-index {
  font-family: var(--font-mono);
  color: var(--navy);
  font-weight: 700;
}

.gallery-figure {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.gallery-image-wrap {
  position: relative;
}

.gallery-image-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fbfaf5;
  border: 1px solid rgba(141, 124, 99, 0.18);
}

.gallery-image {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-caption {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.gallery-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.label-pin,
.label-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
}

.label-pin {
  pointer-events: auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 50, 77, 0.35);
  background: rgba(23, 50, 77, 0.92);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.label-pin.is-active {
  background: var(--amber);
  border-color: var(--amber);
}

.label-bubble {
  display: none;
  margin-top: -2.25rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.96);
  border: 1px solid rgba(141, 124, 99, 0.3);
  color: var(--navy-deep);
  font-size: 0.88rem;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.label-bubble.is-active {
  display: block;
}

.gallery-notes {
  display: grid;
  gap: 1rem;
}

.gallery-note {
  padding: 1rem;
}

.gallery-note p {
  margin: 0.2rem 0 0;
}

.gallery-label-detail p:first-child {
  margin-top: 0.2rem;
}

.gallery-thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.2rem, 1fr));
  gap: 0.75rem;
}

.gallery-thumb {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem;
  border-radius: 14px;
  border: 1px solid rgba(141, 124, 99, 0.22);
  background: #fffaf3;
  color: var(--ink);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(141, 124, 99, 0.16);
  background: white;
}

.gallery-thumb span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
}

.gallery-thumb.is-active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(47, 110, 115, 0.25);
}

.scenario-buttons {
  align-items: flex-start;
}

.scenario-button {
  text-align: left;
}

.scenario-panel dl {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.scenario-panel dt {
  font-weight: 700;
  color: var(--navy);
}

.scenario-panel dd {
  margin: 0;
}

.comparison-wrap {
  margin-top: 1rem;
}

.comparison-table {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.comparison-table thead th {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.08)) 70%, var(--surface));
  color: var(--navy-deep);
  font-weight: 700;
}

.comparison-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.08)) 36%, transparent);
}

.comparison-table tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.08)) 16%, transparent);
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
  border-left: 1px solid color-mix(in srgb, var(--chapter-border, rgba(141, 124, 99, 0.22)) 72%, transparent);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  font-weight: 700;
  color: var(--navy-deep);
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.08)) 18%, transparent);
}

.comparison-table tbody tr {
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.comparison-table td {
  transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.comparison-table tr.is-muted {
  opacity: 0.38;
}

.comparison-table tr.is-highlighted {
  background: transparent;
}

.comparison-table tr.is-highlighted td {
  background: color-mix(in srgb, var(--chapter-accent) 24%, var(--chapter-card));
  color: var(--navy-deep);
  font-weight: 600;
}

.comparison-table tr.is-highlighted td:first-child {
  background: color-mix(in srgb, var(--chapter-accent) 44%, var(--chapter-card));
  box-shadow: inset 5px 0 0 var(--chapter-accent);
  color: var(--chapter-accent-deep);
}

.comparison-table tr.is-highlighted td:not(:first-child) {
  background: color-mix(in srgb, var(--chapter-accent) 20%, var(--chapter-card));
}

html[data-theme="dark"] .comparison-table thead th {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.16)) 58%, var(--surface));
  color: var(--ink);
}

html[data-theme="dark"] .comparison-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.16)) 28%, transparent);
}

html[data-theme="dark"] .comparison-table tbody tr:nth-child(odd) {
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.16)) 12%, transparent);
}

html[data-theme="dark"] .comparison-table th:not(:first-child),
html[data-theme="dark"] .comparison-table td:not(:first-child) {
  border-left-color: color-mix(in srgb, var(--chapter-border, rgba(141, 124, 99, 0.3)) 68%, transparent);
}

html[data-theme="dark"] .comparison-table th:first-child,
html[data-theme="dark"] .comparison-table td:first-child {
  color: var(--ink);
  background: color-mix(in srgb, var(--chapter-accent-soft, rgba(47, 110, 115, 0.16)) 18%, transparent);
}

html[data-theme="dark"] .comparison-table tr.is-muted {
  opacity: 0.45;
}

html[data-theme="dark"] .comparison-table tr.is-highlighted td {
  background: color-mix(in srgb, var(--chapter-accent) 22%, var(--chapter-card-strong));
  color: var(--ink);
  font-weight: 600;
}

html[data-theme="dark"] .comparison-table tr.is-highlighted td:first-child {
  background: color-mix(in srgb, var(--chapter-accent) 34%, var(--chapter-card-strong));
  box-shadow: inset 5px 0 0 var(--chapter-accent);
  color: var(--chapter-accent-deep);
}

html[data-theme="dark"] .comparison-table tr.is-highlighted td:not(:first-child) {
  background: color-mix(in srgb, var(--chapter-accent) 18%, var(--chapter-card-strong));
}

.takeaway-grid {
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}

.takeaway-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: linear-gradient(160deg, rgba(23, 50, 77, 0.94), rgba(12, 32, 51, 0.95));
  color: #f6f4ee;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.takeaway-card span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(245, 225, 197, 0.18);
  font-weight: 700;
}

.takeaway-card p {
  margin: 0;
}

.review-groups {
  display: grid;
  gap: 1.5rem;
}

.review-card {
  background: var(--surface);
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.review-card summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 700;
  color: var(--navy-deep);
}

.review-card p {
  padding: 0 1rem 1rem;
  margin: 0;
  color: var(--ink-soft);
}

.closing-panel {
  padding: 1.4rem;
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(179, 107, 31, 0.09), rgba(255, 253, 247, 1));
}

.site-footer {
  padding: 0 0 3rem;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0.2rem 0;
}

@media (min-width: 720px) {
  .three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-up,
  .foundation-grid,
  .accordion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-shell {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
  }

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

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

html[data-theme="dark"] .pressure-callout {
  background: linear-gradient(160deg, color-mix(in srgb, var(--amber-soft) 88%, transparent), rgba(24, 33, 43, 0.9));
  border-color: rgba(214, 160, 74, 0.32);
}

html[data-theme="dark"] .tool-tags span,
html[data-theme="dark"] .gauge-panel,
html[data-theme="dark"] .accordion-body,
html[data-theme="dark"] .review-card summary + * {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .toggle,
html[data-theme="dark"] .filter,
html[data-theme="dark"] .flow-controls button,
html[data-theme="dark"] .scenario-button {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .toggle.is-active,
html[data-theme="dark"] .filter.is-active,
html[data-theme="dark"] .scenario-button.is-active,
html[data-theme="dark"] .flow-controls button:hover {
  color: #09131a;
}

html[data-theme="dark"] .takeaway-card {
  background: linear-gradient(160deg, rgba(28, 41, 55, 0.96), rgba(15, 24, 33, 0.97));
  color: #eef4fb;
}

html[data-theme="dark"] .takeaway-card span {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .site-footer {
  background: linear-gradient(180deg, rgba(214, 160, 74, 0.05), rgba(12, 19, 25, 1));
}

@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }

  .site-nav-shell {
    gap: 0.5rem;
    padding: 0.5rem 0 0.8rem;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .site-nav a {
    padding: 0.62rem 0.9rem;
  }

  .foundation-grid {
    grid-template-columns: 0.92fr 1.08fr;
  }

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

@media (min-width: 980px) {
  .site-nav-shell {
    display: none;
  }

  .page-layout {
    width: min(calc(100% - 3rem), 1640px);
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }

  .sidebar {
    display: block;
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    min-height: 0;
  }

  .toc {
    max-height: 100%;
    overflow: auto;
  }

  .section {
    scroll-margin-top: 1.5rem;
  }
}

@media (max-width: 979px) {
  .site-nav-shell {
    width: min(calc(100% - 1rem), var(--content-width));
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ─── Visual Walkthrough ──────────────────────────────────────── */

.walkthrough-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.walkthrough-schematic-wrap {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  outline: none;
  cursor: zoom-in;
}

.walkthrough-schematic-wrap:focus-visible {
  box-shadow: 0 0 0 3px var(--teal);
}

body.editor-mode .walkthrough-schematic-wrap {
  cursor: default;
}

.walkthrough-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.walkthrough-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.walkthrough-snap-guide {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
}

.walkthrough-snap-guide--x {
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed rgba(47, 110, 115, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.walkthrough-snap-guide--y {
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(47, 110, 115, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.walkthrough-overlay {
  position: absolute;
  border-radius: 3px;
  transition: opacity 0.18s ease;
  transform-origin: center center;
}

.walkthrough-overlay--highlight {
  border: 2.5px solid var(--amber);
  background-color: color-mix(in srgb, var(--amber) 18%, transparent);
}

.walkthrough-overlay--fill {
  border: 2px solid #c084fc;
  background-color: color-mix(in srgb, #c084fc 22%, transparent);
}

.walkthrough-overlay--flow {
  border: 2.5px solid var(--teal);
  background-color: color-mix(in srgb, var(--teal) 20%, transparent);
}

.walkthrough-overlay--label,
.walkthrough-overlay--badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(23, 50, 77, 0.92);
  color: white;
  line-height: 1.2;
  text-align: center;
}

.walkthrough-overlay--badge {
  border-radius: 999px;
  background: rgba(179, 107, 31, 0.94);
}

.walkthrough-overlay__text {
  width: 100%;
  font-size: clamp(0.68rem, 1vw, 0.88rem);
  font-weight: 700;
}

.walkthrough-overlay--arrow {
  border: none;
  background: transparent;
  overflow: visible;
}

.walkthrough-overlay__arrow-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
  filter: drop-shadow(0 1px 1px rgba(12, 32, 51, 0.24));
}

.walkthrough-overlay__arrow-line,
.walkthrough-overlay__arrow-head {
  pointer-events: none;
}

.walkthrough-overlay__arrow-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.walkthrough-overlay__arrow-line--outline {
  stroke: rgba(255, 255, 255, 0.9);
  opacity: min(calc(var(--overlay-opacity, 1) + 0.08), 1);
}

.walkthrough-overlay__arrow-line--main {
  stroke: var(--overlay-stroke, var(--teal));
  opacity: var(--overlay-opacity, 1);
}

.walkthrough-overlay__arrow-head {
  vector-effect: non-scaling-stroke;
}

.walkthrough-overlay.overlay-note {
  background: rgba(12, 32, 51, 0.96);
}

.walkthrough-overlay.overlay-badge {
  background: rgba(179, 107, 31, 0.94);
}

body.editor-mode .walkthrough-overlay-layer {
  pointer-events: auto;
}

body.editor-mode .walkthrough-overlay {
  cursor: move;
}

.walkthrough-overlay.is-selected {
  box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(47, 110, 115, 0.72);
}

.overlay-handle {
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid white;
  border-radius: 999px;
  background: var(--teal);
  padding: 0;
  box-shadow: 0 0 0 2px rgba(12, 32, 51, 0.2);
}

.overlay-handle--nw {
  top: -0.45rem;
  left: -0.45rem;
  cursor: nwse-resize;
}

.overlay-handle--ne {
  top: -0.45rem;
  right: -0.45rem;
  cursor: nesw-resize;
}

.overlay-handle--n {
  top: -0.45rem;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.overlay-handle--e {
  right: -0.45rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.overlay-handle--sw {
  bottom: -0.45rem;
  left: -0.45rem;
  cursor: nesw-resize;
}

.overlay-handle--s {
  bottom: -0.45rem;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.overlay-handle--w {
  left: -0.45rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.overlay-handle--se {
  right: -0.45rem;
  bottom: -0.45rem;
  cursor: nwse-resize;
}

.overlay-handle--rotate {
  top: -1.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  background: var(--amber);
  cursor: grab;
}

.overlay-handle--rotate::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 0.7rem;
  background: rgba(23, 50, 77, 0.45);
  transform: translateX(-50%);
}

.walkthrough-overlay--arrow .overlay-handle--endpoint {
  width: 1rem;
  height: 1rem;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92), 0 0 0 4px rgba(12, 32, 51, 0.2);
}

.walkthrough-visual-nav {
  flex: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 5rem;
  min-height: 44px;
  padding: 0.7rem 0.5rem;
  border: 1px solid rgba(47, 110, 115, 0.22);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.76), rgba(244, 248, 249, 0.68));
  color: var(--navy-deep);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 16px rgba(12, 32, 51, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.walkthrough-visual-nav:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.9), rgba(238, 246, 247, 0.82));
  border-color: rgba(47, 110, 115, 0.38);
}

.walkthrough-visual-nav:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.walkthrough-visual-nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 250, 240, 0.9), 0 0 0 6px rgba(47, 110, 115, 0.55);
}

.walkthrough-visual-nav--prev:hover:not(:disabled) .walkthrough-visual-nav__chevron {
  transform: translateX(-2px);
}

.walkthrough-visual-nav--next:hover:not(:disabled) .walkthrough-visual-nav__chevron {
  transform: translateX(2px);
}

.walkthrough-visual-nav__chevron {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  transition: transform 0.15s ease;
}

.walkthrough-visual-nav__label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.walkthrough-visual-nav__count {
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--navy);
}

.walkthrough-nav-strip {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.walkthrough-progress-strip {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(47, 110, 115, 0.16);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(245, 249, 249, 0.96));
}

.walkthrough-progress-phase {
  display: grid;
  gap: 0.2rem;
}

.walkthrough-progress-phase__system,
.walkthrough-progress-phase__context,
.walkthrough-progress-phase__phase,
.walkthrough-progress-counter {
  font-family: var(--font-mono);
}

.walkthrough-progress-phase__system {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

.walkthrough-progress-phase__context {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.walkthrough-progress-phase__phase {
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
}

.walkthrough-progress-counter {
  font-size: 0.8rem;
  color: var(--ink);
  opacity: 0.72;
  white-space: nowrap;
}

.walkthrough-progress-segments {
  display: grid;
  grid-template-columns: repeat(var(--segment-count, 1), minmax(0, 1fr));
  gap: 0.32rem;
  min-width: 0;
}

.walkthrough-progress-segment {
  min-width: 0;
  min-height: 0.9rem;
  padding: 0;
  border: 1px solid rgba(141, 124, 99, 0.24);
  border-radius: 999px;
  background: rgba(12, 32, 51, 0.08);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.walkthrough-progress-segment:hover {
  border-color: rgba(47, 110, 115, 0.4);
  background: rgba(47, 110, 115, 0.16);
}

.walkthrough-progress-segment.is-complete {
  border-color: rgba(47, 110, 115, 0.38);
  background: rgba(47, 110, 115, 0.24);
}

.walkthrough-progress-segment.is-active {
  border-color: var(--teal);
  background: linear-gradient(90deg, rgba(47, 110, 115, 0.9), rgba(77, 153, 158, 0.94));
  transform: scaleY(1.08);
}

.walkthrough-progress-segment:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 250, 240, 0.9), 0 0 0 6px rgba(47, 110, 115, 0.38);
}

html[data-theme="dark"] .walkthrough-visual-nav {
  border-color: rgba(127, 199, 204, 0.2);
  background: linear-gradient(180deg, rgba(24, 33, 43, 0.88), rgba(18, 26, 35, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 22px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .walkthrough-visual-nav:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(28, 40, 53, 0.94), rgba(20, 30, 40, 0.9));
  border-color: rgba(127, 199, 204, 0.34);
}

html[data-theme="dark"] .walkthrough-visual-nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(14, 21, 29, 0.92), 0 0 0 6px rgba(127, 199, 204, 0.5);
}

html[data-theme="dark"] .walkthrough-progress-strip {
  border-color: rgba(127, 199, 204, 0.18);
  background: linear-gradient(180deg, rgba(24, 33, 43, 0.96), rgba(20, 29, 39, 0.96));
}

html[data-theme="dark"] .walkthrough-progress-segment {
  border-color: rgba(124, 142, 161, 0.26);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .walkthrough-progress-segment:hover {
  border-color: rgba(127, 199, 204, 0.42);
  background: rgba(127, 199, 204, 0.14);
}

html[data-theme="dark"] .walkthrough-progress-segment.is-complete {
  border-color: rgba(127, 199, 204, 0.3);
  background: rgba(127, 199, 204, 0.18);
}

html[data-theme="dark"] .walkthrough-progress-segment:focus-visible {
  box-shadow: 0 0 0 3px rgba(14, 21, 29, 0.92), 0 0 0 6px rgba(127, 199, 204, 0.38);
}

.walkthrough-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.walkthrough-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.walkthrough-step-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
  color: var(--ink);
}

.walkthrough-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.55;
  margin: 0 0 0.3rem;
}

.walkthrough-section {
  display: flex;
  flex-direction: column;
}

.walkthrough-notice-text,
.walkthrough-matters-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

.walkthrough-gap-notice {
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 10%, var(--surface));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink);
}

.walkthrough-pressure {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pressure-cascade-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pressure-cascade-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--shadow);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 5.5rem;
}

.pressure-cascade-component {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--ink);
  opacity: 0.65;
  text-align: center;
  line-height: 1.3;
}

.pressure-cascade-value {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--teal);
  text-align: center;
}

.pressure-cascade-arrow {
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.35;
  flex: none;
}

.overlay-editor-panel {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  width: min(28rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid rgba(141, 124, 99, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .overlay-editor-panel {
  border-color: rgba(124, 142, 161, 0.28);
  background: rgba(24, 33, 43, 0.98);
}

.overlay-editor-panel__header,
.overlay-editor-button-row,
.overlay-editor-grid {
  display: grid;
  gap: 0.75rem;
}

.overlay-editor-panel__header {
  grid-template-columns: 1fr auto auto;
  align-items: start;
}

.overlay-editor-panel__section + .overlay-editor-panel__section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(141, 124, 99, 0.25);
}

.overlay-editor-panel h3,
.overlay-editor-panel h4 {
  margin: 0;
}

.overlay-editor-dirty {
  align-self: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.08);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.overlay-editor-dirty[data-dirty="true"] {
  background: rgba(179, 107, 31, 0.16);
  color: var(--amber);
}

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

.overlay-style-swatch-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.overlay-style-swatch {
  display: grid;
  grid-template-columns: 1rem 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(141, 124, 99, 0.32);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 0.77rem;
  font-weight: 600;
}

.overlay-style-swatch.is-active {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 10%, #fff);
}

.overlay-style-swatch__chip {
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-radius: 999px;
}

.overlay-editor-panel label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.overlay-editor-panel input,
.overlay-editor-panel select,
.overlay-editor-panel textarea,
.overlay-editor-panel button {
  border: 1px solid rgba(141, 124, 99, 0.4);
  border-radius: 10px;
  background: white;
}

html[data-theme="dark"] .overlay-editor-panel input,
html[data-theme="dark"] .overlay-editor-panel select,
html[data-theme="dark"] .overlay-editor-panel textarea,
html[data-theme="dark"] .overlay-editor-panel button {
  border-color: rgba(124, 142, 161, 0.34);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

html[data-theme="dark"] .overlay-editor-panel__section + .overlay-editor-panel__section {
  border-top-color: rgba(124, 142, 161, 0.22);
}

html[data-theme="dark"] .overlay-editor-dirty[data-dirty="false"] {
  background: rgba(127, 199, 204, 0.12);
}

html[data-theme="dark"] .overlay-editor-dirty[data-dirty="true"] {
  background: rgba(214, 160, 74, 0.18);
}

.overlay-editor-panel input,
.overlay-editor-panel select,
.overlay-editor-panel textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
}

.overlay-editor-panel textarea {
  min-height: 12rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  resize: vertical;
}

.overlay-editor-button-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.overlay-editor-save-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

.overlay-editor-panel button,
.overlay-editor-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.6rem 0.8rem;
  color: var(--navy-deep);
  font-weight: 700;
  text-align: center;
}

.overlay-editor-snap-toggle[aria-pressed="true"] {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, #fff);
  color: var(--navy-deep);
}

html[data-theme="dark"] .overlay-editor-snap-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--teal) 24%, rgba(255, 255, 255, 0.06));
}

.overlay-editor-file {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.overlay-editor-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.overlay-editor-checkbox {
  align-content: end;
}

.overlay-editor-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
}

.overlay-editor-status {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(23, 50, 77, 0.06);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.overlay-editor-status[data-status-tone="success"],
.overlay-editor-status[data-status-tone="ready"] {
  background: rgba(47, 110, 115, 0.12);
  color: var(--navy-deep);
}

.overlay-editor-status[data-status-tone="warning"] {
  background: rgba(179, 107, 31, 0.14);
  color: var(--amber);
}

.overlay-editor-status[data-status-tone="working"] {
  background: rgba(23, 50, 77, 0.1);
  color: var(--navy);
}

.overlay-editor-inline-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.overlay-editor-step-fields {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.overlay-editor-step-fields textarea {
  min-height: 5rem;
}

.overlay-editor-field-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .overlay-editor-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }

  .overlay-editor-grid,
  .overlay-editor-button-row,
  .overlay-style-swatch-row {
    grid-template-columns: 1fr;
  }

  .walkthrough-progress-strip {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .walkthrough-progress-counter {
    justify-self: start;
  }
}

.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;
}

.schematic-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.schematic-lightbox[hidden] {
  display: none;
}

.schematic-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 28, 0.74);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.schematic-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
  width: min(96vw, 1240px);
  max-height: min(94vh, 980px);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 20px 48px rgba(8, 18, 28, 0.32);
}

html[data-theme="dark"] .schematic-lightbox__dialog {
  border-color: rgba(124, 142, 161, 0.24);
  background: rgba(18, 26, 35, 0.98);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
}

.schematic-lightbox__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.schematic-lightbox__heading {
  display: grid;
  gap: 0.2rem;
}

.schematic-lightbox__heading h3,
.schematic-lightbox__heading p {
  margin: 0;
}

.schematic-lightbox__step {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.schematic-lightbox__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.schematic-lightbox__toolbar button {
  min-height: 2.4rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(141, 124, 99, 0.32);
  border-radius: 10px;
  background: white;
  color: var(--navy-deep);
  font-weight: 700;
}

html[data-theme="dark"] .schematic-lightbox__toolbar button {
  border-color: rgba(124, 142, 161, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.schematic-lightbox__viewport {
  position: relative;
  min-height: 0;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: #0f1f2f;
  touch-action: none;
  outline: none;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.schematic-lightbox__viewport::-webkit-scrollbar {
  display: none;
}

.schematic-lightbox__viewport:active {
  cursor: grabbing;
}

.schematic-lightbox__viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 110, 115, 0.7);
}

.schematic-lightbox__stage {
  position: relative;
  /* width is set by JS to baseFitWidth * scale, driving the browser to re-rasterize
     the source image at progressively higher resolutions up to naturalWidth */
}

.schematic-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
}

.schematic-lightbox__overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.schematic-lightbox__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

@media (min-width: 820px) {
  .schematic-lightbox__viewport {
    min-height: 60vh;
  }
}

@media (max-width: 820px) {
  .schematic-lightbox {
    padding: 0.5rem;
  }

  .schematic-lightbox__dialog {
    width: min(98vw, 1240px);
    max-height: 96vh;
    padding: 0.8rem;
  }

  .schematic-lightbox__header {
    flex-direction: column;
  }

  .schematic-lightbox__toolbar {
    justify-content: flex-start;
  }

  .schematic-lightbox__toolbar button {
    min-height: 2.6rem;
  }

  .schematic-lightbox__viewport {
    min-height: 48vh;
  }
}

@media (min-width: 900px) {
  .walkthrough-panel-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 700px) {
  .walkthrough-progress-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .walkthrough-progress-phase {
    display: none;
  }
}

@media (max-width: 480px) {
  .walkthrough-visual-nav {
    min-width: 4rem;
    padding: 0.55rem 0.35rem;
  }

  .walkthrough-visual-nav__chevron {
    font-size: 1.5rem;
  }

  .walkthrough-visual-nav__label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  .walkthrough-visual-nav__count {
    font-size: 0.72rem;
  }

  .walkthrough-progress-strip {
    padding: 0.6rem 0.65rem;
    gap: 0.5rem;
  }
}

/* Approved chapter identity system overrides */

:root {
  --bg: #e8eaed;
  --bg-alt: #dfe4e8;
  --surface: #ffffff;
  --surface-strong: #f7f9fb;
  --ink: #1b2530;
  --ink-soft: #54616d;
  --line: #d3d9df;
  --line-strong: #98a4b0;
  --navy: #2f6042;
  --navy-deep: #1b2530;
  --shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 14px 28px rgba(16, 24, 32, 0.08);
  --focus: 0 0 0 3px rgba(47, 96, 66, 0.22);
  --theme-toggle-hover: rgba(229, 236, 241, 0.92);
  --theme-toggle-border: rgba(84, 97, 109, 0.18);
  --theme-toggle-accent: #2f6042;
}

html[data-theme="dark"] {
  --bg: #070b10;
  --bg-alt: #0f151c;
  --surface: #161d25;
  --surface-strong: #1c2530;
  --ink: #e8eef4;
  --ink-soft: #aab7c4;
  --line: #27313a;
  --line-strong: #52606d;
  --navy: #5fa975;
  --navy-deep: #f2f6fb;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.42), 0 18px 36px rgba(0, 0, 0, 0.38);
  --focus: 0 0 0 3px rgba(95, 169, 117, 0.28);
  --theme-toggle-hover: rgba(255, 255, 255, 0.08);
  --theme-toggle-border: rgba(255, 255, 255, 0.12);
  --theme-toggle-accent: #84c79a;
}

[data-nav-chapter="foundation"] {
  --nav-link-accent: #43566b;
  --nav-link-accent-deep: #2c3a49;
  --nav-link-soft: #dce4ea;
}

[data-nav-chapter="propane"] {
  --nav-link-accent: #876217;
  --nav-link-accent-deep: #5d420f;
  --nav-link-soft: #efe5cd;
}

[data-nav-chapter="natural-gas"] {
  --nav-link-accent: #205089;
  --nav-link-accent-deep: #143962;
  --nav-link-soft: #d9e3f2;
}

[data-nav-chapter="compare"] {
  --nav-link-accent: #573c77;
  --nav-link-accent-deep: #3b2855;
  --nav-link-soft: #e4daf1;
}

[data-nav-chapter="troubleshooting"] {
  --nav-link-accent: #8a3a28;
  --nav-link-accent-deep: #61281b;
  --nav-link-soft: #f0ddd4;
}

[data-nav-chapter="final-review"] {
  --nav-link-accent: #2f6042;
  --nav-link-accent-deep: #1f422d;
  --nav-link-soft: #d8e9de;
}

html[data-theme="dark"] [data-nav-chapter="foundation"] {
  --nav-link-accent: #8ba1b5;
  --nav-link-accent-deep: #d4e0ea;
  --nav-link-soft: #1c2a37;
}

html[data-theme="dark"] [data-nav-chapter="propane"] {
  --nav-link-accent: #cb9c4f;
  --nav-link-accent-deep: #f0d49d;
  --nav-link-soft: #241a0e;
}

html[data-theme="dark"] [data-nav-chapter="natural-gas"] {
  --nav-link-accent: #5f8fc4;
  --nav-link-accent-deep: #d2e3f8;
  --nav-link-soft: #122236;
}

html[data-theme="dark"] [data-nav-chapter="compare"] {
  --nav-link-accent: #9c77c6;
  --nav-link-accent-deep: #eadffd;
  --nav-link-soft: #1a1430;
}

html[data-theme="dark"] [data-nav-chapter="troubleshooting"] {
  --nav-link-accent: #cd7261;
  --nav-link-accent-deep: #ffd9cf;
  --nav-link-soft: #2a130d;
}

html[data-theme="dark"] [data-nav-chapter="final-review"] {
  --nav-link-accent: #5faa75;
  --nav-link-accent-deep: #d7f5e0;
  --nav-link-soft: #112016;
}

[data-chapter="foundation"] {
  --chapter-canvas: #e6eaee;
  --chapter-card: #f7f9fb;
  --chapter-card-strong: #ffffff;
  --chapter-border: #d0d9e1;
  --chapter-accent: #43566b;
  --chapter-accent-deep: #2c3a49;
  --chapter-accent-soft: #dce4ea;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

[data-chapter="propane"] {
  --chapter-canvas: #ece2cf;
  --chapter-card: #fdf9f1;
  --chapter-card-strong: #fffefa;
  --chapter-border: #dccfb4;
  --chapter-accent: #876217;
  --chapter-accent-deep: #5d420f;
  --chapter-accent-soft: #efe5cd;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

[data-chapter="natural-gas"] {
  --chapter-canvas: #dbe5f1;
  --chapter-card: #f5f8fd;
  --chapter-card-strong: #ffffff;
  --chapter-border: #c4d3e6;
  --chapter-accent: #205089;
  --chapter-accent-deep: #143962;
  --chapter-accent-soft: #d9e3f2;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

[data-chapter="compare"] {
  --chapter-canvas: #e6dff1;
  --chapter-card: #f9f6fd;
  --chapter-card-strong: #ffffff;
  --chapter-border: #d4c8e6;
  --chapter-accent: #573c77;
  --chapter-accent-deep: #3b2855;
  --chapter-accent-soft: #e4daf1;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

[data-chapter="troubleshooting"] {
  --chapter-canvas: #eedcd6;
  --chapter-card: #fdf6f2;
  --chapter-card-strong: #fffbf9;
  --chapter-border: #e1c6bd;
  --chapter-accent: #8a3a28;
  --chapter-accent-deep: #61281b;
  --chapter-accent-soft: #f0ddd4;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

[data-chapter="final-review"] {
  --chapter-canvas: #dce9e0;
  --chapter-card: #f4faf6;
  --chapter-card-strong: #ffffff;
  --chapter-border: #c4dacd;
  --chapter-accent: #2f6042;
  --chapter-accent-deep: #1f422d;
  --chapter-accent-soft: #d8e9de;
  --chapter-on-accent: #ffffff;
  background: var(--chapter-canvas);
}

html[data-theme="dark"] [data-chapter="foundation"] {
  --chapter-canvas: #0e1620;
  --chapter-card: #1a2531;
  --chapter-card-strong: #21303f;
  --chapter-border: #33424f;
  --chapter-accent: #8ba1b5;
  --chapter-accent-deep: #d8e4ee;
  --chapter-accent-soft: #1c2a37;
  --chapter-on-accent: #0c151d;
}

html[data-theme="dark"] [data-chapter="propane"] {
  --chapter-canvas: #17110a;
  --chapter-card: #241b10;
  --chapter-card-strong: #2f2415;
  --chapter-border: #473726;
  --chapter-accent: #cb9c4f;
  --chapter-accent-deep: #f0d49d;
  --chapter-accent-soft: #241a0e;
  --chapter-on-accent: #1a1206;
}

html[data-theme="dark"] [data-chapter="natural-gas"] {
  --chapter-canvas: #091523;
  --chapter-card: #142231;
  --chapter-card-strong: #1b2d40;
  --chapter-border: #2c3f56;
  --chapter-accent: #5f8fc4;
  --chapter-accent-deep: #d2e3f8;
  --chapter-accent-soft: #122236;
  --chapter-on-accent: #07101c;
}

html[data-theme="dark"] [data-chapter="compare"] {
  --chapter-canvas: #110d1d;
  --chapter-card: #1d1830;
  --chapter-card-strong: #261f3f;
  --chapter-border: #392f50;
  --chapter-accent: #9c77c6;
  --chapter-accent-deep: #eadffd;
  --chapter-accent-soft: #1a1430;
  --chapter-on-accent: #0d0820;
}

html[data-theme="dark"] [data-chapter="troubleshooting"] {
  --chapter-canvas: #1a0c08;
  --chapter-card: #281611;
  --chapter-card-strong: #341d16;
  --chapter-border: #4a2c22;
  --chapter-accent: #cd7261;
  --chapter-accent-deep: #ffd9cf;
  --chapter-accent-soft: #2a130d;
  --chapter-on-accent: #1d0a06;
}

html[data-theme="dark"] [data-chapter="final-review"] {
  --chapter-canvas: #091610;
  --chapter-card: #14221a;
  --chapter-card-strong: #1b2e22;
  --chapter-border: #2a4232;
  --chapter-accent: #5faa75;
  --chapter-accent-deep: #d7f5e0;
  --chapter-accent-soft: #112016;
  --chapter-on-accent: #07140d;
}

body {
  background:
    radial-gradient(circle at top right, rgba(95, 169, 117, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(95, 169, 117, 0.1), transparent 24%),
    linear-gradient(180deg, #070b10 0%, #0d1319 100%);
}

.site-header {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.site-nav-shell {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom-color: rgba(84, 97, 109, 0.14);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-nav-shell {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.site-nav-label,
.toc-title,
.eyebrow {
  color: var(--navy);
}

.toc,
.site-nav-shell .nav-toggle {
  border-color: rgba(84, 97, 109, 0.16);
}

.site-nav a,
.toc a {
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a[aria-current="location"] {
  background: var(--nav-link-soft, rgba(47, 96, 66, 0.1));
  border-color: color-mix(in srgb, var(--nav-link-accent, var(--navy)) 18%, transparent);
  color: var(--nav-link-accent-deep, var(--navy-deep));
}

.toc a::before {
  color: color-mix(in srgb, var(--nav-link-accent, var(--ink-soft)) 66%, transparent);
}

.toc a:hover,
.toc a.is-active,
.toc a[aria-current="location"] {
  background: var(--nav-link-soft, rgba(47, 96, 66, 0.1));
  color: var(--nav-link-accent-deep, var(--navy-deep));
  box-shadow: inset 3px 0 0 var(--nav-link-accent, var(--navy));
  border-color: color-mix(in srgb, var(--nav-link-accent, var(--navy)) 18%, transparent);
}

.toc a:hover::before,
.toc a.is-active::before,
.toc a[aria-current="location"]::before {
  color: var(--nav-link-accent, var(--navy));
}

html[data-theme="dark"] .site-nav a:hover,
html[data-theme="dark"] .site-nav a.is-active,
html[data-theme="dark"] .site-nav a[aria-current="location"] {
  background: var(--nav-link-soft, rgba(95, 169, 117, 0.12));
  color: var(--nav-link-accent-deep, var(--navy-deep));
}

html[data-theme="dark"] .toc a:hover,
html[data-theme="dark"] .toc a.is-active,
html[data-theme="dark"] .toc a[aria-current="location"] {
  background: var(--nav-link-soft, rgba(95, 169, 117, 0.12));
  color: var(--nav-link-accent-deep, var(--navy-deep));
  box-shadow: inset 3px 0 0 var(--nav-link-accent, var(--navy));
}

.content {
  display: grid;
  gap: 1.3rem;
}

.section {
  position: relative;
  margin: 0;
  padding: 0 1.6rem 2.1rem 2.1rem;
  overflow: hidden;
  scroll-margin-top: 6rem;
  border: 1px solid var(--chapter-border);
  border-left: 6px solid var(--chapter-accent);
  border-radius: 0 28px 28px 0;
  background: var(--chapter-canvas);
  box-shadow: var(--shadow);
  --surface: var(--chapter-card);
  --surface-strong: var(--chapter-card-strong);
  --line: var(--chapter-border);
  --line-strong: var(--chapter-accent);
  --navy: var(--chapter-accent);
  --navy-deep: var(--chapter-accent-deep);
  --focus: 0 0 0 3px color-mix(in srgb, var(--chapter-accent) 24%, transparent);
}

.section + .section {
  border-top: 1px solid var(--chapter-border);
}

.section + .section::before {
  content: "";
  position: absolute;
  left: 2.1rem;
  right: 1.6rem;
  top: -0.95rem;
  height: 1.05rem;
  border-top: 1px solid color-mix(in srgb, var(--chapter-accent) 24%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chapter-accent-soft) 70%, transparent), transparent 84%);
  pointer-events: none;
}

.section-heading,
.section-subhead,
.interactive-heading,
.review-group h3 {
  max-width: none;
}

.section-heading {
  position: relative;
  margin-bottom: 1.45rem;
  padding: 1.9rem 0 1.2rem;
  border-bottom: 1px solid var(--chapter-border);
  overflow: hidden;
}

.section-heading::before {
  display: none;
}

.section-heading::after {
  content: attr(data-chapter-number);
  position: absolute;
  right: -0.15rem;
  top: 0.15rem;
  font-size: clamp(4.5rem, 10vw, 6.2rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--chapter-accent);
  opacity: 0.14;
  pointer-events: none;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--chapter-accent-deep);
  position: relative;
  z-index: 1;
}

.section-kicker::before {
  content: "";
  width: 1.4rem;
  height: 2px;
  border-radius: 999px;
  background: var(--chapter-accent);
}

.section-heading h2 {
  position: relative;
  z-index: 1;
  margin: 0.35rem 0 0.7rem;
  max-width: 14ch;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-heading p,
.section-subhead p,
.interactive-heading p {
  position: relative;
  z-index: 1;
  max-width: 58ch;
}

.section-subhead h3,
.interactive-heading h3,
.review-group h3 {
  color: var(--chapter-accent-deep);
  letter-spacing: -0.01em;
}

.card-label {
  color: var(--chapter-accent-deep, var(--navy));
}

.section .card,
.section .feature-card,
.section .interactive-block,
.section .closing-panel,
.section .review-card,
.section .accordion-card,
.section .flow-shell,
.section .scenario-shell,
.section .gallery-stage,
.section .gallery-note {
  border-color: var(--chapter-border);
}

.section .card,
.section .interactive-block,
.section .closing-panel,
.section .review-card,
.section .flow-shell,
.section .scenario-shell,
.section .gallery-stage,
.section .gallery-note {
  background: var(--chapter-card);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 24px rgba(16, 24, 32, 0.1);
}

.section .feature-card {
  background: var(--chapter-card-strong);
  border-top: 3px solid var(--chapter-accent);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 14px 30px rgba(16, 24, 32, 0.13);
}

.section .pressure-callout,
.section .closing-panel {
  background: var(--chapter-accent-soft);
  border-left: 4px solid var(--chapter-accent);
  border-top-width: 1px;
}

.section .pressure-callout h3,
.section .closing-panel h3 {
  color: var(--chapter-accent-deep);
}

.section .gauge-panel,
.section .walkthrough-gap-notice {
  background: color-mix(in srgb, var(--chapter-accent-soft) 78%, var(--chapter-card-strong));
}

.section .tool-tags span,
.section .flow-step-meta span,
.section .flow-index,
.section .scenario-tag {
  background: var(--chapter-accent-soft);
  color: var(--chapter-accent-deep);
}

.section th {
  color: var(--chapter-accent-deep);
  background: color-mix(in srgb, var(--chapter-accent) 9%, var(--chapter-card));
}

.section .toggle,
.section .filter,
.section .flow-controls button,
.section .scenario-button,
.section .walkthrough-sheet-tab {
  border: 1px solid var(--chapter-border);
  background: var(--chapter-card);
  color: var(--ink-soft);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.section .toggle:hover,
.section .filter:hover,
.section .flow-controls button:hover,
.section .scenario-button:hover {
  background: var(--chapter-accent-soft);
  border-color: var(--chapter-accent);
  color: var(--chapter-accent-deep);
}

.section .toggle.is-active,
.section .filter.is-active,
.section .scenario-button.is-active,
.section .flow-controls button:hover {
  background: var(--chapter-accent);
  border-color: var(--chapter-accent);
  color: var(--chapter-on-accent);
}

.section .toggle.is-active:hover,
.section .filter.is-active:hover,
.section .scenario-button.is-active:hover {
  color: var(--chapter-on-accent);
}

.toc-theme-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.section .accordion-card {
  border-left: 3px solid var(--chapter-accent);
  border-radius: 14px;
  background: var(--chapter-card);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 24px rgba(16, 24, 32, 0.1);
}

.section .accordion-card summary {
  color: var(--chapter-accent-deep);
}

.section .accordion-card summary::after {
  content: "";
  right: 1.3rem;
  top: 1.22rem;
  width: 0.72rem;
  height: 0.72rem;
  border-right: 2px solid var(--chapter-accent);
  border-bottom: 2px solid var(--chapter-accent);
  transform: rotate(45deg);
}

.section .accordion-card[open] summary {
  background: var(--chapter-accent-soft);
}

.section .accordion-card[open] summary::after {
  top: 1.45rem;
  transform: rotate(225deg);
}

.section .accordion-body {
  border-top: 1px solid var(--chapter-border);
  background: color-mix(in srgb, var(--chapter-card-strong) 84%, var(--chapter-accent-soft));
}

.section .takeaway-card {
  background: var(--chapter-card);
  color: var(--ink);
  border: 1px solid var(--chapter-border);
  border-top: 3px solid var(--chapter-accent);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 24px rgba(16, 24, 32, 0.1);
}

.section .takeaway-card span {
  background: var(--chapter-accent-soft);
  color: var(--chapter-accent-deep);
}

.section .review-card {
  background: var(--chapter-card);
}

.section .review-card summary {
  color: var(--chapter-accent-deep);
}

.section .review-card[open] summary {
  background: var(--chapter-accent-soft);
}

.section .scenario-button {
  background: var(--chapter-card-strong);
}

.section .walkthrough-shell {
  display: grid;
  gap: 1rem;
}

.section .walkthrough-schematic-wrap {
  border: 1px solid var(--chapter-border);
  border-radius: 16px;
  background: var(--chapter-card-strong);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 24px rgba(16, 24, 32, 0.1);
}

.section .walkthrough-schematic-wrap:focus-visible,
.section .walkthrough-visual-nav:focus-visible,
.section .walkthrough-progress-segment:focus-visible,
.section .toggle:focus-visible,
.section .filter:focus-visible,
.section .flow-controls button:focus-visible,
.section .scenario-button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chapter-card-strong) 80%, transparent), 0 0 0 6px color-mix(in srgb, var(--chapter-accent) 34%, transparent);
}

.section .walkthrough-visual-nav {
  border: 1px solid var(--chapter-accent);
  background: var(--chapter-card);
  color: var(--chapter-accent-deep);
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05), 0 10px 22px rgba(16, 24, 32, 0.1);
}

.section .walkthrough-visual-nav:hover:not(:disabled) {
  background: var(--chapter-accent-soft);
  border-color: var(--chapter-accent);
}

.section .walkthrough-visual-nav--next {
  background: var(--chapter-accent);
  color: var(--chapter-on-accent);
}

.section .walkthrough-visual-nav--next:hover:not(:disabled) {
  background: color-mix(in srgb, var(--chapter-accent) 88%, black);
}

.section .walkthrough-visual-nav__chevron {
  color: var(--chapter-accent);
}

.section .walkthrough-visual-nav__label,
.section .walkthrough-visual-nav__count {
  color: currentColor;
  opacity: 0.78;
}

.section .walkthrough-visual-nav--next .walkthrough-visual-nav__chevron,
.section .walkthrough-visual-nav--next .walkthrough-visual-nav__label,
.section .walkthrough-visual-nav--next .walkthrough-visual-nav__count {
  color: var(--chapter-on-accent);
  opacity: 1;
}

.section .walkthrough-progress-strip {
  border: 1px solid var(--chapter-border);
  background: var(--chapter-card);
}

.section .walkthrough-progress-phase__system,
.section .walkthrough-progress-phase__phase {
  color: var(--chapter-accent-deep);
}

.section .walkthrough-progress-segment {
  border-color: var(--chapter-border);
  background: var(--chapter-accent-soft);
}

.section .walkthrough-progress-segment:hover {
  border-color: var(--chapter-accent);
  background: color-mix(in srgb, var(--chapter-accent) 22%, var(--chapter-accent-soft));
}

.section .walkthrough-progress-segment.is-complete {
  border-color: color-mix(in srgb, var(--chapter-accent) 40%, transparent);
  background: color-mix(in srgb, var(--chapter-accent) 36%, var(--chapter-accent-soft));
}

.section .walkthrough-progress-segment.is-active {
  border-color: var(--chapter-accent);
  background: var(--chapter-accent);
}

.section .walkthrough-overlay--highlight {
  border-color: var(--overlay-stroke, var(--chapter-accent));
  background-color: var(--overlay-fill, color-mix(in srgb, var(--chapter-accent) 16%, transparent));
}

.section .walkthrough-overlay--fill {
  border-color: var(--overlay-stroke, color-mix(in srgb, var(--chapter-accent) 75%, white));
  background-color: var(--overlay-fill, color-mix(in srgb, var(--chapter-accent) 12%, transparent));
}

.section .walkthrough-overlay--flow {
  border-color: var(--overlay-stroke, var(--chapter-accent-deep));
  background-color: color-mix(in srgb, var(--chapter-accent) 10%, transparent);
}

.section .walkthrough-overlay--label,
.section .walkthrough-overlay--badge {
  background: var(--chapter-accent-deep);
}

.section .walkthrough-overlay.overlay-badge {
  background: var(--chapter-accent);
}

.section .walkthrough-label {
  color: var(--chapter-accent-deep);
  opacity: 0.8;
}

.section .walkthrough-gap-notice {
  border-left-color: var(--chapter-accent);
}

.section .pressure-cascade-value {
  color: var(--chapter-accent);
}

html[data-theme="dark"] .section .walkthrough-visual-nav {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.38), 0 12px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .section .walkthrough-visual-nav:hover:not(:disabled) {
  background: color-mix(in srgb, var(--chapter-accent-soft) 88%, var(--chapter-card));
}

html[data-theme="dark"] .section .walkthrough-progress-strip,
html[data-theme="dark"] .section .walkthrough-schematic-wrap {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .section .card,
html[data-theme="dark"] .section .interactive-block,
html[data-theme="dark"] .section .closing-panel,
html[data-theme="dark"] .section .review-card,
html[data-theme="dark"] .section .accordion-card,
html[data-theme="dark"] .section .takeaway-card,
html[data-theme="dark"] .section .flow-shell,
html[data-theme="dark"] .section .scenario-shell,
html[data-theme="dark"] .section .gallery-stage,
html[data-theme="dark"] .section .gallery-note {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.38), 0 12px 28px rgba(0, 0, 0, 0.28);
}

@media (max-width: 900px) {
  .content {
    gap: 1rem;
  }

  .section {
    padding: 0 1.15rem 1.65rem 1.45rem;
    border-radius: 0 22px 22px 0;
  }

  .section + .section::before {
    left: 1.45rem;
    right: 1.15rem;
  }

  .section-heading::after {
    right: -0.1rem;
    font-size: clamp(3.7rem, 16vw, 5rem);
  }
}

@media (max-width: 700px) {
  .section-heading h2 {
    max-width: 11ch;
  }
}

@media (max-width: 540px) {
  .section {
    padding: 0 1rem 1.4rem 1.2rem;
    border-left-width: 5px;
  }

  .section + .section::before {
    left: 1.2rem;
    right: 1rem;
  }

  .section-heading {
    padding-top: 1.5rem;
  }

  .section-heading::after {
    top: 0.35rem;
    right: 0.1rem;
    font-size: 3.6rem;
  }

  .section .walkthrough-nav-strip {
    gap: 0.5rem;
  }
}

/* Walkthrough Workbench */

.walkthrough.walkthrough-shell {
  --walkthrough-pad: clamp(0.95rem, 1.6vw, 1.35rem);
  position: relative;
  display: block;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--chapter-border);
  border-radius: 16px;
  background: var(--chapter-card);
  box-shadow: 0 14px 30px rgba(16, 24, 32, 0.12);
  color: var(--chapter-accent-deep);
}

.walkthrough.walkthrough-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--chapter-accent);
  z-index: 4;
}

.walkthrough.walkthrough-shell .walkthrough__head,
.walkthrough.walkthrough-shell .walkthrough__stage,
.walkthrough.walkthrough-shell .walkthrough__controls,
.walkthrough.walkthrough-shell .walkthrough__content {
  padding-left: calc(var(--walkthrough-pad) + 0.3rem);
  padding-right: var(--walkthrough-pad);
}

.walkthrough.walkthrough-shell .walkthrough__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-top: var(--walkthrough-pad);
  padding-bottom: calc(var(--walkthrough-pad) - 0.2rem);
  border-bottom: 1px solid var(--chapter-border);
}

.walkthrough.walkthrough-shell .walkthrough__identity {
  min-width: 0;
}

.walkthrough.walkthrough-shell .walkthrough__eyebrow {
  margin: 0 0 0.28rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chapter-accent-deep);
}

.walkthrough.walkthrough-shell .walkthrough__tick {
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: var(--chapter-accent);
}

.walkthrough.walkthrough-shell .walkthrough__title {
  margin: 0;
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--chapter-accent-deep);
}

.walkthrough.walkthrough-shell .walkthrough__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  flex: none;
}

.walkthrough.walkthrough-shell .walkthrough__sheet-tabs {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: var(--chapter-accent-soft);
}

.walkthrough.walkthrough-shell .walkthrough__sheet-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--chapter-accent-deep);
}

.walkthrough.walkthrough-shell .walkthrough__sheet-tab.is-active {
  background: var(--chapter-accent);
  color: var(--chapter-on-accent);
}

.walkthrough.walkthrough-shell .walkthrough__counter {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--chapter-accent-deep);
  white-space: nowrap;
}

.walkthrough.walkthrough-shell .walkthrough__counter b {
  font-size: 1.35rem;
  font-weight: 700;
}

.walkthrough.walkthrough-shell .walkthrough__counter span {
  margin-left: 0.15rem;
  font-size: 0.92rem;
  opacity: 0.6;
}

.walkthrough.walkthrough-shell .walkthrough__stage {
  padding-top: var(--walkthrough-pad);
  padding-bottom: var(--walkthrough-pad);
}

.walkthrough.walkthrough-shell .walkthrough__screen {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--chapter-border);
  border-radius: 12px;
  background: var(--chapter-card-strong);
}

.walkthrough.walkthrough-shell .walkthrough-schematic-wrap {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.walkthrough.walkthrough-shell .walkthrough-schematic-wrap:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chapter-card-strong) 82%, transparent), 0 0 0 6px color-mix(in srgb, var(--chapter-accent) 34%, transparent);
}

body.editor-mode .walkthrough.walkthrough-shell .walkthrough-schematic-wrap {
  cursor: default;
}

.walkthrough.walkthrough-shell .walkthrough-img {
  border-radius: 0;
}

.walkthrough.walkthrough-shell .walkthrough__controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
  padding-top: var(--walkthrough-pad);
  padding-bottom: var(--walkthrough-pad);
  border-top: 1px solid var(--chapter-border);
  background: color-mix(in srgb, var(--chapter-accent-soft) 55%, var(--chapter-card));
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  min-width: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--chapter-accent);
  border-radius: 11px;
  background: var(--chapter-card);
  color: var(--chapter-accent-deep);
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav:hover:not(:disabled) {
  background: var(--chapter-accent-soft);
  border-color: var(--chapter-accent);
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav:disabled {
  opacity: 0.4;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav:focus-visible,
.walkthrough.walkthrough-shell .walkthrough-progress-segment:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chapter-card-strong) 80%, transparent), 0 0 0 6px color-mix(in srgb, var(--chapter-accent) 34%, transparent);
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav--next {
  background: var(--chapter-accent);
  color: var(--chapter-on-accent);
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav--next:hover:not(:disabled) {
  background: color-mix(in srgb, var(--chapter-accent) 88%, black);
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav__chevron {
  font-size: 1.3rem;
  font-weight: 700;
  color: currentColor;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav__stack {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1.05;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav__stack--next {
  text-align: right;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav__label {
  font-size: 0.62rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.8;
}

.walkthrough.walkthrough-shell .walkthrough-visual-nav__count {
  font-size: 0.86rem;
  font-family: var(--font-mono);
  color: currentColor;
}

.walkthrough.walkthrough-shell .walkthrough-progress-strip {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.walkthrough.walkthrough-shell .walkthrough__progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chapter-accent-deep);
  opacity: 0.85;
}

.walkthrough.walkthrough-shell .walkthrough-progress-counter {
  font-size: 0.66rem;
  font-family: var(--font-mono);
  color: var(--chapter-accent-deep);
  white-space: nowrap;
}

.walkthrough.walkthrough-shell .walkthrough-progress-segments {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.22rem;
  align-items: center;
  padding-block: 0.16rem;
  isolation: isolate;
}

.walkthrough.walkthrough-shell .walkthrough-progress-segments::before,
.walkthrough.walkthrough-shell .walkthrough-progress-segments::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 0.28rem;
  transform: translateY(-50%);
  border-radius: 999px;
  pointer-events: none;
}

.walkthrough.walkthrough-shell .walkthrough-progress-segments::before {
  background: color-mix(in srgb, var(--chapter-border) 52%, transparent);
}

.walkthrough.walkthrough-shell .walkthrough-progress-segments::after {
  width: var(--walkthrough-progress-fill, 0%);
  inset-inline-end: auto;
  background: linear-gradient(90deg, color-mix(in srgb, var(--chapter-accent-soft) 18%, var(--chapter-accent)) 0%, var(--chapter-accent) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chapter-accent) 32%, transparent);
}

.walkthrough.walkthrough-shell .walkthrough-progress-segment {
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 0.5rem;
  padding: 0;
  border: 1px solid var(--chapter-border);
  border-radius: 999px;
  background: var(--chapter-accent-soft);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, height 0.15s ease;
}

.walkthrough.walkthrough-shell .walkthrough-progress-segment:hover {
  border-color: var(--chapter-accent);
  background: color-mix(in srgb, var(--chapter-accent) 30%, var(--chapter-accent-soft));
}

.walkthrough.walkthrough-shell .walkthrough-progress-segment.is-complete {
  border-color: transparent;
  background: color-mix(in srgb, var(--chapter-accent) 45%, transparent);
}

.walkthrough.walkthrough-shell .walkthrough-progress-segment.is-active {
  height: 0.66rem;
  border-color: var(--chapter-accent);
  background: var(--chapter-accent);
}

html[data-theme="dark"] .walkthrough.walkthrough-shell .walkthrough-progress-segments::before {
  background: color-mix(in srgb, var(--chapter-border) 64%, rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .walkthrough.walkthrough-shell .walkthrough-progress-segments::after {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--chapter-accent) 42%, transparent);
}

.walkthrough.walkthrough-shell .walkthrough__content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: var(--walkthrough-pad);
  padding-bottom: var(--walkthrough-pad);
  border-top: 1px solid var(--chapter-border);
  background: var(--chapter-card-strong);
}

.walkthrough.walkthrough-shell .walkthrough-panel-body.walkthrough__content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.walkthrough.walkthrough-shell .walkthrough-section {
  display: flex;
  flex-direction: column;
}

.walkthrough.walkthrough-shell .walkthrough-label {
  margin: 0 0 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--chapter-accent-deep);
  opacity: 1;
}

.walkthrough.walkthrough-shell .walkthrough-label::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--chapter-accent);
}

.walkthrough.walkthrough-shell .walkthrough-notice-text,
.walkthrough.walkthrough-shell .walkthrough-matters-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--chapter-accent-deep) 78%, #888888);
}

html[data-theme="dark"] .walkthrough.walkthrough-shell {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .walkthrough.walkthrough-shell .walkthrough-notice-text,
html[data-theme="dark"] .walkthrough.walkthrough-shell .walkthrough-matters-text {
  color: color-mix(in srgb, var(--chapter-accent-deep) 70%, #cfd8e0);
}

@media (max-width: 680px) {
  .walkthrough.walkthrough-shell .walkthrough__controls {
    grid-template-columns: 1fr 1fr;
  }

  .walkthrough.walkthrough-shell .walkthrough__progress {
    grid-column: 1 / -1;
    order: -1;
  }

  .walkthrough.walkthrough-shell .walkthrough-visual-nav--next {
    justify-self: end;
  }

  .walkthrough.walkthrough-shell .walkthrough__content {
    gap: 0.75rem;
  }

  .walkthrough.walkthrough-shell .walkthrough-panel-body.walkthrough__content-grid {
    grid-template-columns: 1fr;
  }

  .walkthrough.walkthrough-shell .walkthrough__head {
    flex-direction: column;
  }

  .walkthrough.walkthrough-shell .walkthrough__meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
}
