/* Shared style for /privacy and the 404 page. Tokens are copied from index.html; keep them in step. */
:root {
  color-scheme: dark;
  --bg: #0A0E15; --bg-2: #0E131C; --card: #121822; --card-2: #19202C;
  --ink: #F3EFE7; --body: #D4CEC3; --muted: #A6A29A; --faint: #908C85;
  --ink-rgb: 243, 239, 231; --bg-rgb: 10, 14, 21; --card-rgb: 18, 24, 34;
  --line: rgba(var(--ink-rgb), .09); --line-2: rgba(var(--ink-rgb), .17);
  --accent: #FFB162; --accent-hi: #FFCB94; --accent-rgb: 255, 177, 98;
  --accent-fill: #FFB162; --accent-press: #F59E45; --on-accent: #17120B;
  --band: #FFB162; --band-rgb: 255, 177, 98; --on-band: #17120B; --on-band-rgb: 23, 18, 11;
  --bull: #3FCF9A; --bull-rgb: 63, 207, 154; --bear: #FF7A6E; --bear-rgb: 255, 122, 110;
  --tile-bg: linear-gradient(145deg, #1A2130 0%, #10151E 100%); --tile-fg: #FFB162;
  --shade-rgb: 0, 0, 0; --shade-k: 1;
  --glass: rgba(12, 17, 25, .76); --grain: .045;
  --bezel: #07090D; --deck-1: #343944; --deck-2: #191C23; --deck-edge: #4C525E; --screen: #0B0F16;
  --film-ground: #F9FBF6; --film-ink-rgb: 17, 24, 39; --film-accent: #C2620F;

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --wrap: 1240px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --pad-x: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F3EFE7; --bg-2: #F8F5EF; --card: #FFFFFF; --card-2: #F1ECE3;
    --ink: #111827; --body: #2E3543; --muted: #555D6B; --faint: #626977;
    --ink-rgb: 17, 24, 39; --bg-rgb: 243, 239, 231; --card-rgb: 255, 255, 255;
    --line: rgba(var(--ink-rgb), .10); --line-2: rgba(var(--ink-rgb), .18);
    --accent: #B4580C; --accent-hi: #94470A; --accent-rgb: 206, 104, 16;
    --accent-fill: #B4580C; --accent-press: #8F4609; --on-accent: #FFFFFF;
    --bull: #0B8158; --bull-rgb: 11, 140, 96; --bear: #C23A2F; --bear-rgb: 205, 62, 50;
    --tile-bg: linear-gradient(145deg, #FFF6EC 0%, #FFFFFF 100%); --tile-fg: #B4580C;
    --shade-rgb: 30, 34, 44; --shade-k: .32; --glass: rgba(248, 245, 239, .8); --grain: .05;
    --deck-1: #E4E6EB; --deck-2: #A7ACB6; --deck-edge: #F4F5F7;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3EFE7; --bg-2: #F8F5EF; --card: #FFFFFF; --card-2: #F1ECE3;
  --ink: #111827; --body: #2E3543; --muted: #555D6B; --faint: #626977;
  --ink-rgb: 17, 24, 39; --bg-rgb: 243, 239, 231; --card-rgb: 255, 255, 255;
  --line: rgba(var(--ink-rgb), .10); --line-2: rgba(var(--ink-rgb), .18);
  --accent: #B4580C; --accent-hi: #94470A; --accent-rgb: 206, 104, 16;
  --accent-fill: #B4580C; --accent-press: #8F4609; --on-accent: #FFFFFF;
  --bull: #0B8158; --bull-rgb: 11, 140, 96; --bear: #C23A2F; --bear-rgb: 205, 62, 50;
  --tile-bg: linear-gradient(145deg, #FFF6EC 0%, #FFFFFF 100%); --tile-fg: #B4580C;
  --shade-rgb: 30, 34, 44; --shade-k: .32; --glass: rgba(248, 245, 239, .8); --grain: .05;
  --deck-1: #E4E6EB; --deck-2: #A7ACB6; --deck-edge: #F4F5F7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0E15; --bg-2: #0E131C; --card: #121822; --card-2: #19202C;
  --ink: #F3EFE7; --body: #D4CEC3; --muted: #A6A29A; --faint: #908C85;
  --ink-rgb: 243, 239, 231; --bg-rgb: 10, 14, 21; --card-rgb: 18, 24, 34;
  --line: rgba(var(--ink-rgb), .09); --line-2: rgba(var(--ink-rgb), .17);
  --accent: #FFB162; --accent-hi: #FFCB94; --accent-rgb: 255, 177, 98;
  --accent-fill: #FFB162; --accent-press: #F59E45; --on-accent: #17120B;
  --bull: #3FCF9A; --bull-rgb: 63, 207, 154; --bear: #FF7A6E; --bear-rgb: 255, 122, 110;
  --tile-bg: linear-gradient(145deg, #1A2130 0%, #10151E 100%); --tile-fg: #FFB162;
  --shade-rgb: 0, 0, 0; --shade-k: 1; --glass: rgba(12, 17, 25, .76); --grain: .045;
  --deck-1: #343944; --deck-2: #191C23; --deck-edge: #4C525E;
}

/* ---------- base (same as index.html) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: rgba(var(--ink-rgb), .22) var(--bg); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .32s ease, color .32s ease, border-color .32s ease, box-shadow .32s ease, fill .32s ease, stroke .32s ease !important;
}
a { color: inherit; }
::selection { background: rgba(var(--accent-rgb), .32); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad-x)); margin-inline: auto; padding-left: max(var(--pad-x), var(--gutter)); padding-right: max(var(--pad-x), var(--gutter-r)); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
main { flex: 1; position: relative; z-index: 1; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(46% 52% at 82% 6%, rgba(var(--accent-rgb), .13), transparent 72%);
}
.nav { z-index: 60; }

/* ---------- type ---------- */
h1, h2 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 600; font-optical-sizing: auto; letter-spacing: -.022em; text-wrap: balance; }
h1 em { font-style: italic; font-weight: 480; letter-spacing: -.012em; padding-right: .04em; }
h1 { font-size: clamp(2.55rem, 4.7vw, 4.5rem); line-height: 1.04; padding-bottom: .06em; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 7px 14px 7px 11px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(var(--bg-rgb), .5);
  font: 500 12.5px/1.2 var(--mono); color: var(--muted);
}
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- logo, buttons, nav ---------- */
.logo-tile {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px;
  background: var(--tile-bg); color: var(--tile-fg);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .40), 0 0 0 3px rgba(var(--accent-rgb), .07);
}
.logo-tile svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 6px 0 22px;
  border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent);
  font: 700 15px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 14px 34px -16px rgba(var(--accent-rgb), .75), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .18s var(--ease-out), box-shadow .3s ease;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent-press); transform: scaleX(0); transform-origin: left center; transition: transform .5s var(--ease-out); }
