/* omnisnap.org: the landing page, the docs (GitHub's rendered Markdown), the
   schema list and the 404 page. The demo (/demo/) is the viewer's report.html
   with its own styles.

   The "Blueprint" design (openspec change redesign-website, design.md):
   the logo's two blues, an amber for what differs, a faint grid behind the
   hero and the closing band, corner ticks and dimension lines. Fonts are
   self-hosted (fonts/, SIL OFL); nothing is loaded from another origin
   (specs/SPEC-website.md, "Code style"). */

/* Fonts ----------------------------------------------------------------- */

/* IBM's Latin1 split files, with IBM's unicode-range: other characters
   fall back to the system fonts below. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Italic-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

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

:root {
  color-scheme: light;
  --ink: #0f1a2a;
  --ink-2: #44546b;          /* secondary text */
  --ink-3: #5d6d84;          /* labels, captions */
  --paper: #f7f9fc;
  --surface: #ffffff;        /* cards */
  --surface-2: #edf2f8;      /* code, table heads */
  --line: #d6e0ec;
  --line-strong: #b4c4d8;
  --primary: #0A5BB5;        /* the logo's main layer: links, buttons */
  --primary-hover: #084a94;
  --primary-ink: #ffffff;
  --secondary: #4199F0;      /* the logo's offset layer: decoration only */
  --diff: #a14a08;           /* what differs; AA on paper, surface-2 and diff-soft */
  --diff-soft: rgba(161, 74, 8, 0.10);
  --primary-soft: rgba(10, 91, 181, 0.08);
  --grid: rgba(10, 91, 181, 0.07);
  --tick: #0A5BB5;
  --focus: #0A5BB5;
  --header-bg: rgba(247, 249, 252, 0.88);
  --hl-keyword: #b3195e;
  --hl-string: #0a6b3d;
  --hl-comment: #5f6b7a;
  --hl-constant: #0b57b8;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  --wide: 74rem;             /* page width */
  --text: 46rem;             /* reading width */
  --gutter: 1.25rem;
  --header-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e3ecf7;
    --ink-2: #a9b8cc;
    --ink-3: #8b9bb2;
    --paper: #0b1220;
    --surface: #101a2c;
    --surface-2: #131f34;
    --line: #1f2d44;
    --line-strong: #2f4363;
    --primary: #4199F0;
    --primary-hover: #6aafff;
    --primary-ink: #06101f;
    --secondary: #0A5BB5;
    --diff: #f5a524;
    --diff-soft: rgba(245, 165, 36, 0.12);
    --primary-soft: rgba(65, 153, 240, 0.10);
    --grid: rgba(65, 153, 240, 0.08);
    --tick: #4199F0;
    --focus: #6aafff;
    --header-bg: rgba(11, 18, 32, 0.86);
    --hl-keyword: #ff7aa8;
    --hl-string: #6fd39c;
    --hl-comment: #8c9ab0;
    --hl-constant: #8cbcff;
  }
}

/* The same dark set, when the visitor chose it (site.js stores the choice;
   an inline script in <head> applies it before the first paint). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e3ecf7;
  --ink-2: #a9b8cc;
  --ink-3: #8b9bb2;
  --paper: #0b1220;
  --surface: #101a2c;
  --surface-2: #131f34;
  --line: #1f2d44;
  --line-strong: #2f4363;
  --primary: #4199F0;
  --primary-hover: #6aafff;
  --primary-ink: #06101f;
  --secondary: #0A5BB5;
  --diff: #f5a524;
  --diff-soft: rgba(245, 165, 36, 0.12);
  --primary-soft: rgba(65, 153, 240, 0.10);
  --grid: rgba(65, 153, 240, 0.08);
  --tick: #4199F0;
  --focus: #6aafff;
  --header-bg: rgba(11, 18, 32, 0.86);
  --hl-keyword: #ff7aa8;
  --hl-string: #6fd39c;
  --hl-comment: #8c9ab0;
  --hl-constant: #8cbcff;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  /* The footer stays at the bottom of a short page. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }

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

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

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

code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 2;
}
pre code { background: none; border: 0; padding: 0; font-size: 1em; }

.visually-hidden {
  position: absolute !important;
  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: 1rem; top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--primary);
  color: var(--primary-ink);
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Motifs ---------------------------------------------------------------- */

