/* Picture Frame System theme. StaticForge bundles these @imports into one file at build time. */
/* Import: tokens.css */
/* Design tokens: "the lit-up family desk". Light is cream paper and ink; dark is a lamp-lit brown-black. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root,
.force-light {
  color-scheme: light;

  --paper: #faf5ea;
  --paper-2: #f2ead8;
  --surface: #fffdf8;
  --line: #e3dac8;
  --line-strong: #9a8d76;
  --fg: #2a2118;
  --soft: #54483a;
  --dim: #6b5e4c;
  --accent: #1b64b0;
  --accent-hover: #14508f;
  --accent-bg: #e3ecf4;
  --on-accent: #fff;
  --postmark: #b8502e; /* decorative only: it does not meet text contrast */
  --ok: #1f6a38;
  --ok-bg: #e3efd9;
  --warn: #8a5300;
  --warn-bg: #f8e8c4;
  --bad: #b0281c;
  --bad-bg: #f9e0d9;
  --code-bg: #2a2118;
  --code-fg: #f3ecdd;
  --code-dim: #a99d86;
  --focus: 0 0 0 3px rgba(27, 100, 176, 0.4);
  --shadow-1: 0 1px 2px rgba(70, 45, 10, 0.08), 0 1px 1px rgba(70, 45, 10, 0.04);
  --shadow-2: 0 10px 28px rgba(70, 45, 10, 0.16);
  --ring: 0 0 0 1px rgba(70, 45, 10, 0.08);
  --grain: rgba(110, 85, 40, 0.035);
  --header-bg: rgba(250, 245, 234, 0.9);
}

/* Dark follows the system unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --paper: #14110d;
    --paper-2: #1d1913;
    --surface: #211c15;
    --line: #3a3226;
    --line-strong: #6e6350;
    --fg: #f3ecdd;
    --soft: #d2c8b4;
    --dim: #a99d86;
    --accent: #7db4ef;
    --accent-hover: #a3cbf5;
    --accent-bg: #1c2c3e;
    --on-accent: #14110d;
    --postmark: #e07a52;
    --ok: #8fd49a;
    --ok-bg: #16301c;
    --warn: #ffb74d;
    --warn-bg: #2d2209;
    --bad: #ff8f84;
    --bad-bg: #371a17;
    --code-bg: #0e0c09;
    --code-fg: #f3ecdd;
    --code-dim: #8f846f;
    --focus: 0 0 0 3px rgba(125, 180, 239, 0.5);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.55);
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --grain: rgba(255, 235, 200, 0.03);
    --header-bg: rgba(20, 17, 13, 0.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper: #14110d;
  --paper-2: #1d1913;
  --surface: #211c15;
  --line: #3a3226;
  --line-strong: #6e6350;
  --fg: #f3ecdd;
  --soft: #d2c8b4;
  --dim: #a99d86;
  --accent: #7db4ef;
  --accent-hover: #a3cbf5;
  --accent-bg: #1c2c3e;
  --on-accent: #14110d;
  --postmark: #e07a52;
  --ok: #8fd49a;
  --ok-bg: #16301c;
  --warn: #ffb74d;
  --warn-bg: #2d2209;
  --bad: #ff8f84;
  --bad-bg: #371a17;
  --code-bg: #0e0c09;
  --code-fg: #f3ecdd;
  --code-dim: #8f846f;
  --focus: 0 0 0 3px rgba(125, 180, 239, 0.5);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.07);
  --grain: rgba(255, 235, 200, 0.03);
  --header-bg: rgba(20, 17, 13, 0.9);
}

:root {
  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.375rem;
  --text-hero: clamp(2.5rem, 5.5vw, 4.25rem);

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Shape and motion */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;

  /* Layout */
  --side-w: 264px;
  --toc-w: 216px;
  --content-w: 46rem;
  --measure: 68ch;
  --wrap: 80rem;
  --head-h: 64px;
}


/* Import: base.css */
/* Reset, typography, links, focus. */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + var(--space-5));
  scroll-behavior: smooth;
}
@media (min-width: 640px) {
  html { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, var(--grain) 0 1px, transparent 1px 3px);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
}
h1 { font-size: var(--text-3xl); line-height: 1.15; }
h2 { font-size: var(--text-2xl); line-height: 1.2; }
h3 { font-size: var(--text-xl); line-height: 1.3; }
h4 { font-size: var(--text-lg); line-height: 1.5; }

p { margin: 0 0 var(--space-4); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

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

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-7) 0; }

