:root {
  --rdc-bg: #121618;
  --rdc-auth-bg: #11171c;
  --rdc-header: #1b2327;
  --rdc-surface: #1b2429;
  --rdc-input: #171f24;
  --rdc-auth-input: #1a232b;
  --rdc-border: #343e43;
  --rdc-input-border: #455159;
  --rdc-text: #eef2f3;
  --rdc-muted: #a4b0b6;
  --rdc-primary: #007dbb;
  --rdc-primary-hover: #008dd0;
  --rdc-focus: #46b9e7;
  --rdc-link: #42bfff;
  --rdc-section-accent: #76ba32;
  --rdc-system-accent: #32acd9;
  --rdc-important-text: #ffe597;
  --rdc-important-bg: #3b341c;
  --rdc-important-border: #77642e;
  --rdc-error-text: #ffc5bc;
  --rdc-font: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  --rdc-font-body: 14px;
  --rdc-font-meta: 12px;
  --rdc-font-section: 23px;
  --rdc-radius: 6px;
  --rdc-radius-modal: 7px;
  --rdc-content-max: 1420px;
  --rdc-space-1: 4px;
  --rdc-space-2: 8px;
  --rdc-space-3: 12px;
  --rdc-space-4: 16px;
  --rdc-space-6: 24px;
  --rdc-space-8: 32px;
}

/* Additional semantic colors preserve the existing dark theme. */
:root {
  --rdc-color-scheme: dark;
  --rdc-tool-shadow: none;
  --rdc-button: #202a2f;
  --rdc-button-hover: #2b3c45;
  --rdc-primary-border: #079bdc;
  --rdc-on-primary: white;
  --rdc-label: #c4d0d6;
  --rdc-placeholder: #67747b;
  --rdc-dialog: #1a2328;
  --rdc-dialog-border: #48565d;
  --rdc-backdrop: #05090dbb;
  --rdc-shadow: #0009;
  --rdc-category: #b9d8be;
  --rdc-status: #bbdca9;
  --rdc-tool-border: #3f4b51;
  --rdc-tool-icon: #27b4e7;
  --rdc-unavailable-icon: #c0c9cd;
  --rdc-title: #f3f6f7;
  --rdc-expand-icon: #8b9ba5;
  --rdc-meta: #a8b6bd;
  --rdc-important-accent: #edc653;
  --rdc-body-text: #d4dfe4;
  --rdc-detail-border: #303e46;
  --rdc-subheading: #a6bbc7;
  --rdc-positive: #b3d98c;
  --rdc-text-link: #69c7f5;
  --rdc-link-hover: #6bc9f8;
  --rdc-inline-icon: #2ab4e9;
  --rdc-tab-accent: #0baff1;
  --rdc-check: #0288c7;
  --rdc-input-text: #edf1f3;
  --rdc-brand-divider: #526068;
  --rdc-grid-line: #28353c35;
  --rdc-brand-border: #344149;
  --rdc-brand-bg: #11161b;
  --rdc-auth-frame: #26343e;
  --rdc-auth-rail: #25313a;
  --rdc-auth-brand-border: #3c4953;
  --rdc-auth-shadow: #0004;
  --rdc-auth-caption: #9cabb5;
  --rdc-auth-divider: #3a4751;
  --rdc-auth-heading: #d4dee4;
  --rdc-auth-label: #dbe3e8;
  --rdc-auth-meta: #8495a1;
  --rdc-auth-input-border: #42515d;
  --rdc-auth-input-hover: #61727e;
  --rdc-auth-input-focus: #1d2932;
  --rdc-focus-ring: #249dce20;
  --rdc-auth-icon: #8ca1ae;
  --rdc-auth-text: #f2f6f8;
  --rdc-password-icon: #9badba;
  --rdc-password-hover: #2d3b46;
  --rdc-password-focus: #69bfe0;
  --rdc-auth-primary: #077da9;
  --rdc-auth-primary-border: #27a5d0;
  --rdc-auth-primary-hover: #0b90bd;
  --rdc-auth-button-shadow: #0003;
  --rdc-auth-secondary-border: #2b3a45;
  --rdc-auth-secondary-text: #a9c5d7;
  --rdc-auth-secondary-hover: #24323d;
  --rdc-error-bg: #352428;
  --rdc-error-border: #ca8c83;
  --rdc-auth-rail-mobile: #223039;
}

