/* Shared by the document pages (privacy, support). The landing page keeps its
   own inline styles: it is one file with no repeat visitors to cache for, and
   splitting it would cost a render-blocking request for no benefit. These two
   pages share enough that a second copy would be the thing that drifts. */

:root {
  --brand: #7367F0;
  --brand-dark: #5E52D6;
  /* White on #7367F0 is 4.26:1, under AA for button-sized text. These two
     keep the brand's look while passing: a slightly deeper fill behind white
     text, and a deeper ink for brand-coloured text on page backgrounds.
     --brand itself stays for decoration, where contrast rules do not apply. */
  --brand-fill: #6A5DEE;
  --brand-ink: #5E52D6;
  --bg: #FFFFFF;
  --bg-alt: #F6F6F9;
  --card: #FFFFFF;
  --text: #1D1C22;
  --muted: #5E5B66;
  --border: #E6E5EC;
  --shadow: 0 2px 8px rgb(47 43 61 / 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #B0A6FF;
    --bg: #17161C;
    --bg-alt: #1E1D25;
    --card: #22212A;
    --text: #ECEAF2;
    --muted: #A3A0AD;
    --border: #2F2D38;
    --shadow: 0 2px 8px rgb(15 14 20 / 0.4);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); }
a:hover { color: var(--brand-dark); }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }

/* --- nav (matches the landing page) --- */
header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: 1.02rem; text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand svg { color: var(--brand); }
.nav-links { margin-left: auto; display: flex; gap: 1.75rem; align-items: center; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .68rem 1.2rem; border-radius: 6px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--brand-fill); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .88rem; }

/* --- document body --- */
.doc { width: min(72ch, 100% - 3rem); margin: 0 auto; padding: 3.5rem 0 4.5rem; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); letter-spacing: -.025em; margin: 0 0 .6rem; line-height: 1.15; }
.doc .meta { color: var(--muted); font-size: .9rem; margin: 0 0 2.5rem; }
.doc h2 {
  font-size: 1.25rem; letter-spacing: -.01em; margin: 2.8rem 0 .8rem;
  padding-top: 1.6rem; border-top: 1px solid var(--border);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 { font-size: 1.02rem; margin: 1.8rem 0 .4rem; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: .5rem; }
.doc li::marker { color: var(--brand); }
.doc strong { font-weight: 600; }

.lede { font-size: 1.1rem; color: var(--muted); }

.note {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-left: 3px solid var(--brand); border-radius: 6px;
  padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.note p { margin: 0; font-size: .95rem; }
.note p + p { margin-top: .7rem; }

table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .94rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 500; font-size: .8rem; font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; color: var(--muted); }
.table-scroll { overflow-x: auto; }

code {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: .88em; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 5px; padding: .1em .35em;
}

.toc { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.2rem 0; margin-bottom: 3rem; }
.toc p { margin: 0 0 .6rem; font-size: .8rem; font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc li { margin-bottom: .3rem; font-size: .93rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

footer { border-top: 1px solid var(--border); padding: 2.5rem 0; color: var(--muted); font-size: .9rem; }
.foot { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.foot nav { margin-left: auto; display: flex; gap: 1.5rem; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* Version badge on the changelog. --brand-ink is the AA-safe text weight of the
   brand in both schemes; the fill is the same hue at low alpha so it tints with
   the theme instead of needing a second definition. */
.tag {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 0.5rem;
  padding: 0.15em 0.6em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-ink);
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
}
