/* TruePx docs and changelog. Same tokens, fonts and header as the homepage
 * (assets/site.css); pages are built by scripts/build-docs.mjs. */
@font-face { font-family: Geist; font-weight: 100 900; font-display: swap; src: url('/fonts/geist-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: Geist; font-weight: 100 900; font-display: swap; src: url('/fonts/geist-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-weight: 100 900; font-display: swap; src: url('/fonts/geist-mono-latin.woff2') format('woff2'); }

:root {
  --paper: #ffffff; --wash: #f3f5f8; --ink: #15171c; --ink-2: #4a515c; --faint: #646a73; --line: #e3e7ec;
  --measure: #0160c0; --measure-soft: rgba(1, 96, 192, 0.08); --focus: #0160c0;
  --err: #c4291f; --warn: #a15c00; --info: #0160c0; --good: #13824a;
  --sans: Geist, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1115; --wash: #171a20; --ink: #eceef2; --ink-2: #aab1bc; --faint: #8b929d; --line: #262b33;
    --measure: #4d9bff; --measure-soft: rgba(77, 155, 255, 0.1); --focus: #6aaeff;
    --err: #ff7b72; --warn: #e3a440; --info: #6aaeff; --good: #4fd18b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--measure); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--faint); font-weight: 500; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--ink-2); font-size: 15px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); text-decoration: none; }
.btn { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 500 14px/1 var(--sans); white-space: nowrap; }
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }

/* ---- three columns: docs menu, article, on this page ---- */
.layout { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 232px minmax(0, 1fr) 208px; gap: 48px; }
.layout.wide { grid-template-columns: minmax(0, 1fr) 208px; max-width: 1040px; }
.side { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto; padding: 28px 4px 40px 0; font-size: 14.5px; }
.side details { display: contents; }
.side summary { display: none; }
.side p { margin: 22px 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.side p:first-of-type { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); }
.side a:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.side a[aria-current] { color: var(--ink); background: var(--wash); font-weight: 550; }
.toc { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto; padding: 32px 0 40px; font-size: 13.5px; }
.toc p { margin: 0 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--faint); }
.toc a:hover, .toc a[aria-current] { color: var(--ink); border-left-color: var(--ink); text-decoration: none; }

/* ---- article ---- */
main { min-width: 0; padding: 36px 0 64px; }
article { max-width: 760px; }
.crumb { margin: 0 0 10px; font-size: 13.5px; color: var(--faint); }
h1 { font-size: clamp(30px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 640; margin: 0 0 12px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 620; margin: 52px 0 12px; padding-top: 28px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; letter-spacing: -0.01em; font-weight: 620; margin: 32px 0 8px; }
h4 { font-size: 15.5px; font-weight: 620; margin: 22px 0 6px; }
h2 a.anchor, h3 a.anchor { color: var(--faint); opacity: 0; margin-left: 6px; font-weight: 400; }
h2:hover a.anchor, h3:hover a.anchor, a.anchor:focus-visible { opacity: 1; text-decoration: none; }
article p, article li { color: var(--ink-2); }
article strong { color: var(--ink); font-weight: 600; }
article ul, article ol { padding-left: 22px; margin: 10px 0; }
article li { margin: 6px 0; }
article li::marker { color: var(--faint); }
code { font: 0.88em var(--mono); background: var(--wash); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; color: var(--ink); overflow-wrap: anywhere; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; font: 500 0.82em/1.5 var(--mono); text-align: center; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; }
pre { background: var(--wash); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); color: var(--ink); }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

figure { margin: 22px 0 26px; }
figure img { border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 18px 44px -24px rgba(21, 23, 28, 0.35); background: #0b0d12; width: 100%; }
figure.strip img { border-radius: 12px; }
figcaption { font-size: 14px; color: var(--faint); margin-top: 10px; line-height: 1.5; }

.note { margin: 18px 0; padding: 12px 16px; border-radius: 10px; background: var(--wash); border: 1px solid var(--line); border-left: 3px solid var(--measure); font-size: 15px; }
.note.warn { border-left-color: var(--warn); }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }

table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 14.5px; }
.tablewrap { overflow-x: auto; margin: 14px 0 22px; }
.tablewrap table { margin: 0; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); white-space: nowrap; }
table.checks td:first-child { white-space: normal; width: 34%; font-weight: 550; }
table.checks td:nth-child(2) { white-space: nowrap; width: 1%; }
.sev { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.sev.e { color: var(--err); }
.sev.w { color: var(--warn); }
.sev.i { color: var(--info); }

/* cards on the overview */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.cards a:hover { border-color: var(--ink-2); text-decoration: none; }
.cards b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.cards span { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

/* prev / next */
.pager { display: flex; gap: 12px; margin-top: 56px; }
.pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.pager a:hover { border-color: var(--ink-2); text-decoration: none; }
.pager small { display: block; color: var(--faint); font-size: 12.5px; }
.pager b { color: var(--ink); font-weight: 600; }
.pager .next { text-align: right; }

/* changelog */
.release { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.release h2 { margin: 0 0 4px; padding: 0; border: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.release time { font-size: 15px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.release h3 { margin-top: 20px; }

footer { border-top: 1px solid var(--line); }
footer .in { max-width: 1320px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--faint); }
footer .in a { color: var(--faint); }
footer .in a:hover { color: var(--ink); }
footer .in span { margin-right: auto; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .layout.wide { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .top .in { gap: 16px; padding: 0 16px; }
  .top nav { display: none; }
  .layout, .layout.wide { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  /* The docs menu folds into a button-like summary above the article. */
  .side { position: static; max-height: none; overflow: visible; padding: 16px 0 0; }
  .side details { display: block; border: 1px solid var(--line); border-radius: 10px; }
  .side summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; cursor: pointer; font-weight: 550; color: var(--ink); list-style: none; }
  .side summary::-webkit-details-marker { display: none; }
  .side summary::after { content: '+'; color: var(--faint); font-weight: 400; }
  .side details[open] summary::after { content: '–'; }
  .side details > div { padding: 0 8px 12px; }
  main { padding-top: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .pager { flex-direction: column; }
  td:first-child { white-space: normal; }
  footer .in { padding: 24px 16px; }
}
@media print {
  .top, .side, .toc, .pager { display: none; }
  .layout { display: block; }
}
