@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --topbar-h: 60px;
  --sidebar-w: 264px;
  --toc-w: 232px;
  --content-w: 720px;
  --radius: 10px;

  --bg: #ffffff;
  --bg-subtle: #fafaf9;
  --bg-muted: #f3f3f2;
  --fg: #171717;
  --fg-2: #52525b;
  --fg-3: #8b8b93;
  --border: #ececea;
  --border-strong: #dcdcd9;
  --accent: #e87d0d;
  --accent-fg: #c2410c;
  --accent-soft: rgb(232 125 13 / 0.1);
  --danger: #dc2626;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 16px 48px rgb(0 0 0 / 0.12);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-subtle: #111113;
  --bg-muted: #1b1b1e;
  --fg: #ededed;
  --fg-2: #a1a1aa;
  --fg-3: #71717a;
  --border: #1f1f23;
  --border-strong: #2e2e33;
  --accent: #f08a24;
  --accent-fg: #fb9a45;
  --accent-soft: rgb(240 138 36 / 0.13);
  --danger: #f87171;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 48px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b0b0c;
    --bg-subtle: #111113;
    --bg-muted: #1b1b1e;
    --fg: #ededed;
    --fg-2: #a1a1aa;
    --fg-3: #71717a;
    --border: #1f1f23;
    --border-strong: #2e2e33;
    --accent: #f08a24;
    --accent-fg: #fb9a45;
    --accent-soft: rgb(240 138 36 / 0.13);
    --danger: #f87171;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15.5px/1.7 var(--font-sans);
  font-feature-settings: "cv05", "cv08";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgb(232 125 13 / 0.24);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.fill {
  fill: currentColor;
  stroke: none;
}

button {
  font: inherit;
  color: inherit;
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 3px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg);
  color: var(--fg-3);
  font: 500 11px/1 var(--font-sans);
  text-align: center;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
}

.skip:focus {
  top: 12px;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand .logo {
  width: 22px;
  height: 22px;
  stroke: none;
}

.version {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-3);
  font: 500 11.5px/1.4 var(--font-mono);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 232px;
  height: 36px;
  margin-right: 8px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-subtle);
  color: var(--fg-3);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.search-btn:hover {
  border-color: var(--border-strong);
  color: var(--fg-2);
}

.search-btn kbd {
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--fg-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--bg-muted);
  color: var(--fg);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-btn svg:first-child,
[data-theme="dark"] .theme-btn svg:last-child {
  display: none;
}

[data-theme="dark"] .theme-btn svg:first-child {
  display: block;
}

.menu-btn {
  display: none;
  margin-left: -8px;
}

/* Layout */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar,
.toc {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100dvh - var(--topbar-h));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.sidebar {
  padding: 32px 20px 48px 24px;
}

.nav-group + .nav-group {
  margin-top: 28px;
}

.nav-title {
  margin: 0 0 6px;
  padding: 0 10px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  margin: 1px 0;
  padding: 5px 10px;
  border-radius: 7px;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-list a:hover {
  background: var(--bg-muted);
  color: var(--fg);
}

.nav-list a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-fg);
  font-weight: 500;
}

.main {
  min-width: 0;
  padding: 56px 48px 96px;
}

.doc {
  max-width: var(--content-w);
  margin: 0 auto;
}

.toc {
  padding: 60px 24px 48px 8px;
  font-size: 13px;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  list-style: none;
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 14px;
  border-left: 1px solid transparent;
  color: var(--fg-3);
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.toc .depth-3 a {
  padding-left: 26px;
}

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

.toc a.active {
  border-left-color: var(--accent);
  color: var(--fg);
}

/* Page header */

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-fg);
  font-size: 13px;
  font-weight: 500;
}

.doc-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.doc-header h1,
.not-found h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.028em;
}

.lead {
  margin: 14px 0 0;
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.6;
}

/* Prose */

.prose > :first-child {
  margin-top: 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 18px;
}

.prose h2,
.prose h3 {
  position: relative;
}

