
:root {
  --layout-w: 1140px;
  --sidebar-w: 220px;
  --toc-w: 200px;
  --nav-h: 4.3rem;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  --fast: 120ms;
  --ease: ease;
  --radius: 8px;
  --docs-body: 1.0625rem;
  --docs-leading: 1.7;
  /* Dyson & Haselgrove 2001: ~55 cpl best for screen comprehension */
  --docs-measure: 55ch;
  /* WCAG 1.4.8: paragraph spacing ≥ 1.5 × line spacing */
  --docs-para-gap: calc(1.5 * var(--docs-leading) * 1em);
  --docs-prose: oklch(0.84 0 0);
}

html { scroll-behavior: smooth; }
body { position: relative; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: oklch(0.7 0.15 250 / 0.35);
  color: var(--fg);
}

/* Skip link */
.docs-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border-radius: 6px;
  text-decoration: none;
}
.docs-skip:focus {
  top: 0.75rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.docs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--nav-h);
  background: oklch(0.10 0 0 / 0.88);
  border-bottom: 1px solid oklch(1 0 0 / 0.07);
}
.docs-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--layout-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.docs-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
.docs-nav-back:hover { color: var(--fg); opacity: 0.8; }
.docs-nav-back:focus-visible,
.docs-nav-link:focus-visible,
.docs-nav-gh:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.docs-nav-mark {
  width: 1.90rem;
  height: 1.90rem;
  color: oklch(0.96 0 0);
  flex-shrink: 0;
}
.docs-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.docs-nav-link {
  padding: 0.3rem 0.65rem;
  font-size: 0.875rem;
  color: oklch(0.62 0 0);
  text-decoration: none;
  border-radius: 6px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.docs-nav-link:hover { color: var(--fg); background: oklch(1 0 0 / 0.06); }
.docs-nav-link[aria-current="page"] { color: var(--accent); }
.docs-nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
  margin-left: 0.5rem;
}
.docs-nav-gh:hover { background: oklch(1 0 0 / 0.13); border-color: oklch(1 0 0 / 0.2); }
.docs-nav-gh svg { width: 0.875rem; height: 0.875rem; }

/* ── Mobile nav (CSS-only checkbox) ──────────────────────────────────────── */
.nav-toggle { display: none; }
.nav-hamburger {
  display: none;
  cursor: pointer;
  padding: 0.4rem;
  color: oklch(0.7 0 0);
  border-radius: 6px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav-hamburger:hover { color: var(--fg); background: oklch(1 0 0 / 0.06); }
.nav-hamburger svg { display: block; width: 1.25rem; height: 1.25rem; }
.docs-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}
.docs-drawer-overlay {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.2s;
}
.docs-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  background: oklch(0.09 0 0);
  border-right: 1px solid oklch(1 0 0 / 0.08);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}
