/* SageOx design tokens — applied to MkDocs Material */

:root {
  /* Sage */
  --sageox-sage-100: #e2ebdf;
  --sageox-sage-300: #b5cbaf;
  --sageox-sage-400: #9dc498;
  --sageox-sage-500: #7fa87c;
  --sageox-sage-700: #577a55;
  --sageox-sage-900: #374d36;

  /* Gold — earthed accent (replaces retired copper) */
  --sageox-gold-300: #dfc06a;
  --sageox-gold-500: #c6a23c;
  --sageox-gold-700: #836726;

  /* Neutral — green-black dark surfaces (Crater), warm text (Dust/Silt) */
  --sageox-bg: #0b0d0b;
  --sageox-surface-1: #111411;
  --sageox-surface-2: #171b17;
  --sageox-surface-3: #212620;
  --sageox-border: rgba(255, 255, 255, 0.06);
  --sageox-border-strong: #4a4d42;
  --sageox-text: #f4f2ef;
  --sageox-text-muted: #b7b6a3;
  --sageox-text-subtle: #8c8e7e;
}

/* ── Dark scheme (default) ─────────────────────────────────── */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--sageox-bg);
  --md-default-bg-color--light: var(--sageox-surface-1);
  --md-default-bg-color--lighter: var(--sageox-surface-2);
  --md-default-bg-color--lightest: var(--sageox-surface-3);

  --md-default-fg-color: var(--sageox-text);
  --md-default-fg-color--light: var(--sageox-text-muted);
  --md-default-fg-color--lighter: var(--sageox-text-subtle);
  --md-default-fg-color--lightest: var(--sageox-border-strong);

  --md-primary-fg-color: var(--sageox-sage-700);
  --md-primary-fg-color--light: var(--sageox-sage-500);
  --md-primary-fg-color--dark: var(--sageox-sage-900);
  --md-primary-bg-color: var(--sageox-text);
  --md-primary-bg-color--light: var(--sageox-text-muted);

  --md-accent-fg-color: var(--sageox-gold-500);
  --md-accent-fg-color--transparent: rgba(198, 162, 60, 0.12);
  --md-accent-bg-color: var(--sageox-bg);
  --md-accent-bg-color--light: var(--sageox-surface-1);

  --md-typeset-color: var(--sageox-text);
  --md-typeset-a-color: var(--sageox-sage-300);

  --md-code-bg-color: var(--sageox-surface-2);
  --md-code-fg-color: var(--sageox-sage-300);

  --md-footer-bg-color: var(--sageox-surface-1);
  --md-footer-bg-color--dark: var(--sageox-bg);

  --md-typeset-table-color: var(--sageox-border);
}

/* ── Light scheme ───────────────────────────────────────────── */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--sageox-sage-700);
  --md-primary-fg-color--light: var(--sageox-sage-500);
  --md-primary-fg-color--dark: var(--sageox-sage-900);

  --md-accent-fg-color: var(--sageox-gold-500);
  --md-accent-fg-color--transparent: rgba(198, 162, 60, 0.10);

  --md-typeset-a-color: var(--sageox-sage-700);
}

/* ── Typography ─────────────────────────────────────────────── */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: "Space Grotesk", "Inter", -apple-system, sans-serif;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.md-typeset h1 { font-weight: 600; letter-spacing: -0.02em; }
.md-typeset h2 { color: var(--md-default-fg-color); }
.md-typeset h3 { color: var(--md-default-fg-color--light); }