code, kbd, samp, pre { font-family: var(--font-mono); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
main:focus-visible, [tabindex="-1"]:focus-visible { outline: none; }

::selection { background: var(--accent-bg); color: var(--fg); }

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-md);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); color: var(--on-accent); }

.eyebrow {
  margin: 0 0 var(--space-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--dim);
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--soft);
  max-width: 44rem;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space-5); }
.wrap-narrow { max-width: 52rem; }
@media (min-width: 900px) {
  .wrap { padding-inline: var(--space-6); }
}

/* Perforation rule: a row of punched holes between sections. */
.perforation {
  height: 8px;
  background-image: radial-gradient(circle at 6px 4px, var(--line-strong) 0 2px, transparent 2.5px);
  background-size: 12px 8px;
  background-repeat: repeat-x;
  opacity: 0.55;
}


/* Import: layout.css */
/* Site header, footer. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--head-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  height: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
@media (min-width: 900px) {
  .site-header-inner { padding-inline: var(--space-6); gap: var(--space-5); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  flex: none;
  border-radius: var(--r-sm);
}
.brand:hover { color: var(--fg); }
.logo-mark { width: 40px; height: 32px; flex: none; }
.wordmark { font-family: var(--font-display); font-size: 1.15rem; line-height: 1; white-space: nowrap; display: none; }
.wordmark-main { font-weight: 600; }
.wordmark-sub { font-weight: 500; font-style: italic; color: var(--dim); }
@media (min-width: 420px) { .wordmark { display: inline; } }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--soft);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.site-nav a:hover { color: var(--fg); background: var(--paper-2); }
.site-nav a[aria-current] { color: var(--accent); }
.site-nav .nav-gitlab { display: none; }
@media (min-width: 560px) { .site-nav .nav-gitlab { display: block; } }

.theme-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  position: relative;
}
html.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--fg); background: var(--paper-2); }
.theme-icon { display: inline-flex; position: absolute; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.theme-icon svg { width: 22px; height: 22px; }
.theme-icon-moon { opacity: 0; transform: rotate(-30deg) scale(0.7); }
/* Show the icon of the theme you would switch to. */
:root[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: rotate(30deg) scale(0.7); }
:root[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { opacity: 0; transform: rotate(30deg) scale(0.7); }
  :root:not([data-theme="light"]) .theme-icon-moon { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-icon { transition: none; }
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--paper-2);
  color: var(--soft);
  font-size: var(--text-sm);
}
.site-footer .perforation { background-color: var(--paper); }
.footer-grid {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-7);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-about p { margin: var(--space-4) 0 0; max-width: 28ch; color: var(--dim); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; }
.footer-col a { display: inline-block; padding: 6px 0; color: var(--soft); text-decoration: none; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; }
.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}
.footer-base p { margin: 0; color: var(--dim); }
.postmark { color: var(--postmark); opacity: 0.6; transform: rotate(-8deg); display: inline-flex; }

.site-nav a { white-space: nowrap; }
html.js .force-light .theme-toggle { display: none; }


/* Import: components.css */
/* Buttons, badges, cards, stamps, callouts, code, tables, diagrams. */

/* ---- Buttons and links -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn .icon { width: 20px; height: 20px; flex: none; }
.btn-primary { color: var(--on-accent); background: var(--accent); }
.btn-primary:hover { color: var(--on-accent); background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--fg); background: var(--paper-2); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }
.btn:active { transform: translateY(1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---- Badges ------------------------------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: var(--space-5) 0 0; padding: 0; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  color: var(--soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.badge:nth-child(1) { color: var(--accent); background: var(--accent-bg); border-color: transparent; }
.badge:nth-child(4) { color: var(--ok); background: var(--ok-bg); border-color: transparent; }

/* ---- Cards -------------------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-5); }
.card {
  position: relative;
  padding: var(--space-5);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card::after { /* folded corner */
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background: linear-gradient(225deg, var(--paper) 0 50%, var(--paper-2) 50% 100%);
  border-bottom-left-radius: var(--r-xs);
  box-shadow: -1px 1px 2px rgba(70, 45, 10, 0.12);
  border-top-right-radius: var(--r-lg);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--ring), var(--shadow-2); }
.card h3 { font-size: var(--text-xl); margin: var(--space-4) 0 var(--space-2); }
.card p { margin: 0; color: var(--soft); font-size: var(--text-sm); line-height: 1.6; }
.card-icon, .why-icon, .aud-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 50%;
}
.card-icon .icon, .why-icon .icon, .aud-icon .icon { width: 24px; height: 24px; }
.card-stamp { padding-bottom: calc(var(--space-5) + 18px); }