.nav-toggle:checked ~ .docs-drawer { pointer-events: auto; }
.nav-toggle:checked ~ .docs-drawer .docs-drawer-overlay { opacity: 1; }
.nav-toggle:checked ~ .docs-drawer .docs-drawer-panel { transform: translateX(0); }
/* close when overlay is "clicked" via label hack */
.docs-drawer-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}
.docs-drawer-close label {
  cursor: pointer;
  padding: 0.3rem;
  color: oklch(0.55 0 0);
  border-radius: 5px;
  transition: color var(--fast) var(--ease);
}
.docs-drawer-close label:hover { color: var(--fg); }
.docs-drawer-close label svg { display: block; width: 1.125rem; height: 1.125rem; }
.docs-drawer-back {
  display: block;
  font-size: 0.8rem;
  color: oklch(0.45 0 0);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  margin-bottom: 1rem;
}
.docs-drawer-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.38 0 0);
  padding: 0 0.5rem;
  margin-bottom: 0.35rem;
}
.docs-drawer-link {
  display: block;
  font-size: 0.8125rem;
  color: oklch(0.58 0 0);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.docs-drawer-link:hover { color: var(--fg); background: oklch(1 0 0 / 0.05); }
.docs-drawer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.docs-drawer-link[aria-current="page"] { color: var(--accent); background: oklch(0.7 0.15 250 / 0.1); }
.docs-drawer-divider { height: 1px; background: oklch(1 0 0 / 0.07); margin: 0.75rem 0.5rem; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 720px) var(--toc-w);
  grid-template-areas: "sidebar content toc";
  min-height: calc(100vh - var(--nav-h));
  max-width: var(--layout-w);
  margin-inline: auto;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.docs-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 2rem 0 2rem 1.25rem;
  border-right: 1px solid oklch(1 0 0 / 0.07);
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.1) transparent;
}
.docs-sidebar-back {
  display: block;
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  color: oklch(0.45 0 0);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  transition: color var(--fast) var(--ease);
}
.docs-sidebar-back:hover { color: var(--fg); }
.docs-sidebar-prism-label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: oklch(0.78 0 0);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.docs-sidebar-version {
  font-size: 0.65rem;
  font-weight: 500;
  font-family: var(--mono);
  color: oklch(0.48 0 0);
  letter-spacing: 0.02em;
}
.docs-sidebar-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.38 0 0);
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}
.docs-sidebar-link {
  display: block;
  position: relative;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: oklch(0.62 0 0);
  text-decoration: none;
  border-radius: 6px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
  line-height: 1.4;
}
.docs-sidebar-link:hover { color: var(--fg); background: oklch(1 0 0 / 0.05); }
.docs-sidebar-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.docs-sidebar-link[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
  background: oklch(0.7 0.15 250 / 0.12);
}
.docs-sidebar-link[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.docs-sidebar-divider { height: 1px; background: oklch(1 0 0 / 0.07); margin: 0.75rem 0.75rem; }

/* ── Content ──────────────────────────────────────────────────────────────── */
.docs-content {
  grid-area: content;
  padding: 2.5rem 2.75rem 5rem;
  min-width: 0;
  font-size: var(--docs-body);
  line-height: var(--docs-leading);
  overflow-wrap: break-word;
}

/* Breadcrumbs */
.docs-breadcrumbs {
  margin: 0 0 1.35rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.docs-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}
.docs-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: oklch(0.52 0 0);
  max-width: none;
}
.docs-breadcrumbs li:not(:last-child)::after {
  content: '/';
  color: oklch(0.35 0 0);
  margin-left: 0.1rem;
}
.docs-breadcrumbs a {
  color: oklch(0.58 0 0);
  text-decoration: none;
}
.docs-breadcrumbs a:hover { color: var(--fg); text-decoration: none; }
.docs-breadcrumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.docs-breadcrumbs li[aria-current="page"] {
  color: oklch(0.72 0 0);
  font-weight: 500;
}

/* ── Article hero gradient ─────────────────────────────────────── */
.docs-hero {
  position: relative;
  margin: -2.5rem -2.75rem 2.5rem;
  padding: 3.25rem 2.75rem 2.25rem;
  overflow: hidden;
  border-bottom: 1px solid oklch(1 0 0 / 0.06);
}
.docs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 120% at 10% -20%, oklch(0.55 0.18 250 / 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 90% 110%, oklch(0.55 0.18 300 / 0.10) 0%, transparent 65%);
  pointer-events: none;
}
.docs-hero > * { position: relative; }

