:root {
  --plore-font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", Inter, "Segoe UI", sans-serif;
  --plore-font-display: ui-rounded, "SF Pro Rounded", "Nunito Variable", Nunito, -apple-system, Inter, sans-serif;
  --plore-font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --plore-text-xs: .75rem;
  --plore-text-sm: .8125rem;
  --plore-text-base: .875rem;
  --plore-text-lg: 1.0625rem;
  --plore-text-xl: 1.375rem;
  --plore-text-page: 1.875rem;
  --plore-leading: 1.5;
  --plore-leading-tight: 1.2;

  --plore-space-1: .25rem;
  --plore-space-2: .5rem;
  --plore-space-3: .75rem;
  --plore-space-4: 1rem;
  --plore-space-5: 1.25rem;
  --plore-space-6: 1.5rem;
  --plore-space-8: 2rem;
  --plore-space-10: 2.5rem;
  --plore-space-12: 3rem;

  --plore-radius-tile: 8px;
  --plore-radius-control: 11px;
  --plore-radius-card: 18px;
  --plore-radius-pill: 999px;
  --plore-border-width: 1px;
  --plore-focus-width: 2px;
  --plore-size-control-sm: 2rem;
  --plore-size-control: 2.375rem;
  --plore-size-touch: 2.75rem;
  --plore-size-icon: 1rem;
  --plore-size-sidebar: 13.5rem;
  --plore-content-width: 77rem;
  --plore-breakpoint-tablet: 48rem;
  --plore-breakpoint-desktop: 64rem;
  --plore-duration-fast: 140ms;
  --plore-duration-normal: 220ms;
  --plore-ease: cubic-bezier(.2, .75, .25, 1);
  --plore-radius-feature: 24px;
  --plore-category-media: light-dark(#0759b1, #69b8ff);
  --plore-category-digest: light-dark(#6b32bf, #bf9aff);
  --plore-category-notify: light-dark(#aa2458, #f58bb7);
  --plore-category-sync: light-dark(#006c63, #64dcca);
  --plore-highlight-warning: #ffda92;
  --plore-z-sticky: 10;
  --plore-z-menu: 30;
  --plore-z-overlay: 40;
  --plore-z-dialog: 50;
  --plore-z-toast: 60;
}

:root, [data-plore-theme="light"] {
  color-scheme: light;
  --plore-background: #f5f5f7;
  --plore-navigation: #e9ebf2;
  --plore-highlight: #3045ce;
  --plore-on-highlight: #ffffff;
  --plore-highlight-detail: #e2e8ff;
  --plore-surface: #ffffff;
  --plore-surface-muted: #eeeef2;
  --plore-surface-translucent: rgb(255 255 255 / 84%);
  --plore-foreground: #1d1d1f;
  --plore-muted-foreground: #50535e;
  --plore-border: #dedee4;
  --plore-input-border: #858996;
  --plore-accent: #2e4bf0;
  --plore-on-accent: #ffffff;
  --plore-accent-muted: #ecf0ff;
  --plore-focus: var(--plore-accent);
  --plore-success: #166638;
  --plore-success-muted: #e7f4ec;
  --plore-warning: #855000;
  --plore-warning-muted: #fff2d9;
  --plore-danger: #a42126;
  --plore-danger-muted: #fceded;
  --plore-overlay: rgb(29 29 31 / 38%);
  --plore-shadow-card: 0 1px 2px rgb(29 29 31 / 5%);
  --plore-shadow-overlay: 0 12px 38px rgb(29 29 31 / 18%);
  --plore-control-hover: color-mix(in srgb, currentColor 7%, transparent);
  --plore-control-active: color-mix(in srgb, currentColor 13%, transparent);
}

[data-plore-theme="dark"] {
  color-scheme: dark;
  --plore-background: #111215;
  --plore-navigation: #161921;
  --plore-highlight: #3147d2;
  --plore-on-highlight: #ffffff;
  --plore-highlight-detail: #e2e8ff;
  --plore-surface: #1c1d21;
  --plore-surface-muted: #292b31;
  --plore-surface-translucent: rgb(28 29 33 / 88%);
  --plore-foreground: #f2f2f5;
  --plore-muted-foreground: #b6b8c2;
  --plore-border: #373941;
  --plore-input-border: #767b89;
  --plore-accent: #7f95ff;
  --plore-on-accent: #0b0d11;
  --plore-accent-muted: #272e51;
  --plore-focus: var(--plore-accent);
  --plore-success: #70d79a;
  --plore-success-muted: #1f382a;
  --plore-warning: #ffc574;
  --plore-warning-muted: #40321f;
  --plore-danger: #ff9a94;
  --plore-danger-muted: #4a2a2a;
  --plore-overlay: rgb(0 0 0 / 62%);
  --plore-shadow-card: 0 1px 3px rgb(0 0 0 / 18%);
  --plore-shadow-overlay: 0 14px 40px rgb(0 0 0 / 45%);
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-plore-theme])) {
    color-scheme: dark;
    --plore-background: #111215;
    --plore-navigation: #161921;
    --plore-highlight: #3147d2;
    --plore-on-highlight: #ffffff;
    --plore-highlight-detail: #e2e8ff;
    --plore-surface: #1c1d21;
    --plore-surface-muted: #292b31;
    --plore-surface-translucent: rgb(28 29 33 / 88%);
    --plore-foreground: #f2f2f5;
    --plore-muted-foreground: #b6b8c2;
    --plore-border: #373941;
    --plore-input-border: #767b89;
    --plore-accent: #7f95ff;
    --plore-on-accent: #0b0d11;
    --plore-accent-muted: #272e51;
    --plore-success: #70d79a;
    --plore-success-muted: #1f382a;
    --plore-warning: #ffc574;
    --plore-warning-muted: #40321f;
    --plore-danger: #ff9a94;
    --plore-danger-muted: #4a2a2a;
    --plore-overlay: rgb(0 0 0 / 62%);
    --plore-shadow-card: 0 1px 3px rgb(0 0 0 / 18%);
    --plore-shadow-overlay: 0 14px 40px rgb(0 0 0 / 45%);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --plore-duration-fast: 0ms;
    --plore-duration-normal: 0ms;
  }
}

/* Apply a palette to the theme root or to a component subtree. */
:where([data-plore-accent]) { --plore-focus: var(--plore-accent); }

[data-plore-accent="cobalt"] {
  --plore-accent: light-dark(#2e4bf0, #7f95ff);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#3045ce, #3147d2);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}

[data-plore-accent="azure"] {
  --plore-accent: light-dark(#0059bb, #66b7ff);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#075bbb, #0754aa);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}

[data-plore-accent="teal"] {
  --plore-accent: light-dark(#006e66, #5edccd);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#00756b, #006b61);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}

[data-plore-accent="violet"] {
  --plore-accent: light-dark(#6d35ca, #bf9aff);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#6638ba, #6841ba);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}

[data-plore-accent="raspberry"] {
  --plore-accent: light-dark(#a51e58, #f88cba);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#ad255d, #a12d60);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}

[data-plore-accent="amber"] {
  --plore-accent: light-dark(#873e00, #ffba62);
  --plore-accent-muted: color-mix(in srgb, var(--plore-accent) 15%, var(--plore-surface));
  --plore-highlight: light-dark(#954700, #873b00);
  --plore-highlight-detail: color-mix(in srgb, var(--plore-on-highlight) 88%, var(--plore-highlight));
}