/* Corner ticks: four L-shaped marks at a box's corners. */
.ticked { position: relative; }
.ticked::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --t: 10px;
  background:
    linear-gradient(var(--tick), var(--tick)) top left / var(--t) 2px,
    linear-gradient(var(--tick), var(--tick)) top left / 2px var(--t),
    linear-gradient(var(--tick), var(--tick)) top right / var(--t) 2px,
    linear-gradient(var(--tick), var(--tick)) top right / 2px var(--t),
    linear-gradient(var(--tick), var(--tick)) bottom left / var(--t) 2px,
    linear-gradient(var(--tick), var(--tick)) bottom left / 2px var(--t),
    linear-gradient(var(--tick), var(--tick)) bottom right / var(--t) 2px,
    linear-gradient(var(--tick), var(--tick)) bottom right / 2px var(--t);
  background-repeat: no-repeat;
  border-radius: inherit;
}

/* A dimension line, |<-- label -->|, used to open a section. */
.dim {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: var(--ink-3);
  font: 0.75rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dim::before, .dim::after {
  content: "";
  flex: 1;
  height: 9px;
  background: linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat;
}
.dim::before { border-left: 1px solid var(--line-strong); }
.dim::after { border-right: 1px solid var(--line-strong); }

/* The grid, behind the hero and the closing band only. */
.gridded { position: relative; isolation: isolate; }
.gridded::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--primary);
  font: 0.8rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.mark { width: 28px; height: 28px; flex: none; }
.mark .mark-back { stroke: var(--secondary); }
.mark .mark-front { stroke: var(--primary); }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: auto; }
.site-nav a {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--primary);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; }
/* The icon shows the theme a click switches to. */
.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; }
}

@media (max-width: 40rem) {
  .header-inner { flex-wrap: wrap; padding-block: 0.6rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 0.25rem 1.1rem; }
  .theme-toggle { margin-left: auto; }
}

/* Main and footer -------------------------------------------------------- */

main { display: block; flex: 1 0 auto; }
main.page {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 2.75rem var(--gutter) 4.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.925rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-block: 2.75rem 3rem;
}
.footer-grid h2 {
  margin: 0 0 0.75rem;
  color: var(--ink-3);
  font: 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0.35rem 0; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--primary); text-decoration: underline; }
.footer-about p { margin: 0.75rem 0 0; max-width: 24rem; }
.footer-version { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-3); }
@media (max-width: 40rem) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

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

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; padding: 0; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
}
.button:hover { border-color: var(--primary); color: var(--ink); text-decoration: none; }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.button svg { width: 16px; height: 16px; }

/* Code blocks with a copy button (site.js wraps each <pre>). ------------- */

/* The wrapper takes the <pre>'s place, and its margin. */
.code-block { position: relative; margin: 1em 0; }
.code-block > pre { margin: 0; }
.highlight > .code-block, .snippet-clipboard-content > .code-block { margin: 0; }
.hero-text .code-block { margin-top: 1.75rem; }
.tab-panel .code-block { margin: 0.5rem 0 0; }
.copy-button {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-2);
  font: 0.75rem/1.5 var(--mono);
  cursor: pointer;
  opacity: 0.85;
}
.copy-button:hover, .copy-button:focus-visible { opacity: 1; color: var(--ink); border-color: var(--line-strong); }
.copy-button[data-copied] { color: var(--primary); border-color: var(--primary); }
.code-block > pre { padding-right: 4.75rem; }

/* Landing page ----------------------------------------------------------- */

.home > section { padding-block: 4.5rem; }
.home > section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.75rem; }
.section-lead { max-width: 40rem; margin: 0 0 2.5rem; color: var(--ink-2); font-size: 1.075rem; }