.docs-content h1 {
  font-size: clamp(1.75rem, 2.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  line-height: 1.2;
  color: var(--fg);
  max-width: var(--docs-measure);
}

/* Qualifier inside an h1 — keeps the keyword visually dominant while giving the
   heading enough text to state what the page is actually about. */
.h1-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--mid, oklch(0.78 0 0));
}
.docs-content .lead {
  font-size: 1.125rem;
  color: oklch(0.68 0 0);
  margin-bottom: 2rem;
  line-height: 1.65;
  max-width: var(--docs-measure);
}
.docs-optout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  font-size: 0.8rem;
  color: oklch(0.55 0 0);
}
.docs-optout span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: oklch(0.65 0 0);
  background: oklch(0.18 0 0);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.5em;
}
.docs-content :is(h2, h3, h4) {
  position: relative;
}
.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 3rem 0 1rem;
  padding-top: 1.15rem;
  border-top: 1px solid oklch(1 0 0 / 0.07);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  line-height: 1.3;
  color: var(--fg);
  max-width: var(--docs-measure);
}
.docs-content h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  line-height: 1.35;
  color: var(--fg);
  max-width: var(--docs-measure);
}
.docs-content h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: oklch(0.5 0 0);
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  max-width: var(--docs-measure);
}
.heading-anchor {
  position: absolute;
  left: -1.15em;
  top: 0;
  width: 1em;
  color: oklch(0.45 0 0);
  text-decoration: none;
  opacity: 0;
  font-weight: 500;
  font-size: 0.85em;
  transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease);
}
.docs-content h2 .heading-anchor { top: 1.15rem; }
.docs-content h2:first-of-type .heading-anchor { top: 0; }
.docs-content :is(h2, h3, h4):hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
  color: var(--accent);
  text-decoration: none;
}
.heading-anchor:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.docs-content p {
  margin-bottom: var(--docs-para-gap);
  color: var(--docs-prose);
  max-width: var(--docs-measure);
}
.docs-content p strong, .docs-content li strong { color: var(--fg); }
.docs-content ul, .docs-content ol {
  margin: 0.5rem 0 var(--docs-para-gap) 1.5rem;
  max-width: var(--docs-measure);
}
.docs-content .docs-breadcrumbs ol {
  margin: 0;
  padding: 0;
  max-width: none;
}
.docs-content li {
  margin-bottom: 0.45rem;
  color: var(--docs-prose);
  max-width: var(--docs-measure);
}
.docs-content .docs-breadcrumbs li {
  margin: 0;
  max-width: none;
}
.docs-content blockquote {
  max-width: var(--docs-measure);
}
.docs-content hr { border: none; border-top: 1px solid oklch(1 0 0 / 0.07); margin: 2.5rem 0; }
.docs-content a:not(.docs-pager-link) { color: var(--accent); text-decoration: none; }
.docs-content a:not(.docs-pager-link):hover { text-decoration: underline; }
.docs-content a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.docs-content del {
  text-decoration: line-through;
  color: oklch(0.55 0 0);
}
.docs-content code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: 4px;
  padding: 0.12em 0.4em;
  color: oklch(0.86 0.08 250);
  /* Long slash-chains of inline code (spec) must wrap inside the measure */
  white-space: break-spaces;
  overflow-wrap: anywhere;
}
/* ── Copy button ────────────────────────────────────────────── */
.docs-pre-wrap {
  position: relative;
  margin: 1rem 0 1.5rem;
}
.docs-pre-wrap pre {
  margin: 0;
}
.docs-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-family: var(--mono);
  font-weight: 500;
  color: oklch(0.55 0 0);
  background: oklch(0.14 0 0);
  border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  user-select: none;
  letter-spacing: 0.02em;
}
.docs-copy svg { flex-shrink: 0; }
.docs-pre-wrap:hover .docs-copy,
.docs-copy:focus-visible { opacity: 1; }
.docs-copy:hover { color: var(--fg); border-color: oklch(1 0 0 / 0.18); }
.docs-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.docs-copy.copied { color: oklch(0.72 0.14 145); border-color: oklch(0.72 0.14 145 / 0.4); opacity: 1; }
@media (hover: none) {
  .docs-copy { opacity: 0.85; }
}

.docs-content pre {
  background: oklch(0.09 0.005 250);
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.1) transparent;
}
.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: oklch(0.90 0 0);
}

/* syntax highlight */
.ck { color: oklch(0.72 0.15 300); font-style: italic; }
.ct { color: oklch(0.72 0.15 220); }
.cf { color: oklch(0.78 0.12 180); }
.cs { color: oklch(0.72 0.15 85); }
.cm { color: oklch(0.48 0 0); font-style: italic; }
.cn { color: oklch(0.72 0.12 60); }

/* callouts — full content column (not prose measure) */
.callout {
  border-left: 3px solid var(--accent);
  background: oklch(0.7 0.15 250 / 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.95rem 1.25rem;
  margin: 1.35rem 0;
  max-width: none;
}
.callout p {
  margin: 0;
  max-width: none;
  color: var(--docs-prose);
  font-size: 0.95em;
}
.callout-warn { border-left-color: oklch(0.78 0.15 85); background: oklch(0.78 0.15 85 / 0.08); }
.callout-tip { border-left-color: oklch(0.72 0.14 145); background: oklch(0.72 0.14 145 / 0.08); }
.callout-note { border-left-color: oklch(0.62 0.05 250); background: oklch(1 0 0 / 0.04); }

/* compare panels — always single column, never side by side */
.compare {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  max-width: none;
}
.compare > div {
  display: flex;
  flex-direction: column;
}
.compare-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius) var(--radius) 0 0;
}
.compare-label-before { background: oklch(0.65 0.15 25 / 0.15); color: oklch(0.72 0.12 25); }
.compare-label-after  { background: oklch(0.65 0.15 145 / 0.15); color: oklch(0.72 0.12 145); }
.compare pre { margin: 0; border-radius: 0 0 var(--radius) var(--radius); flex: 1; }
/* strip margin/border-radius from pre-wrap when inside compare */
.compare .docs-pre-wrap { margin: 0; }
.compare .docs-pre-wrap pre { border-radius: 0 0 var(--radius) var(--radius); }