.md-header__title,
.md-tabs__link {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.md-typeset code,
.md-typeset pre {
  font-family: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

/* ── Header / hero polish ───────────────────────────────────── */
.md-header {
  background: var(--sageox-bg);
  border-bottom: 1px solid var(--sageox-border);
  box-shadow: none;
}
[data-md-color-scheme="slate"] .md-header {
  background: var(--sageox-bg);
}
.md-tabs {
  background: var(--sageox-bg);
  border-bottom: 1px solid var(--sageox-border);
}

/* ── Search ─────────────────────────────────────────────────── */
.md-search__input {
  background: var(--sageox-surface-2);
}
.md-search__input::placeholder {
  color: var(--sageox-text-subtle);
}

/* ── Tables ─────────────────────────────────────────────────── */
.md-typeset table:not([class]) {
  font-size: 0.78rem;
  border: 1px solid var(--sageox-border);
  border-radius: 8px;
  overflow: hidden;
}
.md-typeset table:not([class]) th {
  background: var(--sageox-surface-2);
  color: var(--sageox-sage-300);
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr {
  background: var(--sageox-surface-1);
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background: var(--sageox-surface-2);
}

/* ── Blockquote ─────────────────────────────────────────────── */
.md-typeset blockquote {
  border-left: 3px solid var(--sageox-gold-500);
  background: var(--sageox-surface-2);
  border-radius: 4px;
  color: var(--sageox-text-muted);
  padding: 12px 18px;
}
[data-md-color-scheme="default"] .md-typeset blockquote {
  background: var(--sageox-sage-100);
  color: var(--sageox-surface-1);
}

/* ── Links: sage in body, gold on hover ───────────────────── */
.md-typeset a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--md-typeset-a-color) 35%, transparent);
  transition: color 120ms ease-out, border-color 120ms ease-out;
}
.md-typeset a:hover {
  color: var(--md-accent-fg-color);
  border-bottom-color: var(--md-accent-fg-color);
}

/* ── Nav (sidebar) ──────────────────────────────────────────── */
.md-nav__title {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sageox-sage-500);
}
.md-nav__link--active {
  color: var(--sageox-sage-300);
  font-weight: 500;
}

/* ── Content polish ─────────────────────────────────────────── */
.md-content article {
  font-size: 15px;
  line-height: 1.6;
}
.md-typeset hr {
  border-bottom: 1px solid var(--sageox-border);
}

/* ── Footer ─────────────────────────────────────────────────── */
.md-footer-meta {
  background: var(--sageox-bg);
}

/* ── Studio backlink in header ──────────────────────────────── */
.md-header__source .md-source__icon {
  color: var(--sageox-text-muted);
}

/* ── Custom: "Studio →" badge in tab strip ──────────────────── */
.md-tabs__list::after {
  content: "";
  flex: 1;
}

/* ── Permalink anchors (¶) — calmer ─────────────────────────── */
.md-typeset .headerlink {
  color: var(--sageox-text-subtle);
  opacity: 0;
  transition: opacity 120ms ease-out, color 120ms ease-out;
}
.md-typeset h1:hover .headerlink,
.md-typeset h2:hover .headerlink,
.md-typeset h3:hover .headerlink,
.md-typeset h4:hover .headerlink {
  opacity: 1;
}
.md-typeset .headerlink:hover {
  color: var(--sageox-gold-500);
}

/* ── Code blocks: subtle gold accent ──────────────────────── */
.md-typeset pre > code {
  border-radius: 8px;
  border: 1px solid var(--sageox-border);
}

/* ── Inline code ────────────────────────────────────────────── */
.md-typeset :not(pre) > code {
  border: 1px solid var(--sageox-border);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────
   HOMEPAGE-CHROME PARITY
   Below: styles that make the docs site visually paired with
   the studio homepage (sageox-design.netlify.app). Same wordmark
   typography in the header, same ambient atmospheric layer, same
   editorial landing-page hero, same colophon feel.
   ───────────────────────────────────────────────────────────── */

/* ── Ambient backdrop (matches homepage .ambient) ─────────────── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 18% -10%, rgba(122,143,120,0.10), transparent 60%),
    radial-gradient(700px 500px at 92% 8%,  rgba(196,122,74,0.06), transparent 60%),
    radial-gradient(1100px 800px at 50% 110%, rgba(84,106,84,0.06), transparent 60%);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.03 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}
[data-md-color-scheme="default"] .ambient {
  background:
    radial-gradient(900px 600px at 18% -10%, rgba(122,143,120,0.06), transparent 60%),
    radial-gradient(700px 500px at 92% 8%,  rgba(196,122,74,0.04), transparent 60%);
}

/* Landing page gets a stronger ambient — matches the cinematic
   homepage feel where the wordmark sits over warm radials. */
.is-docs-landing .ambient {
  background:
    radial-gradient(900px 600px at 18% -10%, rgba(122,143,120,0.18), transparent 60%),
    radial-gradient(700px 500px at 92% 8%,  rgba(196,122,74,0.10), transparent 60%),
    radial-gradient(1100px 800px at 50% 110%, rgba(84,106,84,0.10), transparent 60%);
}

/* ── Header chrome to match homepage nav.top ─────────────────── */
.md-header {
  background: rgba(10, 13, 15, 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  box-shadow: none;
}
[data-md-color-scheme="default"] .md-header {
  background: rgba(255, 255, 255, 0.84);
}
.md-header__inner {
  padding-block: 6px;
}
.md-header__title {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--sageox-text-muted);
  margin-left: 8px;
}
.md-header__title .md-ellipsis {
  color: var(--sageox-text-muted);
}
.md-header__button.md-logo svg,
.md-header__button.md-logo img {
  height: 22px;
  width: auto;
}

/* Tabs row to feel like a quiet sub-rail */
.md-tabs {
  background: transparent;
  border-bottom: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
}
.md-tabs__link {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0.7;
  transition: opacity 150ms ease-out, color 150ms ease-out;
}
.md-tabs__link:hover {
  opacity: 1;
  color: var(--sageox-sage-300);
}
.md-tabs__link--active {
  opacity: 1;
  color: var(--sageox-sage-300);
  font-weight: 500;
}
/* First tab (← Studio) gets the homepage's pulsing dot affordance */
.md-tabs__item:first-child .md-tabs__link {
  color: var(--sageox-sage-300);
  opacity: 1;
}

/* GitHub source link styling */
.md-header__source {
  width: auto;
  margin-right: 8px;
}
.md-source__repository {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--sageox-text-muted);
}

