:root {
  color-scheme: light;
  --bg: #fbfaf5;
  --panel: #f3f1ea;
  --panel-strong: #ebe8dc;
  --ink: #11130f;
  --muted: #68665d;
  --muted-strong: #3b3932;
  --line: #d9d5c8;
  --line-strong: #b9b3a2;
  --accent: #2f6f62;
  --accent-strong: #205449;
  --accent-soft: #dce9e4;
  --code-bg: #12140f;
  --code-ink: #f4f0e7;
  --code-muted: #aaa59a;
  --code-line: #30332d;
  --shadow: 0 22px 70px rgba(35, 32, 22, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10120f;
  --panel: #171a15;
  --panel-strong: #1d211b;
  --ink: #f4f0e7;
  --muted: #a6a195;
  --muted-strong: #d6d0c2;
  --line: #30342d;
  --line-strong: #51584c;
  --accent: #74bba9;
  --accent-strong: #9bd7c9;
  --accent-soft: #1b332d;
  --code-bg: #0b0d0a;
  --code-ink: #f4f0e7;
  --code-muted: #a6a195;
  --code-line: #30342d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #10120f;
    --panel: #171a15;
    --panel-strong: #1d211b;
    --ink: #f4f0e7;
    --muted: #a6a195;
    --muted-strong: #d6d0c2;
    --line: #30342d;
    --line-strong: #51584c;
    --accent: #74bba9;
    --accent-strong: #9bd7c9;
    --accent-soft: #1b332d;
    --code-bg: #0b0d0a;
    --code-ink: #f4f0e7;
    --code-muted: #a6a195;
    --code-line: #30342d;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  background-attachment: fixed;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}

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

code,
pre {
  font-family: var(--font-mono);
}

::selection {
  background: var(--accent-soft);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  padding: 0 32px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 15px;
}

.brand strong {
  color: var(--accent);
  font-weight: 700;
}

.header-actions,
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.theme-toggle {
  display: inline-flex;
  width: 44px;
  height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 3px;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.theme-toggle span {
  display: block;
  width: 14px;
  height: 14px;
  background: var(--ink);
  transform: translateX(0);
  transition: transform 160ms ease, background-color 160ms ease;
}

html[data-theme="dark"] .theme-toggle span {
  background: var(--accent);
  transform: translateX(18px);
}

.hero,
.section,
.closing,
.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 56px;
  align-items: center;
  padding: 78px 0 84px;
}

.eyebrow,
.section-index,
.label {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.eyebrow::before,
.section-index::before,
.label::before {
  content: "$ ";
  color: var(--accent);
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 730;
  line-height: 0.95;
}

h2 {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.04;
}

h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted-strong);
  font-size: 21px;
  line-height: 1.56;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 650;
}

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

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

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
  outline: none;
}

html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .button:focus-visible {
  color: #10120f;
}

.evidence-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.panel-topline strong {
  color: var(--accent);
  font-weight: 650;
}

.evidence-panel pre {
  margin: 0;
  overflow-x: auto;
  background: var(--code-bg);
  padding: 22px;
  color: var(--code-ink);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
}

.artifact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.artifact-row span {
  border-right: 1px solid var(--line);
  padding: 13px 14px;
  text-align: center;
}

.artifact-row span:last-child {
  border-right: 0;
}

.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 56px;
}

.prose p,
.section-heading p,
.command-card p,
.receipt-callout p,
.path-list p,
.closing p,
.audience-section p,
.faq-list p,
.principles p {
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.72;
}

.prose p {
  margin: 0 0 18px;
}

.audience-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto 76px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.audience-section article {
  padding: 28px;
}

.audience-section article + article {
  border-left: 1px solid var(--line);
}

.audience-section h3 {
  max-width: 460px;
  margin-top: 22px;
  font-size: 25px;
  line-height: 1.16;
}

.audience-section p:last-child {
  max-width: 500px;
  margin-bottom: 0;
}

.section-heading {
  max-width: 790px;
}

.section-heading p,
.closing p {
  max-width: 710px;
  margin: 20px 0 0;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.principles article {
  min-height: 250px;
  border-right: 1px solid var(--line);
  padding: 34px;
}

.principles article:last-child {
  border-right: 0;
}

.principles span,
.path-list span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.principles h3,
.path-list h3 {
  margin-top: 46px;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.command-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
}

.command-card pre,
.closing pre {
  margin: 16px 0 0;
  overflow-x: auto;
  border: 1px solid var(--code-line);
  background: var(--code-bg);
  padding: 16px;
  color: var(--code-ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

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

.receipt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-top: 38px;
}

.receipt-table,
.receipt-callout {
  border: 1px solid var(--line);
  background: var(--panel);
}

.receipt-table div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 17px 18px;
}

.receipt-table div:last-child {
  border-bottom: 0;
}

.receipt-table span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
}

.receipt-table strong {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 520;
  line-height: 1.5;
}

.receipt-callout {
  align-self: start;
  padding: 22px;
}

.receipt-callout p:last-child {
  margin-bottom: 0;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.path-list article {
  min-height: 245px;
  border-right: 1px solid var(--line);
  padding: 22px;
}

.path-list article:last-child {
  border-right: 0;
}

.faq-list {
  margin-top: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 0;
}

.faq-list summary {
  cursor: pointer;
  padding: 22px 24px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.35;
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-list p {
  max-width: 820px;
  margin: -6px 24px 24px;
}

.closing {
  padding: 78px 0 96px;
  border-top: 1px solid var(--line);
}

.closing pre {
  width: fit-content;
  max-width: 100%;
  margin-top: 28px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.site-footer div,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
  outline: none;
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 20px;
  }

  .site-nav {
    display: none;
  }

  .hero,
  .section,
  .closing,
  .site-footer {
    width: min(100% - 36px, 1120px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 58px 0;
  }

  h1 {
    font-size: clamp(46px, 14vw, 62px);
  }

  .lede {
    font-size: 18px;
  }

  .intro-section,
  .receipt-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .principles,
  .command-grid,
  .audience-section,
  .path-list {
    grid-template-columns: 1fr;
  }

  .audience-section {
    width: min(100% - 36px, 1120px);
    margin-bottom: 58px;
  }

  .audience-section article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .audience-section h3 {
    font-size: 22px;
  }

  .principles article,
  .path-list article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .principles article:last-child,
  .path-list article:last-child {
    border-bottom: 0;
  }

  .principles h3,
  .path-list h3 {
    margin-top: 24px;
  }

  .receipt-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .artifact-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .artifact-row span:last-child {
    border-bottom: 0;
  }

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

@media (min-width: 901px) and (max-height: 700px) {
  .hero {
    gap: 44px;
    padding: 54px 0 58px;
  }

  h1 {
    font-size: clamp(48px, 6.2vw, 74px);
  }

  .lede {
    margin-top: 22px;
    font-size: 18px;
    line-height: 1.48;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .evidence-panel pre {
    padding: 18px;
    font-size: 12px;
    line-height: 1.55;
  }
}
