/* Clojask docs theme. Plain CSS, no build step. */

/* ---------- Tokens ---------- */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-sidebar: #f8fafd;
  --text: #1c2333;
  --text-strong: #0d1322;
  --muted: #5d6779;
  --border: #e2e7f0;
  --border-strong: #cfd6e3;
  --brand: #3c63dd;
  --brand-strong: #2b4fc4;
  --brand-soft: #eaf0ff;
  --green: #2f9b4f;
  --green-soft: #e8f6ec;
  --amber-soft: #fff6e0;
  --amber: #b7791f;
  --red: #c53030;
  --code-bg: #f5f7fb;
  --code-inline-bg: #eef1f8;
  --code-text: #1f2a44;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);

  /* syntax colours */
  --hl-comment: #6b7487;
  --hl-keyword: #8a3ffc;
  --hl-string: #1a7f37;
  --hl-number: #b35900;
  --hl-symbol: #0b6bcb;
  --hl-name: #c2185b;
  --hl-literal: #b35900;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 272px;
  --content-w: 800px;
  --toc-w: 228px;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131d;
    --bg-soft: #151c2a;
    --bg-sidebar: #111826;
    --text: #d9e0ec;
    --text-strong: #f3f6fb;
    --muted: #94a0b5;
    --border: #243049;
    --border-strong: #33415e;
    --brand: #84a2ff;
    --brand-strong: #a7bdff;
    --brand-soft: #1b2645;
    --green: #5bd17e;
    --green-soft: #142a1d;
    --amber-soft: #2c2412;
    --amber: #f0b44c;
    --red: #ff7b72;
    --code-bg: #131a28;
    --code-inline-bg: #1c2538;
    --code-text: #dbe3f1;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --hl-comment: #7f8aa0;
    --hl-keyword: #c49bff;
    --hl-string: #7ee2a0;
    --hl-number: #ffb86b;
    --hl-symbol: #7cc4ff;
    --hl-name: #ff8fb8;
    --hl-literal: #ffb86b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e131d;
  --bg-soft: #151c2a;
  --bg-sidebar: #111826;
  --text: #d9e0ec;
  --text-strong: #f3f6fb;
  --muted: #94a0b5;
  --border: #243049;
  --border-strong: #33415e;
  --brand: #84a2ff;
  --brand-strong: #a7bdff;
  --brand-soft: #1b2645;
  --green: #5bd17e;
  --green-soft: #142a1d;
  --amber-soft: #2c2412;
  --amber: #f0b44c;
  --red: #ff7b72;
  --code-bg: #131a28;
  --code-inline-bg: #1c2538;
  --code-text: #dbe3f1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --hl-comment: #7f8aa0;
  --hl-keyword: #c49bff;
  --hl-string: #7ee2a0;
  --hl-number: #ffb86b;
  --hl-symbol: #7cc4ff;
  --hl-name: #ff8fb8;
  --hl-literal: #ffb86b;
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; }

button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--brand); color: #fff;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 40px clamp(20px, 4vw, 56px) 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--content-w));
  gap: 56px;
  justify-content: center;
}

@media (min-width: 1280px) {
  .doc-grid.has-toc {
    grid-template-columns: minmax(0, var(--content-w)) var(--toc-w);
  }
}

/* ---------- Brand ---------- */

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-strong);
  font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em;
}
.brand:hover { color: var(--text-strong); text-decoration: none; }
.brand-logo { display: block; }

.version {
  margin-left: auto;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: .72rem; font-weight: 600; letter-spacing: 0;
  font-family: var(--mono);
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 16px;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  overflow-y: auto;
}

.brand-desktop { padding: 4px 10px 22px; }

.nav { flex: 1; }

.nav-section + .nav-section { margin-top: 22px; }

.nav-heading {
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}

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

.nav a {
  display: block;
  margin: 1px 0;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: .94rem; font-weight: 500;
}
.nav a:hover { background: var(--bg-soft); color: var(--text-strong); text-decoration: none; }
.nav a.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

.sidebar-foot {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin-top: 24px; padding: 14px 6px 0;
  border-top: 1px solid var(--border);
}

.icon-link, .theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 7px;
  color: var(--muted); font-size: .86rem; font-weight: 500;
}
.icon-link:hover, .theme-toggle:hover { background: var(--bg-soft); color: var(--text-strong); text-decoration: none; }

.theme-toggle { margin-left: auto; border: 0; background: none; cursor: pointer; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Mobile top bar */
.topbar { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }

  .topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
  }
  html { scroll-padding-top: 72px; }

  .menu-toggle {
    display: inline-flex; padding: 8px; margin-right: -8px;
    border: 0; border-radius: 8px; background: none; cursor: pointer;
  }
  .menu-toggle:hover { background: var(--bg-soft); }

  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 50;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }

  .scrim {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(5, 10, 20, .45);
  }
  .scrim[hidden] { display: none; }

  .main { padding-top: 28px; }
}

/* ---------- Article typography ---------- */

.doc { min-width: 0; }

