/* Palette: "Sherbet", Grace's pick 2026-11-17. Built from the Fairy
   palette plus coral FF7582, cream FFFEF2 and light pink; less purple,
   more pink, blue, cream and red. The two modes are flips of each other:
   - Light: light pink page, blue (#2F62C4) title on a coral highlighter,
     blue button with a cream label.
   - Dark: navy page, coral (#FF8C97, Grace's pick of three shades) title
     on a blue highlighter (65%), coral button with a navy label.
   All text pairs checked against WCAG AA (large-text 3:1 for display
   type over its highlighter). */

:root {
  color-scheme: dark;

  --bg: #172036;
  --surface: #212B47;
  --raise: #2B3757;
  --border: #3B4870;
  --tx: #FFFEF2;
  --tx2: #C9CDE6;
  --tx3: #A7ADCC;

  /* Title color (the "neon" standout text, with a soft glow). */
  --neon: #FF8C97;
  /* Buttons. */
  --accent: #FF8C97;
  --on-accent: #141A30;
  /* Accent used as a text color. */
  --accent-text: #FF8C97;
  --accent-deep: #FF8C97;
  /* Input edge needs 3:1 against the card to show where the field is. */
  --input-border: #7A86BA;

  --error: #FFB4A8;

  /* Background pattern tile (see base.css). */
  --pattern: url("../assets/pattern-dark.svg");

  /* Frosted sheet over the pattern. */
  --sheet-bg: color-mix(in srgb, var(--surface) 86%, transparent);
  --sheet-border: color-mix(in srgb, #C9CDE6 20%, transparent);
  --sheet-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --focus-ring: color-mix(in srgb, #FF8C97 30%, transparent);
  --track: color-mix(in srgb, #C9CDE6 32%, transparent);
  --open-bg: var(--raise);

  /* Highlighter swipes behind display type (see gate.css). */
  --hl-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%232F62C4' fill-opacity='0.65'%3E%3Cpath d='M30 8 L150 6 L156 1 L250 2 L262 5 L276 6 L268 9 L290 11 L272 14 L298 17 L276 20 L294 23 L270 26 L286 30 L262 33 L240 36 L120 37 L40 38 L22 35 L34 32 L6 29 L28 26 L2 22 L26 19 L8 15 L32 12 L16 9 Z'/%3E%3Cpath d='M262 22 L300 23 L298 25.5 L262 25 Z'/%3E%3Cpath d='M0 31 L36 30 L36 32.5 L2 33.5 Z'/%3E%3C/g%3E%3C/svg%3E");
  --hl-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%232F62C4' fill-opacity='0.65'%3E%3Cpath d='M24 6 L210 5 L216 9 L272 9 L262 12 L292 15 L268 18 L299 21 L274 24 L290 28 L266 31 L250 34 L180 35 L174 39 L36 38 L20 35 L32 32 L4 28 L26 25 L1 21 L24 18 L6 14 L28 11 L12 8 Z'/%3E%3Cpath d='M266 12 L298 11.5 L297 14 L266 14.5 Z'/%3E%3Cpath d='M0 34 L30 33 L30 35.5 L2 36.5 Z'/%3E%3C/g%3E%3C/svg%3E");

  /* Display type: scoreboard and gym-signage feel. Self-hosted. */
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif-condensed, sans-serif;
  --font-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Minimum tap target, used mid-set with one thumb. */
  --tap: 48px;
}

/* Light: system preference, unless a manual override is set. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #FFEEF3;
    --surface: #FFFFFF;
    --raise: #FFF7F0;
    --border: #F3DCE3;
    --tx: #1C2140;
    --tx2: #4F5578;
    --tx3: #6A7090;
    --neon: #2F62C4;
    --accent: #2F62C4;
    --on-accent: #FFFEF2;
    --accent-text: #2F62C4;
    --accent-deep: #2F62C4;
    --input-border: #7A82AE;
    --error: #B83F3A;
    --pattern: url("../assets/pattern-light.svg");
    --hl-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%23FF7582' fill-opacity='0.5'%3E%3Cpath d='M30 8 L150 6 L156 1 L250 2 L262 5 L276 6 L268 9 L290 11 L272 14 L298 17 L276 20 L294 23 L270 26 L286 30 L262 33 L240 36 L120 37 L40 38 L22 35 L34 32 L6 29 L28 26 L2 22 L26 19 L8 15 L32 12 L16 9 Z'/%3E%3Cpath d='M262 22 L300 23 L298 25.5 L262 25 Z'/%3E%3Cpath d='M0 31 L36 30 L36 32.5 L2 33.5 Z'/%3E%3C/g%3E%3C/svg%3E");
    --hl-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%23FF7582' fill-opacity='0.5'%3E%3Cpath d='M24 6 L210 5 L216 9 L272 9 L262 12 L292 15 L268 18 L299 21 L274 24 L290 28 L266 31 L250 34 L180 35 L174 39 L36 38 L20 35 L32 32 L4 28 L26 25 L1 21 L24 18 L6 14 L28 11 L12 8 Z'/%3E%3Cpath d='M266 12 L298 11.5 L297 14 L266 14.5 Z'/%3E%3Cpath d='M0 34 L30 33 L30 35.5 L2 36.5 Z'/%3E%3C/g%3E%3C/svg%3E");
    --sheet-bg: color-mix(in srgb, #FFFFFF 94%, transparent);
    --sheet-border: color-mix(in srgb, #2F62C4 12%, transparent);
    --sheet-shadow: 0 18px 40px -20px rgba(47, 98, 196, 0.25);
    --focus-ring: color-mix(in srgb, #2F62C4 22%, transparent);
    --track: color-mix(in srgb, #2F62C4 28%, transparent);
    --open-bg: color-mix(in srgb, #2F62C4 7%, #FFFFFF);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFEEF3;
  --surface: #FFFFFF;
  --raise: #FFF7F0;
  --border: #F3DCE3;
  --tx: #1C2140;
  --tx2: #4F5578;
  --tx3: #6A7090;
  --neon: #2F62C4;
  --accent: #2F62C4;
  --on-accent: #FFFEF2;
  --accent-text: #2F62C4;
  --accent-deep: #2F62C4;
  --input-border: #7A82AE;
  --error: #B83F3A;
  --pattern: url("../assets/pattern-light.svg");
  --hl-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%23FF7582' fill-opacity='0.5'%3E%3Cpath d='M30 8 L150 6 L156 1 L250 2 L262 5 L276 6 L268 9 L290 11 L272 14 L298 17 L276 20 L294 23 L270 26 L286 30 L262 33 L240 36 L120 37 L40 38 L22 35 L34 32 L6 29 L28 26 L2 22 L26 19 L8 15 L32 12 L16 9 Z'/%3E%3Cpath d='M262 22 L300 23 L298 25.5 L262 25 Z'/%3E%3Cpath d='M0 31 L36 30 L36 32.5 L2 33.5 Z'/%3E%3C/g%3E%3C/svg%3E");
  --hl-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cg fill='%23FF7582' fill-opacity='0.5'%3E%3Cpath d='M24 6 L210 5 L216 9 L272 9 L262 12 L292 15 L268 18 L299 21 L274 24 L290 28 L266 31 L250 34 L180 35 L174 39 L36 38 L20 35 L32 32 L4 28 L26 25 L1 21 L24 18 L6 14 L28 11 L12 8 Z'/%3E%3Cpath d='M266 12 L298 11.5 L297 14 L266 14.5 Z'/%3E%3Cpath d='M0 34 L30 33 L30 35.5 L2 36.5 Z'/%3E%3C/g%3E%3C/svg%3E");
  --sheet-bg: color-mix(in srgb, #FFFFFF 94%, transparent);
  --sheet-border: color-mix(in srgb, #2F62C4 12%, transparent);
  --sheet-shadow: 0 18px 40px -20px rgba(47, 98, 196, 0.25);
  --focus-ring: color-mix(in srgb, #2F62C4 22%, transparent);
  --track: color-mix(in srgb, #2F62C4 28%, transparent);
  --open-bg: color-mix(in srgb, #2F62C4 7%, #FFFFFF);
}