/* ── DOCS LANDING — hand-crafted hero matching homepage ──────── */
.is-docs-landing .md-main__inner {
  margin-top: 0;
}
.is-docs-landing .md-content__inner {
  max-width: none;
  padding-top: 0;
}
.is-docs-landing .md-content__inner::before {
  display: none;
}
/* Hide the edit-this-page icon on landing */
.is-docs-landing .md-content__button {
  display: none;
}

/* The hero block we render via raw HTML in index.md */
.docs-hero {
  padding: 64px 16px 96px;
  border-bottom: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: end;
}
@media (min-width: 900px) {
  .docs-hero { grid-template-columns: 1.4fr 1fr; gap: 96px; padding: 56px 16px 112px; }
}
.docs-hero-mark {
  width: clamp(280px, 32vw, 420px);
  height: auto;
  display: block;
  margin-bottom: 32px;
  filter: drop-shadow(0 24px 60px rgba(196,209,192,0.06));
}
.docs-hero .eyebrow {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sageox-sage-500);
  margin-bottom: 16px;
}
.docs-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  color: var(--sageox-text);
  max-width: 26ch;
}
.docs-hero h1 em {
  font-style: normal;
  color: var(--sageox-sage-300);
  font-weight: 500;
}
.docs-hero .lede {
  color: var(--sageox-text-muted);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 52ch;
  margin: 0 0 32px;
}
.docs-hero .lede a {
  color: var(--sageox-sage-300);
  border-bottom: 1px solid var(--sageox-sage-700);
}
.docs-hero .lede a:hover {
  color: var(--sageox-gold-500);
  border-bottom-color: var(--sageox-gold-500);
}

/* Editorial start-here cards — bento style, matching homepage manifesto */
.docs-startgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 64px 0 96px;
}
@media (min-width: 720px) {
  .docs-startgrid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 1100px) {
  .docs-startgrid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 20px;
  }
  .docs-startgrid .start-card.feature { grid-column: span 4; grid-row: span 2; }
  .docs-startgrid .start-card.half    { grid-column: span 2; grid-row: span 1; }
  .docs-startgrid .start-card.wide    { grid-column: span 3; grid-row: span 1; }
}