.prose h2 {
  margin: 52px 0 14px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.prose h3 {
  margin: 34px 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.prose .anchor {
  position: absolute;
  left: -1em;
  width: 1em;
  color: var(--fg-3);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.prose :is(h2, h3):hover .anchor {
  opacity: 1;
}

.prose a {
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s, color 0.15s;
}

.prose a:hover {
  color: var(--accent-fg);
  text-decoration-color: var(--accent);
}

.prose strong {
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 6px 0;
  padding-left: 4px;
}

.prose li::marker {
  color: var(--fg-3);
}

.prose ol > li::marker {
  font-size: 0.92em;
  font-weight: 500;
}

.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose :not(pre) > code {
  padding: 0.12em 0.32em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-subtle);
  font: 0.85em/1 var(--font-mono);
  overflow-wrap: anywhere;
}

.prose blockquote {
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--accent);
  color: var(--fg-2);
  font-size: 16px;
}

.prose blockquote p {
  margin: 0;
}

/* Code blocks */

.code {
  position: relative;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow: hidden;
}

.code figcaption {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 500;
}

.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: transparent !important;
  font: 13px/1.7 var(--font-mono);
  tab-size: 2;
}

.shiki span {
  color: var(--shiki-light);
}

[data-theme="dark"] .shiki span {
  color: var(--shiki-dark);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .shiki span {
    color: var(--shiki-dark);
  }
}

.shiki.plain .line {
  color: var(--fg);
}

.shiki.plain .prompt {
  color: var(--fg-3);
  user-select: none;
}

.copy {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.code figcaption ~ .copy {
  top: 4px;
  width: 28px;
  height: 28px;
}

.code:hover .copy,
.copy:focus-visible,
.copy.copied {
  opacity: 1;
}

.copy:hover {
  color: var(--fg);
}

.copy svg {
  width: 14px;
  height: 14px;
}

[data-copy] .done,
[data-copy].copied svg:not(.done) {
  display: none;
}

[data-copy].copied .done {
  display: block;
  color: var(--accent-fg);
}

@media (hover: none) {
  .copy {
    opacity: 1;
  }
}

/* Tables */

.table-wrap {
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

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

.prose th {
  background: var(--bg-subtle);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  white-space: nowrap;
}

.prose td code {
  overflow-wrap: normal;
}

/* Callouts */

.callout {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  font-size: 14.5px;
}

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

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

.callout .callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.callout-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-3);
}

.callout-tip .callout-title::before,
.callout-important .callout-title::before {
  background: var(--accent);
}

.callout-warning .callout-title::before,
.callout-caution .callout-title::before {
  background: var(--danger);
}

/* Pager and footer */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.pager a:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.pager span {
  color: var(--fg-3);
  font-size: 12.5px;
}

.pager strong {
  font-size: 15px;
  font-weight: 500;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--fg-3);
  font-size: 13px;
}

.doc-footer p {
  margin: 0;
}

.doc-links {
  display: flex;
  gap: 20px;
}

.doc-links a,
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg-2);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.doc-links a:hover,
.link-btn:hover {
  color: var(--fg);
}

.doc-links svg {
  width: 14px;
  height: 14px;
}

/* Home */

.hero {
  position: relative;
  padding: 8px 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -56px -48px auto;
  height: 420px;
  z-index: -1;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 75%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  color: var(--fg-3);
}

.hero .lead {
  max-width: 56ch;
  margin-top: 20px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 36px;
}

.example-preview { margin: 0 0 28px; }
.example-preview img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.example-preview figcaption { margin-top: 10px; color: var(--fg-2); font-size: 13px; line-height: 1.6; }
.example-preview figcaption a { color: var(--accent-fg); text-underline-offset: 3px; }
.example-preview figcaption svg { width: 13px; height: 13px; vertical-align: middle; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.86;
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

.install .copy {
  opacity: 1;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 48px 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--border);
  overflow: hidden;
}

