:root {
  color-scheme: dark;
  --bg: #08110f;
  --bg-soft: #0e1714;
  --panel: #101a17;
  --panel-soft: #13211c;
  --line: #243631;
  --text: #ebf3ee;
  --muted: #9caea7;
  --accent: #7ed6b7;
  --accent-strong: #9ce6cb;
  --accent-soft: rgba(126, 214, 183, 0.14);
  --warm: #f0d2a7;
  --code-bg: #0b1311;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(126, 214, 183, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.hero,
.section {
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 30px 28px 34px;
  background: linear-gradient(145deg, #122622 0%, #17312b 50%, #22463f 100%);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.03;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.24;
}

p,
li {
  line-height: 1.72;
}

.hero-note {
  max-width: 820px;
  margin: 16px 0 0;
  color: rgba(235, 243, 238, 0.92);
  font-size: 1rem;
}

.meta-row {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.meta-card,
.manuscript-section,
.terminal-block {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
}

.meta-card {
  padding: 16px 18px;
}

.mini-label {
  display: block;
  margin-bottom: 8px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-card strong {
  display: block;
  margin-bottom: 6px;
}

.section {
  margin-top: 28px;
  padding: 34px 24px 28px;
  background: var(--panel);
}

.intro-box {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(126, 214, 183, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.intro-box p {
  margin: 0;
  color: rgba(235, 243, 238, 0.88);
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(126, 214, 183, 0.22);
  background: rgba(126, 214, 183, 0.08);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.page-links a:hover {
  background: rgba(126, 214, 183, 0.14);
}

.chapter-frame {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chapter-frame h2 {
  color: var(--accent);
}

.chapter-frame p {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--muted);
}

.manuscript-stack {
  display: grid;
  gap: 18px;
}

.manuscript-section {
  padding: 28px 20px 22px;
  background: rgba(255, 255, 255, 0.04);
}

.manuscript-section h3 {
  margin-bottom: 16px;
  color: var(--warm);
}

.manuscript-section p {
  margin: 0 0 14px;
  color: var(--muted);
}

.manuscript-section p:last-child {
  margin-bottom: 0;
}

.checklist {
  margin: 0;
  padding-left: 18px;
}

.checklist li {
  margin-bottom: 10px;
  color: var(--muted);
}

.checklist li:last-child {
  margin-bottom: 0;
}

code {
  padding: 0.1em 0.34em;
  border-radius: 6px;
  background: rgba(240, 210, 167, 0.12);
  color: #f4d1a4;
  font-family: "DejaVu Sans Mono", "Ubuntu Mono", monospace;
  font-size: 0.94em;
}

.code-block,
.terminal-block pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--code-bg);
  border: 1px solid #1b2a25;
  color: #dbe7e1;
  font-family: "DejaVu Sans Mono", "Ubuntu Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
}

.support-copy {
  margin: 18px 0 12px;
  color: var(--accent-strong);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.validation-grid {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.command-card {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(126, 214, 183, 0.18);
  background:
    linear-gradient(180deg, rgba(126, 214, 183, 0.08), rgba(126, 214, 183, 0.03)),
    var(--panel-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.command-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(126, 214, 183, 0.12);
  border: 1px solid rgba(126, 214, 183, 0.22);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.command-topic {
  display: block;
  margin: 14px 0 10px;
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-line {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 12, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dff5eb;
  font-size: 0.86rem;
  line-height: 1.55;
  word-break: break-word;
}

.command-copy {
  margin: 12px 0 0;
  color: rgba(235, 243, 238, 0.88);
  font-size: 0.95rem;
  line-height: 1.68;
}

.review-points-panel {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(240, 210, 167, 0.18);
  background:
    linear-gradient(180deg, rgba(240, 210, 167, 0.08), rgba(240, 210, 167, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.review-points-panel .support-copy {
  margin-top: 0;
  color: var(--warm);
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.6;
}

@page {
  margin: 0.65in;
}

@media print {
  html {
    background: #fcfbf8;
  }

  body {
    background: #fcfbf8;
    color: #1b2521;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .shell {
    width: auto;
    max-width: none;
    padding: 0;
  }

  .hero,
  .section,
  .meta-card,
  .manuscript-section,
  .terminal-block,
  .command-card,
  .review-points-panel,
  .intro-box {
    box-shadow: none;
  }

  .hero {
    background: #f8f7f2;
    border-color: #d5dfd9;
    color: #14211c;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .hero h1,
  .hero-note,
  .hero strong,
  .hero span,
  .eyebrow {
    color: #14211c;
  }

  .hero-note {
    color: #30413a;
  }

  .eyebrow,
  .mini-label,
  .support-copy,
  .command-topic,
  .review-points-panel .support-copy,
  .chapter-frame h2,
  .manuscript-section h3 {
    color: #245344;
  }

  .meta-card {
    background: #ffffff;
    border-color: #bfd0c7;
    color: #203029;
  }

  .section {
    margin-top: 20px;
    padding: 26px 20px 22px;
    background: #ffffff;
    border-color: #d9e1db;
    break-inside: auto;
    page-break-inside: auto;
  }

  .intro-box {
    background: #faf9f5;
    border-color: #c9d7cf;
  }

  .intro-box p,
  .chapter-frame p,
  .manuscript-section p,
  .checklist li,
  .command-copy,
  .footer-note {
    color: #33423c;
  }

  .page-links a {
    background: #ffffff;
    border-color: #bfd0c7;
    color: #204d41;
  }

  .chapter-frame {
    border-bottom-color: #d8e1db;
  }

  .manuscript-section {
    background: #ffffff;
    border-color: #dbe5df;
  }

  code {
    background: #f3f6f4;
    color: #1c4338;
  }

  .code-block,
  .terminal-block pre,
  .command-line {
    background: #fcfcfa;
    border-color: #ccd7d1;
    color: #1d2522;
  }

  .terminal-block,
  .manuscript-section,
  .command-card,
  .review-points-panel {
    background: #ffffff;
  }

  .terminal-block,
  .intro-box,
  .command-card,
  .review-points-panel,
  .code-block {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .validation-grid {
    gap: 12px;
  }

  .command-card {
    border-color: #cad7d1;
  }

  .command-step {
    background: #ffffff;
    border-color: #b8cbc3;
    color: #1c4338;
  }

  .review-points-panel {
    border-color: #d8d7c6;
    background: #faf9f5;
  }

  h2,
  h3,
  .support-copy {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .section {
    orphans: 3;
    widows: 3;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(1120px, calc(100vw - 20px));
    padding-top: 20px;
  }

  .hero,
  .section {
    border-radius: 18px;
    padding: 22px 18px;
  }

  .code-block,
  .terminal-block pre {
    font-size: 0.88rem;
  }
}
