/* themes.css — theme overrides for tokens.css (foundation-ui shell floor).
 * Dark is the default (tokens.css :root); named themes override on [data-theme].
 * A new theme = append a new [data-theme="…"] selector that overrides token
 * VALUES only — never redeclare shell/component selectors.
 * A consumer's own theme override loads AFTER this file and wins by cascade.
 */

[data-theme="light"] {
  /* ── Catppuccin Latte palette ── */
  --base:     #eff1f5;
  --mantle:   #e6e9ef;
  --crust:    #dce0e8;
  --surface0: #dce0e8;
  --surface1: #bcc0cc;
  --surface2: #acb0be;
  --overlay0: #9ca0b0;
  --overlay1: #8c8fa1;
  --overlay2: #7c7f93;
  --subtext0: #5e6176;
  --subtext1: #5c5f77;
  --text:     #494c66;

  --rosewater: #dc8a78;
  --flamingo:  #dd7878;
  --pink:      #ea76cb;
  --mauve:     #8839ef;
  --red:       #c5002f;
  --maroon:    #e64553;
  --peach:     #fe640b;
  --yellow:    #984c00;
  --green:     #007200;
  --teal:      #006c74; /* HC-U6: OKLCH L 0.477 from Latte #179299, 4.67:1 on the card */
  --sky:       #0065a2;
  --sapphire:  #209fb5;
  --blue:      #0b55e3;
  --lavender:  #7287fd;

  --accent-rgb:   11, 85, 227;
  --success-rgb:  0, 114, 0;
  --warning-rgb:  152, 76, 0;
  --danger-rgb:   197, 0, 47;
  --info-rgb:     0, 101, 162;
  --fg-muted-rgb: 94, 97, 118;
  --fg-rgb:       76, 79, 105;

  /* --viz-* light values: viz.css */

  --shadow-sm: 0 1px 2px  rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 4px 12px rgba(var(--shadow-rgb), 0.12);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-rgb), 0.15);

  /* contrast (heritage-contrast-scheme HC-U2, owner ruling B1): cards one Latte step lighter,
     then only what still failed darkened in OKLCH lightness; muted text reads subtext0. */
  --fg-muted: var(--subtext0);
}

/* Stone — warm, low-chroma light neutral. */
[data-theme="stone"] {
  --base:     #e7e5e4;
  --mantle:   #dedad7;
  --crust:    #d1cdca;
  --surface0: #cbc7c4;
  --surface1: #b8b3af;
  --surface2: #a39d98;
  --overlay0: #8b8580;
  --overlay1: #736d68;
  --overlay2: #625c57;
  --subtext0: #57514c;
  --subtext1: #44403c;
  --text:     #292524;
  --fg-muted-rgb: 87, 81, 76;
  --fg-rgb:       41, 37, 36;

  --shadow-sm: 0 1px 2px  rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 4px 12px rgba(var(--shadow-rgb), 0.13);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-rgb), 0.17);

  /* contrast (U9): stone is light, so the heritage pastel accents are replaced by darker, hue-preserving steps, and muted text reads subtext0 */
  --blue: #2c5190;
  --red: #8e3050;
  --sky: #005b68;
  --teal: #005c64; /* HC-U6: OKLCH L 0.422 from Latte #179299, 4.61:1 on the card */
  --green: #245e22;
  --yellow: #634f1f;
  --fg-muted: var(--subtext0);
  --accent-rgb: 44, 81, 144;
  --success-rgb: 36, 94, 34;
  --warning-rgb: 99, 79, 31;
  --danger-rgb: 142, 48, 80;
  --info-rgb: 0, 91, 104;
}

