/* Shared palette: preserve the original light appearance and give every surface
   and diagram a deliberate dark equivalent. Light is the default. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #626267;
  --accent: #0066cc;
  --rule: #e5e5e7;
  --rule-strong: #dcdcdf;
  --header-glass: rgb(255 255 255 / 94%);
  --header-rule: rgb(0 0 0 / 6%);
  --selection: #dcecff;
  --connector: #a1a1a6;
  --accent-soft: #e5f0ff;
  --diagram-paper: #ffffff;
  --diagram-line: #c7cbd1;
  --diagram-outline: #b8c0ca;
  --diagram-marker: #a1a8b2;
  --diagram-secondary: #86868b;
  --diagram-muted-fill: #dce0e6;
  --diagram-soft-fill: #e2e5ea;
  --chat-panel: #ffffff;
  --chat-line: #dfe3e8;
  --chat-divider: #eceef0;
  --chat-launcher-ink: #343b46;
  --chat-secondary: #3e4a59;
  --chat-hover: #f1f3f6;
  --chat-suggestion-hover: #f4f7fb;
  --chat-suggestion-outline: #bdcde0;
  --chat-bubble: #eef3fa;
  --chat-bubble-ink: #29384e;
  --chat-input-border: #cdd3db;
  --chat-placeholder: #69727d;
  --button-fill: #0066cc;
  --button-ink: #ffffff;
  --button-hover: #005bb7;
  --button-disabled-fill: #e6eaf0;
  --button-disabled-ink: #7b8695;
  --focus-glow: #0066cc12;
  --chat-backdrop: #17233519;
  --shadow-launcher: 0 3px 18px #1d1d1f12;
  --shadow-launcher-hover: 0 5px 24px #1d1d1f1c;
  --shadow-dialog: 0 18px 70px #17233526;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111214;
  --surface: #1b1c1f;
  --ink: #f5f5f7;
  --muted: #aaaab3;
  --accent: #7dbbff;
  --rule: #34363b;
  --rule-strong: #3b3c42;
  --header-glass: rgb(17 18 20 / 94%);
  --header-rule: rgb(255 255 255 / 8%);
  --selection: #264f7c;
  --connector: #7a7d86;
  --accent-soft: #1c334c;
  --diagram-paper: #25272b;
  --diagram-line: #5d636e;
  --diagram-outline: #69717f;
  --diagram-marker: #9da7b6;
  --diagram-secondary: #a4a7af;
  --diagram-muted-fill: #41454d;
  --diagram-soft-fill: #33373d;
  --chat-panel: #202226;
  --chat-line: #41444b;
  --chat-divider: #35373e;
  --chat-launcher-ink: #dbe2ec;
  --chat-secondary: #dbe2ec;
  --chat-hover: #2d3036;
  --chat-suggestion-hover: #2b313b;
  --chat-suggestion-outline: #627b9c;
  --chat-bubble: #273b53;
  --chat-bubble-ink: #e3ecf8;
  --chat-input-border: #606771;
  --chat-placeholder: #a1aab8;
  --button-fill: #7dbbff;
  --button-ink: #101c2c;
  --button-hover: #a4d1ff;
  --button-disabled-fill: #343942;
  --button-disabled-ink: #9ba6b5;
  --focus-glow: #82baff26;
  --chat-backdrop: #00000066;
  --shadow-launcher: 0 3px 18px #00000040;
  --shadow-launcher-hover: 0 5px 24px #00000066;
  --shadow-dialog: 0 18px 70px #00000066;
}

/* Printed pages always use the light palette, regardless of the saved theme. */
@media print {
  :root:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #626267;
  --accent: #0066cc;
  --rule: #e5e5e7;
  --rule-strong: #dcdcdf;
  --header-glass: rgb(255 255 255 / 94%);
  --header-rule: rgb(0 0 0 / 6%);
  --selection: #dcecff;
  --connector: #a1a1a6;
  --accent-soft: #e5f0ff;
  --diagram-paper: #ffffff;
  --diagram-line: #c7cbd1;
  --diagram-outline: #b8c0ca;
  --diagram-marker: #a1a8b2;
  --diagram-secondary: #86868b;
  --diagram-muted-fill: #dce0e6;
  --diagram-soft-fill: #e2e5ea;
  --chat-panel: #ffffff;
  --chat-line: #dfe3e8;
  --chat-divider: #eceef0;
  --chat-launcher-ink: #343b46;
  --chat-secondary: #3e4a59;
  --chat-hover: #f1f3f6;
  --chat-suggestion-hover: #f4f7fb;
  --chat-suggestion-outline: #bdcde0;
  --chat-bubble: #eef3fa;
  --chat-bubble-ink: #29384e;
  --chat-input-border: #cdd3db;
  --chat-placeholder: #69727d;
  --button-fill: #0066cc;
  --button-ink: #ffffff;
  --button-hover: #005bb7;
  --button-disabled-fill: #e6eaf0;
  --button-disabled-ink: #7b8695;
  --focus-glow: #0066cc12;
  --chat-backdrop: #17233519;
  --shadow-launcher: 0 3px 18px #1d1d1f12;
  --shadow-launcher-hover: 0 5px 24px #1d1d1f1c;
  --shadow-dialog: 0 18px 70px #17233526;
}
}