.doc-header { margin-bottom: 28px; }

.doc h1, .hero h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.025em;
}

.lede { margin: 12px 0 0; color: var(--muted); font-size: 1.15rem; }

.doc h2, .doc h3, .doc h4, .doc h5 {
  position: relative;
  color: var(--text-strong);
  line-height: 1.3;
  letter-spacing: -.01em;
}

.doc h2 {
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 1.6rem; font-weight: 750;
}
.doc-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { margin: 36px 0 12px; font-size: 1.25rem; font-weight: 700; }
.doc h4 { margin: 32px 0 10px; font-size: 1.15rem; font-weight: 700; }
.doc h5 { margin: 24px 0 8px; font-size: 1rem; font-weight: 700; }

.doc h2 code, .doc h3 code, .doc h4 code { font-size: .9em; }

.anchor {
  position: absolute; left: -1.1em;
  padding-right: .3em;
  color: var(--border-strong);
  font-weight: 500;
  opacity: 0;
  transition: opacity .15s;
}
.doc h2 .anchor { top: 24px; }
.doc h2:hover .anchor, .doc h3:hover .anchor, .doc h4:hover .anchor, .anchor:focus { opacity: 1; }
.anchor:hover { color: var(--brand); text-decoration: none; }

.doc p, .doc ul, .doc ol, .doc dl, .doc table, .doc pre, .doc blockquote, .doc details { margin: 0 0 18px; }

.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin: 4px 0; }
.doc li > ul, .doc li > ol { margin: 4px 0; }
.doc li::marker { color: var(--muted); }

.doc strong { color: var(--text-strong); font-weight: 650; }

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

/* The API page uses hr between functions; keep those quieter. */
.doc hr + h4 { margin-top: 0; }

/* Inline code */
code, kbd, samp {
  font-family: var(--mono);
  font-size: .86em;
}
:not(pre) > code {
  padding: .12em .38em;
  border-radius: 5px;
  background: var(--code-inline-bg);
  color: var(--code-text);
  overflow-wrap: anywhere;
}
a > code { color: var(--brand); }

/* Code blocks */
.code-block { position: relative; margin: 0 0 18px; }
.code-block pre { margin: 0; }

.doc pre, .hero-code pre {
  overflow-x: auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  font-size: .86rem;
  line-height: 1.6;
  tab-size: 2;
}
.doc pre code, .hero-code pre code {
  padding: 0; background: none; font-size: inherit;
  white-space: pre;
}

/* Program output and data files: slightly smaller, so wide tables fit */
.doc pre code.text, .doc pre code.language-plaintext { font-size: .9em; }

.copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: .75rem; font-weight: 600;
  cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.code-block:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.copy-btn:hover { color: var(--text-strong); border-color: var(--border-strong); }
@media (hover: none) { .copy-btn { opacity: 1; } }

/* highlight.js tokens */
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition { color: var(--hl-string); }
.hljs-number, .hljs-literal { color: var(--hl-number); }
.hljs-symbol, .hljs-attr, .hljs-variable, .hljs-template-variable { color: var(--hl-symbol); }
.hljs-name, .hljs-title, .hljs-section, .hljs-type { color: var(--hl-name); }
.hljs-meta { color: var(--hl-comment); }
.hljs-deletion { color: var(--red); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.doc table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.5;
}
.doc th, .doc td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: top;
}
.doc th {
  background: var(--bg-soft);
  color: var(--text-strong);
  font-weight: 650;
  white-space: nowrap;
}
.doc tr:last-child td { border-bottom: 0; }
.doc td code { white-space: nowrap; overflow-wrap: normal; }
.doc td:first-child code { color: var(--text-strong); }

/* Numbers in benchmark tables */
.doc table.numeric td:not(:first-child),
.doc table.numeric th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* Callouts: a blockquote whose first word is bold, e.g. "> **Note** ..." */
.doc blockquote {
  margin-left: 0; margin-right: 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--text);
}
.doc blockquote > :last-child { margin-bottom: 0; }
.doc blockquote.tip { border-left-color: var(--green); background: var(--green-soft); }
.doc blockquote.warning { border-left-color: var(--amber); background: var(--amber-soft); }

