/* Cantilever Docs — static documentation platform theme
   Generated markup classes produced by the Boris compiler are themed here:
     contentType:  .site-nav, .page-toc, .breadcrumb, .page-children
     content units: .article (headings, tables, pre, figures, callouts)
*/

/* Self-hosted Google Fonts WOFF2 subsets. The variable files preserve the
   requested weight range while system stacks keep the theme readable in older
   browsers or when a font request is unavailable. */

@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/crimson-pro/CrimsonPro-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/crimson-pro/CrimsonPro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans/PlusJakartaSans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-Regular-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-Regular-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-Medium-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-Medium-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-SemiBold-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono/IBMPlexMono-SemiBold-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f4f0e7;
  --surface: #fffdf8;
  --ink: #1f2824;
  --ink-soft: #46514a;
  --muted: #7c8379;
  --line: #ddd8cd;
  --accent: #b24d35;
  --accent-strong: #8e3828;
  --accent-soft: #f6e8e1;
  --warn: #8a5a00;
  --warn-soft: #fdf3dd;
  --note: #0f5b8a;
  --note-soft: #e8f1f8;
  --danger: #9c3a2a;
  --danger-soft: #fbeae7;
  --code-bg: #ebe6dc;
  --code-ink: #2f302c;
  --code-border: #d9d2c5;
  --focus: 3px;
  --radius: 8px;
  --max-read: 48rem;
  --font-display: "Crimson Pro", "Iowan Old Style", "Palatino Linotype",
                  Palatino, Georgia, "Times New Roman", serif;
  --font-ui: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
             "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-ui);
  --font-prose: var(--font-body);
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo,
               Consolas, "Liberation Mono", monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 1.25rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-feature-settings: "kern" 1, "liga" 1;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- accessibility scaffolding ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { left: 0; }

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

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
  color: #f4f1eb;
  border-bottom: 3px solid var(--accent);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 34rem) minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  padding: 0.35rem 0;
  grid-column: 1;
  justify-self: start;
}

.brand__mark {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: #df8a70;
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  color: #f0b29f;
}

.site-header__tag {
  grid-column: 3;
  margin: 0;
  justify-self: end;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: #cfc9bd;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- archive search ---------- */

.site-search {
  position: relative;
  z-index: 2;
  grid-column: 2;
  justify-self: center;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  color: #f4f1eb;
}

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

.site-search__controls {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  overflow: hidden;
  border: 1px solid #69766e;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08);
}

.site-search__controls:focus-within {
  outline: 2px solid #df8a70;
  outline-offset: 2px;
}

.site-search__icon {
  flex: 0 0 auto;
  padding-left: 0.9rem;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.site-search__input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  padding: 0.55rem 0.5rem;
  color: var(--ink);
  background: transparent;
  font: 0.86rem var(--font-ui);
}

.site-search__input::placeholder { color: var(--muted); }
.site-search__input:focus { outline: none; }

.site-search__shortcut {
  flex: 0 0 auto;
  margin-right: 0.35rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper);
  font: 500 0.68rem var(--font-mono);
}

.site-search__button {
  flex: 0 0 auto;
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--accent-strong);
  border-radius: 0 999px 999px 0;
  padding: 0 1rem;
  color: #fff;
  background: var(--accent);
  font: 700 0.72rem var(--font-ui);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-search__button:hover { background: var(--accent-strong); }

.site-search__status {
  min-height: 1.05rem;
  margin: 0.2rem 0.85rem 0;
  color: #cfc9bd;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.site-search__results {
  position: absolute;
  top: calc(100% - 0.05rem);
  right: 0;
  left: 0;
  z-index: 10;
  max-height: min(70vh, 30rem);
  overflow: auto;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 0.22);
  list-style: none;
}

.site-search__results:empty { display: none; }

.site-search__result { margin: 0; }

.site-search__result + .site-search__result {
  border-top: 1px solid var(--line);
}

.site-search__result a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.site-search__result a:hover,
.site-search__result a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.site-search__title {
  display: block;
  color: var(--accent-strong);
  font: 700 1rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
}

.site-search__path {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font: 0.68rem/1.35 var(--font-mono);
}

.site-search__excerpt {
  display: block;
  margin-top: 0.16rem;
  color: var(--ink-soft);
  font: 0.76rem/1.45 var(--font-body);
}

.site-search__fallback {
  margin: 0.2rem 0.85rem 0;
  color: #cfc9bd;
  font-size: 0.68rem;
}

/* ---------- shell ---------- */

.site-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.7rem 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}