.btn .bi { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--on-band-rgb), .12); transition: transform .45s var(--ease-out); }
:root[data-theme="light"] .btn .bi { background: rgba(255, 255, 255, .2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn .bi { background: rgba(255, 255, 255, .2); } }
.btn .bi .ic { width: 16px; height: 16px; stroke-width: 2.2; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { transform: scaleX(1); }
  .btn:hover .bi { transform: translateX(3px) rotate(-8deg); }
}
.btn:active { transform: scale(.97); }
.nav { position: relative; z-index: 60; padding: calc(env(safe-area-inset-top, 0px) + 12px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.nav-in { display: flex; align-items: center; gap: 18px; height: 62px; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 10px 0 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; border-radius: 12px; }
.wordmark { font: 600 21px/1 var(--display); letter-spacing: -.02em; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.back { padding: 9px 14px; border-radius: 999px; color: var(--muted); font: 500 14px/1 var(--sans); text-decoration: none; transition: color .2s ease, background-color .2s ease; }
.back:hover { color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.theme-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.theme-btn:hover { color: var(--ink); background: rgba(var(--ink-rgb), .06); }
.theme-btn .i-sun { display: none; }
.is-dark .theme-btn .i-sun { display: block; }
.is-dark .theme-btn .i-moon { display: none; }
@media (max-width: 900px) { .nav-in { height: 56px; } }
@media (max-width: 440px) { .back .long { display: none; } }

/* ---------- privacy notice ---------- */
.doc { padding-block: clamp(48px, 7vw, 96px) clamp(72px, 9vw, 128px); }
.doc-head { display: grid; gap: 22px; justify-items: start; margin-bottom: clamp(36px, 5vw, 60px); }
.doc-head p.lede { margin: 0; max-width: 52ch; color: var(--body); font-size: clamp(1.05rem, 1.3vw, 1.18rem); text-wrap: pretty; }
.prose { max-width: 68ch; }
.prose section { padding-block: 28px; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.15; margin-bottom: 12px; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 4px; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--ink); text-decoration-color: rgba(var(--accent-rgb), .7); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.lost { display: grid; place-items: center; text-align: center; padding-block: clamp(64px, 12vw, 160px); }
.lost-in { display: grid; gap: 22px; justify-items: center; max-width: 34rem; }
.lost .big { font: 600 clamp(5rem, 16vw, 10rem)/.9 var(--display); letter-spacing: -.04em; color: var(--accent); font-optical-sizing: auto; }
.lost p { margin: 0; color: var(--body); font-size: clamp(1.05rem, 1.3vw, 1.18rem); text-wrap: pretty; }

/* ---------- footer ---------- */
footer { position: relative; z-index: 1; padding-block: 0 clamp(28px, 4vw, 44px); }
.foot-b { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 22px; border-top: 1px solid var(--line); font: 400 12.5px/1.5 var(--mono); color: var(--faint); }
.foot-b a { color: var(--muted); text-decoration: none; }
.foot-b a:hover { color: var(--ink); }