/* Slate — cool structural grey, darker than Stone and lighter than Charcoal. */
[data-theme="slate"] {
  --base:     #3f4854;
  --mantle:   #363e48;
  --crust:    #2d343d;
  --surface0: #4b5663;
  --surface1: #5b6775;
  --surface2: #6b7887;
  --overlay0: #84909d;
  --overlay1: #9ba5af;
  --overlay2: #adb6bf;
  --subtext0: #c6cdd4;
  --subtext1: #d4d9de;
  --text:     #f1f4f6;
  --fg-muted-rgb: 198, 205, 212;
  --fg-rgb:       241, 244, 246;

  /* contrast (U9): blue and red lifted in OKLCH lightness; subtext0 nudged, and muted text reads it */
  --blue: #a3d0ff;
  --red: #ffb8d5;
  --fg-muted: var(--subtext0);
  --accent-rgb: 163, 208, 255;
  --danger-rgb: 255, 184, 213;
}

/* Charcoal — high-contrast neutral dark; separate from heritage Dark. */
[data-theme="charcoal"] {
  --base:     #333333;
  --mantle:   #2b2b2b;
  --crust:    #232323;
  --surface0: #404040;
  --surface1: #4d4d4d;
  --surface2: #5a5a5a;
  --overlay0: #767676;
  --overlay1: #8f8f8f;
  --overlay2: #a3a3a3;
  --subtext0: #c4c4c4;
  --subtext1: #d6d6d6;
  --text:     #f2f2f2;
  --fg-muted-rgb: 196, 196, 196;
  --fg-rgb:       242, 242, 242;

  /* contrast (U9): red nudged lighter; muted text reads subtext0 (overlay1 is 3.21:1 on --bg-card) */
  --red: #f68eab;
  --fg-muted: var(--subtext0);
  --danger-rgb: 246, 142, 171;
}

/* Midnight — blue-black operator theme. */
[data-theme="midnight"] {
  --base:     #111827;
  --mantle:   #0f172a;
  --crust:    #0b1120;
  --surface0: #1f2937;
  --surface1: #334155;
  --surface2: #475569;
  --overlay0: #64748b;
  --overlay1: #8290a3;
  --overlay2: #9ca8b8;
  --subtext0: #b8c2cf;
  --subtext1: #d1d8e0;
  --text:     #f1f5f9;
  --fg-muted-rgb: 130, 144, 163;
  --fg-rgb:       241, 245, 249;
  /* keep this theme's own muted step: heritage dark now points muted text at subtext0
     (heritage-contrast-scheme HC-U3), which must not leak into an accepted named theme */
  --fg-muted: var(--overlay1);
}

/* Obsidian — near-black neutral, the deepest platform theme. */
[data-theme="obsidian"] {
  --base:     #151517;
  --mantle:   #101012;
  --crust:    #0b0b0d;
  --surface0: #222226;
  --surface1: #303036;
  --surface2: #414148;
  --overlay0: #62626b;
  --overlay1: #8b8b95;
  --overlay2: #9d9da7;
  --subtext0: #bdbdc5;
  --subtext1: #d6d6dc;
  --text:     #f5f5f7;
  --fg-muted-rgb: 139, 139, 149;
  --fg-rgb:       245, 245, 247;
  /* contrast (U9): overlay1 nudged lighter (4.34:1 on --bg-card before) */
  /* keep this theme's own muted step: heritage dark now points muted text at subtext0
     (heritage-contrast-scheme HC-U3), which must not leak into an accepted named theme */
  --fg-muted: var(--overlay1);
}

/* ── theme-groups (docs/specs/theme-groups/): the mediterranean and seasonal groups. The group, label
 *    and typeface of each code live in ui/themes.json; these blocks carry the token values only. ── */