.feature {
  padding: 20px 22px 22px;
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.feature:hover {
  background: var(--bg-subtle);
}

.feature h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature h3::after {
  content: "→";
  color: var(--fg-3);
  font-weight: 400;
  transition: transform 0.15s, color 0.15s;
}

.feature:hover h3::after {
  color: var(--accent);
  transform: translateX(3px);
}

.feature p {
  margin: 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}

.home .prose {
  margin-top: 56px;
}

.not-found {
  max-width: 560px;
  margin: 0 auto;
  padding: 18vh 24px;
}

.not-found .btn {
  margin-top: 28px;
}

/* Search */

dialog.search {
  width: min(620px, calc(100vw - 32px));
  max-height: min(580px, calc(100dvh - 24vh));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

dialog.search[open] {
  display: flex;
  flex-direction: column;
}

dialog.search::backdrop {
  background: rgb(10 10 12 / 0.4);
  backdrop-filter: blur(3px);
}

.search-box {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-3);
}

.search-box svg {
  width: 18px;
  height: 18px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-results {
  flex: 1;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.search-results a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--fg);
  text-decoration: none;
}

.search-results [aria-selected="true"] a {
  background: var(--bg-muted);
}

.result-path {
  color: var(--fg-3);
  font-size: 12px;
}

.result-heading {
  font-size: 14.5px;
  font-weight: 500;
}

.result-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

mark {
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-fg);
}

.search-empty {
  padding: 32px 16px;
  color: var(--fg-3);
  font-size: 14px;
  text-align: center;
}

.search-foot {
  display: flex;
  flex: none;
  gap: 18px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  color: var(--fg-3);
  font-size: 12px;
}

.search-foot kbd {
  min-width: 18px;
  margin-right: 4px;
  padding: 2px 4px;
}

/* Responsive */

@media (max-width: 1200px) {
  .shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 880px) {
  .topbar-inner {
    padding: 0 16px;
  }

  .menu-btn {
    display: inline-grid;
  }

  .version {
    display: none;
  }

  .search-btn {
    width: 36px;
    margin-right: 0;
    padding: 0;
    justify-content: center;
    border: 0;
    background: none;
  }

  .search-btn span,
  .search-btn kbd {
    display: none;
  }

  .search-btn svg {
    width: 18px;
    height: 18px;
  }

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

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(300px, 86vw);
    height: auto;
    border-right: 1px solid var(--border);
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }

  .nav-open .sidebar {
    transform: none;
    visibility: visible;
  }

  .scrim {
    position: fixed;
    inset: var(--topbar-h) 0 0;
    z-index: 35;
    background: rgb(10 10 12 / 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
  }

  .nav-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    padding: 36px 20px 72px;
  }

  .hero::before {
    inset: -36px -20px auto;
  }

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

  .prose .anchor {
    display: none;
  }

  .doc-header h1 {
    font-size: 30px;
  }
}

@media (max-width: 640px) {
  .prose thead {
    display: none;
  }

  .prose table,
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
  }

  .prose tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }

  .prose tr:last-child {
    border-bottom: 0;
  }

  .prose td,
  .prose td:first-child {
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .prose td:first-child {
    font-weight: 500;
  }

  .prose td + td {
    margin-top: 4px;
    color: var(--fg-2);
  }

  .prose table:not(.cols-2) td + td::before {
    content: attr(data-label) ": ";
    color: var(--fg-3);
  }
}

@media (max-width: 520px) {
  .brand span {
    font-size: 14px;
  }

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

  .pager .next {
    grid-column: 1;
  }

  .search-foot {
    display: none;
  }
}

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

