/* Notiq site: shared base for every page (tokens, header, footer, buttons, prose).
   No external requests: system fonts, inline SVG icons. */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* "sealed" fields: always navy, in both themes (header, hero, vault sections, footer) */
  --s-ground: #0a1222;
  --s-ground-2: #0e172b;
  --s-surface: #121d33;
  --s-line: #1f2c45;
  --s-ink: #e8edf4;
  --s-ink-2: #b8c4d4;
  --s-muted: #8d9bb1;

  /* open page (dark default) */
  --ground: #0f172a;
  --ground-2: #121b30;
  --surface: #172136;
  --line: #233049;
  --line-2: #2f3d58;
  --ink: #e5eaf1;
  --ink-2: #b9c4d3;
  --muted: #94a3b8;
  --gold-text: #d9b85c;
  --sky-text: #7dd3fc;
  --code-bg: rgba(148, 163, 184, .13);

  /* brand: gold always fills with navy ink */
  --gold: #c9a84c;
  --gold-h: #dcbb62;
  --gold-ink: #0f172a;
  --sky: #38bdf8;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wide: 1200px;
  --gutter: 24px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #f6f7f9; --ground-2: #eef1f5; --surface: #ffffff; --line: #dfe4ea; --line-2: #c9d1dc;
    --ink: #0f172a; --ink-2: #334155; --muted: #51607a; --gold-text: #7d5f14; --sky-text: #0369a1;
    --code-bg: rgba(15, 23, 42, .06);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #f6f7f9; --ground-2: #eef1f5; --surface: #ffffff; --line: #dfe4ea; --line-2: #c9d1dc;
  --ink: #0f172a; --ink-2: #334155; --muted: #51607a; --gold-text: #7d5f14; --sky-text: #0369a1;
  --code-bg: rgba(15, 23, 42, .06);
  color-scheme: light;
}

/* A sealed field re-points the open-page tokens at navy values, so anything inside reads correctly. */
.sealed-field {
  --ground: var(--s-ground); --ground-2: var(--s-ground-2); --surface: var(--s-surface);
  --line: var(--s-line); --line-2: #2c3b58; --ink: var(--s-ink); --ink-2: var(--s-ink-2); --muted: var(--s-muted);
  --gold-text: #d9b85c; --sky-text: #7dd3fc; --code-bg: rgba(148, 163, 184, .13);
  background: var(--s-ground); color: var(--s-ink); color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scrollbar-color: var(--line-2) var(--ground); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-text); }
::selection { background: rgba(201, 168, 76, .38); color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .86em; padding: .12em .42em; border-radius: 4px; background: var(--code-bg); overflow-wrap: anywhere; }
kbd {
  font-size: .78em; padding: .1em .45em; border-radius: 4px; border: 1px solid var(--line-2);
  border-bottom-width: 2px; background: var(--surface); color: var(--ink); white-space: nowrap;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 6px; background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.container { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 520px) { :root { --gutter: 16px; } }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: 12px 18px; border-radius: 8px; border: 1px solid transparent;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn .i { font-size: 17px; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 6px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-h); color: var(--gold-ink); }
.btn-line { color: var(--ink); border-color: var(--line-2); background: transparent; }
.btn-line:hover { color: var(--ink); border-color: var(--gold); }

/* ── Header (sealed on every page) ──────────────────────── */
.site-head { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--s-line); }
.head-in { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1 var(--font-display); letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 6px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 2px; margin-left: 20px; }
.nav a {
  padding: 8px 11px; border-radius: 6px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: rgba(148, 163, 184, .1); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-link, .icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 6px;
  color: var(--ink-2); font: 500 14.5px var(--font); text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: color .2s, background-color .2s;
}
.icon-link .i, .icon-btn .i { font-size: 18px; }
.icon-link:hover, .icon-btn:hover { color: var(--ink); background: rgba(148, 163, 184, .1); }
.head-dl { margin-left: 6px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
}
/* narrow: nav drops to its own scrollable row */
@media (max-width: 1100px) {
  .head-in { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 4px; }
  .nav {
    order: 3; flex-basis: 100%; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 10px; font-size: 14px; }
  html { scroll-padding-top: 116px; }
}
@media (max-width: 520px) { .gh-label { display: none; } .head-in { gap: 6px; } }

/* ── Footer (sealed) ────────────────────────────────────── */
.site-foot { padding: 48px 0 56px; border-top: 1px solid var(--s-line); font-size: 14.5px; }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 20px 48px; align-items: start; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.site-foot nav a { color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 20px; border-top: 1px solid var(--s-line); color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } .site-foot nav { justify-content: flex-start; } }

/* ── Prose pages (privacy policies) ─────────────────────── */
.doc-head { padding-block: 64px 40px; border-bottom: 1px solid var(--s-line); }
.doc-head h1 { margin: 0 0 14px; font-size: clamp(2.1rem, 4.6vw, 3.25rem); line-height: 1.06; letter-spacing: -.03em; font-weight: 720; max-width: 22ch; }
.doc-head .meta { margin: 0; color: var(--muted); font-size: 14.5px; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; padding-top: 56px; padding-bottom: 96px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc p { margin: 0 0 10px; font-weight: 650; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--gold); }
.doc { min-width: 0; }
.doc > p:first-child { font-size: 1.12rem; color: var(--ink); }
.doc h2 { font-size: 1.4rem; line-height: 1.25; letter-spacing: -.015em; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 18px; padding-left: 20px; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--gold-text); }
.doc strong { color: var(--ink); font-weight: 650; }
.doc a { color: var(--sky-text); }
.doc a:hover { color: var(--ink); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
  .toc { position: static; margin-bottom: 8px; }
  .toc ol { grid-template-columns: 1fr 1fr; border-left: 0; gap: 0 16px; }
  .toc a { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) { .doc-head { padding-block: 40px 28px; } .toc ol { grid-template-columns: 1fr; } }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
