/* Theme tokens. The :root values are the default palette (Frappe); the html[data-palette] rules below are the other eleven, which the inline script in each page's <head> selects from localStorage before first paint. Keep them in sync with PALETTES in src/theme.ts, which re-applies the same values as inline styles once it runs. */
:root {
  --font-geist-mono: "Geist Mono", ui-monospace, monospace;
  --default-font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --default-mono-font-family: var(--font-geist-mono);
}

:root {
  --background:    #303446;
  --foreground:    #c6d0f5;
  --surface:       #292c3c;
  --border:        #51576d;
  --accent:        #8caaee;
  --accent-subtle: #8caaee18;
  --muted-fg:      color-mix(in srgb, var(--foreground) 78%, transparent);
  --meta-fg:       color-mix(in srgb, var(--foreground) 72%, transparent);
  --chip-1:        #90aef0;
  --chip-2:        #ca9ee6;
  --chip-3:        #a6d189;
  --chip-4:        #ef9f76;
  --card-shadow:   0 2px 12px 0 rgba(0, 0, 0, 0.4);
}

html[data-palette="1"] {
  /* Mint */
  --background:    #081a14;
  --foreground:    #ccfaec;
  --surface:       #051008;
  --border:        #0e2e1e;
  --accent:        #34d399;
  --accent-subtle: #34d39918;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="2"] {
  /* Midnight */
  --background:    #0f1117;
  --foreground:    #e6edf3;
  --surface:       #161b22;
  --border:        #21262d;
  --accent:        #7eb8f7;
  --accent-subtle: #7eb8f718;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="3"] {
  /* Ember */
  --background:    #1a1008;
  --foreground:    #f0e0cc;
  --surface:       #140d05;
  --border:        #3a2010;
  --accent:        #e8894a;
  --accent-subtle: #e8894a18;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="4"] {
  /* Rose */
  --background:    #1f0a14;
  --foreground:    #fde8f0;
  --surface:       #180810;
  --border:        #4a1a2a;
  --accent:        #f78fb3;
  --accent-subtle: #f78fb318;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="5"] {
  /* Arctic */
  --background:    #071520;
  --foreground:    #daf0f8;
  --surface:       #061018;
  --border:        #0e2a3a;
  --accent:        #88d4e8;
  --accent-subtle: #88d4e818;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="6"] {
  /* Crimson */
  --background:    #1a0808;
  --foreground:    #f8dada;
  --surface:       #140505;
  --border:        #3a1010;
  --accent:        #e85555;
  --accent-subtle: #e8555518;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="7"] {
  /* Gold */
  --background:    #1a1400;
  --foreground:    #faf0cc;
  --surface:       #130f00;
  --border:        #3a2e00;
  --accent:        #f0c040;
  --accent-subtle: #f0c04018;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="8"] {
  /* Indigo */
  --background:    #0e0e2a;
  --foreground:    #e0e0ff;
  --surface:       #08081e;
  --border:        #1c1c4a;
  --accent:        #818cf8;
  --accent-subtle: #818cf818;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="9"] {
  /* Dusk */
  --background:    #180f1f;
  --foreground:    #ecdcff;
  --surface:       #100a18;
  --border:        #301a40;
  --accent:        #c084fc;
  --accent-subtle: #c084fc18;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="10"] {
  /* Neon */
  --background:    #0a0f0a;
  --foreground:    #d0ffd0;
  --surface:       #050d05;
  --border:        #103010;
  --accent:        #39ff14;
  --accent-subtle: #39ff1418;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}

html[data-palette="11"] {
  /* Plum */
  --background:    #38172e;
  --foreground:    #f0e8f0;
  --surface:       #2a1023;
  --border:        #5a2a4a;
  --accent:        #d47abf;
  --accent-subtle: #d47abf18;
  --chip-1:        var(--accent);
  --chip-2:        oklch(from var(--accent) l c calc(h + 70));
  --chip-3:        oklch(from var(--accent) l c calc(h + 150));
  --chip-4:        oklch(from var(--accent) l c calc(h + 230));
}