/* Hero */
.hero { padding-block: 4rem 4.5rem; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.hero .lead { margin: 0; max-width: 34rem; color: var(--ink-2); font-size: 1.15rem; }
.command { margin: 1.75rem 0 0; font-size: 1.05rem; background: var(--surface); }
.command .prompt { color: var(--ink-3); user-select: none; }
.status { margin: 1.25rem 0 0; color: var(--ink-3); font-size: 0.9rem; }
.status code { font-size: 0.85rem; }

.hero-figure { margin: 0; }
.hero-figure svg { display: block; width: 100%; height: auto; }
.hero-figure figcaption { margin-top: 0.75rem; color: var(--ink-3); font-size: 0.825rem; line-height: 1.5; }

/* The hero drawing's parts follow the theme. */
.fig-pane { fill: var(--surface); stroke: var(--line-strong); }
.fig-card { fill: var(--surface-2); stroke: var(--line); }
.fig-heading { fill: var(--ink-3); }
.fig-line { fill: var(--line-strong); }
.fig-base { fill: var(--primary-soft); stroke: var(--primary); }
.fig-diff { fill: var(--diff-soft); stroke: var(--diff); }
.fig-label { fill: var(--ink-2); font: 13px var(--mono); }
.fig-title { fill: var(--ink); font: 600 14px var(--sans); }
.fig-sub { fill: var(--ink-3); font: 12px var(--mono); }
.fig-dim { stroke: var(--ink-3); }
.fig-dim-base { stroke: var(--primary); }
.fig-dim-diff { stroke: var(--diff); }
.fig-num-base { fill: var(--primary); font: 600 13px var(--mono); }
.fig-num-diff { fill: var(--diff); font: 600 13px var(--mono); }
.fig-chip { fill: var(--ink); }
.fig-chip-text { fill: var(--paper); font: 13px var(--mono); }
.fig-verdict { fill: var(--diff); font: 600 13px var(--sans); }

/* Engine strip */
.engines { padding-block: 2.25rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.home > section.engines { padding-block: 2.25rem; }
.engines-grid {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  align-items: start;
}
.engines-intro { margin: 0; max-width: 15rem; color: var(--ink-2); font-size: 0.95rem; }
.engine { margin: 0; padding-left: 1rem; border-left: 2px solid var(--line-strong); }
.engine dt { font: 600 0.95rem/1.4 var(--mono); color: var(--ink); }
.engine dd { margin: 0.2rem 0 0; color: var(--ink-2); font-size: 0.925rem; }
.engine:nth-of-type(1) { border-left-color: var(--primary); }
.engine:nth-of-type(2) { border-left-color: var(--secondary); }
.engine:nth-of-type(3) { border-left-color: var(--diff); }

/* Feature cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: block;
  margin: 0;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
}
.card h3 { margin: 0.9rem 0 0.4rem; font-size: 1.075rem; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.card-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}
.card-icon svg { width: 22px; height: 22px; }
a.card { text-decoration: none; }
a.card:hover { border-color: var(--primary); color: inherit; }
a.card:hover h2, a.card:hover h3 { color: var(--primary); }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 1.25rem 1.25rem 1.4rem;
  border-top: 2px solid var(--line-strong);
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.6rem;
  color: var(--primary);
  font: 0.85rem/1 var(--mono);
}
.steps li:last-child { border-top-color: var(--diff); }
.steps li:last-child::before { color: var(--diff); }
.steps h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* The report screenshot */
.shot { margin: 0; }
.shot-link {
  display: block;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 1px 2px rgba(15, 26, 42, 0.06), 0 12px 32px -12px rgba(15, 26, 42, 0.18);
}
.shot-link:hover { border-color: var(--primary); }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.shot figcaption { margin-top: 0.9rem; color: var(--ink-3); font-size: 0.9rem; }

/* Install tabs. Without site.js each panel is a headed block; with it,
   a tablist (WAI-ARIA) shows one panel at a time. */
.tabs { max-width: none; }
.tab-panel + .tab-panel { margin-top: 1.75rem; }
.tab-panel h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.tab-panel p { color: var(--ink-2); }
.tab-panel pre { margin: 0.5rem 0 0; }
.tabs[data-ready] .tab-panel + .tab-panel { margin-top: 0; }
.tabs[data-ready] .tab-panel > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabs[data-ready] .tab-panel { padding-top: 1.25rem; }
.tablist { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); }
.tablist [role="tab"] {
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-2);
  font: 600 0.95rem/1.2 var(--sans);
  cursor: pointer;
}
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--primary); }