/* ---- Stamps ------------------------------------------------------------------------------- */
.stamp, .mini-stamp {
  --notch: 3.2px;
  background-color: #f7f0de;
  -webkit-mask:
    radial-gradient(circle at 7px 0, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 14px 100% repeat-x,
    radial-gradient(circle at 7px 100%, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 14px 100% repeat-x,
    radial-gradient(circle at 0 7px, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 100% 14px repeat-y,
    radial-gradient(circle at 100% 7px, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 100% 14px repeat-y;
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle at 7px 0, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 14px 100% repeat-x,
    radial-gradient(circle at 7px 100%, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 14px 100% repeat-x,
    radial-gradient(circle at 0 7px, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 100% 14px repeat-y,
    radial-gradient(circle at 100% 7px, transparent var(--notch), #000 calc(var(--notch) + 0.6px)) 0 0 / 100% 14px repeat-y;
  mask-composite: intersect;
}
.mini-stamp {
  position: absolute;
  right: 18px; bottom: 14px;
  width: 30px; height: 37px;
  transform: rotate(6deg);
  background-image: radial-gradient(circle at 50% 38%, var(--accent) 0 3px, transparent 3.5px), linear-gradient(180deg, transparent 62%, var(--accent-bg) 62%);
}

/* ---- Photo corners ------------------------------------------------------------------------ */
.photo-corners {
  background:
    linear-gradient(135deg, var(--paper-2) 0 50%, transparent 50%) top left / 18px 18px no-repeat,
    linear-gradient(225deg, var(--paper-2) 0 50%, transparent 50%) top right / 18px 18px no-repeat,
    linear-gradient(45deg, var(--paper-2) 0 50%, transparent 50%) bottom left / 18px 18px no-repeat,
    linear-gradient(315deg, var(--paper-2) 0 50%, transparent 50%) bottom right / 18px 18px no-repeat,
    var(--surface);
}

/* ---- Callouts ----------------------------------------------------------------------------- */
:root {
  --ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='M22 4 12 14.01l-3-3'/%3E%3C/svg%3E");
  --ic-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --ic-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86z'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
}
.callout {
  --c: var(--accent);
  --c-bg: var(--accent-bg);
  --c-icon: var(--ic-info);
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  color: var(--fg);
  background: var(--c-bg);
  border-left: 4px solid var(--c);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.callout-tip, .callout-here { --c: var(--ok); --c-bg: var(--ok-bg); --c-icon: var(--ic-check); }
.callout-warning { --c: var(--warn); --c-bg: var(--warn-bg); --c-icon: var(--ic-warn); }
.callout-danger { --c: var(--bad); --c-bg: var(--bad-bg); --c-icon: var(--ic-stop); }
.callout-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c);
}
.callout-label::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  background-color: currentColor;
  -webkit-mask: var(--c-icon) center / contain no-repeat;
  mask: var(--c-icon) center / contain no-repeat;
}
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin-bottom: var(--space-3); }

/* ---- Code --------------------------------------------------------------------------------- */
:not(pre) > code {
  padding: 0.12em 0.4em;
  font-size: 0.875em;
  color: var(--fg);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow-wrap: anywhere;
}
.codeblock {
  position: relative;
  margin: var(--space-5) 0;
  color: var(--code-fg);
  background: var(--code-bg);
  border-radius: var(--r-md);
  box-shadow: var(--ring);
}
.codeblock pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  tab-size: 4;
  border-radius: var(--r-md);
}
.codeblock pre:focus-visible { outline: 2px solid #8cc7ff; outline-offset: 2px; }
.codeblock code { padding: 0; font-size: inherit; color: inherit; background: none; border: 0; white-space: pre; }
.codeblock-lang {
  position: absolute;
  top: 10px; left: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-dim);
  pointer-events: none;
}
.codeblock[data-lang] pre { padding-top: 38px; }
.copy-btn {
  position: absolute;
  top: 6px; right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  padding: 0;
  color: var(--code-dim);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.copy-btn::before { content: ""; position: absolute; inset: -6px; } /* 44px hit area */
.copy-btn:hover { color: var(--code-fg); background: rgba(255, 255, 255, 0.08); }
.copy-btn:focus-visible { outline: 2px solid #8cc7ff; outline-offset: 0; }
.copy-btn .icon { width: 18px; height: 18px; }
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied { color: #a9d6a0; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }
.tok-k { color: #f0a37f; }
.tok-s { color: #a9d6a0; }
.tok-n { color: #f5c57a; }
.tok-c { color: #a99d86; font-style: italic; }
.tok-f { color: #8cc7ff; }

/* ---- Tables ------------------------------------------------------------------------------- */
.table-scroll {
  margin: var(--space-5) 0;
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--ring);
}
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.5; }
.prose th {
  padding: 12px 16px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  color: var(--soft);
  background: var(--paper-2);
  white-space: nowrap;
}
.prose td { padding: 12px 16px; vertical-align: top; border-top: 1px solid var(--line); }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.prose td:first-child { font-weight: 600; }
.prose td:first-child code { font-weight: 400; }

/* ---- Diagrams (mermaid) ------------------------------------------------------------------- */
.diagram {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring);
}
.diagram pre.mermaid {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--soft);
  background: none;
  white-space: pre;
}
.diagram pre.mermaid[data-processed] { font-family: var(--font-body); font-size: 15px; text-align: center; white-space: normal; }
.diagram svg { max-width: 100%; height: auto; }
.diagram svg { min-width: 720px; }


/* Import: prose.css */
/* Long-form text: docs, for-agents, family. */

.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--space-8) 0 var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.prose h2:first-child { border-top: 0; padding-top: 0; }
.prose h3 { margin: var(--space-7) 0 var(--space-3); }
.prose h4 { margin: var(--space-6) 0 var(--space-2); }
.prose h2 + h3 { margin-top: var(--space-4); }
.prose ul, .prose ol { margin: 0 0 var(--space-4); padding-left: 1.4em; }
.prose li { margin: 0 0 var(--space-2); padding-left: 0.2em; }
.prose li > ul, .prose li > ol { margin-top: var(--space-2); margin-bottom: 0; }
.prose li::marker { color: var(--dim); }
.prose a { text-decoration-thickness: 1px; }
.prose img { border-radius: var(--r-md); box-shadow: var(--ring); }
.prose strong { font-weight: 650; }
.prose blockquote { margin: var(--space-5) 0; padding: 0 0 0 var(--space-5); border-left: 3px solid var(--line-strong); color: var(--soft); }
.prose hr { margin: var(--space-7) 0; }
.prose details { margin: var(--space-4) 0; padding: var(--space-3) var(--space-4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--ring); }
.prose details > summary { cursor: pointer; font-weight: 600; }

/* Heading permalinks: visible on hover or keyboard focus. */
.heading-permalink {
  margin-left: 0.4em;
  font-family: var(--font-body);
  font-size: 0.75em;
  font-weight: 400;
  text-decoration: none;
  color: var(--dim);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.heading-permalink::after { content: "#"; }
h1:hover .heading-permalink, h2:hover .heading-permalink, h3:hover .heading-permalink, h4:hover .heading-permalink,
.heading-permalink:focus-visible { opacity: 1; }
@media (hover: none) { .heading-permalink { opacity: 0.5; } }
.prose hr + h2 { border-top: 0; padding-top: 0; margin-top: var(--space-6); }


/* Import: docs.css */
/* Docs layout: sidebar | content | on this page. */

.docs-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--wrap);
  width: 100%;
  margin-inline: auto;
  padding: var(--space-5) var(--space-4) var(--space-8);
  gap: var(--space-5);
}
@media (min-width: 900px) { .docs-shell { padding-inline: var(--space-6); } }
@media (min-width: 820px) {
  .docs-shell {
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    column-gap: var(--space-7);
    align-items: start;
  }
}
@media (min-width: 1100px) {
  .docs-shell { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); }
}

/* Sidebar */
.docs-side { min-width: 0; }
.docs-side-head, .docs-menu-close, .docs-menu-button, .docs-scrim { display: none; }

@media (min-width: 820px) {
  .docs-side {
    position: sticky;
    top: calc(var(--head-h) + var(--space-5));
    max-height: calc(100vh - var(--head-h) - var(--space-6));
    overflow-y: auto;
    padding-right: var(--space-2);
    overscroll-behavior: contain;
  }
}

/* Below 820px with JS the sidebar becomes a drawer; without JS it stacks above the page. */
@media (max-width: 819.98px) {
  html.js .docs-menu-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    justify-self: start;
    min-height: 44px;
    padding: 0 var(--space-4);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--fg);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    cursor: pointer;
  }
  html.js .docs-menu-button .icon { width: 20px; height: 20px; }
  html.js .docs-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(88vw, 320px);
    padding: var(--space-4) var(--space-4) var(--space-7);
    overflow-y: auto;
    background: var(--paper);
    border-right: 1px solid var(--line-strong);
    box-shadow: var(--shadow-2);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  html.js .docs-side.is-open { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
  html.js .docs-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
  html.js .docs-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    color: var(--soft);
    background: transparent;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
  }
  html.js .docs-menu-close:hover { background: var(--paper-2); }
  html.js .docs-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20, 14, 6, 0.5); }
  html.js .docs-scrim:not([hidden]) { display: block; }
  html.js body.drawer-open { overflow: hidden; }
}
@media (max-width: 819.98px) and (prefers-reduced-motion: reduce) {
  html.js .docs-side, html.js .docs-side.is-open { transition: none; }
}

