/* Clarity: calm, native-app look. One light palette, one dark palette, variants for light mode. */
:root[data-theme-base="clarity"] {
  color-scheme: light;
  --app-page: #ffffff; --app-card: #ffffff; --app-soft: #f5f5f7; --app-surface: #f5f5f7;
  --app-field: #ffffff; --app-hover: #f0f0f3; --app-overlay: rgba(0, 0, 0, .4);
  --app-topbar: #ffffff; --app-topbar-text: #1d1d1f; --app-topbar-border: #e5e5ea;
  --app-sidebar: #f5f5f7; --app-sidebar-text: #1d1d1f; --app-sidebar-muted: #6e6e73;
  --app-sidebar-active-bg: var(--app-accent-soft); --app-sidebar-active-text: var(--app-accent);
  --app-search-bg: #f0f0f3; --app-search-text: #1d1d1f;
  --app-text: #1d1d1f; --app-muted: #6e6e73; --app-control-text: #3a3a3c;
  --app-border: #e5e5ea; --app-border-strong: #c7c7cc;
  --app-accent: #1a5cc4; --app-accent-hover: #164a9d; --app-accent-text: #ffffff;
  --app-accent-soft: #e8f0fe; --app-focus: #1a5cc4;
  --app-danger: #c4261d; --app-warning: #a15c00; --app-success: #1a7f37;
  --app-notice: #fff8e1; --app-notice-text: #5c4400;
  --app-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --app-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  --app-shadow-lg: 0 12px 32px rgba(0, 0, 0, .14);
  --app-menu-shadow: 0 8px 28px rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .04);
}
:root[data-theme-base="clarity"][data-theme="dark"] {
  color-scheme: dark;
  --app-page: #1c1c1e; --app-card: #2c2c2e; --app-soft: #242426; --app-surface: #242426;
  --app-field: #1c1c1e; --app-hover: #3a3a3c; --app-overlay: rgba(0, 0, 0, .6);
  --app-topbar: #1c1c1e; --app-topbar-text: #f5f5f7; --app-topbar-border: #38383a;
  --app-sidebar: #161618; --app-sidebar-text: #f5f5f7; --app-sidebar-muted: #a1a1a6;
  --app-sidebar-active-bg: var(--app-accent-soft); --app-sidebar-active-text: var(--app-accent);
  --app-search-bg: #2c2c2e; --app-search-text: #f5f5f7;
  --app-text: #f5f5f7; --app-muted: #a1a1a6; --app-control-text: #e5e5ea;
  --app-border: #38383a; --app-border-strong: #545458;
  --app-accent: #4c9bff; --app-accent-hover: #7ab6ff; --app-accent-text: #07101c;
  --app-accent-soft: #1d3350; --app-focus: #4c9bff;
  --app-danger: #ff8a80; --app-warning: #ffb340; --app-success: #5fd68a;
  --app-notice: #3a3220; --app-notice-text: #f5e3b0;
  --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --app-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  --app-shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
  --app-menu-shadow: 0 8px 28px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
}
/* Variant: graphite (neutral grey accent). Dark mode keeps the single Clarity dark palette. */
:root[data-theme-base="clarity"][data-theme-variant="graphite"]:not([data-theme="dark"]) {
  --app-accent: #3a3a3c; --app-accent-hover: #1d1d1f; --app-accent-text: #ffffff;
  --app-accent-soft: #e9e9ed; --app-focus: #3a3a3c;
}