/* Daybreak — Mediterranean light. Limestone ground, Sage chrome, Terracotta ink, Seafoam tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals lifted from free-john 2730f11; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="med_daybreak"] {
  --base:     #f7f3eb;
  --mantle:   #b8c7b4;
  --crust:    #a9baa5;
  --surface0: #fffdf8;
  --surface1: #ede7dc;
  --surface2: #e4a895;
  --overlay0: #9aa59c;
  --overlay1: #6f7b76;
  --overlay2: #56625e;
  --subtext0: #38464e;
  --subtext1: #2e3a40;
  --text:     #1d272c;

  --rosewater: #a55b4c;
  --flamingo:  #a55959;
  --pink:      #995b87;
  --mauve:     #7864a5;
  --red:       #a45859;
  --maroon:    #a6595a;
  --peach:     #a35d41;
  --yellow:    #976528;
  --green:     #4b7b42;
  --teal:      #007c83;
  --sky:       #24769f;
  --sapphire:  #007a8e;
  --blue:      #4f6faa;
  --lavender:  #5e6cab;

  --accent:    #98523d;
  --accent-fg: #fffdf8;
  --tint:      #b5d1d8;
  --fg-muted:  var(--subtext0);
  --accent-rgb:   152, 82, 61;
  --tint-rgb:     181, 209, 216;
  --success-rgb:  75, 123, 66;
  --warning-rgb:  151, 101, 40;
  --danger-rgb:   164, 88, 89;
  --info-rgb:     36, 118, 159;
  --fg-muted-rgb: 56, 70, 78;
  --fg-rgb:       29, 39, 44;
  --bg-input:  #f1ece2; /* a Limestone shade, not the Sage chrome (owner 2026-11-26) */
  --shadow-sm: 0 1px 2px  rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 4px 12px rgba(var(--shadow-rgb), 0.12);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-rgb), 0.15);
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Twilight — Mediterranean dark. Twilight ground, Deep Sage chrome, lifted Terracotta, Pale Seafoam tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals lifted from free-john 2730f11; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="med_twilight"] {
  --base:     #253138;
  --mantle:   #4a5a4a;
  --crust:    #1c262b;
  --surface0: #2e3b42;
  --surface1: #3a4950;
  --surface2: #4b5b62;
  --overlay0: #6b7d80;
  --overlay1: #8fa1a2;
  --overlay2: #a9b8b8;
  --subtext0: #d4ddd9;
  --subtext1: #dde4e0;
  --text:     #f2eee6;

  --rosewater: #f5e0dc;
  --flamingo:  #f2cdcd;
  --pink:      #f5c2e7;
  --mauve:     #c8aaee;
  --red:       #e595aa;
  --maroon:    #eba0ac;
  --peach:     #f9b388;
  --yellow:    #f9e2af;
  --green:     #aae2a5;
  --teal:      #94e2d5;
  --sky:       #89dceb;
  --sapphire:  #74c7ec;
  --blue:      #8eb4f3;
  --lavender:  #b4befe;

  --accent:    #e89f86;
  --accent-fg: #1a2328;
  --tint:      #98bac2;
  --fg-muted:  var(--subtext0);
  --accent-rgb:   232, 159, 134;
  --tint-rgb:     152, 186, 194;
  --success-rgb:  170, 226, 165;
  --warning-rgb:  249, 226, 175;
  --danger-rgb:   229, 149, 170;
  --info-rgb:     137, 220, 235;
  --fg-muted-rgb: 212, 221, 217;
  --fg-rgb:       242, 238, 230;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Midnight — Mediterranean obsidian. Obsidian ground, Smoky Olive chrome, lifted Terracotta, Seafoam tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals lifted from free-john 2730f11; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="med_midnight"] {
  --base:     #14191c;
  --mantle:   #2e372e;
  --crust:    #0e1214;
  --surface0: #1d2428;
  --surface1: #283035;
  --surface2: #353e43;
  --overlay0: #5a676a;
  --overlay1: #84939a;
  --overlay2: #9eacaf;
  --subtext0: #bcc5c9;
  --subtext1: #d2d9d6;
  --text:     #ece8e0;

  --rosewater: #f5e0dc;
  --flamingo:  #f2cdcd;
  --pink:      #f5c2e7;
  --mauve:     #c8aaee;
  --red:       #e595aa;
  --maroon:    #eba0ac;
  --peach:     #f9b388;
  --yellow:    #f9e2af;
  --green:     #aae2a5;
  --teal:      #94e2d5;
  --sky:       #89dceb;
  --sapphire:  #74c7ec;
  --blue:      #8eb4f3;
  --lavender:  #b4befe;

  --accent:    #de937a;
  --accent-fg: #101417;
  --tint:      #87a9b3;
  --fg-muted:  var(--subtext0);
  --accent-rgb:   222, 147, 122;
  --tint-rgb:     135, 169, 179;
  --success-rgb:  170, 226, 165;
  --warning-rgb:  249, 226, 175;
  --danger-rgb:   229, 149, 170;
  --info-rgb:     137, 220, 235;
  --fg-muted-rgb: 188, 197, 201;
  --fg-rgb:       236, 232, 224;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Winter — seasonal light. Cold Ice ground, Frosty Glacial chrome, Arctic Blue accent, Frosted Rose tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals stepped in OKLCH lightness on the base hue; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="season_winter"] {
  --base:     #f2f6fa;
  --mantle:   #dce6f0;
  --crust:    #d2dce6;
  --surface0: #fafeff;
  --surface1: #e1e5e9;
  --surface2: #ced2d6;
  --overlay0: #8f9396;
  --overlay1: #717578;
  --overlay2: #5d6164;
  --subtext0: #4a4d51;
  --subtext1: #3a3d41;
  --text:     #24272a;

  --rosewater: #a65d4d;
  --flamingo:  #a75b5b;
  --pink:      #9a5c89;
  --mauve:     #7966a6;
  --red:       #a45859;
  --maroon:    #a75b5c;
  --peach:     #a45f42;
  --yellow:    #996629;
  --green:     #4c7c43;
  --teal:      #007d85;
  --sky:       #2778a2;
  --sapphire:  #007c90;
  --blue:      #5170ac;
  --lavender:  #5f6dac;

  --accent:    #286393;
  --accent-fg: #fafeff;
  --tint:      #865c6a;
  --fg-muted:  var(--subtext0);
  --accent-rgb:   40, 99, 147;
  --tint-rgb:     134, 92, 106;
  --success-rgb:  76, 124, 67;
  --warning-rgb:  153, 102, 41;
  --danger-rgb:   164, 88, 89;
  --info-rgb:     39, 120, 162;
  --fg-muted-rgb: 74, 77, 81;
  --fg-rgb:       36, 39, 42;
  --shadow-sm: 0 1px 2px  rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 4px 12px rgba(var(--shadow-rgb), 0.12);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-rgb), 0.15);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Spring — seasonal medium-dark. Meadow Foliage ground, Spring Leaf chrome, Blossom accent, soft Lime tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals stepped in OKLCH lightness on the base hue; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="season_spring"] {
  --base:     #1e2a33;
  --mantle:   #385041;
  --crust:    #2c4335;
  --surface0: #273540;
  --surface1: #324350;
  --surface2: #405463;
  --overlay0: #637786;
  --overlay1: #8296a5;
  --overlay2: #9db0be;
  --subtext0: #c6d3dc;
  --subtext1: #d6e1e8;
  --text:     #eff4f7;

  --rosewater: #f5e0dc;
  --flamingo:  #f2cdcd;
  --pink:      #f5c2e7;
  --mauve:     #c8aaee;
  --red:       #e595aa;
  --maroon:    #eba0ac;
  --peach:     #f9b388;
  --yellow:    #f9e2af;
  --green:     #aae2a5;
  --teal:      #94e2d5;
  --sky:       #89dceb;
  --sapphire:  #74c7ec;
  --blue:      #8eb4f3;
  --lavender:  #b4befe;

  --accent:    #f7a5b1;
  --accent-fg: #2c4335;
  --tint:      #8ee06c;
  --fg-muted:  var(--subtext0);
  --bg-input:  #23303a; /* a slate shade of the canvas, not the leaf chrome (U15, owner 2026-11-27) */
  --accent-rgb:   247, 165, 177;
  --tint-rgb:     142, 224, 108;
  --success-rgb:  170, 226, 165;
  --warning-rgb:  249, 226, 175;
  --danger-rgb:   229, 149, 170;
  --info-rgb:     137, 220, 235;
  --fg-muted-rgb: 198, 211, 220;
  --fg-rgb:       239, 244, 247;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Summer — seasonal sun-bleached. Dry Earth Linen ground, Wheat-Oat chrome, Grain Ochre accent, Olive-Leaf tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals stepped in OKLCH lightness on the base hue; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="season_summer"] {
  --base:     #eae2d3;
  --mantle:   #d8ccb8;
  --crust:    #cec2af;
  --surface0: #efebe2;
  --surface1: #d6d2ca;
  --surface2: #c3bfb7;
  --overlay0: #96928a;
  --overlay1: #78746d;
  --overlay2: #646059;
  --subtext0: #504d46;
  --subtext1: #403d36;
  --text:     #292620;

  --rosewater: #995041;
  --flamingo:  #9a4f4f;
  --pink:      #8e517d;
  --mauve:     #6e5b9a;
  --red:       #9a4f51;
  --maroon:    #9a4f50;
  --peach:     #975337;
  --yellow:    #8c5a1b;
  --green:     #417038;
  --teal:      #007077;
  --sky:       #166c95;
  --sapphire:  #006f83;
  --blue:      #45659f;
  --lavender:  #5461a0;

  --accent:    #6f5311;
  --accent-fg: #efebe2;
  --tint:      #526148;
  --fg-muted:  var(--subtext0);
  --accent-rgb:   111, 83, 17;
  --tint-rgb:     82, 97, 72;
  --success-rgb:  65, 112, 56;
  --warning-rgb:  140, 90, 27;
  --danger-rgb:   154, 79, 81;
  --info-rgb:     22, 108, 149;
  --fg-muted-rgb: 80, 77, 70;
  --fg-rgb:       41, 38, 32;
  --shadow-sm: 0 1px 2px  rgba(var(--shadow-rgb), 0.10);
  --shadow-md: 0 4px 12px rgba(var(--shadow-rgb), 0.12);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-rgb), 0.15);
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Autumn — seasonal deep dark. Plum-Obsidian ground, Forest chrome, Maple Red accent, Amber Leaf tint. theme-groups (docs/specs/theme-groups/design.md § Palettes)
 * — generated: neutrals stepped in OKLCH lightness on the base hue; hues from Catppuccin, chroma ≤ 0.10, inked to 4.5:1 on page and card. */