.docs-nav { font-size: var(--text-sm); }
.docs-nav-home {
  display: block;
  margin-bottom: var(--space-3);
  padding: 8px 12px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--r-sm);
}
.docs-nav-home:hover { background: var(--paper-2); color: var(--fg); }
.nav-group { margin: 0 0 var(--space-3); }
.nav-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-sm);
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .eyebrow { margin: 0; }
.nav-group > summary::after {
  content: "";
  width: 7px; height: 7px;
  margin-right: 4px;
  border-right: 2px solid var(--dim);
  border-bottom: 2px solid var(--dim);
  transform: rotate(-45deg);
  transition: transform var(--dur) var(--ease);
}
.nav-group[open] > summary::after { transform: rotate(45deg); }
.nav-group > summary:hover { background: var(--paper-2); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li { margin: 0; }
.nav-group li a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  color: var(--soft);
  text-decoration: none;
  border-radius: var(--r-sm);
  line-height: 1.35;
}
.nav-group li a:hover { color: var(--fg); background: var(--paper-2); }
.nav-group li a.is-current, .docs-nav-home.is-current {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-bg);
}
.nav-group li a.is-current::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-extra a { font-style: italic; }
@media (prefers-reduced-motion: reduce) { .nav-group > summary::after { transition: none; } }