/* CI */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: start;
}
.checks { margin: 1.5rem 0; padding: 0; list-style: none; }
.checks li { position: relative; margin: 0.6rem 0; padding-left: 1.6rem; color: var(--ink-2); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0.1rem; top: 0.5em;
  width: 0.55rem; height: 0.55rem;
  border: 2px solid var(--primary);
  border-radius: 1px;
}

/* Closing band */
.cta { border-top: 1px solid var(--line); text-align: center; }
.home > section.cta { padding-block: 5rem; }
.home > section.cta h2 { margin: 0 auto 0.75rem; max-width: 36rem; }
.cta p { margin-inline: auto; max-width: 36rem; color: var(--ink-2); }
.cta .actions { justify-content: center; }

.alt { background: var(--surface); border-block: 1px solid var(--line); }

@media (max-width: 60rem) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .engines-grid { grid-template-columns: 1fr 1fr; }
  .engines-intro { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 36rem) {
  .home > section { padding-block: 3.25rem; }
  .hero { padding-block: 2.5rem 3rem; }
  .command { font-size: 0.875rem; }
  .hero-text .code-block > pre { padding-right: 4rem; }
  .steps, .engines-grid { grid-template-columns: 1fr; }
}

/* Generic page headings (docs index, schema list, 404) ------------------- */

.page-head { max-width: var(--text); margin-bottom: 2.25rem; }
.page-head h1 { margin: 0 0 0.75rem; font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
.page-head p { margin: 0; color: var(--ink-2); font-size: 1.075rem; }
.page-note { margin-top: 2.5rem; color: var(--ink-2); font-size: 0.95rem; }

.card h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card .card-icon + h2 { margin-top: 0.9rem; }
.card .card-meta { margin: 0 0 0.6rem; color: var(--ink-3); font: 0.8rem/1.4 var(--mono); overflow-wrap: anywhere; }
.schema-cards .card h2 a { text-decoration: none; }
.schema-cards .card h2 a::after { content: ""; position: absolute; inset: 0; }
.schema-cards .card { position: relative; }
.schema-cards .card:hover { border-color: var(--primary); }
.schema-cards .card:hover h2 a { text-decoration: underline; }
.schema-cards .card code { background: none; border: 0; padding: 0; font-size: 1em; }

/* 404 */
.not-found { max-width: 36rem; padding-block: 2rem 1rem; }
.not-found h1 { margin: 0 0 0.75rem; font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.02em; }
.not-found p { color: var(--ink-2); font-size: 1.075rem; }
.not-found .dim { max-width: 20rem; }

/* Docs layout: guide list, article, table of contents ------------------- */

.doc-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr) 14rem;
  grid-template-areas: "nav article toc";
  gap: 3rem;
  align-items: start;
}
.doc-nav { grid-area: nav; }
.doc-toc { grid-area: toc; }
.doc-main { grid-area: article; min-width: 0; max-width: var(--text); }
.doc-nav, .doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
  font-size: 0.9rem;
}
.side-title {
  margin: 0 0 0.75rem;
  color: var(--ink-3);
  font: 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.doc-nav a {
  display: block;
  margin-left: -1px;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.4;
}
.doc-nav a:hover { color: var(--ink); }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--primary); }

