/* The public documentation site. Generated by scripts/gen-handbook.mjs.

   The same numbers as the panel's reading layout, because it is the same
   design: a 68ch measure, 17px over 1.55, a 272px navigation column and a
   240px table of contents. Written as plain CSS with custom properties rather
   than compiled from the panel's tokens — this file has to be readable on its
   own, and a documentation site that needs a bundler is a documentation site
   that rots. #2f6f4f is substituted per brand on the way out. */

:root {
  color-scheme: light dark;
  --accent: #2f6f4f;
  --canvas: #fbfcfd;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --ink: #10151c;
  --muted: #5a6572;
  --faint: #8b96a3;
  --line: #e2e6ea;
  --line-strong: #cbd2da;
  --measure: 68ch;
  --nav-w: 17rem;
  --toc-w: 15rem;
  --radius: 10px;
  --info: #2563a8;
  --tip: var(--accent);
  --warning: #96650b;
  --danger: #b3261e;
  --check: #1d7a4d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b0d11;
    --surface: #12151b;
    --surface-2: #181c23;
    --ink: #e8ecf1;
    --muted: #a3adba;
    --faint: #78828f;
    --line: #232830;
    --line-strong: #333a45;
    --info: #6fb0ea;
    --warning: #dfae4e;
    --danger: #ef8078;
    --check: #63c795;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem .75rem; border-radius: var(--radius); }

/* --- the bar ----------------------------------------------------------- */
.site {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.5rem;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); text-decoration: none; font-size: .9375rem; }
.brand .mark { width: 1.25rem; height: 1.25rem; border-radius: 6px; background: var(--accent); display: inline-block; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .875rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav .cta { color: var(--accent); font-weight: 500; }
.menu { display: none; }

.search { position: relative; flex: 1 1 auto; max-width: 26rem; }
.search input {
  width: 100%; height: 2.25rem; padding: 0 .75rem;
  font: inherit; font-size: .9375rem;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.search .results {
  position: absolute; top: calc(100% + .25rem); left: 0; right: 0;
  max-height: 22rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / .25);
  padding: .25rem;
}
.search .results a { display: block; padding: .5rem .625rem; border-radius: 6px; text-decoration: none; color: var(--ink); }
.search .results a:hover, .search .results a.active { background: var(--surface-2); }
.search .results strong { display: block; font-size: .9375rem; }
.search .results span { display: block; font-size: .8125rem; color: var(--muted); }
.search .results p { margin: 0; padding: .75rem .625rem; color: var(--muted); font-size: .875rem; }

/* --- the three columns ------------------------------------------------- */
.layout {
  display: flex; align-items: flex-start; gap: 2rem;
  max-width: 96rem; margin: 0 auto; padding: 2rem 1.5rem 5rem;
}
.docnav { position: sticky; top: 4.5rem; width: var(--nav-w); flex: none; max-height: calc(100vh - 6rem); overflow-y: auto; font-size: .9375rem; }
.docnav-home { display: block; padding: .375rem .5rem; border-radius: 6px; text-decoration: none; color: var(--muted); }
.docnav-home.current, .docnav-home:hover { background: var(--surface-2); color: var(--ink); }
.docnav details { margin-top: .5rem; }
.docnav summary {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .375rem .5rem; border-radius: 6px;
  font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.docnav summary:hover { background: var(--surface-2); color: var(--ink); }
.docnav summary span { margin-left: auto; font-weight: 400; color: var(--faint); }
.docnav ul { list-style: none; margin: .125rem 0 .25rem .75rem; padding: 0 0 0 0; border-left: 1px solid var(--line); }
.docnav li a {
  display: block; padding: .3125rem 0 .3125rem .75rem; margin-left: -1px;
  border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: .9375rem;
}
.docnav li a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.docnav li a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

main { flex: 1 1 auto; min-width: 0; max-width: var(--measure); }
.toc { position: sticky; top: 4.5rem; width: var(--toc-w); flex: none; max-height: calc(100vh - 6rem); overflow-y: auto; }
@media (max-width: 80rem) { .toc { display: none; } }
@media (max-width: 64rem) {
  .docnav { display: none; }
  .docnav.open {
    display: block; position: fixed; inset: 3.5rem 0 0 0; width: auto; max-height: none;
    background: var(--canvas); padding: 1rem 1.5rem; z-index: 4;
  }
  .menu { display: inline-block; margin-left: auto; font: inherit; font-size: .875rem; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .25rem .625rem; color: var(--ink); }
  .site-nav { margin-left: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .site { flex-wrap: wrap; }
}
.toc-title { margin: 0 0 .5rem; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: .3125rem 0 .3125rem .75rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .8125rem; line-height: 1.4; }
.toc li.l3 a { padding-left: 1.5rem; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

/* --- the article ------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 1.5rem; }
h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5rem; }
.lead { color: var(--muted); margin: 0; }
.audience { margin: .75rem 0 0; font-size: .8125rem; color: var(--faint); }
article h2 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -.01em; margin: 2.5rem 0 .5rem; scroll-margin-top: 5rem; }
article h3 { font-size: 1.125rem; margin: 1.75rem 0 .375rem; scroll-margin-top: 5rem; }
article h4 { font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.5rem 0 .375rem; }
article p, article ul, article ol { margin: 0 0 1rem; }
article li { margin-bottom: .5rem; }
article ul, article ol { padding-left: 1.5rem; }
article code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .875em; background: var(--surface-2); padding: .0625rem .25rem; border-radius: 4px; overflow-wrap: break-word; }
article blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 2px solid var(--line-strong); color: var(--muted); font-style: italic; }
article hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.scroll { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th { text-align: left; background: var(--surface-2); }
th, td { padding: .5rem .625rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }

.code { position: relative; margin: 0 0 1rem; }
.code pre { margin: 0; padding: .875rem 1rem; overflow-x: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.code code { background: none; padding: 0; font-size: .9375rem; line-height: 1.5; }
.code button {
  position: absolute; top: .5rem; right: .5rem;
  font: inherit; font-size: .75rem; padding: .1875rem .5rem;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer;
}
.code button:hover { color: var(--ink); }

.callout { margin: 0 0 1rem; padding: .875rem 1rem; border: 1px solid; border-radius: var(--radius); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; margin: 0 0 .375rem; }
.callout.info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 8%, transparent); }
.callout.info .callout-title { color: var(--info); }
.callout.tip { border-color: color-mix(in srgb, var(--tip) 40%, transparent); background: color-mix(in srgb, var(--tip) 8%, transparent); }
.callout.tip .callout-title { color: var(--tip); }
.callout.warning { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.callout.warning .callout-title { color: var(--warning); }
.callout.danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.callout.danger .callout-title { color: var(--danger); }
.callout.check { border-color: color-mix(in srgb, var(--check) 40%, transparent); background: color-mix(in srgb, var(--check) 8%, transparent); }
.callout.check .callout-title { color: var(--check); }

.neighbours { display: flex; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.neighbours a { flex: 1; display: flex; flex-direction: column; gap: .125rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.neighbours a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.neighbours span { font-size: .8125rem; color: var(--muted); }
.neighbours .next { text-align: right; }
@media (max-width: 40rem) { .neighbours { flex-direction: column; } .neighbours .next { text-align: left; } }

/* --- the hub ----------------------------------------------------------- */
.hero { margin-bottom: 2.5rem; }
.hero h1 { font-size: 2.25rem; }
.count { color: var(--faint); font-size: .875rem; margin: .75rem 0 0; }
main section { margin-bottom: 2.5rem; }
main section h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.card { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.card-title { font-weight: 600; font-size: .9375rem; }
.card-body { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
/* The hub is a grid and not a column of prose, so it is allowed past the
   measure — the measure is about reading, and a hub is scanned. */
.layout:has(.hero) main { max-width: 64rem; }