.start-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 30px;
  background: linear-gradient(180deg, var(--sageox-surface-2), var(--sageox-surface-1));
  border: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition: transform 220ms cubic-bezier(0.2,0.7,0.2,1),
              border-color 200ms ease-out,
              box-shadow 220ms ease-out;
}
.start-card:hover {
  transform: translateY(-3px);
  border-color: var(--sageox-border-strong);
  box-shadow: 0 28px 60px -28px rgba(0,0,0,0.7),
              0 0 0 1px rgba(196,209,192,0.04);
  border-bottom-color: var(--sageox-border-strong);  /* override link underline */
}
.start-card .card-eyebrow {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sageox-sage-500);
}
.start-card.feature .card-eyebrow { color: var(--sageox-gold-500); }
.start-card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  color: var(--sageox-text);
}
.start-card.feature h2 {
  font-size: clamp(26px, 2vw, 32px);
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.start-card p {
  color: var(--sageox-text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.start-card.feature p { font-size: 15.5px; max-width: 52ch; }
.start-card .card-cta {
  margin-top: 4px;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--sageox-sage-300);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 150ms ease-out, gap 200ms ease-out;
}
.start-card:hover .card-cta { color: var(--sageox-gold-500); gap: 10px; }

/* ── Section labels (eyebrows + counts) on landing ────────────── */
.docs-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 96px 0 28px;
}
.docs-section-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--sageox-text);
}
.docs-section-head .count {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--sageox-text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* What's here table — replace MD table chrome on landing with a calmer list */
.docs-areas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  margin: 0 0 96px;
}
.docs-areas .area {
  display: grid;
  grid-template-columns: 1fr;
  padding: 22px 4px;
  border-bottom: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  gap: 8px;
}
@media (min-width: 720px) {
  .docs-areas .area { grid-template-columns: 220px 1fr; gap: 32px; align-items: baseline; }
}
.docs-areas .area .name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--sageox-text);
  letter-spacing: -0.005em;
}
.docs-areas .area .name .kbd {
  display: inline-block;
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--sageox-text-subtle);
  margin-left: 8px;
}
.docs-areas .area p {
  color: var(--sageox-text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}

/* Conventions strip */
.docs-conventions {
  background: linear-gradient(180deg, var(--sageox-surface-2), var(--sageox-surface-1));
  border: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  border-radius: 14px;
  padding: 28px 32px;
  margin: 0 0 96px;
}
.docs-conventions .eyebrow {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sageox-gold-500);
  margin-bottom: 16px;
}
.docs-conventions ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .docs-conventions ul { grid-template-columns: 1fr 1fr; gap: 20px 40px; }
}
.docs-conventions ul li {
  color: var(--sageox-text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  padding-left: 0;
}
.docs-conventions ul li strong {
  color: var(--sageox-text);
  font-weight: 500;
  display: block;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 2px;
}

/* ── Internal doc pages: cinematic h1, refined spacing ─────────── */
html:not(.is-docs-landing) .md-typeset h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 2.8vw, 36px);
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin-bottom: 24px;
  max-width: 28ch;
}
html:not(.is-docs-landing) .md-typeset h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin-top: 48px;
}
html:not(.is-docs-landing) .md-typeset h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
  color: var(--sageox-text);
}

/* Polished first-paragraph lede on doc pages */
html:not(.is-docs-landing) .md-typeset h1 + p:first-of-type {
  font-size: 16.5px;
  color: var(--sageox-text-muted);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 32px;
}

/* ── Sidebar polish ────────────────────────────────────────────── */
.md-nav__item .md-nav__link {
  font-size: 13.5px;
}
.md-nav__title[for] {
  color: var(--sageox-sage-500);
}

/* Footer mark — match homepage colophon vibe */
.md-footer-meta__inner {
  padding-block: 18px;
}
.md-footer-copyright,
.md-footer-meta {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--sageox-text-subtle);
  letter-spacing: 0.04em;
}

/* Print: turn off ambient + grain */
@media print {
  .ambient { display: none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .start-card { transition-duration: 120ms !important; }
}

/* ─────────────────────────────────────────────────────────────
   LANDING — TIGHTER HERO + SITEMAP + READING LIST
   v0.2 — pulls density up, makes the page legible in one scroll.
   ───────────────────────────────────────────────────────────── */

/* Tighter hero — was 64px/112px padding, now 32px/56px */
.docs-hero {
  padding: 32px 16px 48px;
  gap: 32px;
}
@media (min-width: 900px) {
  .docs-hero { padding: 32px 16px 56px; gap: 64px; }
}
.docs-hero-mark {
  width: clamp(220px, 22vw, 300px);
  margin-bottom: 20px;
}
.docs-hero h1 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.docs-hero .lede {
  font-size: 15px;
  margin-bottom: 16px;
}
.docs-hero .lede-sub {
  font-size: 13.5px;
  color: var(--sageox-text-subtle);
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
}
.docs-hero .lede-sub strong {
  color: var(--sageox-sage-500);
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
}
.docs-hero .lede-sub a {
  color: var(--sageox-sage-300);
  border-bottom: 1px solid var(--sageox-sage-700);
  padding-bottom: 1px;
}

/* ── Sitemap (dense, scan-friendly) ───────────────────────────── */
.docs-sitemap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 56px 0 72px;
}
@media (min-width: 900px) {
  .docs-sitemap { grid-template-columns: 1fr 1fr 1.4fr; gap: 40px; }
}