.doc-toc details { border: 0; }
.doc-toc summary {
  list-style: none;
  cursor: pointer;
  margin: 0 0 0.75rem;
  color: var(--ink-3);
  font: 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc summary::after { content: " +"; }
.doc-toc details[open] summary::after { content: " \2212"; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; }
.doc-toc ol ol { padding-left: 0.85rem; }
.doc-toc li { margin: 0; }
.doc-toc a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.4;
}
.doc-toc a:hover { color: var(--ink); }
.doc-toc a[aria-current="true"] { color: var(--primary); border-left-color: var(--primary); }

@media (max-width: 68.74rem) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "toc" "article";
    gap: 1.25rem;
  }
  .doc-nav, .doc-toc { position: static; max-height: none; overflow: visible; }
  .doc-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; }
  .doc-nav a {
    margin: 0;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }
  .doc-nav a[aria-current="page"] { border-color: var(--primary); }
  .doc-toc {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .doc-toc summary { margin: 0; }
  .doc-toc details[open] summary { margin-bottom: 0.75rem; }
  .doc-main { max-width: none; }
}

.doc-source {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* Docs: GitHub's rendered Markdown -------------------------------------- */

.markdown-body { font-size: 1rem; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin: 2.2em 0 0.7em;
}
.markdown-body h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-top: 0; letter-spacing: -0.02em; }
.markdown-body h2 { font-size: 1.5rem; }
.markdown-body h3 { font-size: 1.2rem; }
.markdown-body h4 { font-size: 1rem; }
.markdown-body p, .markdown-body li { color: var(--ink); }
.markdown-body li + li { margin-top: 0.3rem; }
.markdown-body img { max-width: 100%; }
.markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* A heading and its permalink anchor (an octicon) side by side. GitHub
   wraps each in <div class="markdown-heading">; an h2 opens a section with
   a rule across the column. */
.markdown-heading { display: flex; align-items: baseline; gap: 0.5rem; margin: 2.2em 0 0.7em; }
.markdown-heading .heading-element { margin: 0; }
.markdown-heading:has(> h2) { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.markdown-body > .markdown-heading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.markdown-heading .anchor { flex: none; opacity: 0; color: var(--ink-3); line-height: 1; }
.markdown-heading:hover .anchor, .markdown-heading .anchor:focus { opacity: 1; }
.markdown-heading svg { fill: currentColor; vertical-align: middle; }

.markdown-body blockquote {
  margin: 1.25rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--secondary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
}
.markdown-body blockquote > :first-child { margin-top: 0; }
.markdown-body blockquote > :last-child { margin-bottom: 0; }

/* Tables scroll sideways on a narrow screen instead of widening the page.
   GitHub wraps each one in <markdown-accessiblity-table> (its spelling). */
markdown-accessiblity-table {
  display: block;
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.markdown-body table { border-collapse: collapse; min-width: 100%; font-size: 0.925rem; }
.markdown-body th, .markdown-body td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.markdown-body th + th, .markdown-body td + td { border-left: 1px solid var(--line); }
.markdown-body tr:last-child td { border-bottom: 0; }
.markdown-body th { background: var(--surface-2); font-weight: 600; }
.markdown-body td { background: var(--surface); }
/* Keep a version or input name on one line; the wrapper scrolls instead. */
.markdown-body td code, .markdown-body th code { white-space: nowrap; }

/* GitHub's syntax highlighting classes, the ones the guides use. */
.markdown-body .highlight, .markdown-body .snippet-clipboard-content { margin: 1.25rem 0; }
.highlight pre { margin: 0; }
.pl-k, .pl-ent { color: var(--hl-keyword); }
.pl-s, .pl-pds, .pl-sr { color: var(--hl-string); }
.pl-c { color: var(--hl-comment); font-style: italic; }
.pl-c1, .pl-v, .pl-smi, .pl-en { color: var(--hl-constant); }

/* Motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .card, .shot-link, .copy-button, .theme-toggle { transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
}

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

@media print {
  .site-header, .site-footer, .doc-nav, .doc-toc, .copy-button, .theme-toggle { display: none !important; }
  .doc-layout { display: block; }
}
