:root {
  color-scheme: dark;
  --ink: #f7f1e4;
  --muted: #c9c0ad;
  --paper: #fff6e3;
  --paper-ink: #26231f;
  --charcoal: #151615;
  --charcoal-2: #20231f;
  --olive: #707858;
  --olive-dark: #3d4935;
  --red: #c44832;
  --amber: #e1a941;
  --steel: #899196;
  --line: rgba(247, 241, 228, 0.18);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#top,
section[id] {
  scroll-margin-top: 118px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--charcoal);
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--ink);
  background: rgba(21, 22, 21, 0.76);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(21, 22, 21, 0.92);
}

.wip-banner {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(12px, 2.5vw, 28px);
  align-items: center;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--paper-ink);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(38, 35, 31, 0.12) 0,
      rgba(38, 35, 31, 0.12) 12px,
      transparent 12px,
      transparent 24px
    ),
    var(--amber);
  border-block: 3px solid var(--paper-ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.wip-banner strong {
  display: block;
  padding: 5px 10px;
  color: var(--paper);
  background: var(--paper-ink);
  font-size: clamp(1.15rem, 3vw, 2.15rem);
  font-weight: 1000;
  line-height: 0.95;
  text-transform: uppercase;
}

.wip-banner p {
  max-width: 980px;
  margin: 0;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 800;
  line-height: 1.35;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  color: var(--charcoal);
  background: var(--amber);
  border: 2px solid var(--ink);
  border-radius: 5px;
  font-weight: 900;
}

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

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2.5vw, 28px);
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a {
  text-decoration: none;
}

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