.sitemap-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.sitemap-col-wide { /* on usage column */ }

.sitemap-section { display: flex; flex-direction: column; gap: 12px; }

.sitemap-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sageox-border-strong);
}
.sitemap-head .sec {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--sageox-text);
}
.sitemap-head .sec .sub {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--sageox-text-subtle);
  text-transform: none;
}
.sitemap-head .count {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--sageox-text-subtle);
  letter-spacing: 0.06em;
}

.sitemap-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
/* `.two-col` reserved for future use; for now usage stays single-column
   so descriptions don't truncate at the 1.4fr column width. */
.sitemap-section ul.two-col { display: flex; flex-direction: column; }

.sitemap-section ul li {
  border-bottom: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
}
.sitemap-section ul li:last-child { border-bottom: none; }

.sitemap-section ul li a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 10px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: background 120ms ease-out;
  align-items: baseline;
}
.sitemap-section ul li a:hover {
  background: linear-gradient(90deg,
    var(--sageox-hairline, rgba(255,255,255,0.04)) 0%,
    transparent 60%);
}
.sitemap-section ul li a .page {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--sageox-sage-300);
  letter-spacing: 0.01em;
}
.sitemap-section ul li a:hover .page {
  color: var(--sageox-gold-500);
}
.sitemap-section ul li a .desc {
  font-size: 13.5px;
  color: var(--sageox-text-muted);
  line-height: 1.45;
}

/* ── Conventions block — tighter ──────────────────────────────── */
.docs-conventions { margin-bottom: 72px; padding: 24px 28px; }
.docs-conventions ul li { font-size: 13.5px; }
.docs-conventions ul li strong { font-size: 14px; }

/* ── Further reading — Tufte canon ────────────────────────────── */
.docs-reading {
  margin: 0 0 80px;
  padding: 56px 0 16px;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
}
.docs-reading .docs-section-head { margin: 0 0 12px; }
.docs-reading .reading-intro,
.docs-reading .reading-outro {
  color: var(--sageox-text-muted);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 64ch;
  margin: 0 0 32px;
}

/* Subheads inside Further Reading — separate "Part 1 / Part 2" cleanly */
.reading-subhead {
  margin: 64px 0 8px;
  padding-top: 32px;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}
.reading-subhead:first-of-type { margin-top: 32px; padding-top: 24px; border-top: none; }
.reading-subhead .eyebrow {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sageox-gold-500);
  margin: 0;
  flex-shrink: 0;
}
.reading-subhead h3 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
  color: var(--sageox-text);
}
/* Anchor offset so #information-design-canon doesn't scroll under sticky header */
#information-design-canon { scroll-margin-top: 96px; }
.docs-reading .reading-outro {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 900px) {
  .reading-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.reading-author {
  background: linear-gradient(180deg, var(--sageox-surface-2), var(--sageox-surface-1));
  border: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  border-radius: 12px;
  padding: 24px 26px 22px;
}

.reading-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--sageox-text);
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.reading-name .reading-site {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--sageox-sage-500);
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.reading-name .reading-site:hover {
  color: var(--sageox-gold-500);
  border-bottom-color: var(--sageox-gold-500);
}

.reading-bio {
  color: var(--sageox-text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.reading-books {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reading-books li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 0 8px;
  border-top: 1px solid var(--sageox-hairline, rgba(255,255,255,0.06));
  font-size: 13px;
  line-height: 1.5;
}
.reading-books li:first-child { border-top: none; padding-top: 4px; }
.reading-books li strong,
.reading-books li a strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  color: var(--sageox-sage-300);
  font-size: 14px;
  letter-spacing: -0.005em;
}
.reading-books li a {
  text-decoration: none;
  border-bottom: none;
}
.reading-books li a:hover strong { color: var(--sageox-gold-500); }
.reading-books li .year {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--sageox-text-subtle);
  letter-spacing: 0.04em;
  display: inline-block;
  margin-left: 8px;
}
.reading-books li .why {
  color: var(--sageox-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  display: block;
  margin-top: 2px;
}
