/* ============================================================================
   deck-tokens.css — Paper Design System TOKENS ONLY (no visual rules)
   ----------------------------------------------------------------------------
   The RDx Decks web app (web/index.html) loads THIS file instead of the full
   legacy src/deck-system.css. It carries every design token the app chrome
   needs (--surface, --ink, --accent, theme flips, type/space scale, …) but
   NONE of the legacy element/slide/component RULES that used to bleed into V2
   `.slide` previews.

   WHY: legacy deck-system.css is loaded app-wide and its rules cascaded into
   V2 slides — 59 collisions incl. a `*{transform:none!important}` reduced-motion
   rule that broke the slide scale-to-fit, a global `font-family:Inter!important`
   that defeated per-theme body fonts, and `.s-ink`/`.feature-card`/agenda bleeds.
   Loading tokens-only removes the bleed at the SOURCE (the legacy rules never
   enter the app document) rather than overriding it rule-by-rule.

   deck-system.css is UNCHANGED on disk and still linked by every self-contained
   legacy deck artifact (render-deck.ts `<iframe srcdoc>`) and file:// deck, so
   legacy decks + the frozen render-deck tests are unaffected.

   REGENERATE: extracted from every :root / [data-theme] / [data-accent] rule's
   custom-property declarations in src/deck-system.css. If you add/rename a token
   there, mirror it here. The zero-legacy guardrail test asserts this file defines
   the app-needed token set. DO NOT add visual selectors here — tokens only.
   ============================================================================ */

:root {
  --font-sans: "Graphik", "Inter", system-ui, -apple-system, "Segoe UI",
               Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-editorial: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

:root, [data-theme="light"] {
  --canvas: #F4F2EE;
  --surface: #FDFCFA;
  --surface-hover: #F0EDE8;
  --surface-sunken: #EAE6E0;
  --border-subtle: #E3DFD8;
  --border-default: #CFC9C0;
  --border-strong: #B8B0A5;
  --text-primary: #1A1A1A;
  --text-secondary: #595959;
  --text-tertiary: #8F8F8F;
  --text-disabled: #BFBFBF;
  --text-link: #1E2A3A;
  --ink: #1E2A3A;
  --ink-hover: #101826;
  --ink-soft: #E8ECF1;
  --on-ink: #FDFCFA;
  --success: #3F7A55;
  --success-soft: #E5EFE9;
  --warning: #B87333;
  --warning-soft: #F4ECE0;
  --danger: #A03020;
  --danger-soft: #F2E1DE;
  --info: #2C5470;
  --info-soft: #E2EAF1;
  --accent-cool: #9FABB5;
  --glass-bg: linear-gradient(135deg, rgba(253,252,250,.80), rgba(244,242,238,.75));
  --glass-border: 1px solid rgba(0,0,0,.06);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,.6);
  --glass-shadow: 0 8px 32px rgba(0,0,0,.08);
  --glass-blur: blur(4px) saturate(180%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-hover: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  --shadow-overlay: 0 12px 32px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --ring-focus: 0 0 0 2px var(--canvas), 0 0 0 4px var(--ink);
}

[data-theme="dark"] {
  --canvas: #0B0B0C;
  --surface: #141416;
  --surface-hover: #1C1C1F;
  --surface-sunken: #0F0F11;
  --border-subtle: #222226;
  --border-default: #2C2C32;
  --border-strong: #404048;
  --text-primary: #F2F0EC;
  --text-secondary: #B8B0A5;
  --text-tertiary: #7A7670;
  --text-disabled: #4D4A45;
  --text-link: #9FB8D4;
  --ink: #9FB8D4;
  --ink-hover: #B8CCE2;
  --ink-soft: #1E2A3A;
  --on-ink: #0B0B0C;
  --success: #6FB389;
  --success-soft: #1F2E26;
  --warning: #D9903A;
  --warning-soft: #2E2418;
  --danger: #E06658;
  --danger-soft: #2E1B17;
  --info: #7FA8C7;
  --info-soft: #18222C;
  --accent-cool: #6E7A86;
  --glass-bg: linear-gradient(135deg, rgba(26,26,28,.80), rgba(20,20,22,.75));
  --glass-border: 1px solid rgba(255,255,255,.08);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,.06);
  --glass-shadow: 0 8px 32px rgba(0,0,0,.40);
  --glass-blur: blur(4px) saturate(160%) brightness(90%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.30);
  --shadow-hover: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
  --shadow-overlay: 0 12px 32px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
  --ring-focus: 0 0 0 2px var(--canvas), 0 0 0 4px var(--ink);
}