.hero {
  position: relative;
  min-height: min(690px, calc(100svh - 118px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(44px, 7vw, 92px) clamp(18px, 5vw, 70px) clamp(12px, 2vw, 20px);
}

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -3;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(12, 13, 12, 0.96) 0%, rgba(12, 13, 12, 0.78) 38%, rgba(12, 13, 12, 0.2) 82%),
    linear-gradient(0deg, rgba(12, 13, 12, 0.92) 0%, transparent 42%);
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(2.9rem, 6.4vw, 5.45rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  color: var(--charcoal);
  background: var(--amber);
  border-color: var(--amber);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.intro-band,
.systems-band,
.schematic-band,
.workbench,
.guide-shell {
  padding: clamp(58px, 8vw, 108px) clamp(18px, 5vw, 70px);
}

.intro-band {
  padding-top: clamp(12px, 2vw, 22px);
}

.section-heading {
  max-width: 800px;
  margin-bottom: 30px;
}

.section-heading h2,
.guide-sidebar h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-heading p:last-child,
.guide-sidebar p {
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid,
.workbench-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-grid {
  grid-template-columns: minmax(280px, 520px);
}

.feature-card,
.snippet,
.module-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.module-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 169, 65, 0.65);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
}

.module-card.is-upcoming:hover {
  transform: none;
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.module-card.featured {
  background:
    linear-gradient(180deg, rgba(196, 72, 50, 0.22), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.module-kicker,
.module-status {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card h3 {
  margin: 18px 0 10px;
  font-size: 1.28rem;
  line-height: 1.12;
}

.module-card p {
  color: var(--muted);
  line-height: 1.58;
}

.module-status {
  margin-top: auto;
  color: var(--ink);
}

.feature-number {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--red);
  font-weight: 900;
}

.feature-card h3,
.snippet h3 {
  margin-bottom: 10px;
  font-size: 1.22rem;
}

.feature-card p,
.snippet p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.guide-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.36fr) minmax(0, 0.64fr);
  gap: clamp(24px, 5vw, 70px);
  background:
    linear-gradient(135deg, rgba(112, 120, 88, 0.2), transparent 36%),
    var(--charcoal-2);
  border-block: 1px solid var(--line);
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.progress-meter {
  margin-top: 28px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meter-label,
.meter-value {
  display: inline-block;
  font-weight: 800;
}

.meter-value {
  float: right;
  color: var(--amber);
}

.meter-track {
  display: block;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber));
  transition: width 180ms ease;
}

.guide-list {
  display: grid;
  gap: 12px;
}

.guide-step {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  color: var(--paper-ink);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

.step-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.step-index {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--olive-dark);
  border-radius: 5px;
  font-weight: 900;
}

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

.step-toggle strong {
  font-size: 1.08rem;
}

.step-toggle small {
  margin-top: 4px;
  color: #756f63;
  line-height: 1.4;
}

.step-content {
  display: none;
  padding: 0 18px 22px 72px;
}

.guide-step.is-open .step-content {
  display: block;
}

.step-content p {
  line-height: 1.7;
}

.callout {
  margin: 18px 0;
  padding: 16px;
  background: #f4e7c8;
  border-left: 5px solid var(--olive);
  border-radius: 4px;
}

.callout.caution {
  border-left-color: var(--red);
}

.callout p {
  margin: 6px 0 0;
}

.checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
}

.checklist input {
  margin-top: 3px;
  accent-color: var(--red);
}

.spec-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.spec-table caption {
  margin-bottom: 10px;
  font-weight: 900;
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: 12px;
  border: 1px solid #d8cbaa;
  vertical-align: top;
  text-align: left;
}

.spec-table th {
  background: #e9dab5;
}

.measure-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.measure-row div {
  padding: 14px;
  background: #eadbb9;
  border: 1px solid #d4c49f;
  border-radius: 5px;
}

.measure-row span,
.measure-row strong {
  display: block;
}

.measure-row span {
  color: #665f53;
  font-size: 0.86rem;
}

.measure-row strong {
  margin-top: 8px;
}

.schematic-band {
  background: #101211;
}

.systems-band {
  background:
    linear-gradient(135deg, rgba(112, 120, 88, 0.16), transparent 38%),
    var(--charcoal-2);
  border-block: 1px solid var(--line);
}

.tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.tab-list button {
  min-height: 48px;
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
}

.tab-list button[aria-selected="true"] {
  color: var(--ink);
  background: rgba(196, 72, 50, 0.22);
}

.tab-panel {
  padding: clamp(16px, 3vw, 28px);
}

.schematic-render {
  width: 100%;
  min-height: 360px;
}

.schematic-render svg {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 32px 32px,
    #17201d;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.schematic-title {
  fill: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.schematic-link {
  stroke: var(--amber);
  stroke-width: 3;
  fill: none;
}

.schematic-label {
  fill: var(--muted);
  font-size: 13px;
}

.schematic-node rect {
  fill: #26342d;
  stroke: var(--steel);
  stroke-width: 2;
}

.schematic-node text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.snippet pre {
  margin: 18px 0 0;
  overflow: auto;
  padding: 14px;
  color: #f8e9c6;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 70px);
  color: var(--muted);
  background: #0c0d0c;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 860px;
  margin-bottom: 0;
}

.site-footer a {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.docs-page {
  color: var(--paper-ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 42px 42px,
    #eee7d8;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  max-width: 1380px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 54px) clamp(18px, 4vw, 48px);
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
  color: var(--ink);
  background: #171a17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.docs-sidebar h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.98;
}

.docs-sidebar p {
  color: var(--muted);
  line-height: 1.6;
}

.back-link,
.docs-toc a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.back-link {
  margin-bottom: 22px;
  color: var(--amber);
  font-weight: 900;
}

.docs-toc {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.docs-toc a {
  padding: 8px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-toc a:hover {
  color: var(--ink);
}

.docs-content {
  display: grid;
  gap: 18px;
}

.doc-section {
  padding: clamp(20px, 3vw, 34px);
  background: var(--paper);
  border: 1px solid #d8cbaa;
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}

.doc-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.doc-section h3 {
  margin-bottom: 8px;
}

.doc-section p {
  line-height: 1.72;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.fact-grid div,
.reference-list article {
  padding: 16px;
  background: #eadbb9;
  border: 1px solid #d4c49f;
  border-radius: 5px;
}

.fact-grid dt {
  color: #665f53;
  font-size: 0.82rem;
  font-weight: 800;
}

.fact-grid dd {
  margin: 8px 0 0;
  font-weight: 900;
}

.reference-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.reference-list article p {
  margin-bottom: 0;
}

.inline-meter {
  color: var(--ink);
  background: #17201d;
}

.manual-page {
  --manual-paper: #eee7d5;
  --manual-paper-light: #f8f1df;
  --manual-ink: #211f1b;
  --manual-muted: #655f53;
  color: var(--manual-ink);
  background:
    radial-gradient(circle at 10% 18%, rgba(70, 57, 36, 0.055) 0 1px, transparent 1.5px) 0 0 / 11px 13px,
    radial-gradient(circle at 75% 82%, rgba(70, 57, 36, 0.04) 0 1px, transparent 1.5px) 0 0 / 17px 19px,
    var(--manual-paper);
}

.manual-header {
  background: rgba(28, 27, 24, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.manual-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 50px);
}

.manual-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 22px 20px;
  color: var(--manual-ink);
  background: var(--manual-paper-light);
  border: 2px solid var(--manual-ink);
  box-shadow: 7px 7px 0 rgba(33, 31, 27, 0.18);
}

.manual-sidebar .back-link {
  color: var(--manual-ink);
}

.manual-label,
.manual-running-head {
  margin-bottom: 8px;
  color: var(--manual-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-sidebar h1 {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--manual-ink);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1;
}

.chapter-list {
  display: grid;
  margin-top: 12px;
  border-top: 2px solid var(--manual-ink);
}

.chapter-list a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  color: var(--manual-ink);
  border-bottom: 1px solid rgba(33, 31, 27, 0.35);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.2;
}

.chapter-list b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--manual-paper-light);
  background: var(--manual-ink);
  font-size: 0.8rem;
}

.manual-content {
  min-width: 0;
  background: var(--manual-paper-light);
  border: 2px solid var(--manual-ink);
  box-shadow: 9px 9px 0 rgba(33, 31, 27, 0.18);
}

.manual-title-page,
.manual-section {
  padding: clamp(24px, 4vw, 54px);
}

.manual-title-page {
  border-bottom: 7px double var(--manual-ink);
}

.manual-title-page h2 {
  max-width: 850px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 5px solid var(--manual-ink);
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 0.88;
}

.manual-title-page > p:not(.manual-running-head) {
  max-width: 900px;
  font-size: 1.08rem;
  line-height: 1.6;
}

.manual-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border: 2px solid var(--manual-ink);
}

.manual-summary div {
  padding: 12px;
  border-right: 1px solid var(--manual-ink);
}

.manual-summary div:last-child {
  border-right: 0;
}

.manual-summary span,
.manual-summary strong {
  display: block;
}

.manual-summary span {
  margin-bottom: 5px;
  color: var(--manual-muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-warning,
.manual-note {
  position: relative;
  margin: 24px 0 0;
  padding: 17px 18px 17px 58px;
  border-block: 3px solid var(--manual-ink);
}

.manual-warning::before,
.manual-note::before {
  position: absolute;
  top: 13px;
  left: 14px;
  font-size: 1.55rem;
  font-weight: 1000;
}

.manual-warning::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid var(--manual-ink);
}

.manual-note::before {
  content: "i";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid var(--manual-ink);
  border-radius: 50%;
  font-family: Georgia, serif;
}

.manual-warning.compact {
  margin-top: 0;
}

.manual-warning p,
.manual-note p {
  margin: 5px 0 0;
  line-height: 1.5;
}

.manual-section {
  border-bottom: 5px double var(--manual-ink);
  scroll-margin-top: 92px;
}

.manual-section:last-child {
  border-bottom: 0;
}

.manual-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 4px solid var(--manual-ink);
}

.manual-section-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--manual-paper-light);
  background: var(--manual-ink);
  font-size: 2rem;
  font-weight: 1000;
}

.manual-section-heading p {
  margin-bottom: 3px;
  color: var(--manual-muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.96;
}

.manual-section p {
  line-height: 1.68;
}

.manual-columns {
  column-count: 2;
  column-gap: clamp(24px, 4vw, 50px);
  column-rule: 1px solid rgba(33, 31, 27, 0.35);
}

.manual-columns > * {
  break-inside: avoid;
}

.manual-section h3 {
  margin-bottom: 8px;
  padding-top: 10px;
  border-top: 2px solid var(--manual-ink);
  font-size: 1.25rem;
}

.manual-steps {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: manual-step;
}

.manual-steps li {
  position: relative;
  min-height: 46px;
  padding-left: 54px;
  counter-increment: manual-step;
}

.manual-steps li::before {
  content: counter(manual-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--manual-paper-light);
  background: var(--manual-ink);
  font-weight: 1000;
}

.manual-steps p {
  margin: 4px 0 0;
}

.diagnostic-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.manual-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.manual-table caption {
  padding: 8px 0;
  border-block: 3px solid var(--manual-ink);
  font-size: 1rem;
  font-weight: 1000;
  text-align: left;
  text-transform: uppercase;
}

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

.manual-table th {
  color: var(--manual-paper-light);
  background: var(--manual-ink);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.manual-table tbody tr:nth-child(even) {
  background: rgba(33, 31, 27, 0.06);
}

.manual-split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 20px 0;
}

.manual-split-list > div {
  padding-top: 12px;
  border-top: 4px solid var(--manual-ink);
}

.manual-panels {
  display: grid;
  gap: 18px;
  margin: 22px 0;
}

.manual-panels > section {
  padding: 16px 18px 18px;
  background: rgba(33, 31, 27, 0.045);
  border: 2px solid var(--manual-ink);
  box-shadow: 5px 5px 0 rgba(33, 31, 27, 0.14);
}

.manual-panels > section > h3:first-child {
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-top: 0;
  border-bottom: 3px solid var(--manual-ink);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1;
}

.manual-panels > section > p:last-child,
.manual-panels > section .manual-note:last-child {
  margin-bottom: 0;
}

.manual-checks {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.manual-checks li {
  padding: 12px 12px 12px 46px;
  background: rgba(33, 31, 27, 0.055);
  border-bottom: 1px solid var(--manual-ink);
  line-height: 1.55;
}

.manual-checks li::before {
  content: "CHECK";
  float: left;
  width: 38px;
  margin-left: -38px;
  font-size: 0.58rem;
  font-weight: 1000;
}

.quick-reference {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 24px 0;
  border: 3px solid var(--manual-ink);
}

.quick-reference div {
  padding: 12px;
  border-right: 1px solid var(--manual-ink);
}

.quick-reference div:last-child {
  border-right: 0;
}

.quick-reference b,
.quick-reference strong,
.quick-reference span {
  display: block;
}

.quick-reference b {
  font-size: 1.55rem;
}

.quick-reference strong {
  margin: 8px 0 4px;
}

.quick-reference span {
  color: var(--manual-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.manual-figure {
  margin: 30px 0 8px;
}

.manual-image-figure {
  padding: 14px;
  border: 2px solid var(--manual-ink);
}

.manual-image {
  width: 100%;
  height: auto;
  background: var(--manual-paper-light);
}

.manual-figure figcaption {
  padding-top: 7px;
  border-top: 2px solid var(--manual-ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-schematic .schematic-render {
  min-height: 0;
}

.manual-schematic .schematic-render svg {
  background: var(--manual-paper-light);
  border: 2px solid var(--manual-ink);
  border-radius: 0;
}

.manual-schematic .schematic-title,
.manual-schematic .schematic-label,
.manual-schematic .schematic-node text {
  fill: var(--manual-ink);
}

.manual-schematic .schematic-link,
.manual-schematic .schematic-node rect {
  stroke: var(--manual-ink);
}

.manual-schematic .schematic-node rect {
  fill: var(--manual-paper-light);
  stroke-width: 3;
}

.manual-sources {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 4px solid var(--manual-ink);
  font-size: 0.82rem;
}

.section-return {
  display: inline-block;
  margin-top: 22px;
  color: var(--manual-ink);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.manual-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 50px);
  color: var(--manual-paper-light);
  background: var(--manual-ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-footer a {
  color: inherit;
}

@media (max-width: 980px) {
  .hero {
    min-height: 680px;
  }

  .feature-grid,
  .workbench-grid,
  .module-grid,
  .guide-shell {
    grid-template-columns: 1fr;
  }

  .guide-sidebar,
  .docs-sidebar {
    position: static;
  }

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

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-sidebar {
    position: static;
    max-height: none;
  }

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

  .chapter-list a:nth-child(odd) {
    padding-right: 12px;
    border-right: 1px solid rgba(33, 31, 27, 0.35);
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .wip-banner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 14px;
  }

  .wip-banner strong {
    width: fit-content;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 640px;
    padding-top: 66px;
    padding-bottom: 138px;
  }

  h1 {
    font-size: clamp(2.35rem, 13.2vw, 3.45rem);
  }

  .hero-copy {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .hero-actions {
    gap: 8px;
  }

  .button {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.94rem;
  }

  .step-content {
    padding-left: 18px;
  }

  .measure-row {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    padding-inline: 12px;
  }

  .doc-section,
  .docs-sidebar {
    padding: 18px;
  }

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

  .manual-layout {
    padding-inline: 8px;
  }

  .manual-title-page,
  .manual-section {
    padding: 22px 16px;
  }

  .manual-title-page h2 {
    font-size: clamp(2.5rem, 15vw, 4.3rem);
  }

  .manual-summary,
  .manual-split-list,
  .diagnostic-steps,
  .quick-reference {
    grid-template-columns: 1fr;
  }

  .manual-summary div,
  .quick-reference div {
    border-right: 0;
    border-bottom: 1px solid var(--manual-ink);
  }

  .manual-summary div:last-child,
  .quick-reference div:last-child {
    border-bottom: 0;
  }

  .manual-columns {
    column-count: 1;
  }

  .chapter-list {
    grid-template-columns: 1fr;
  }

  .chapter-list a:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .manual-table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  .manual-footer {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