/* Evidence comparison: image first, with the existing docs typography. */
.comparison-page .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.comparison-page .toc { display: none; }
.comparison-page .doc { max-width: 1020px; }
.comparison-page .doc-header { margin-bottom: 28px; }
.comparison { margin-bottom: 24px; }
.comparison-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 12px; margin-bottom: 18px; }
.comparison-controls label { display: grid; gap: 7px; color: var(--fg-2); font-size: 12px; font-weight: 600; }
.comparison-controls select { min-width: 0; width: 100%; font: 500 14px var(--font-sans); color: var(--fg); background: var(--bg); padding: 10px 32px 10px 12px; border: 1px solid var(--border-strong); border-radius: 5px; }
.comparison-controls select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.comparison-stage { position: relative; aspect-ratio: 4 / 3; max-height: 660px; overflow: hidden; background: #171b20; border-radius: 6px; isolation: isolate; }
.comparison-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.comparison-stage img[hidden], .comparison-status[hidden] { display: none; }
.comparison-after { clip-path: inset(0 0 0 var(--split)); }
.comparison-stage[data-available="plugin"] .comparison-after { clip-path: none; }
.comparison-stage[data-available="vanilla"] .comparison-label-after,
.comparison-stage[data-available="plugin"] .comparison-label-before,
.comparison-links a[hidden] { display: none; }
.comparison-stage[data-available="vanilla"] .comparison-divider,
.comparison-stage[data-available="plugin"] .comparison-divider,
.comparison-stage[data-available="none"] .comparison-divider,
.comparison-stage[data-available="vanilla"] .comparison-range,
.comparison-stage[data-available="plugin"] .comparison-range,
.comparison-stage[data-available="none"] .comparison-range { display: none; }
.comparison-stage[data-available="vanilla"] .comparison-status,
.comparison-stage[data-available="plugin"] .comparison-status { inset: auto 12px 12px; padding: 8px 12px; border-radius: 4px; background: rgb(10 13 17 / .82); font-size: 12px; }
.comparison-label { position: absolute; z-index: 2; top: 16px; max-width: 45%; padding: 5px 10px; background: rgb(10 13 17 / .82); color: #fff; border: 1px solid rgb(255 255 255 / .16); border-radius: 3px; font-size: 11px; font-weight: 550; pointer-events: none; }
.comparison-label-before { left: 16px; }.comparison-label-after { right: 16px; }
.comparison-divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); pointer-events: none; }
.comparison-divider span { position: absolute; top: 50%; left: 1px; transform: translate(-50%, -50%); display: grid; place-content: center; width: 42px; height: 42px; background: white; color: #272727; border-radius: 50%; box-shadow: 0 2px 16px rgb(0 0 0 / .25); font-size: 24px; }
.comparison-range { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; touch-action: pan-y; z-index: 3; }
.comparison-stage:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.comparison-stage[aria-busy="true"] .comparison-divider { opacity: 0; }
.comparison-status { position: absolute; inset: 0; margin: 0; display: grid; place-content: center; text-align: center; padding: 40px; background: #171b20; color: #eee; z-index: 4; pointer-events: none; }
.comparison-caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 12px; color: var(--fg-2); font-size: 12px; }
.comparison-caption button { font: inherit; color: var(--fg-2); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.comparison-framing { color: var(--fg-3); font-size: 12px; margin: 7px 0 12px; }
.comparison-verdict { border-top: 1px solid var(--border); padding-top: 21px; }
.comparison-verdict > p { margin: 0 0 8px; }.comparison-verdict > p:nth-child(2) { font-size: 18px; font-weight: 550; letter-spacing: -.025em; }
.comparison-note { max-width: 74ch; font-size: 14px; color: var(--fg-2); }
.comparison-details { margin-top: 22px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; font-size: 13px; }
.comparison-details summary { cursor: pointer; font-weight: 550; }.comparison-details > a { color: var(--accent-fg); }
.comparison-details table { width: 100%; border-collapse: collapse; margin: 18px 0; text-align: left; font-size: 12px; }
.comparison-details th, .comparison-details td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.comparison-details th { color: var(--fg-2); font-weight: 550; }.comparison-details p { color: var(--fg-2); }
@media (max-width: 880px) { .comparison-page .shell { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .comparison-controls { grid-template-columns: 1fr 1fr; gap: 12px; }
  .comparison-stage { aspect-ratio: 1; }.comparison-label { top: 10px; padding: 5px 7px; font-size: 9px; }.comparison-label-before { left: 10px; }.comparison-label-after { right: 10px; }
  .comparison-caption { font-size: 11px; }.comparison-verdict > p:nth-child(2) { font-size: 16px; }
}

.comparison-controls label[hidden] { display: none; }
.comparison-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 9px; }
.comparison-links a { color: var(--accent-fg); }
.comparison-details .comparison-verdict { border-top: 0; padding-top: 8px; }