.site-main { min-width: 0; }

.site-shell--compact { max-width: 1180px; }

.site-side {
  position: sticky;
  top: 1.25rem;
}

/* ---------- site navigation (sidebar + drawer) ---------- */

.site-nav-drawer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: clip;
  box-shadow: 0 0.35rem 1.2rem rgb(52 43 34 / 0.05);
}

.site-nav-drawer__summary {
  display: none;
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-nav-drawer__summary::-webkit-details-marker { display: none; }
.site-nav-drawer__summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
}

.site-nav-drawer[open] .site-nav-drawer__summary::after { content: "▴"; }

.site-nav {
  padding: 0.6rem 0.75rem 0.9rem;
  max-height: 100vh;
  overflow: auto;
}

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

.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: 0.28rem 0.5rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.84rem;
  border-left: 3px solid transparent;
}

.site-nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.site-nav a:focus-visible { outline-offset: -2px; }

.filed-nav__home {
  display: block;
  margin-bottom: 0.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.filed-nav__group { margin: 0.9rem 0 0; }

.filed-nav__group h2 {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filed-nav__group ul { margin: 0; }

.site-nav .site-nav__trunk > a {
  font-weight: 700;
  color: var(--ink);
}

.site-nav .site-nav__trunk > a::after {
  content: "↴";
  font-size: 0.75em;
  color: var(--muted);
  margin-left: 0.35em;
  vertical-align: 0.15em;
}

.site-nav .site-nav__trunk > ul {
  margin: 0.15rem 0 0.45rem 0.6rem;
  border-left: 1px solid var(--line);
}

.site-nav .site-nav__satellite { color: var(--ink-soft); }

.site-nav a.is-current {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 650;
  border-left-color: var(--accent);
}

.site-nav a.is-ancestor { color: var(--accent-strong); }

/* ---------- breadcrumb ---------- */

.breadcrumb-wrap {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}

.breadcrumb { margin: 0; }

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline;
  color: var(--muted);
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.45rem;
  color: var(--line);
}

.breadcrumb a {
  color: var(--accent-strong);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- page grid ---------- */

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--max-read)) minmax(12rem, 16rem);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  max-width: calc(var(--max-read) + 18rem);
}

.page-rail {
  position: sticky;
  top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  max-height: calc(100vh - 4rem);
  overflow: auto;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.page-rail:empty { display: none; }

/* ---------- article / prose ---------- */

.article {
  font-family: var(--font-prose);
  font-size: 1.02rem;
  line-height: 1.7;
  letter-spacing: -0.005em;
  color: var(--ink);
  min-width: 0;
  padding-top: 0.2rem;
}

.article :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  color: var(--ink);
  font-optical-sizing: auto;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
  scroll-margin-top: 5rem;
  scroll-margin-bottom: 2rem;
}

.article h1 {
  max-width: 20ch;
  font-size: clamp(2.7rem, 6vw, 4.35rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.06em;
  margin: 0 0 0.9rem;
}

.article h2 {
  position: relative;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 0.98;
  margin: 3rem 0 0.8rem;
  padding-bottom: 0.48rem;
  border-bottom: 1px solid var(--line);
}

.article h2::after {
  content: "";
  display: block;
  width: 2.8rem;
  height: 3px;
  margin-top: 0.55rem;
  background: var(--accent);
}

.article h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.1rem 0 0.5rem;
}

.article h4 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

.article h1 a, .article h2 a, .article h3 a { color: inherit; text-decoration: none; }

.article p { max-width: 70ch; margin: 0.85rem 0; }

.article h1 + p {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.62;
}

.article a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent);
}

.article a:hover { text-decoration-thickness: 2px; }

.article ul, .article ol { padding-left: 1.4rem; margin: 0.75rem 0; }

.article li { margin: 0.25rem 0; }

.article li > ul, .article li > ol { margin: 0.2rem 0; }

.article strong { font-weight: 700; }

.article em { font-style: italic; }

.article del { color: var(--muted); }

.article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.article blockquote {
  max-width: 62ch;
  margin: 1.8rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.3;
}

/* ---------- code ---------- */

.article code,
.article pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.article :not(pre) > code {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-size: 0.86em;
}

.article pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 4;
}

.article pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--code-ink);
}

.article pre[lang]::before {
  content: attr(lang);
  display: block;
  font-size: 0.66rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.article kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 0.12em 0.45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
}

/* ---------- tables ---------- */

.table-scroller { overflow-x: auto; margin: 1rem 0; }

.article table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin: 1.1rem 0;
  overflow-wrap: anywhere;
}