:root {
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --motion-fast: 150ms;
  --motion: 250ms;
  --motion-page: 300ms;
  --motion-slow: 450ms;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-sharp: cubic-bezier(.4,  0, .2, 1);
  --shell-gutter: 16px;
  --sidebar-w: 340px;
  --rightpanel-w: 380px;
  --glass-bar-h: 48px;
}

:root {
  --type-mega: 160px;
  --type-display: 112px;
  --type-title: 72px;
  --type-subtitle: 44px;
  --type-h3: 34px;
  --type-body: 28px;
  --type-small: 24px;
  --type-eyebrow: 26px;
  --pad-top: 64px;
  --pad-bottom: 100px;
  --pad-x: 112px;
  --gap-title: 40px;
  --gap-item: 32px;
  --gap-section: 48px;
  --ls-mega: -0.05em;
  --ls-display: -0.045em;
  --ls-title: -0.035em;
  --on-dark: #F7F5F1;
  --on-light: #14181F;
  --scrim-dark-soft: rgba(11, 11, 12, 0.38);
  --scrim-dark-strong: rgba(11, 11, 12, 0.64);
  --scrim-light-soft: rgba(244, 242, 238, 0.46);
  --scrim-light-strong: rgba(244, 242, 238, 0.72);
}

:root {
  --accent: var(--danger);
  --accent-soft: var(--danger-soft);
  --accent-on: var(--on-ink);
}

[data-accent="red"] {
  --accent: var(--danger);
  --accent-soft: var(--danger-soft);
  --accent-on: var(--on-ink);
}

[data-accent="ink"] {
  --accent: var(--ink);
  --accent-soft: var(--ink-soft);
  --accent-on: var(--on-ink);
}

[data-accent="sage"] {
  --accent: var(--success);
  --accent-soft: var(--success-soft);
  --accent-on: var(--on-ink);
}

[data-accent="clay"] {
  --accent: var(--warning);
  --accent-soft: var(--warning-soft);
  --accent-on: var(--on-ink);
}

[data-accent="info"] {
  --accent: var(--info);
  --accent-soft: var(--info-soft);
  --accent-on: var(--on-ink);
}

[data-theme="dark"][data-accent="ink"], [data-theme="dark"] [data-accent="ink"] {
  --accent-on: var(--canvas);
}

:root {
  --img-radius: var(--radius-lg);
  --scrim: linear-gradient(180deg,
                  rgba(11, 11, 12, 0.10) 0%,
                  rgba(11, 11, 12, 0.45) 55%,
                  rgba(11, 11, 12, 0.78) 100%);
  --aspect-16-9: 16 / 9;
  --aspect-4-3: 4 / 3;
  --aspect-1-1: 1 / 1;
}

[data-theme="dark"] {
  --scrim: linear-gradient(180deg,
             rgba(0, 0, 0, 0.20) 0%,
             rgba(0, 0, 0, 0.55) 55%,
             rgba(0, 0, 0, 0.85) 100%);
}

:root {
  --chart-1: var(--ink);
  --chart-2: var(--danger);
  --chart-3: var(--success);
  --chart-4: var(--warning);
  --chart-5: var(--info);
}

:root {
  --icon-sm: 28px;
  --icon-md: 48px;
  --icon-lg: 64px;
}
