/**
 * IANAI chat-shell — Obsidian tokens (light + dark)
 * Reference mock: Scripts + creatives three-column shell (PatchHouse.CR).
 * Loaded by index.html for /chat (canonical runtime tokens).
 */

:root {
  /* Typography */
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "ui-monospace", monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Accents (shared) */
  --accent: #2563eb;
  --accent-muted: #3b82f6;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;

  /* Artifact type tints */
  --artifact-script: #2563eb;
  --artifact-post: #0d9488;
  --artifact-image: #7c3aed;

  /* Focus */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-med: 220ms;
}

/* Dark — "Obsidian electric" (primary mock) */
[data-theme="obsidian-dark"] {
  --bg: #0b0e14;
  --bg-elevated: #151921;
  --bg-soft: #1a2030;
  --border: #2a3142;
  --border-strong: #3b455c;
  --text: #f3f4f6;
  --text-muted: #9aa3b5;
  --text-faint: #6b7385;
  --bubble-user: #1c2433;
  --bubble-ai: #151921;
  --sidebar: #0e121a;
  --rail: #10151f;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --grid-line: rgba(37, 99, 235, 0.08);
}

/* Light — same geometry, daylight surfaces */
[data-theme="obsidian-light"] {
  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-soft: #e8edf7;
  --border: #d5dbe8;
  --border-strong: #b7c0d4;
  --text: #0f172a;
  --text-muted: #5b657a;
  --text-faint: #8b93a7;
  --bubble-user: #e8eefc;
  --bubble-ai: #ffffff;
  --sidebar: #eef2f9;
  --rail: #f8fafc;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --grid-line: rgba(37, 99, 235, 0.06);
}

body.obsidian-shell {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--grid-line), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, #000) 100%);
  color: var(--text);
  color-scheme: dark;
}

[data-theme="obsidian-light"] body.obsidian-shell,
body.obsidian-shell[data-theme="obsidian-light"] {
  color-scheme: light;
}
