/* BeetleBoy32 docs */

@font-face { font-family: "Inter"; src: url("fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Remilia Mincho"; src: url("fonts/RemiliaMincho.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Remilia Western"; src: url("fonts/RemiliaWestern.otf") format("opentype"); font-display: swap; }

/* ---------- tunables ---------- */
:root {
  --topbar-h: 64px;
  --sidebar-w: 272px;
  --toc-w: 240px;
  --content-w: 720px;
  --radius: 12px;
  --radius-sm: 8px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Remilia Mincho", "Inter", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --digits-scale: 0.967em;  /* Remilia Western digits at the Mincho capitals' height */
  --display-tracking: -0.045em;  /* Remilia Mincho's Latin letters are monospaced: tighten them */
  --screen-max: 400px;       /* screen captures: at most this wide */
  --bezel: #1a1c20;          /* around screen captures, like the board's black glass edge */
  --figure-max-h: 440px;     /* other images: at most this tall */

  --bg: #ffffff;
  --bg-soft: #f7f9f6;
  --bg-hover: #f1f4f0;
  --text: #15181a;
  --text-soft: #3c4245;
  --muted: #6b7276;
  --faint: #9aa1a4;
  --border: #e7eae6;
  --border-strong: #d6dbd4;
  --primary: #2a9d55;
  --primary-text: #1f8546;
  --primary-soft: rgba(63, 185, 80, 0.1);
  --code-bg: #0f1412;
  --code-bar: #161c19;
  --inline-code-bg: #f1f4f0;
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.04), 0 4px 16px rgba(16, 24, 20, 0.06);
  --gingham-a: rgba(204, 231, 194, 0.55);
  --gingham-b: rgba(204, 231, 194, 0.35);

  --note: #2b7de9;     --note-bg: rgba(43, 125, 233, 0.07);
  --tip: #2a9d55;      --tip-bg: rgba(42, 157, 85, 0.08);
  --important: #8957e5; --important-bg: rgba(137, 87, 229, 0.08);
  --warning: #c27a07;  --warning-bg: rgba(234, 160, 20, 0.1);
  --caution: #d1383d;  --caution-bg: rgba(209, 56, 61, 0.07);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e0d; --bg-soft: #111513; --bg-hover: #161b19;
    --text: #eef2ef; --text-soft: #c9d0cc; --muted: #929b96; --faint: #646d68;
    --border: #1e2421; --border-strong: #2a322e;
    --primary: #55cf82; --primary-text: #6ddc95; --primary-soft: rgba(85, 207, 130, 0.12);
    --code-bg: #0e1311; --code-bar: #131916; --inline-code-bg: #161c19;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
    --gingham-a: rgba(85, 207, 130, 0.07); --gingham-b: rgba(85, 207, 130, 0.045);
    --note: #5a9cf5; --note-bg: rgba(90, 156, 245, 0.09);
    --tip: #55cf82; --tip-bg: rgba(85, 207, 130, 0.09);
    --important: #a98bf0; --important-bg: rgba(169, 139, 240, 0.09);
    --warning: #e3a33a; --warning-bg: rgba(227, 163, 58, 0.09);
    --caution: #f0686c; --caution-bg: rgba(240, 104, 108, 0.09);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e0d; --bg-soft: #111513; --bg-hover: #161b19;
  --text: #eef2ef; --text-soft: #c9d0cc; --muted: #929b96; --faint: #646d68;
  --border: #1e2421; --border-strong: #2a322e;
  --primary: #55cf82; --primary-text: #6ddc95; --primary-soft: rgba(85, 207, 130, 0.12);
  --code-bg: #0e1311; --code-bar: #131916; --inline-code-bg: #161c19;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
  --gingham-a: rgba(85, 207, 130, 0.07); --gingham-b: rgba(85, 207, 130, 0.045);
  --note: #5a9cf5; --note-bg: rgba(90, 156, 245, 0.09);
  --tip: #55cf82; --tip-bg: rgba(85, 207, 130, 0.09);
  --important: #a98bf0; --important-bg: rgba(169, 139, 240, 0.09);
  --warning: #e3a33a; --warning-bg: rgba(227, 163, 58, 0.09);
  --caution: #f0686c; --caution-bg: rgba(240, 104, 108, 0.09);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.7 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
svg { flex: none; }
kbd {
  font: 500 11px/1 var(--font); color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 3px 5px; background: var(--bg);
}
.num { font-family: "Remilia Western", var(--font-display); font-size: var(--digits-scale); margin-left: 0.04em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font: 400 21px/1 var(--font-display); letter-spacing: var(--display-tracking); white-space: nowrap; }
.logo img { width: 26px; height: 26px; image-rendering: pixelated; }
.search-btn {
  margin: 0 auto; width: min(380px, 100%); height: 38px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-soft); color: var(--faint); font: 400 14px var(--font); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.search-btn:hover { border-color: var(--faint); }
.search-btn svg { width: 16px; height: 16px; }
.search-btn span { flex: 1; text-align: left; }
.topbar-links { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--muted); cursor: pointer; transition: color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.menu-btn { display: none; }

/* ---------- layout ---------- */
.layout {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w); gap: 48px;
}
.sidebar, .toc {
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 32px 0; scrollbar-width: thin;
}
.main { min-width: 0; max-width: var(--content-w); width: 100%; margin: 0 auto; padding: 40px 0 64px; }

/* ---------- sidebar ---------- */
.nav-group + .nav-group { margin-top: 28px; }
.nav-title { font-size: 12.5px; font-weight: 600; color: var(--text); padding: 0 12px 8px; letter-spacing: 0.01em; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px; margin: 1px 0; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--muted); transition: color .12s, background .12s;
}
.sidebar li a:hover { color: var(--text); background: var(--bg-hover); }
.sidebar li a.active { color: var(--primary-text); background: var(--primary-soft); font-weight: 550; }
.sidebar .icon { width: 17px; height: 17px; opacity: 0.85; }

