/* Exact shared Forphysician web palette. */
:root {
  --radius: 0.625rem;

  /* Surfaces */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(0.9609 0.0029 247.84);
  --card-foreground: oklch(0.145 0 0);
  --card-selected: oklch(0.909 0.0041 256.79);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  /* Text hierarchy */
  --muted-foreground: oklch(0.5544 0.0407 257.42);
  --muted: oklch(0.6 0.01 250);
  /* Brand */
  --primary: oklch(0.2631 0.065564 244.5082);
  --primary-foreground: oklch(0.97 0.014 254.604);
  --secondary: oklch(0.9755 0.0045 258.32);
  --secondary-foreground: oklch(0.21 0.006 285.885);
  --accent: oklch(0.9683 0.0069 247.9);
  --accent-foreground: oklch(0.205 0 0);
  /* Status */
  --destructive: oklch(0.5 0.22 27);
  --destructive-foreground: oklch(0.985 0 0);
  --success: oklch(0.5 0.15 145);
  --success-foreground: oklch(0.985 0 0);
  --warning: oklch(0.48 0.14 55);
  --warning-foreground: oklch(0.985 0 0);
  --info: oklch(0.48 0.2 255);
  --info-foreground: oklch(0.985 0 0);
  /* Chat bubbles — opaque composite of success at 10% (light) / 15%
  (dark) over the background. Opaque on purpose: the iOS context-menu
  lift snapshots the bubble onto an opaque system platter, and a
  translucent fill visibly shifts tone there. */
  --bubble-own: oklch(0.9495 0.0157 151.02);
  /* Media preview overlays */
  --media-overlay: oklch(0 0 0 / 45%);
  --media-overlay-strong: oklch(0 0 0 / 65%);
  --media-overlay-foreground: oklch(1 0 0);
  /* Form controls */
  --border: oklch(0.9288 0.0126 255.51);
  --input: oklch(0.9288 0.0126 255.51);
  --ring: oklch(0.7107 0.0351 256.79);
  /* Charts */
  --chart-1: oklch(0.845 0.143 164.978);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.596 0.145 163.225);
  --chart-4: oklch(0.508 0.118 165.612);
  --chart-5: oklch(0.432 0.095 166.913);
  /* Brand gradient (splash, hero banners) */
  --brand-from: oklch(0.2 0.06 244);
  --brand-to: oklch(0.48 0.05 225);
  /* Star / rating accent — the brand blue, kept in sync with
  --primary so every star in the app reads as one mark. */
  --star: oklch(0.2631 0.065564 244.5082);
  /* AI provider badges (capabilities sheet) */
  --provider-claude: oklch(0.47 0.157 42);
  --provider-claude-foreground: oklch(1 0 0);
  --provider-gemini: oklch(0.685 0.169 237.323);
  --provider-gemini-foreground: oklch(0.5 0.134 242.749);
  --provider-gpt: oklch(0.552 0.016 285.938);
  --provider-gpt-foreground: oklch(0.37 0.013 285.805);
  --podium-gold: oklch(0.72 0.15 85);
  --podium-silver: oklch(0.6 0.02 260);
  --podium-bronze: oklch(0.6 0.12 55);
  /* Live competition arena + signal (see header note) */
  --arena: oklch(0.17 0.03 262);
  --arena-surface: oklch(0.23 0.03 262);
  --arena-border: oklch(0.29 0.03 262);
  --arena-foreground: oklch(0.97 0.004 250);
  --arena-muted: oklch(0.72 0.02 250);
  --signal: oklch(0.68 0.2 33);
  --signal-foreground: oklch(0.15 0.02 262);

  /* Web-only aliases onto the shared palette: web has a sidebar and a page
     canvas, mobile has neither, so these never introduce a colour of their own. */
  --page: var(--background);
  --sidebar: var(--background);
  --sidebar-foreground: var(--foreground);
  --sidebar-primary: var(--primary);
  --sidebar-primary-foreground: var(--primary-foreground);
  --sidebar-accent: var(--accent);
  --sidebar-accent-foreground: var(--accent-foreground);
  --sidebar-border: var(--border);
  --sidebar-ring: var(--ring);
}

.dark {
  /* Surfaces */
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --card-selected: oklch(0.269 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  /* Text hierarchy */
  --muted-foreground: oklch(0.708 0 0);
  --muted: oklch(0.65 0 0);
  /* Brand — dark primary is now LIGHTER than light (direction fix) */
  --primary: oklch(0.45 0.06 244);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.274 0.006 286.033);
  --secondary-foreground: oklch(0.985 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  /* Status */
  --destructive: oklch(0.5 0.22 27);
  --destructive-foreground: oklch(0.985 0 0);
  --success: oklch(0.75 0.17 145);
  --success-foreground: oklch(0.145 0 0);
  --warning: oklch(0.8 0.17 75);
  --warning-foreground: oklch(0.145 0 0);
  --info: oklch(0.78 0.17 250);
  --info-foreground: oklch(0.145 0 0);
  /* Chat bubbles — see the light-variant note. */
  --bubble-own: oklch(0.2521 0.0353 146.16);
  /* Media preview overlays */
  --media-overlay: oklch(0 0 0 / 45%);
  --media-overlay-strong: oklch(0 0 0 / 65%);
  --media-overlay-foreground: oklch(1 0 0);
  /* Form controls */
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  /* Charts (same as light per web-ui convention) */
  --chart-1: oklch(0.845 0.143 164.978);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.596 0.145 163.225);
  --chart-4: oklch(0.508 0.118 165.612);
  --chart-5: oklch(0.432 0.095 166.913);
  /* Brand gradient */
  --brand-from: oklch(0.32 0.05 240);
  --brand-to: oklch(0.53 0.05 225);
  /* Star / rating accent — mirrors the lighter dark-mode primary so it
  stays legible on dark card backgrounds. */
  --star: oklch(0.45 0.06 244);
  /* AI provider badges (capabilities sheet) */
  --provider-claude: oklch(0.5 0.16 44);
  --provider-claude-foreground: oklch(1 0 0);
  --provider-gemini: oklch(0.746 0.16 232.661);
  --provider-gemini-foreground: oklch(0.901 0.058 230.902);
  --provider-gpt: oklch(0.705 0.015 286.067);
  --provider-gpt-foreground: oklch(0.92 0.004 286.32);
  --podium-gold: oklch(0.85 0.15 88);
  --podium-silver: oklch(0.8 0.02 260);
  --podium-bronze: oklch(0.76 0.12 58);
  /* Live competition arena + signal (see header note) */
  --arena: oklch(0.17 0.03 262);
  --arena-surface: oklch(0.23 0.03 262);
  --arena-border: oklch(0.29 0.03 262);
  --arena-foreground: oklch(0.97 0.004 250);
  --arena-muted: oklch(0.72 0.02 250);
  --signal: oklch(0.68 0.2 33);
  --signal-foreground: oklch(0.15 0.02 262);

  /* Web-only aliases onto the shared palette: web has a sidebar and a page
     canvas, mobile has neither, so these never introduce a colour of their own. */
  --page: var(--background);
  --sidebar: var(--background);
  --sidebar-foreground: var(--foreground);
  --sidebar-primary: var(--primary);
  --sidebar-primary-foreground: var(--primary-foreground);
  --sidebar-accent: var(--accent);
  --sidebar-accent-foreground: var(--accent-foreground);
  --sidebar-border: var(--border);
  --sidebar-ring: var(--ring);
}
