/*
 * Ripper Vamp demo — design tokens
 *
 * Dark is default. Light overrides are scoped under [data-theme="light"].
 * Token set aligned with skinny-dip + build-ops for brand family coherence.
 */

:root,
[data-theme="dark"] {
  /* fonts */
  --rip-font-mono:
    "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New", ui-monospace,
    Menlo, Consolas, monospace;
  --rip-font-size-base: 13px;

  /* surfaces */
  --rip-bg: #0a0a0a;
  --rip-bg-secondary: #111111;
  --rip-bg-panel: #0a0a0a;
  --rip-bg-chat: #0c0c0c;
  --rip-bg-raised: #141414;
  --rip-bg-sunken: #070707;
  --rip-card-bg: #0f0f0f;
  --rip-card-border: #1a1a1a;

  /* text */
  --rip-text: #e0e0e0;
  --rip-text-muted: #888888;
  --rip-text-dim: #555555;
  --rip-text-faint: #333333;

  /* accent */
  --rip-accent: #00ff41;
  --rip-accent-dim: #009926;
  --rip-accent-faint: #003d10;
  --rip-accent-glow: rgba(0, 255, 65, 0.35);
  --rip-slash: #ef4444;

  /* supporting tones (shared with skinny-dip + build-ops) */
  --rip-teal: #2dd4bf;
  --rip-amber: #f59e0b;
  --rip-violet: #c084fc;
  --rip-pink: #f472b6;

  /* status */
  --rip-warning: #f59e0b;
  --rip-error: #ef4444;
  --rip-info: #33aaff;

  /* confidence — semantic aliases for inferred-field chips
     (high → accent, medium → amber, low → error) */
  --rip-confidence-high: var(--rip-accent);
  --rip-confidence-medium: var(--rip-amber);
  --rip-confidence-low: var(--rip-error);

  /* user message bubble (skinny-dip palette) */
  --rip-user-bg: #0d0f0a;
  --rip-user-border: #1a2a10;
  --rip-user-text: #c8e6c0;

  /* input */
  --rip-input-bg: #111111;
  --rip-input-border: #333333;
  --rip-input-focus: #00ff41;

  /* borders */
  --rip-border: #222222;
  --rip-border-subtle: #1a1a1a;
  --rip-border-hairline: #151515;
  --rip-border-health: #1a3a1a;
  --rip-border-warn: #4a3a0a;
  --rip-border-critical: #4a1a1a;

  /* cards */
  --rip-card-health: #0d1a0d;
  --rip-card-warn: #15110a;
  --rip-card-critical: #1a0a0a;

  /* receipt block */
  --rip-receipt-bg: #001a00;
  --rip-receipt-border: #1e3a1e;
  --rip-receipt-text: #9ecaa0;

  /* radius / motion */
  --rip-radius: 6px;
  --rip-radius-sm: 4px;
  --rip-radius-xs: 2px;
  --rip-transition-speed: 200ms;

  /* effects (dark-only; forced to 0 in light) */
  --rip-scanline-opacity: 0.03;
  --rip-scanline-size: 2px;
  --rip-matrix-chat-opacity: 0.06;
  --rip-matrix-boot-opacity: 0.18;
  --rip-glow-blur: 8px;
  --rip-glow-strength: 1;

  /* focus */
  --rip-focus-ring: 0 0 0 1px var(--rip-accent), 0 0 12px var(--rip-accent-glow);
}

[data-theme="light"] {
  --rip-bg: #f5f5f2;
  --rip-bg-secondary: #ffffff;
  --rip-bg-panel: #ffffff;
  --rip-bg-chat: #fafaf7;
  --rip-bg-raised: #ffffff;
  --rip-bg-sunken: #eeeeea;
  --rip-card-bg: #ffffff;
  --rip-card-border: #e6e6e2;

  --rip-text: #0a0a0a;
  --rip-text-muted: #555555;
  --rip-text-dim: #888888;
  --rip-text-faint: #bbbbbb;

  --rip-accent: #007a22;
  --rip-accent-dim: #005c18;
  --rip-accent-faint: #d6ecd9;
  --rip-accent-glow: rgba(0, 122, 34, 0.12);
  --rip-slash: #8b0000;

  --rip-teal: #0e9488;
  --rip-amber: #a16207;
  --rip-violet: #7c3aed;
  --rip-pink: #be185d;

  --rip-warning: #b45309;
  --rip-error: #b91c1c;
  --rip-info: #1d4ed8;

  --rip-confidence-high: var(--rip-accent);
  --rip-confidence-medium: var(--rip-amber);
  --rip-confidence-low: var(--rip-error);

  --rip-user-bg: #eef3e9;
  --rip-user-border: #c6d9b3;
  --rip-user-text: #1b3a14;

  --rip-input-bg: #ffffff;
  --rip-input-border: #d8d8d4;
  --rip-input-focus: #007a22;

  --rip-border: #d8d8d4;
  --rip-border-subtle: #e6e6e2;
  --rip-border-hairline: #eeeeea;
  --rip-border-health: #b3d7b6;
  --rip-border-warn: #e6c78a;
  --rip-border-critical: #e8b0b0;

  --rip-card-health: #eaf6ea;
  --rip-card-warn: #fbf3df;
  --rip-card-critical: #faeaea;

  --rip-receipt-bg: #eaf6ea;
  --rip-receipt-border: #9ecaa0;
  --rip-receipt-text: #0f5a22;

  --rip-scanline-opacity: 0;
  --rip-matrix-chat-opacity: 0;
  --rip-matrix-boot-opacity: 0;
  --rip-glow-strength: 0;

  --rip-focus-ring: 0 0 0 2px var(--rip-accent);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --rip-scanline-opacity: 0;
    --rip-matrix-chat-opacity: 0;
    --rip-matrix-boot-opacity: 0;
    --rip-glow-strength: 0;
  }
}

