/* Heritage: the original teal/green FamilyTree palette and dark slate dark mode (colours ported unchanged).
   Variants are light-mode presets: classic (default), rose, sage. */
:root[data-theme-base="heritage"] {
  color-scheme: light;
  --app-page: #f3f6f5; --app-card: #ffffff; --app-soft: #f8fbfa; --app-surface: #f8fbfa;
  --app-field: #ffffff; --app-hover: #eaf2ef; --app-overlay: rgba(7, 23, 25, .66);
  --app-topbar: #173c45; --app-topbar-text: #ffffff; --app-topbar-border: #173c45;
  --app-sidebar: #ffffff; --app-sidebar-text: #18333a; --app-sidebar-muted: #536a6d;
  --app-sidebar-active-bg: var(--app-accent-soft); --app-sidebar-active-text: #08674f;
  --app-search-bg: #ffffff; --app-search-text: #18333a;
  --app-text: #18333a; --app-muted: #536a6d; --app-control-text: #29464a;
  --app-border: #dce6e3; --app-border-strong: #bacbc7;
  --app-accent: #087e67; --app-accent-hover: #066b57; --app-accent-text: #ffffff;
  --app-accent-soft: #e7f4ef; --app-focus: #f0b957;
  --app-danger: #a32d2d; --app-warning: #b45309; --app-success: #08674f;
  --app-notice: #fff8e8; --app-notice-text: #29464a;
  --app-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --app-shadow-sm: 0 1px 3px rgba(21, 60, 69, .08);
  --app-shadow: 0 7px 28px rgba(21, 60, 69, .08);
  --app-shadow-lg: 0 16px 48px rgba(16, 42, 48, .2);
  --app-menu-shadow: 0 10px 30px rgba(16, 42, 48, .22);
}
:root[data-theme-base="heritage"][data-theme="dark"] {
  color-scheme: dark;
  --app-page: #0f172a; --app-card: #1e293b; --app-soft: #172235; --app-surface: #172235;
  --app-field: #172235; --app-hover: #273549; --app-overlay: rgba(2, 6, 14, .72);
  --app-topbar: #0b1120; --app-topbar-text: #f8fafc; --app-topbar-border: #334155;
  --app-sidebar: #111827; --app-sidebar-text: #e2e8f0; --app-sidebar-muted: #a8b6c7;
  --app-sidebar-active-bg: var(--app-accent-soft); --app-sidebar-active-text: var(--app-accent);
  --app-search-bg: #172235; --app-search-text: #f8fafc;
  --app-text: #f8fafc; --app-muted: #a8b6c7; --app-control-text: #e2e8f0;
  --app-border: #334155; --app-border-strong: #475569;
  --app-accent: #62c9ad; --app-accent-hover: #8adcc6; --app-accent-text: #08201a;
  --app-accent-soft: #17383a; --app-focus: #f0b957;
  --app-danger: #ff9b9b; --app-warning: #fbbf24; --app-success: #74d6b6;
  --app-notice: #382f1c; --app-notice-text: #f7e6b5;
  --app-shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
  --app-shadow: 0 7px 28px rgba(0, 0, 0, .4);
  --app-shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --app-menu-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
/* Variant: rose ("pink mode"), blush surfaces with a deep plum bar. */
:root[data-theme-base="heritage"][data-theme-variant="rose"]:not([data-theme="dark"]) {
  --app-page: #fbf3f5; --app-soft: #fdf8f9; --app-surface: #fdf8f9; --app-hover: #f8e8ec;
  --app-topbar: #4a1f3d; --app-topbar-border: #4a1f3d;
  --app-sidebar: #fff9fa; --app-sidebar-text: #33202a; --app-sidebar-muted: #6b4a58; --app-sidebar-active-text: #8f1b4b;
  --app-search-text: #33202a;
  --app-text: #33202a; --app-muted: #6b4a58; --app-control-text: #4a2f3b;
  --app-border: #f0d9df; --app-border-strong: #d9b5c1;
  --app-accent: #b4235f; --app-accent-hover: #8f1b4b; --app-accent-soft: #fbe4ec; --app-focus: #b4235f;
  --app-notice: #fff3e0; --app-notice-text: #4a2f3b;
  --app-shadow: 0 7px 28px rgba(74, 31, 61, .09);
}
/* Variant: sage, soft green-grey surfaces with a forest bar. */
:root[data-theme-base="heritage"][data-theme-variant="sage"]:not([data-theme="dark"]) {
  --app-page: #f2f5f0; --app-soft: #f8faf6; --app-surface: #f8faf6; --app-hover: #e8eee4;
  --app-topbar: #2f4a3a; --app-topbar-border: #2f4a3a;
  --app-sidebar: #fafcf8; --app-sidebar-text: #1f3328; --app-sidebar-muted: #52665a; --app-sidebar-active-text: #2a5a27;
  --app-search-text: #1f3328;
  --app-text: #1f3328; --app-muted: #52665a; --app-control-text: #2f4538;
  --app-border: #dde6d9; --app-border-strong: #bccbb6;
  --app-accent: #386f34; --app-accent-hover: #2a5a27; --app-accent-soft: #e5f0e0; --app-focus: #386f34;
}