/* ---------- table of contents ---------- */
.toc-title { font-size: 12.5px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 1px solid transparent;
  font-size: 13px; line-height: 1.5; color: var(--muted); transition: color .12s, border-color .12s;
}
.toc a[data-level="3"] { padding-left: 26px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--primary-text); border-left-color: var(--primary); font-weight: 500; }

/* ---------- page head ---------- */
.eyebrow { font-size: 13.5px; font-weight: 600; color: var(--primary-text); margin-bottom: 8px; }
.page-head h1 { font: 650 32px/1.2 var(--font); letter-spacing: -0.025em; margin: 0; color: var(--text); }
.hero-title { font: 400 56px/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin: 0; color: var(--text); }
.lead { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 10px 0 0; }
.page-head { padding-bottom: 8px; margin-bottom: 8px; }

.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 40px 40px 40px 44px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 120% at 100% 0%, var(--primary-soft), transparent 60%), var(--bg-soft);
}
.hero::before {  /* the trailer's gingham */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(90deg, var(--gingham-b) 0 24px, transparent 24px 48px),
    repeating-linear-gradient(0deg, var(--gingham-b) 0 24px, transparent 24px 48px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
}
.hero .lead { font-size: 18px; margin-top: 14px; max-width: 26ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-image { width: 100%; height: auto; filter: drop-shadow(0 18px 28px rgba(16, 24, 20, 0.18)); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 550; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong);
  transition: border-color .15s, background .15s, transform .15s;
}
.btn:hover { border-color: var(--faint); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { color: #fff; background: var(--primary); border-color: transparent; }
.btn-primary:hover { background: var(--primary-text); border-color: transparent; }
:root[data-theme="dark"] .btn-primary { color: #06120b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #06120b; } }
.page-home .main { padding-top: 32px; }

/* ---------- prose ---------- */
.prose { color: var(--text-soft); }
.prose > :first-child { margin-top: 24px; }
.prose h2, .prose h3 { color: var(--text); position: relative; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.prose h2 { font-size: 23px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; margin: 48px 0 12px; }
.prose h3 { font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; margin: 32px 0 8px; }
.prose .anchor {
  position: absolute; left: -26px; padding-right: 8px; color: var(--faint); opacity: 0; font-weight: 400;
  transition: opacity .12s;
}
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p { margin: 14px 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--primary); transition: border-width .1s; }
.prose a:hover { border-bottom-width: 2px; }
.prose a.anchor { border: 0; }
.prose ul, .prose ol { padding-left: 22px; margin: 14px 0; }
.prose li { margin: 6px 0; padding-left: 4px; }
.prose li::marker { color: var(--faint); }
.prose ol > li::marker { font-weight: 600; font-size: 14px; color: var(--muted); }
.prose li > p { margin: 6px 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose :not(pre) > code {
  font: 500 0.86em var(--font-mono); padding: 2px 6px; border-radius: 6px;
  background: var(--inline-code-bg); border: 1px solid var(--border); color: var(--text); white-space: nowrap;
}
.prose img { max-width: 100%; }

/* tasks (roadmap) */
.prose li.task { list-style: none; position: relative; margin-left: -22px; padding-left: 30px; }
.prose li.task > .check, .prose li.task > p > .check {
  position: absolute; left: 0; top: 0.32em; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border-strong); background: var(--bg);
}
.prose li.task.done > .check, .prose li.task.done > p > .check {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/13px no-repeat;
  border-color: var(--primary);
}

/* tables */
.table { margin: 20px 0; 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 { text-align: left; font-weight: 600; color: var(--text); background: var(--bg-soft); }
.prose th, .prose td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: normal; }

/* code blocks */
.code {
  margin: 20px 0; border-radius: var(--radius); overflow: hidden; background: var(--code-bg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
:root[data-theme="dark"] .code { border-color: var(--border-strong); }
.code-bar {
  display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px 0 16px;
  background: var(--code-bar); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px; font-weight: 500; color: #9aa8a0;
}
.code-bar span:empty + .copy { margin-left: auto; }
.copy {
  font: 500 12px var(--font); color: #9aa8a0; background: none; border: 0; padding: 5px 8px; border-radius: 6px;
  cursor: pointer; transition: color .12s, background .12s;
}
.copy:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.copy.done { color: #6ddc95; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; background: transparent; }
.code pre code { font: 400 13.5px/1.65 var(--font-mono); color: #e6edf3; }

/* callouts */
.callout {
  display: flex; gap: 12px; margin: 20px 0; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid; font-size: 14.5px; line-height: 1.65;
}
.callout .icon { width: 19px; height: 19px; margin-top: 2px; }
.callout-body { min-width: 0; color: var(--text-soft); }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body ul { margin: 8px 0 0; }
.callout-body li { margin: 4px 0; }
.callout-note { color: var(--note); background: var(--note-bg); border-color: color-mix(in srgb, var(--note) 25%, transparent); }
.callout-tip { color: var(--tip); background: var(--tip-bg); border-color: color-mix(in srgb, var(--tip) 25%, transparent); }
.callout-important { color: var(--important); background: var(--important-bg); border-color: color-mix(in srgb, var(--important) 25%, transparent); }
.callout-warning { color: var(--warning); background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.callout-caution { color: var(--caution); background: var(--caution-bg); border-color: color-mix(in srgb, var(--caution) 25%, transparent); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.prose a.card {
  display: block; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); font-weight: 400; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.prose a.card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.card-icon { width: 22px; height: 22px; color: var(--primary); margin-bottom: 14px; }
.card-title { font-weight: 600; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.card-desc { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* video */
.video {
  margin: 24px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); background: #000; aspect-ratio: 16 / 9;
}
.video video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* figures: a frame around each image, its title as the caption */
.figure {
  margin: 24px 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-soft);
  text-align: center;
}
.figure img { display: block; max-width: 100%; max-height: var(--figure-max-h); width: auto; height: auto; margin: 0 auto; }
.figure figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.figure figcaption b { color: var(--text); font-weight: 600; }
.figure.screen img {
  width: 100%; max-height: none; max-width: var(--screen-max); image-rendering: pixelated;
  border: 8px solid var(--bezel); border-radius: 16px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow);
  background: var(--bezel);
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.grid:has(> .figure:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .figure { margin: 0; padding: 14px; }
.grid .figure.screen img { border-width: 6px; border-radius: 12px; }
.grid .figure figcaption { margin-top: 10px; }

/* ---------- pager and footer ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .15s;
}
.pager a:hover { border-color: var(--primary); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-hint { font-size: 12.5px; color: var(--muted); }
.pager-label { display: flex; align-items: center; gap: 8px; font-weight: 550; color: var(--text); }
.pager-label .icon { width: 16px; height: 16px; color: var(--muted); }
.footer {
  display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted);
}
.footer > span { font: 400 16px var(--font-display); color: var(--text); }
.footer a:hover { color: var(--text); }

/* ---------- search ---------- */
.search { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(8, 12, 10, 0.4); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.search[hidden] { display: none; }
.search-panel {
  width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-field svg { width: 19px; height: 19px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 400 16px var(--font); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; }
.search-results li.selected a { background: var(--primary-soft); }
.sr-page { font-size: 12px; color: var(--muted); }
.sr-title { font-weight: 550; color: var(--text); font-size: 14.5px; }
.sr-text { font-size: 13px; color: var(--muted); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-results mark { background: none; color: var(--primary-text); font-weight: 600; }
.search-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 56px; }
  .topbar-inner, .layout { padding: 0 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .search-btn { width: 38px; padding: 0; justify-content: center; margin-right: 0; flex: none; }
  .search-btn span, .search-btn kbd { display: none; }
  .topbar-inner { gap: 8px; }
  .logo { margin-right: auto; }
  .sidebar {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; height: 100vh; width: min(300px, 85vw);
    padding: 24px 16px; background: var(--bg); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(8, 12, 10, 0.35); opacity: 0; pointer-events: none; transition: opacity .22s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .main { padding-top: 28px; }
  .prose .anchor { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px), (max-width: 700px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-image { max-width: 380px; margin: 0 auto; grid-row: 1; }
}
@media (max-width: 600px) {
  .cards, .pager { grid-template-columns: minmax(0, 1fr); }
  .grid, .grid:has(> .figure:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid .figure { padding: 8px; }
  .figure { padding: 12px; }
  .hero-title { font-size: 42px; }
  .page-head h1 { font-size: 29px; }
  .prose :not(pre) > code { white-space: normal; word-break: break-word; }
}