[data-theme="season_autumn"] {
  --base:     #18131a;
  --mantle:   #1f3329;
  --crust:    #182b22;
  --surface0: #211c23;
  --surface1: #2d282f;
  --surface2: #3d373f;
  --overlay0: #78727a;
  --overlay1: #969098;
  --overlay2: #afa8b1;
  --subtext0: #d2cbd4;
  --subtext1: #dfd8e2;
  --text:     #f3ecf5;

  --rosewater: #f5e0dc;
  --flamingo:  #f2cdcd;
  --pink:      #f5c2e7;
  --mauve:     #c8aaee;
  --red:       #e595aa;
  --maroon:    #eba0ac;
  --peach:     #f9b388;
  --yellow:    #f9e2af;
  --green:     #aae2a5;
  --teal:      #94e2d5;
  --sky:       #89dceb;
  --sapphire:  #74c7ec;
  --blue:      #8eb4f3;
  --lavender:  #b4befe;

  --accent:    #d38481;
  --accent-fg: #182b22;
  --tint:      #d2bd94;
  --fg-muted:  var(--subtext0);
  --bg-input:  #1d1820; /* a plum shade of the canvas, not the evergreen chrome (U15, owner 2026-11-27) */
  --accent-rgb:   211, 132, 129;
  --tint-rgb:     210, 189, 148;
  --success-rgb:  170, 226, 165;
  --warning-rgb:  249, 226, 175;
  --danger-rgb:   229, 149, 170;
  --info-rgb:     137, 220, 235;
  --fg-muted-rgb: 210, 203, 212;
  --fg-rgb:       243, 236, 245;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