/* Main column */
.docs-main { min-width: 0; }
.breadcrumbs { margin-bottom: var(--space-5); font-size: var(--text-sm); color: var(--dim); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 var(--space-2); opacity: 0.5; }
.breadcrumbs a { color: var(--dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--soft); }

.doc-head { margin-bottom: var(--space-6); }
.doc-head h1 { font-size: var(--text-3xl); }
@media (min-width: 640px) { .doc-head h1 { font-size: 2.75rem; line-height: 1.1; } }

.edit-link { margin-top: var(--space-6); font-size: var(--text-sm); }
.edit-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.edit-link .icon { width: 16px; height: 16px; }

/* On this page */
.docs-toc { display: none; }
@media (min-width: 1100px) {
  .docs-toc {
    display: block;
    position: sticky;
    top: calc(var(--head-h) + var(--space-5));
    max-height: calc(100vh - var(--head-h) - var(--space-6));
    overflow-y: auto;
    font-size: var(--text-sm);
  }
  .toc-mobile { display: none; }
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ul { border-left: 2px solid var(--line); }
.toc ul ul { padding-left: var(--space-3); }
.toc li { margin: 0; }
.toc a {
  display: block;
  margin-left: -2px;
  padding: 5px 0 5px var(--space-3);
  line-height: 1.4;
  color: var(--dim);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--fg); }
.toc a.is-active { color: var(--accent); font-weight: 600; border-left-color: var(--accent); }
.toc-title { margin-bottom: var(--space-3); }

.toc-mobile { margin: 0 0 var(--space-6); padding: var(--space-3) var(--space-4); background: var(--surface); border-radius: var(--r-md); box-shadow: var(--ring); font-size: var(--text-sm); }
.toc-mobile summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.toc-mobile ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.toc-mobile ul ul { padding-left: var(--space-4); margin: 0; }
.toc-mobile a { display: block; padding: 6px 0; text-decoration: none; color: var(--soft); }
.toc-mobile a:hover { color: var(--accent); }

