/* ==========================================================================
   HK-RAG Universe Explorer — Monochrome Stippled-White Metaballs Tokens
   White Nodes Outlined by Crisp Grainy Stipple Texture + Grainy Gradient BG
   ========================================================================== */

:root {
  --font-serif: "Noto Serif HK", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --font-body: var(--font-serif);
  --font-sans: "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-pill: 999px;

  /* Default: Stipple-Outlined Metaballs Matching Light Paper Background */
  --bg-base: #eceae4;
  --bg-grad-center: #efede8;
  --bg-grad-mid: #eceae4;
  --bg-grad-edge: #eae7e1;

  --surface: rgba(255, 255, 255, 0.94);
  --surface-hover: #ffffff;
  --surface-muted: rgba(11, 11, 13, 0.06);
  --surface-strong: #0b0b0d;

  --border-subtle: rgba(11, 11, 13, 0.14);
  --border-strong: rgba(11, 11, 13, 0.34);
  --border-focus: #0b0b0d;

  --text-primary: #0b0b0d;
  --text-secondary: rgba(11, 11, 13, 0.72);
  --text-muted: rgba(11, 11, 13, 0.48);
  --text-on-strong: #ffffff;

  /* Stippled Metaball Shader Colors (node interior matches light page background) */
  --node-body: #eceae4;
  --node-grain-ink: #0b0b0d;
  --node-text: #0b0b0d;
  --node-ring: #0b0b0d;
  --edge-line: rgba(11, 11, 13, 0.24);
  --edge-line-active: rgba(11, 11, 13, 0.88);
  --pill-bg: rgba(236, 234, 228, 0.95);
  --pill-border: rgba(11, 11, 13, 0.24);

  /* CSS-Tricks Grainy Gradient Backdrop */
  --grain-opacity: 0.22;
  --grain-contrast: 225%;
  --grain-brightness: 158%;
  --grain-blur: 0px;
  --grain-blend: multiply;
  --plus-color: rgba(11, 11, 13, 0.16);

  --shadow-card: 0 12px 32px -12px rgba(11, 11, 13, 0.18);
}

/* Inverted Dark Mode: Deep Charcoal Nodes Outlined by Crisp White Stipple Grain */
[data-theme="ink"] {
  --bg-base: #08080a;
  --bg-grad-center: #19191d;
  --bg-grad-mid: #0e0e11;
  --bg-grad-edge: #050506;

  --surface: rgba(16, 16, 20, 0.94);
  --surface-hover: #1d1d22;
  --surface-muted: rgba(255, 255, 255, 0.08);
  --surface-strong: #f5f5f2;

  --border-subtle: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.35);
  --border-focus: #f5f5f2;

  --text-primary: #f5f5f2;
  --text-secondary: rgba(245, 245, 242, 0.72);
  --text-muted: rgba(245, 245, 242, 0.48);
  --text-on-strong: #08080a;

  --node-body: #0c0c0f;
  --node-grain-ink: #f5f5f2;
  --node-text: #f5f5f2;
  --node-ring: #f5f5f2;
  --edge-line: rgba(245, 245, 242, 0.25);
  --edge-line-active: rgba(245, 245, 242, 0.90);
  --pill-bg: rgba(14, 14, 17, 0.94);
  --pill-border: rgba(255, 255, 255, 0.24);

  --grain-opacity: 0.28;
  --grain-contrast: 190%;
  --grain-brightness: 118%;
  --grain-blend: overlay;
  --plus-color: rgba(245, 245, 242, 0.16);

  --shadow-card: 0 18px 44px -14px rgba(0, 0, 0, 0.72);
}