/* Opt-in only: tools remain dark until their own theme integration is complete. */
:root[data-rdc-theme="light"] {
  --rdc-color-scheme: light;
  --rdc-tool-shadow: 0 3px 10px #23475d08;
  --rdc-bg: #e9f0f6;
  --rdc-auth-bg: #e9f0f6;
  --rdc-header: #f7fafc;
  --rdc-surface: #f8fbfd;
  --rdc-input: #ffffff;
  --rdc-auth-input: #ffffff;
  --rdc-border: #cad9e5;
  --rdc-input-border: #8498a3;
  --rdc-text: #203b52;
  --rdc-muted: #526a7b;
  --rdc-primary: #194e85;
  --rdc-primary-hover: #123d6c;
  --rdc-focus: #0079ad;
  --rdc-link: #195888;
  --rdc-section-accent: #72ae3e;
  --rdc-system-accent: #235e96;
  --rdc-important-text: #735200;
  --rdc-important-bg: #fff4cf;
  --rdc-important-border: #b58b22;
  --rdc-error-text: #a72e2e;
  --rdc-button: #edf4f9;
  --rdc-button-hover: #dfeaf0;
  --rdc-primary-border: #194e85;
  --rdc-on-primary: #ffffff;
  --rdc-label: #344d5b;
  --rdc-placeholder: #657a85;
  --rdc-dialog: #ffffff;
  --rdc-dialog-border: #a6b9c3;
  --rdc-backdrop: #1b2e3866;
  --rdc-shadow: #203d4f26;
  --rdc-category: #37683f;
  --rdc-status: #36631c;
  --rdc-tool-border: #c8d9e6;
  --rdc-tool-icon: #1b5d91;
  --rdc-unavailable-icon: #617581;
  --rdc-title: #164b7a;
  --rdc-expand-icon: #5e7582;
  --rdc-meta: #526b78;
  --rdc-important-accent: #a77900;
  --rdc-body-text: #344f5e;
  --rdc-detail-border: #d5e0e5;
  --rdc-subheading: #4a6574;
  --rdc-positive: #3e6a22;
  --rdc-text-link: #006b9c;
  --rdc-link-hover: #004f7b;
  --rdc-inline-icon: #0079a8;
  --rdc-tab-accent: #007caf;
  --rdc-check: #006fa6;
  --rdc-input-text: #1b2e38;
  --rdc-brand-divider: #c2d3df;
  --rdc-grid-line: #91a9b51a;
  --rdc-brand-border: transparent;
  --rdc-brand-bg: transparent;
  --rdc-auth-frame: #d4dfe5;
  --rdc-auth-rail: #e0e7eb;
  --rdc-auth-brand-border: transparent;
  --rdc-auth-shadow: #294a6021;
  --rdc-auth-caption: #576f7c;
  --rdc-auth-divider: #bdced8;
  --rdc-auth-heading: #365261;
  --rdc-auth-label: #2d4959;
  --rdc-auth-meta: #5a7180;
  --rdc-auth-input-border: #859ba9;
  --rdc-auth-input-hover: #4f7288;
  --rdc-auth-input-focus: #fafdff;
  --rdc-focus-ring: #0079ad24;
  --rdc-auth-icon: #58717f;
  --rdc-auth-text: #182f3c;
  --rdc-password-icon: #4e6d80;
  --rdc-password-hover: #e8f1f6;
  --rdc-password-focus: #0079ad;
  --rdc-auth-primary: #194e85;
  --rdc-auth-primary-border: #194e85;
  --rdc-auth-primary-hover: #123d6c;
  --rdc-auth-button-shadow: #23475d1a;
  --rdc-auth-secondary-border: #d3e0e8;
  --rdc-auth-secondary-text: #426579;
  --rdc-auth-secondary-hover: #e6eef3;
  --rdc-error-bg: #fff0ef;
  --rdc-error-border: #b84239;
  --rdc-auth-rail-mobile: #dce6eb;
}

/* Semantic issue states retain their labels in both themes. */
:root {
  --rdc-issue-pending-text: #ffd39a;
  --rdc-issue-pending-bg: #3a2b1c;
  --rdc-issue-pending-border: #ad793d;
  --rdc-issue-working-text: #b6dfff;
  --rdc-issue-working-bg: #1d3448;
  --rdc-issue-working-border: #518ab3;
  --rdc-issue-done-text: #c1e5aa;
  --rdc-issue-done-bg: #263c29;
  --rdc-issue-done-border: #68924e;
}
:root[data-rdc-theme="light"] {
  --rdc-issue-pending-text: #854607;
  --rdc-issue-pending-bg: #fff0d8;
  --rdc-issue-pending-border: #c3914c;
  --rdc-issue-working-text: #14548b;
  --rdc-issue-working-bg: #e1f0fc;
  --rdc-issue-working-border: #6d9bc0;
  --rdc-issue-done-text: #35631c;
  --rdc-issue-done-bg: #eaf4df;
  --rdc-issue-done-border: #84a16b;
  --rdc-maintenance-bg: #e1ebf3;
  --rdc-table-header-bg: #d6e4ef;
  --rdc-table-body-bg: #f3f7fa;
  --rdc-meeting-bg: #e2edf3;
  --rdc-tool-secondary-icon: #538a2b;
  --rdc-theme-selected-bg: #deebf5;
  --rdc-theme-selected-text: #174e81;
}