/* Previous / next */
.prevnext { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-top: var(--space-8); max-width: var(--measure); }
@media (min-width: 640px) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-4) var(--space-5);
  color: var(--fg);
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease);
}
.prevnext-card:hover { color: var(--fg); box-shadow: 0 0 0 2px var(--accent), var(--shadow-1); }
.prevnext-next { text-align: right; grid-column: 2; }
@media (max-width: 639.98px) { .prevnext-next { grid-column: 1; } }
.prevnext-title { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); line-height: 1.3; }
.prevnext-next .prevnext-title { justify-content: flex-end; }
.prevnext-title .icon { width: 20px; height: 20px; flex: none; color: var(--accent); transition: transform var(--dur) var(--ease); }
.prevnext-next:hover .icon { transform: translateX(4px); }
.prevnext-prev:hover .icon { transform: translateX(-4px); }
@media (prefers-reduced-motion: reduce) { .prevnext-title .icon, .link-arrow .icon { transition: none; } .prevnext-card:hover .icon { transform: none; } }


/* Import: landing.css */
/* Landing page. */

.section { padding-block: var(--space-8); }
@media (min-width: 720px) { .section { padding-block: var(--space-9); } }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 46rem; margin-bottom: var(--space-7); }
.section-head h2 { font-size: var(--text-2xl); }
@media (min-width: 720px) { .section-head h2 { font-size: var(--text-3xl); line-height: 1.15; } }
.section-head .lead { margin-top: var(--space-4); margin-bottom: 0; }
.section-more { margin: var(--space-6) 0 0; }
.page-landing .perforation { background-color: transparent; }

/* Hero */
.hero { padding-block: var(--space-7) var(--space-8); overflow: hidden; }
@media (min-width: 900px) { .hero { padding-block: var(--space-9) var(--space-9); } }
.hero-grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 5fr 7fr; gap: var(--space-8); } }
.hero h1 { font-size: var(--text-hero); line-height: 1.05; font-weight: 600; margin-bottom: var(--space-5); }
.hero .lead { margin-bottom: var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
.hero-actions-center { justify-content: center; }

.hero-art { position: relative; padding: 4% 6% 6% 2%; }
.device {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 3.2%;
  background: linear-gradient(145deg, #4a3826, #2e2217);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 235, 200, 0.18);
  transform: rotate(-1.5deg);
  animation: float 6s ease-in-out infinite;
}
.glass {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  background: #e9b872;
}
.glass::after { /* glare */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 22%, transparent 22% 100%);
  pointer-events: none;
}
.scene { position: absolute; inset: 0; background: linear-gradient(180deg, #f6d9a0 0%, #efb774 45%, #d98b5a 100%); }
.scene-sun { position: absolute; left: 62%; top: 20%; width: 15%; aspect-ratio: 1; background: #fff4d6; border-radius: 50%; box-shadow: 0 0 0 10px rgba(255, 244, 214, 0.25), 0 0 0 26px rgba(255, 244, 214, 0.12); }
.scene-hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.scene-hill-far { bottom: 10%; height: 42%; background: #a9714f; }
.scene-hill-near { bottom: -18%; height: 48%; background: #6c4a35; left: -30%; right: 10%; }
.scene-tree { position: absolute; left: 17%; bottom: 22%; width: 8%; height: 22%; background: #3f2c20; border-radius: 50% 50% 8% 8%; }
.scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, transparent, rgba(24, 14, 6, 0.7)); }
.device-line { position: absolute; left: 5%; bottom: 5%; margin: 0; display: flex; gap: 0.6em; align-items: baseline; color: #fff; font-size: clamp(0.7rem, 1.5vw, 1rem); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.device-line strong { font-family: var(--font-display); font-size: 1.9em; font-weight: 500; line-height: 1; }
.device-sep { opacity: 0.6; }
.device-shadow { position: absolute; left: 12%; right: 12%; bottom: 1%; height: 5%; background: radial-gradient(ellipse at center, rgba(70, 45, 10, 0.32), transparent 70%); }

.stamp-wrap {
  position: absolute;
  top: 0; right: 0;
  width: clamp(64px, 12vw, 81px);
  aspect-ratio: 81 / 99;
  transform: rotate(6deg);
  filter: drop-shadow(0 3px 5px rgba(70, 45, 10, 0.3));
  animation: thump 380ms var(--ease) 1 both;
}
.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%; height: 100%;
  padding: 8px 6px 6px;
  color: #3b2f22;
}
.stamp svg { width: 100%; height: auto; max-height: 62%; background: #e3ecf4; border-radius: 2px; padding: 6px; }
.stamp-caption { font-family: var(--font-display); font-size: 12px; font-style: italic; font-weight: 500; line-height: 1; }
.postmark-ring { position: absolute; top: 3%; right: 7%; color: var(--postmark); opacity: 0.6; transform: rotate(-9deg); pointer-events: none; width: clamp(110px, 20vw, 150px); height: auto; }

@keyframes float { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-4px); } }
@keyframes thump { 0% { transform: rotate(6deg) scale(1.35); opacity: 0; } 70% { transform: rotate(6deg) scale(0.96); opacity: 1; } 100% { transform: rotate(6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .device { animation: none; }
  .stamp-wrap { animation: none; }
  .card, .card:hover { transition: none; transform: none; }
}

/* Why */
.why-grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-7); } }
.why-item h3 { margin: var(--space-4) 0 var(--space-2); }
.why-item p { color: var(--soft); margin: 0; }

/* Acts */
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); counter-reset: act; }
@media (min-width: 900px) { .acts { grid-template-columns: repeat(3, 1fr); } }
.act {
  position: relative;
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-1);
}
.act-num {
  position: absolute;
  top: -22px; left: var(--space-5);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper-2);
}
.act h3 { margin-bottom: var(--space-3); }
.act p { color: var(--soft); font-size: var(--text-sm); }
.act .link-arrow { font-size: var(--text-sm); }