/* Collapsible blocks */
.doc details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.doc details > summary {
  padding: 10px 16px;
  color: var(--text-strong);
  font-weight: 600; font-size: .92rem;
  cursor: pointer;
  list-style-position: inside;
}
.doc details > summary:hover { background: var(--bg-soft); border-radius: var(--radius); }
.doc details[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.doc details > :not(summary) { margin: 14px 16px; }
.doc details pre { margin: 14px 16px; }
.doc details + details { margin-top: -8px; }

/* Images and media */
.doc img {
  display: block;
  margin: 8px auto 22px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff; /* diagrams are drawn for a white background */
}
.doc a:has(> img) { display: block; }

.video {
  position: relative;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

figure { margin: 0 0 22px; }
figcaption { margin-top: -10px; color: var(--muted); font-size: .88rem; text-align: center; }

/* Inline SVG diagrams */
.diagram {
  margin: 8px 0 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.diagram { overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 600px; height: auto; }
.diagram text { font-family: var(--sans); fill: var(--text-strong); }
.diagram .sub { fill: var(--muted); }
.diagram .box { fill: var(--bg); stroke: var(--border-strong); }
.diagram .box-brand { fill: var(--brand-soft); stroke: var(--brand); }
.diagram .box-green { fill: var(--green-soft); stroke: var(--green); }
.diagram .arrow { stroke: var(--muted); fill: none; stroke-width: 1.6; }
.diagram .arrow-head { fill: var(--muted); }

/* Badges, e.g. <red>Deprecated</red> on the API page */
red, .badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
  font-size: .7em; font-weight: 700;
  vertical-align: middle;
  letter-spacing: .02em;
}

/* Lists of pages (archives, tags) */
.page-list { list-style: none; padding: 0; }
.page-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }

/* ---------- On this page ---------- */

.toc-side {
  position: sticky; top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-size: .85rem;
}
.toc-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.toc-side ul, .toc-side ol, .toc-inline ul, .toc-inline ol { list-style: none; margin: 0; padding: 0; }
.toc-side ul ul, .toc-side ol ol { padding-left: 12px; }
.toc-side a {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  line-height: 1.4;
}
.toc-side a:hover { color: var(--text-strong); text-decoration: none; }
.toc-side a.current { color: var(--brand); font-weight: 600; }

.toc-inline { margin-bottom: 28px; }
.toc-inline ul ul { padding-left: 14px; }
.toc-inline a { display: inline-block; padding: 2px 0; }

@media (min-width: 1280px) {
  .toc-inline { display: none; }
}
@media (max-width: 1279px) {
  .toc-side { display: none; }
}

/* ---------- Pager ---------- */

.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 56px 0 0;
}
.pager-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.pager-link:hover { border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; }
.pager-link.next { text-align: right; grid-column: 2; }
.pager-label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.pager-title { color: var(--brand); font-weight: 650; }

@media (max-width: 560px) {
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { grid-column: 1; }
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: calc(var(--content-w) + var(--toc-w) + 56px);
  margin: 72px auto 0;
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer p { margin: 4px 0; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-strong);
  font-weight: 600; font-size: .95rem;
  transition: background .15s, border-color .15s, transform .15s;
}
.button:hover { border-color: var(--brand); color: var(--text-strong); text-decoration: none; transform: translateY(-1px); }
.button.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
:root[data-theme="dark"] .button.primary { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button.primary { color: #0b1020; } }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover { color: var(--text-strong); border-color: var(--border); }

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 0 56px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
.hero-lede { margin: 18px 0 26px; color: var(--muted); font-size: 1.12rem; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.install {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: .82rem;
}
.install-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 14px; overflow-x: auto; }
.install-row + .install-row { border-top: 1px solid var(--border); }
.install-label { flex: 0 0 72px; color: var(--muted); font-weight: 600; font-size: .78rem; }
.install code { padding: 0; background: none; white-space: nowrap; overflow-wrap: normal; }

.window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}
.window-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window-bar span:nth-child(1) { background: #ff6159; }
.window-bar span:nth-child(2) { background: #ffbd2e; }
.window-bar span:nth-child(3) { background: #28c941; }
.window-bar em { margin-left: 8px; color: var(--muted); font-size: .8rem; font-style: normal; font-family: var(--mono); }
.hero-code pre { margin: 0; border: 0; border-radius: 0; font-size: .84rem; }

.home-body { max-width: 1160px; margin: 0 auto; }
.home-body > h2 { text-align: left; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}
.card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
}
.card-icon.green { background: var(--green-soft); color: var(--green); }
/* A card whose heading link covers the whole card */
.link-card { position: relative; }
.link-card:hover { border-color: var(--brand); }
.link-card h3 { margin-top: 0; }
.link-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.link-card h3 a:hover { text-decoration: none; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li {
  position: relative;
  margin: 0;
  padding: 18px 20px 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-bottom: 8px;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  font-weight: 700; font-size: .9rem;
}
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .93rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.compare > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; }
.compare h3 { margin-top: 0 !important; font-size: 1.05rem !important; }
.compare ul { margin: 0; }
.compare .yes { border-top: 4px solid var(--green); }
.compare .no { border-top: 4px solid var(--border-strong); }

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 8px; }
}
@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; }
  .hero-actions .button { flex: 1 1 auto; }
}

/* ---------- 404 ---------- */

body.not-found {
  display: grid; place-items: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}
body.not-found h1 { margin: 18px 0 8px; font-size: 2rem; color: var(--text-strong); }
body.not-found p { color: var(--muted); }

/* ---------- Print ---------- */

@media print {
  .sidebar, .topbar, .toc-side, .toc-inline, .pager, .copy-btn, .site-footer { display: none !important; }
  .layout { display: block; }
  .doc pre { white-space: pre-wrap; }
}
