/* Shared tokens (CONTRACT.md). Pages: <link rel="stylesheet" href="/theme.css"> then their own CSS. */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #14181f; --muted: #5a6472; --line: #dde2e8;
  --accent: #0b6bcb; --accent-ink: #ffffff; --ok: #1a7f37; --warn: #9a6700; --bad: #c62828; --hi: #fff4cc;
  --radius: 10px; --gutter: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1216; --panel: #181c22; --ink: #e8ebef; --muted: #9aa4b1; --line: #2a313a;
  --accent: #4ea1ff; --accent-ink: #0b1220; --ok: #4cc26a; --warn: #e3b341; --bad: #ff6b6b; --hi: #3a3214; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1216; --panel: #181c22; --ink: #e8ebef; --muted: #9aa4b1; --line: #2a313a;
  --accent: #4ea1ff; --accent-ink: #0b1220; --ok: #4cc26a; --warn: #e3b341; --bad: #ff6b6b; --hi: #3a3214; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* .btn and .card set display, which would beat the hidden attribute */
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: var(--gutter); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--muted); }
.sample { font-size: 12px; color: var(--muted); }
/* share QR dialog (pwa.js) */
.pp-qr { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter); background: rgb(0 0 0 / .6); }
.pp-qr[hidden] { display: none; }
.pp-qr-card { background: var(--panel); color: var(--ink); border-radius: 16px; padding: 24px; max-width: 360px; width: 100%; text-align: center; display: grid; gap: 12px; justify-items: center; }
.pp-qr-head { margin: 0; font-weight: 700; font-size: 18px; }
.pp-qr-code svg { display: block; width: min(260px, 70vw); height: auto; border-radius: 8px; }
.pp-qr-url { margin: 0; font-weight: 600; }
.pp-qr-note { margin: 0; font-size: 14px; }