/* Yours, not ours */
.yours {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-1);
}
@media (min-width: 900px) { .yours { grid-template-columns: 1.3fr 1fr; padding: var(--space-8) var(--space-8); gap: var(--space-8); align-items: center; } }
.yours h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
@media (min-width: 720px) { .yours h2 { font-size: var(--text-3xl); } }
.yours p { color: var(--soft); }
.yours-note { margin: 0; }

/* Audience */
.audience { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.aud { padding: var(--space-5); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--ring), var(--shadow-1); }
.aud h3 { margin: var(--space-4) 0 var(--space-2); }
.aud p { color: var(--soft); font-size: var(--text-sm); }
.aud .link-arrow { font-size: var(--text-sm); }
.know-first { max-width: 52rem; margin: var(--space-7) 0 0; padding: var(--space-4) var(--space-5); color: var(--soft); background: var(--surface); border-left: 4px solid var(--line-strong); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: var(--text-sm); }

/* CTA band */
.cta { text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta h2 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.cta .lead { margin-inline: auto; margin-bottom: var(--space-6); }
.requirements { max-width: 46rem; margin: var(--space-6) 0 0; color: var(--soft); font-size: var(--text-sm); }
.license-note { margin: var(--space-4) 0 0; color: var(--dim); font-size: var(--text-sm); }


/* Import: family.css */
/* The family page: one column, big type, forced light palette, built to be printed. */

.family { padding: var(--space-6) var(--space-4) var(--space-8); }
.family-article { max-width: 40rem; margin-inline: auto; }
.family-head { margin-bottom: var(--space-6); }
.family-head h1 { font-size: 2.25rem; line-height: 1.15; }
.family-actions { margin: var(--space-5) 0 0; }
.family-actions .btn { display: none; min-height: 56px; }
html.js .family-actions .btn { display: inline-flex; }

.family-body { max-width: none; font-size: 22px; line-height: 1.6; }
.family-body h2 { font-size: 1.75rem; line-height: 1.2; margin-top: var(--space-8); }
.family-body h3 { font-size: 1.5rem; margin-top: var(--space-7); }
.family-body a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.family-body .btn, .family-body a.button { min-height: 56px; }
.family-body ul, .family-body ol { padding-left: 1.3em; }
.family-body li { margin-bottom: var(--space-3); }

/* Numbered steps: accent discs. */
.family-body ol { list-style: none; counter-reset: step; padding-left: 0; }
.family-body ol > li { position: relative; counter-increment: step; padding-left: 64px; min-height: 44px; margin-bottom: var(--space-5); }
.family-body ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
}
.family-body ol ol, .family-body ul ol { margin-top: var(--space-3); }

.family-body .callout { padding: 20px; border-left-width: 6px; font-size: 20px; }
.family-body .callout-label { font-size: 1rem; }
.family-body code { font-size: 0.8em; }

@media (min-width: 720px) {
  .family { padding-top: var(--space-8); }
  .family-head h1 { font-size: 2.75rem; }
}


/* Import: search.css */
/* Search: header box with a dropdown, and the search page. */