/* ── Partner: Tyl by NatWest ───────────────────────────────────
   Palette + type extracted from tylbynatwest.com. Layered on top
   of the existing body.white-label scaffolding via the
   data-partner="tyl" attribute set in applyPartnerBranding(). */
[data-partner="tyl"] {
  /* Type — Lato as the closest free humanist-sans substitute for RNHouseSans
     (NatWest-proprietary). Loaded from Google Fonts in applyPartnerBranding. */
  --rip-font-body:
    "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  /* keep mono for code blocks only */
  --rip-font-mono:
    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* surfaces — light, airy, faint lilac washes */
  --rip-bg: #ffffff;
  --rip-bg-secondary: #f7f7fb;
  --rip-bg-panel: #fafafc;
  --rip-bg-chat: #ffffff;
  --rip-bg-raised: #ffffff;
  --rip-bg-sunken: #f2f2f8;
  --rip-card-bg: #ffffff;
  --rip-card-border: #e6e1ee;

  /* text — Champion Purple for headings/accents, near-black for body */
  --rip-text: #2d2d2d;
  --rip-text-muted: #646068;
  --rip-text-dim: #8a8693;
  --rip-text-faint: #bfbcc7;

  /* accent — Champion Purple */
  --rip-accent: #5a287d;
  --rip-accent-dim: #3c1053;
  --rip-accent-faint: #f2eaf9;
  --rip-accent-glow: rgba(90, 40, 125, 0.18);
  --rip-slash: #cf223f;

  /* supporting tones */
  --rip-teal: #5e10b1;
  --rip-amber: #fbb200;
  --rip-violet: #5e10b1;
  --rip-pink: #cf223f;

  /* status */
  --rip-warning: #fbb200;
  --rip-error: #cf223f;
  --rip-info: #5e10b1;

  /* confidence — high → Champion Purple accent, medium → Tyl gold,
     low → Tyl red */
  --rip-confidence-high: var(--rip-accent);
  --rip-confidence-medium: var(--rip-amber);
  --rip-confidence-low: var(--rip-error);

  /* user message bubble — soft lilac */
  --rip-user-bg: #f2eaf9;
  --rip-user-border: #d8c4eb;
  --rip-user-text: #3c1053;

  /* input */
  --rip-input-bg: #ffffff;
  --rip-input-border: #d8d4e0;
  --rip-input-focus: #5a287d;

  /* borders */
  --rip-border: #e6e1ee;
  --rip-border-subtle: #efebf5;
  --rip-border-hairline: #f5f2fa;
  --rip-border-health: #cce4cf;
  --rip-border-warn: #f5d896;
  --rip-border-critical: #f0bcc4;

  /* cards */
  --rip-card-health: #ebf6ec;
  --rip-card-warn: #fdf6e1;
  --rip-card-critical: #fdecef;

  /* receipt block */
  --rip-receipt-bg: #f2eaf9;
  --rip-receipt-border: #d8c4eb;
  --rip-receipt-text: #3c1053;

  /* radii — Tyl uses pill CTAs and rounded panels */
  --rip-radius: 10px;
  --rip-radius-sm: 6px;
  --rip-radius-xs: 4px;
  --rip-radius-pill: 999px;

  /* kill cyberpunk effects entirely */
  --rip-scanline-opacity: 0;
  --rip-matrix-chat-opacity: 0;
  --rip-matrix-boot-opacity: 0;
  --rip-glow-strength: 0;
  --rip-glow-blur: 0;

  /* focus */
  --rip-focus-ring: 0 0 0 3px rgba(90, 40, 125, 0.18);
}