.article thead th {
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
}

.article th, .article td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}

.article tbody tr:nth-child(even) { background: #fcfbf8; }

.article table :is(th, td) code { font-size: 0.85em; }

/* ---------- figures / images ---------- */

.article figure {
  margin: 1.2rem 0;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.article figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.article figcaption {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ---------- callouts ---------- */

.article .note,
.article .warning,
.article .callout,
.article .callout-tip,
.article .callout-important,
.article .callout-caution {
  font-family: var(--font-body);
  border-radius: var(--radius);
  padding: 0.7rem 0.95rem;
  margin: 1.2rem 0;
  font-size: 0.92rem;
}

.article .note {
  background: var(--note-soft);
  border-left: 4px solid var(--note);
}
.article .note::before { content: "Note — "; font-weight: 700; color: var(--note); }

.article .warning {
  background: var(--danger-soft);
  border-left: 4px solid var(--danger);
}
.article .warning::before { content: "Warning — "; font-weight: 700; color: var(--danger); }

.article .callout,
.article .callout-tip,
.article .callout-important,
.article .callout-warning {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.article .callout-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--accent-strong);
}

.article .warning.callout,
.article .callout-warning { border-left-color: var(--danger); background: var(--danger-soft); }

.article .callout blockquote { margin: 0.4rem 0 0; }

/* ---------- children list (section landing) ---------- */

.page-children {
  font-family: var(--font-ui);
  margin: 0;
}

.page-children-wrap {
  margin: 2.6rem 0 1rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--line);
}

.page-children-wrap > .page-children {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
}

.page-children ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: contents;
}

.page-children li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0.3rem 1rem rgb(52 43 34 / 0.04);
}

.page-children li a {
  display: block;
  padding: 0.7rem 0.9rem;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.page-children li a:hover { background: var(--accent-soft); }

/* ---------- on-page TOC rail ---------- */

.page-toc { margin: 0; }

.page-toc .page-toc-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.page-toc ul { list-style: none; margin: 0; padding: 0; }
.page-toc li { margin: 0.18rem 0; }
.page-toc a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  padding: 0.12rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  line-height: 1.35;
}

.page-toc a:hover, .page-toc a:focus-visible {
  color: var(--accent-strong);
  border-left-color: var(--accent);
}

.page-toc .page-toc__l2 { padding-left: 0.6rem; }
.page-toc .page-toc__l3 { padding-left: 1.2rem; font-size: 0.82rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.site-footer p { margin: 0; }

/* ---------- prev/next (progressive enhancement, JS fills this) ---------- */

.page-turn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
  font-family: var(--font-body);
}

.page-turn:empty { display: none; }

.page-turn a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.6rem 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.page-turn a:hover { border-color: var(--accent); background: var(--accent-soft); }

.page-turn .page-turn__prev { text-align: left; }
.page-turn .page-turn__next { text-align: right; }

.page-turn .page-turn__meta {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.page-turn .page-turn__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--accent-strong);
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-side, .page-rail, .skip-link, .page-foot, .page-turn {
    display: none !important;
  }
  body { background: #fff; }
  .site-shell { grid-template-columns: 1fr; max-width: none; padding: 0; }
  .site-main { padding: 0; }
  .breadcrumb-wrap, .page-children-wrap { display: none; }
  .article { font-size: 11pt; }
  a { color: inherit; }
  pre { max-height: none; overflow: visible; white-space: pre-wrap; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-header__tag {
    grid-column: 2;
    grid-row: 1;
  }
  .site-search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }
  .site-shell { grid-template-columns: 1fr; padding-top: 0.5rem; }
  .site-side { position: static; }
  .site-nav-drawer { margin-bottom: 1rem; }
  .site-nav-drawer__summary { display: block; }
  .page-grid { grid-template-columns: 1fr; }
  .page-rail { display: none; }
  .article h1 { font-size: clamp(2.35rem, 8vw, 3.35rem); }
  .article table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .site-header__inner {
    grid-template-columns: 1fr;
    padding: 0.4rem 1rem 0.6rem;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .site-search { grid-column: 1; grid-row: 2; }
  .site-shell { padding: 0.9rem 1rem 2.2rem; }
  .site-header__tag { display: none; }
  .site-search__shortcut { display: none; }
  .site-search__button { padding: 0 0.7rem; }
  .article { font-size: 1rem; }
  .article h1 { font-size: clamp(2.25rem, 13vw, 3rem); }
  .article h2 { font-size: 1.8rem; }
  .article h3 { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