.header-search { position: relative; display: none; }
@media (min-width: 900px) {
  .header-search { display: flex; align-items: center; margin-left: var(--space-2); }
  .site-nav { margin-left: auto; }
}
.header-search > .icon { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--dim); pointer-events: none; }
.header-search input[type="search"] {
  width: 190px;
  height: 40px;
  padding: 0 12px 0 38px;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: width var(--dur) var(--ease);
}
.header-search input[type="search"]:focus { width: 260px; outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.header-search input::placeholder { color: var(--dim); opacity: 1; }
@media (max-width: 1000px) { .header-search input[type="search"]:focus { width: 210px; } }
@media (prefers-reduced-motion: reduce) { .header-search input[type="search"] { transition: none; } }

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-search .search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(30rem, 92vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--space-2);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--ring), var(--shadow-2);
}
.search-results li { margin: 0; }
.search-results a {
  display: block;
  padding: 10px 12px;
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--r-sm);
}
.search-results a:hover, .search-results a.is-active { background: var(--accent-bg); color: var(--fg); }
.search-results .sr-title { display: block; font-weight: 600; line-height: 1.3; }
.search-results .sr-page { display: block; font-size: var(--text-xs); color: var(--dim); }
.search-results .sr-snippet { display: block; margin-top: 2px; font-size: var(--text-sm); color: var(--soft); line-height: 1.45; }
.search-results mark { color: inherit; background: var(--warn-bg); border-radius: 2px; }
.search-results .sr-empty { padding: 12px; color: var(--soft); font-size: var(--text-sm); }

.search-page { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: end; margin-bottom: var(--space-6); }
.search-page label { grid-column: 1 / -1; font-weight: 600; }
.search-page input[type="search"] {
  min-height: 52px;
  padding: 0 var(--space-4);
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
.search-page input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.search-page .btn { min-height: 52px; }
.search-results-page { max-width: var(--measure); }
.search-results-page a { background: var(--surface); margin-bottom: var(--space-3); padding: var(--space-4); box-shadow: var(--ring); border-radius: var(--r-md); }

.notfound { padding-block: var(--space-9); }
.notfound h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.notfound-links { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; margin: var(--space-6) 0 0; }
.page { padding-block: var(--space-7) var(--space-8); }
.prose .search-results { margin: 0; padding-left: 0; }


/* Import: print.css */
/* Print: plain white pages, serif, no chrome. The family page is the one people actually print. */

@media print {
  @page { margin: 18mm; }

  :root, .force-light {
    --paper: #fff; --paper-2: #f4f4f4; --surface: #fff; --line: #ccc; --line-strong: #888;
    --fg: #000; --soft: #222; --dim: #444; --accent: #000; --accent-bg: #eee; --on-accent: #fff;
    --code-bg: #f4f4f4; --code-fg: #000; --code-dim: #444;
    --ok: #000; --ok-bg: #f4f4f4; --warn: #000; --warn-bg: #f4f4f4; --bad: #000; --bad-bg: #f4f4f4;
  }

  html { font-size: 12pt; }
  body { background: #fff; color: #000; font-family: Georgia, "Times New Roman", serif; font-size: 12pt; line-height: 1.5; display: block; }

  .site-header, .site-footer, .skip-link, .docs-side, .docs-toc, .toc-mobile, .prevnext, .perforation,
  .copy-btn, .theme-toggle, .docs-menu-button, .docs-scrim, .hero-art, .heading-permalink, .no-print,
  .edit-link, .family-actions, .breadcrumbs, .header-search { display: none; }

  .docs-shell { display: block; padding: 0; max-width: none; }
  .prose { max-width: none; }
  h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: #000; break-after: avoid; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .family-body a[href^="#"]::after { content: ""; }

  pre, .codeblock, .callout, table, figure, .diagram, .table-scroll, img { break-inside: avoid; }
  .codeblock { background: #f4f4f4; color: #000; box-shadow: none; border: 1px solid #bbb; }
  .codeblock pre { overflow: visible; white-space: pre-wrap; }
  .tok-k, .tok-s, .tok-n, .tok-c, .tok-f { color: #000; }
  .codeblock-lang { color: #444; }
  .callout { border: 1px solid #888; border-left-width: 5px; background: #fff; }
  .table-scroll { overflow: visible; box-shadow: none; border: 1px solid #bbb; }
  .prose tbody tr:nth-child(even) td { background: transparent; }
  .diagram { box-shadow: none; border: 1px solid #bbb; }

  .family { padding: 0; }
  .family-article { max-width: none; }
  .family-body { font-size: 15pt; line-height: 1.5; }
  .family-head h1 { font-size: 24pt; }
  .family-body h2 { font-size: 18pt; margin-top: 1.2em; }
  .family-body ol > li::before { background: #000; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .family-body h2 { break-before: auto; }
}


