/* Shared dark palette for both fixed and system-selected themes. */
:root {
    color-scheme: dark;
    --bg: #0d0f13;
    --surface: #16191e;
    --surface-2: #1c2026;
    --surface-3: #252a32;
    --surface-raised: #1f232a;
    --seg-active: #313741;
    --line: #2b3038;
    --line-strong: #767e8a;
    --text: #f1f3f5;
    --text-2: #b8bec7;
    --text-3: #979ea9;
    --text-disabled: #6c737e;
    --field-bg: #111418;

    --success-ink: #62d69a;
    --success-soft: #16291f;
    --warn-ink: #f2c46b;
    --warn-soft: #2d2513;
    --danger-ink: #ff8f85;
    --danger-soft: #331a19;
    --danger-fill: #cf3a31;
    --success-fill: #2a9a5d;
    --warn-fill: #b47a12;

    --shadow-card: 0 0 0 1px rgb(255 255 255 / 0.02), 0 16px 40px -12px rgb(0 0 0 / 0.7);
    --shadow-pop: 0 0 0 1px rgb(255 255 255 / 0.04), 0 20px 48px -12px rgb(0 0 0 / 0.8);

    --accent-fill: #2e69c2;
    --accent-fill-hover: #1b57ae;
    --accent-ink: #85bfff;
    --accent-soft: #242d3b;
    --accent-soft-hover: #2c394d;
    --accent-line: #3f5577;
    --accent-band: #1b222e;
    --accent-wash: rgb(68 128 219 / 0.22);

    /* The macOS system colors in dark appearance; the green is 8.7:1 on the dark card,
       strong enough for its own line. */
    --system-green: #30d158;
    --system-green-line: #30d158;
    --system-gray: #98989d;
  }

  /*
    Dark: fills take OKLCH lightness 0.53 with chroma capped at 0.16, as in light, so the
    default blue stays as vivid as BusyCal's own dark-mode blue instead of dulling. That is
    light enough to stand out 3:1 from the dark surface, and every preset keeps white text
    at 5:1 or more. Accent text rises to at least 0.80 with chroma capped at 0.14 so it does
    not glare.
  */
  /* A light plate keeps dark logos visible on the dark page. */
  .brand-logo {
    padding: 6px 10px;
    background: #f3f4f7;
  }

  @supports (color: oklch(from red min(l, 0.5) c h)) {
    :root {
      --accent-fill: oklch(from var(--accent) 0.53 min(c, 0.16) h);
      --accent-fill-hover: oklch(from var(--accent) 0.47 min(c, 0.16) h);
      --accent-ink: oklch(from var(--accent) max(l, 0.8) min(c, 0.14) h);
      --accent-soft: color-mix(in oklab, var(--accent-ink) 14%, var(--surface));
      --accent-soft-hover: color-mix(in oklab, var(--accent-ink) 22%, var(--surface));
      --accent-line: color-mix(in oklab, var(--accent-ink) 40%, var(--surface));
      --accent-band: color-mix(in oklab, var(--accent) 10%, var(--surface));
      --accent-wash: color-mix(in srgb, var(--accent) 22%, transparent);
    }
  }
