/* Shared head/partial for ehi.chat static pages (help, terms, privacy, refund
   + their /fr twins) — EHI-workorder Stage3 #4/#11/#12.
   Paper palette, Schibsted Grotesk, red-dot wordmark, self-hosted fonts
   (no fonts.googleapis.com / fonts.gstatic.com — see index.js CSP). Dark mode
   follows the app's own toggle (data-theme, set by /static.js before paint)
   so it carries over app -> static page instead of just prefers-color-scheme. */
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 500; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 700; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 800; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
:root {
  color-scheme: light;
  --paper: oklch(0.972 0.006 85); --surface: #fff; --surface-2: oklch(0.985 0.004 85);
  --ink: oklch(0.22 0.02 255); --body: oklch(0.40 0.018 255); --muted: oklch(0.46 0.02 255);
  --rule: oklch(0.90 0.008 85); --rule-soft: oklch(0.93 0.008 85);
  --maple: oklch(0.56 0.17 27); --maple-light: oklch(0.68 0.16 28); --maple-deep: oklch(0.50 0.17 27);
  --border-btn: oklch(0.86 0.01 85);
  --font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: oklch(0.20 0.02 255); --surface: oklch(0.24 0.02 255); --surface-2: oklch(0.27 0.02 255);
  --ink: oklch(0.972 0.006 85); --body: oklch(0.84 0.01 85); --muted: oklch(0.76 0.012 85);
  --rule: oklch(0.34 0.02 255); --rule-soft: oklch(0.30 0.02 255);
  --maple: oklch(0.68 0.16 28); --maple-light: oklch(0.76 0.14 30); --maple-deep: oklch(0.62 0.16 28);
  --border-btn: oklch(0.38 0.02 255);
}
/* QA review (Stage3): no-JS / script-blocked fallback. static.js always sets
   data-theme explicitly (light or dark) once it runs, so :not([data-theme])
   only ever matches when it never ran at all — a saved 'light' choice on a
   dark OS is never overridden by this, because static.js will have already
   set data-theme="light" before this rule could apply. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: oklch(0.20 0.02 255); --surface: oklch(0.24 0.02 255); --surface-2: oklch(0.27 0.02 255);
    --ink: oklch(0.972 0.006 85); --body: oklch(0.84 0.01 85); --muted: oklch(0.76 0.012 85);
    --rule: oklch(0.34 0.02 255); --rule-soft: oklch(0.30 0.02 255);
    --maple: oklch(0.68 0.16 28); --maple-light: oklch(0.76 0.14 30); --maple-deep: oklch(0.62 0.16 28);
    --border-btn: oklch(0.38 0.02 255);
  }
}
* { box-sizing: border-box; }
body { font-family: var(--font); margin: 0; padding: 0; line-height: 1.6; color: var(--ink); background: var(--paper);
       -webkit-font-smoothing: antialiased; }
a { color: var(--maple); }
.head { display: flex; align-items: center; gap: 18px; padding: 20px 40px; flex-wrap: wrap;
        border-bottom: 1px solid var(--rule-soft); max-width: 1240px; margin: 0 auto; }
@media (max-width: 640px) { .head { padding: 16px 20px; } }

/* The wordmark — same construction as the app; cap = 26 */
.ehi-mark { --cap: 26px; --stem-w: calc(var(--cap) * 0.175); --dot: calc(var(--cap) * 0.185);
  direction: ltr; display: inline-flex; align-items: baseline; line-height: 1; font-family: var(--font); font-weight: 800;
  font-size: calc(var(--cap) / 0.715); letter-spacing: -0.045em; color: var(--ink); text-decoration: none; user-select: none; }
.ehi-glyph { position: relative; display: inline-block; width: max(var(--stem-w), var(--dot)); height: var(--cap);
  margin-left: calc(var(--cap) * 0.10); vertical-align: baseline; }
.ehi-stem, .ehi-dot { position: absolute; left: 50%; transform: translateX(-50%);
  transition: bottom 560ms cubic-bezier(.7, 0, .2, 1), height 560ms cubic-bezier(.7, 0, .2, 1); }
.ehi-stem { width: var(--stem-w); border-radius: calc(var(--stem-w) * 0.28); background: var(--ink); bottom: 0; height: calc(var(--cap) * 0.665); }
.ehi-dot { width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--maple); bottom: calc(var(--cap) * 0.845); }
.ehi-mark:hover .ehi-stem { bottom: calc(var(--cap) * 0.27); height: calc(var(--cap) * 0.73); }
.ehi-mark:hover .ehi-dot { bottom: 0; }
@media (prefers-reduced-motion: reduce) { .ehi-stem, .ehi-dot { transition: none; } }

nav.site { display: flex; gap: clamp(12px, 2vw, 26px); flex-wrap: wrap; font-size: 14px; font-weight: 500; margin-inline-start: auto; }
nav.site a { color: var(--body); text-decoration: none; }
nav.site a:hover { color: var(--ink); }
nav.site a.here { color: var(--ink); font-weight: 600; }
/* Legal-page EN/FR swap pill (help.html toggles language in-page instead) */
.langswap { font-size: 13px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 12px;
            text-decoration: none; color: var(--muted); }
.langswap:hover { color: var(--ink); border-color: var(--muted); }
main { max-width: 800px; margin: 0 auto; padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 40px) 64px; }
h1 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; }
.meta { font-size: 15px; color: var(--body); margin: 0 0 22px; max-width: 60ch; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin: 34px 0 10px; color: var(--maple); }
p, li { font-size: 15px; color: var(--body); }
ul { padding-inline-start: 22px; }
.card { border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; margin: 14px 0; background: var(--surface); }
.muted { color: var(--muted); font-size: 13px; }
footer.site { border-top: 1px solid var(--rule-soft); padding: 26px 40px; font-size: 13px; color: var(--muted);
              display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; max-width: 1240px; margin: 0 auto; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); }