/* spec / arch tables */
.docs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: var(--radius);
  background: oklch(1 0 0 / 0.02);
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.docs-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: oklch(0.45 0 0);
  padding: 0.5rem 1rem;
  background: oklch(1 0 0 / 0.03);
  border-bottom: 1px solid oklch(1 0 0 / 0.1);
  white-space: nowrap;
}
.docs-table td {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid oklch(1 0 0 / 0.05);
  vertical-align: top;
  color: oklch(0.78 0 0);
  line-height: 1.55;
}
.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table tbody tr:hover td { background: oklch(1 0 0 / 0.02); }
.docs-table td code {
  font-size: 0.78rem;
  background: oklch(1 0 0 / 0.07);
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  color: oklch(0.78 0.12 250);
}

/* release page */
.release-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.55em;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.4rem;
  position: relative;
  top: -0.1em;
}
.release-current {
  background: oklch(0.55 0.18 145 / 0.15);
  color: oklch(0.72 0.14 145);
  border: 1px solid oklch(0.72 0.14 145 / 0.3);
}
.release-date {
  font-size: 0.8125rem;
  color: oklch(0.45 0 0);
  margin: -0.5rem 0 1.5rem;
}
.release-date a { color: oklch(0.55 0 0); }
.release-date a:hover { color: var(--fg); }

/* Blog post page — prose uses full content column (not docs 55ch measure) */
body.blog-post .docs-content :is(p, ul, ol, li, h1, h2, h3, h4, blockquote, .lead, .callout),
body.blog-post .blog-article-body :is(p, ul, ol, li, h2, h3) {
  max-width: none;
}

.blog-post-meta {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: oklch(0.45 0 0);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}


/* Blog author card */
.blog-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
}
.blog-author-photo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex-shrink: 0;
}
.blog-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.blog-author-name {
  font-family: var(--mono, monospace);
  font-size: 0.8125rem;
  font-weight: 600;
  color: oklch(0.82 0 0);
  letter-spacing: 0.02em;
}
.blog-author-date {
  font-family: var(--mono, monospace);
  font-size: 0.72rem;
  color: oklch(0.45 0 0);
  letter-spacing: 0.04em;
}

/* Blog post title — large display serif */
.blog-post-title,
.docs-content .blog-post-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: oklch(0.97 0 0);
  margin: 0 0 0.5rem;
}

/* Newspaper elements */
.blog-lede { font-size: 1.25rem !important; color: oklch(0.88 0 0) !important; }
.blog-pullquote {
  border-left: 3px solid var(--accent, oklch(0.7 0.15 250));
  margin: 2.5rem 0;
  padding: 0.25rem 1.5rem;
}
.blog-pullquote p {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  color: oklch(0.88 0 0);
  line-height: 1.45;
  margin: 0 !important;
  max-width: none !important;
}
.blog-endmark {
  text-align: center;
  color: oklch(0.40 0 0);
  font-size: 1rem;
  margin-top: 3rem;
  letter-spacing: 0.2em;
}
.blog-section-rule {
  border: none;
  border-top: 1px solid oklch(1 0 0 / 0.12);
  margin: 2.5rem 0;
}
.blog-kicker {
  font-family: var(--mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.55 0.12 250);
  margin-bottom: 1rem;
  display: block;
}

/* Blog post body — editorial serif typography */
.blog-article-body {
  font-family: 'Source Serif 4', 'Lora', Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  color: oklch(0.84 0 0);
  overflow-x: hidden;
}
.blog-article-body p { margin: 0 0 calc(1.5 * 1.9 * 1em); }
.blog-article-body ul,
.blog-article-body ol { padding-left: 1.5rem; margin: 0 0 calc(1.5 * 1.9 * 1em); }
.blog-article-body li { margin-bottom: 0.4em; }
/* --- Article body ornaments --- */
/* Section ornament — *** between sections */
.blog-article-body hr {
  border: none;
  text-align: center;
  margin: 2.5rem 0;
  overflow: visible;
  height: 1em;
  color: oklch(0.32 0 0);
  letter-spacing: 0.5em;
  font-size: 0.8rem;
}
.blog-article-body hr::after {
  content: '* * *';
  display: inline-block;
  position: relative;
}
/* Running kicker line above h2 sections */
.blog-article-body h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: oklch(0.95 0 0);
  margin: 3rem 0 0.75rem;
  padding-top: 0;
  border-top: none;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  padding-bottom: 0.5rem;
}
.blog-article-body h2:first-of-type { margin-top: 0; }
/* Blockquote pull quote — large italic serif */
.blog-article-body blockquote {
  border: none;
  border-left: 3px solid oklch(0.7 0.15 250);
  margin: 2.5rem 0;
  padding: 0.25rem 1.75rem;
}
.blog-article-body blockquote p {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 1.375rem !important;
  font-style: italic !important;
  color: oklch(0.88 0 0) !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  max-width: none !important;
}
/* First paragraph lede — larger, brighter, slightly bolder */
.blog-article-body > p:first-of-type {
  font-size: 1.175rem;
  font-weight: 500;
  color: oklch(0.90 0 0);
  display: block;
  overflow: hidden;
  padding-right: 2rem;
}
/* First paragraph after each section heading — slightly elevated */
.blog-article-body h2 + p {
  font-size: 1.05rem;
  color: oklch(0.87 0 0);
  font-weight: 450;
}
/* Drop cap */
.blog-article-body > p:first-of-type::first-letter {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 4.5rem;
  line-height: 0.82;
  float: left;
  margin: 0.06rem 0.3rem 0.05rem 0;
  color: oklch(0.97 0 0);
  font-weight: 400;
}
/* Inline code in body */
.blog-article-body code {
  font-family: var(--mono, monospace);
  font-size: 0.82em;
  background: oklch(1 0 0 / 0.07);
  border: 1px solid oklch(1 0 0 / 0.10);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: oklch(0.82 0.08 250);
}
/* Blog share bar */
.blog-share {
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid oklch(1 0 0 / 0.10);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.blog-share-label {
  font-family: var(--mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: oklch(0.40 0 0);
}

/* --- blog index --- */

.blog-index-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2rem;
}
.blog-index-entry {
  border-top: 1px solid oklch(1 0 0 / 0.10);
}
.blog-index-entry:last-child {
  border-bottom: 1px solid oklch(1 0 0 / 0.10);
}
.blog-index-link {
  display: block;
  padding: 1.75rem 0;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--duration, 0.15s) var(--ease, ease);
}
.blog-index-link:hover { opacity: 0.72; }
.blog-index-link:focus-visible {
  outline: 2px solid var(--accent, oklch(0.7 0.15 250));
  outline-offset: 4px;
  border-radius: 4px;
}
.blog-index-date {
  display: block;
  font-family: var(--mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: oklch(0.40 0 0);
  margin-bottom: 0.6rem;
}
.docs-content .blog-index-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  border: 0;
  padding: 0;
}
.blog-index-desc {
  color: var(--prose, oklch(0.84 0 0));
  max-width: var(--measure, 55ch);
  margin: 0 0 0.75rem;
}
.blog-index-more {
  font-size: 0.85rem;
  color: oklch(0.62 0 0);
}
.blog-index-link:hover .blog-index-more { color: var(--fg, oklch(1 0 0)); }
.blog-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.blog-share-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-family: var(--mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: oklch(0.58 0 0);
  border: 1px solid oklch(1 0 0 / 0.14);
  border-radius: 4px;
  text-decoration: none;
  transition: color 120ms, border-color 120ms, background 120ms;
}
.blog-share-link:hover {
  color: oklch(0.92 0 0);
  border-color: oklch(1 0 0 / 0.28);
  background: oklch(1 0 0 / 0.04);
  text-decoration: none;
}
.blog-permalink {
  font-family: var(--mono, monospace);
  font-size: 0.72rem;
  color: oklch(0.38 0 0);
}
.blog-permalink a { color: oklch(0.48 0 0); text-decoration: none; }
.blog-permalink a:hover { color: oklch(0.70 0 0); }
/* Blog CTA — sponsor + contact */
.blog-cta {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid oklch(1 0 0 / 0.10);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.blog-cta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.blog-cta-row-2 {
  padding-top: 2rem;
  border-top: 1px solid oklch(1 0 0 / 0.07);
}
.blog-cta-row > div > p {
  font-family: var(--mono, monospace) !important;
  font-size: 0.8125rem !important;
  color: oklch(0.62 0 0) !important;
  line-height: 1.6 !important;
  margin: 0.4rem 0 0 !important;
  max-width: 42ch !important;
}
.blog-cta-muted {
  color: oklch(0.45 0 0) !important;
  font-size: 0.75rem !important;
}
.blog-cta-label {
  font-family: var(--mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: oklch(0.40 0 0);
  margin-bottom: 0.4rem;
}
.blog-cta-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.5rem;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid oklch(1 0 0 / 0.10);
  border-radius: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 200px;
  transition: border-color 120ms, background 120ms;
}
.blog-cta-card:hover { border-color: oklch(1 0 0 / 0.22); background: oklch(1 0 0 / 0.05); text-decoration: none; }
.blog-cta-card strong { font-family: var(--mono, monospace); font-size: 0.875rem; color: oklch(0.88 0 0); font-weight: 600; display: block; }
.blog-cta-card span { font-family: var(--mono, monospace); font-size: 0.72rem; color: oklch(0.45 0 0); }
/* Release version headings — larger and more separated than regular h2 */
.docs-content h2[id^="v"] {
  font-size: 1.75rem;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid oklch(1 0 0 / 0.1);
}
.docs-content h2[id^="v"]:first-of-type { margin-top: 0; }
.commit-hash {
  font-family: var(--mono);
  font-size: 0.78em;
  color: oklch(0.55 0.10 250);
  text-decoration: none;
  border-bottom: 1px solid oklch(0.55 0.10 250 / 0.3);
  transition: color var(--fast), border-color var(--fast);
}
.commit-hash:hover { color: oklch(0.72 0.14 250); border-color: oklch(0.72 0.14 250 / 0.5); }

/* ── TOC ──────────────────────────────────────────────────────────────────── */
.docs-toc {
  grid-area: toc;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 2rem 0 2rem 1rem;
  border-left: 1px solid oklch(1 0 0 / 0.07);
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.1) transparent;
}
.docs-toc-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.40 0 0);
  padding: 0 0.65rem;
  margin-bottom: 0.65rem;
}
.docs-toc-link {
  display: block;
  position: relative;
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  color: oklch(0.52 0 0);
  text-decoration: none;
  border-radius: 4px;
  line-height: 1.45;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.docs-toc-link:hover { color: var(--fg); background: oklch(1 0 0 / 0.04); }
.docs-toc-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.docs-toc-link.active {
  color: var(--fg);
  background: oklch(0.7 0.15 250 / 0.1);
  font-weight: 500;
}
.docs-toc-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.docs-toc-sub { padding-left: 1.1rem; }

/* ── Pager ────────────────────────────────────────────────────────────────── */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 3.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid oklch(1 0 0 / 0.08);
}
.docs-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
  min-width: 0;
}
.docs-pager-link:hover {
  border-color: oklch(1 0 0 / 0.22);
  background: oklch(1 0 0 / 0.03);
  color: inherit;
  text-decoration: none;
}
.docs-pager-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.docs-pager-next { align-items: flex-end; text-align: right; }
.docs-pager-dir {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.48 0 0);
}
.docs-pager-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
}
.docs-pager-empty {
  border: none;
  pointer-events: none;
  visibility: hidden;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.docs-footer {
  border-top: 1px solid oklch(1 0 0 / 0.07);
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--layout-w);
  margin-inline: auto;
  font-size: 0.8125rem;
  color: oklch(0.45 0 0);
}
.docs-footer a { color: oklch(0.52 0 0); text-decoration: none; }
.docs-footer a:hover { color: var(--fg); }
.docs-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1140px) {
  .docs-layout {
    grid-template-columns: var(--sidebar-w) minmax(0, 720px);
    grid-template-areas: "sidebar content";
  }
  .docs-toc { display: none; }
}
@media (max-width: 768px) {
  .docs-nav-gh { display: none; }
  .docs-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "content";
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .docs-sidebar { display: none; }
  .docs-content {
    padding: 1.5rem 1rem 4rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
  .docs-content pre,
  .docs-pre-wrap {
    max-width: calc(100vw - 2rem);
  }
  .docs-table-wrap {
    max-width: calc(100vw - 2rem);
  }
  .docs-hero {
    margin: -1.5rem -1rem 2rem;
    padding: 2.5rem 1rem 2rem;
  }
  .heading-anchor { display: none; }
  .docs-pager {
    grid-template-columns: 1fr;
  }
  .docs-pager-next { align-items: flex-start; text-align: left; }
  .docs-footer { flex-direction: column; gap: 0.5rem; padding: 1.5rem 1rem; }
  .compare { gap: 0.5rem; }
  .nav-hamburger { display: flex; }
}
