/* classmeter themes: one set of tokens per brand, shared by every tool.
   /theme.js sets <html data-brand="…"> before this sheet loads. A tool's stylesheet uses these tokens
   and never hard-codes a brand colour.
   - Aurora (default): polar night, dark only. One signal in oxygen-557; kickers and links in nitrogen-428.
   - The Majlis of AI: white sheet, black linework, one redline. Light, or dark when the device is dark. */
:root, :root[data-brand="aurora"] {
  color-scheme: dark;
  --page: #0d1326;
  --surface-100: #0d1326;
  --surface-200: #151d36;
  --surface-300: #1d2747;
  --ink: #e9eef8;
  --ink-muted: #a3afcb;
  --ink-muted-inverse: #4b5675;
  --hairline: #27314f;
  --border: #56627f;
  /* "redline" is the one focal colour of the theme: oxygen-557 here, the redline in The Majlis of AI */
  --redline: #5ce0a0;
  --on-redline: #0d1326;
  --on-ink: #0d1326;
  --focal-text: #5ce0a0;
  --lead-text: #5ce0a0;
  --kicker: #9da8ff;
  --link: #9da8ff;
  --focus: #9da8ff;
  /* Status only, always with a word */
  --status-red: #ff8a7a;   --status-red-wash: #312533;
  --status-amber: #f2c46b; --status-amber-wash: #2f2e30;
  --status-green: #5ce0a0; --status-green-wash: #193238;
  --on-status: #0d1326;
  --font: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-cond: "JetBrains Mono", ui-monospace, Menlo, monospace; /* uppercase labels */
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --display-weight: 400;
  --label-tracking: 0.08em;
  --radius: 4px;       /* controls, inputs */
  --radius-panel: 8px; /* cards, bands */
  /* Chart series stay quiet; the one highlight is --redline */
  --s1: #e9eef8; --s2: #9da8ff; --s3: #7cc4f0; --s4: #a3afcb; --s5: #56627f;
  --s6: #c3caff; --s7: #4f7fa8; --s8: #d5dbea; --s9: #3b4668; --s10: #8a96b5;
}

:root[data-brand="majlisofai"] {
  color-scheme: light;
  --page: #ffffff;
  --surface-100: #ffffff;
  --surface-200: #f5f5f5;
  --surface-300: #e6e6e6;
  --ink: #111111;
  --ink-muted: #5c5c5c;
  --ink-muted-inverse: #bdbdbd;
  --hairline: #d9d9d9;
  --border: #767676;
  --redline: #cc3a1c;
  --on-redline: #ffffff;
  --on-ink: #ffffff;
  --focal-text: #cc3a1c;
  --lead-text: #cc3a1c;
  --kicker: #5c5c5c;
  --link: #111111;
  --focus: #111111;
  /* RAG: rag-red is darker than the redline so status text holds 4.5:1 */
  --status-red: #a82f18;   --status-red-wash: #f6e5e1;
  --status-amber: #7e5300; --status-amber-wash: #f2ecdf;
  --status-green: #2e6b47; --status-green-wash: #e3ede7;
  --on-status: #ffffff;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --display-weight: 300;
  --label-tracking: 0.06em;
  --radius: 2px;
  --radius-panel: 0;
  /* Greys only; the one highlight is the redline */
  --s1: #111111; --s2: #5c5c5c; --s3: #8c8c8c; --s4: #bdbdbd; --s5: #333333;
  --s6: #767676; --s7: #a6a6a6; --s8: #d0d0d0; --s9: #4a4a4a; --s10: #9a9a9a;
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="majlisofai"] {
    color-scheme: dark;
    --page: #121212;
    --surface-100: #121212;
    --surface-200: #1e1e1e;
    --surface-300: #2a2a2a;
    --ink: #ffffff;
    --ink-muted: #b3b3b3;
    --ink-muted-inverse: #4d4d4d;
    --hairline: #333333;
    --border: #8a8a8a;
    --redline: #ff7a5c;
    --on-redline: #121212;
    --on-ink: #121212;
    --focal-text: #ff7a5c;
    --lead-text: #ff7a5c;
    --kicker: #b3b3b3;
    --link: #ffffff;
    --focus: #ffffff;
    --status-red: #ff7a5c;   --status-red-wash: #35221d;
    --status-amber: #e3b25a; --status-amber-wash: #312a1d;
    --status-green: #7cc49a; --status-green-wash: #222d26;
    --on-status: #121212;
    --s1: #ffffff; --s2: #b3b3b3; --s3: #7a7a7a; --s4: #4d4d4d; --s5: #d9d9d9;
    --s6: #8f8f8f; --s7: #616161; --s8: #3a3a3a; --s9: #c4c4c4; --s10: #6e6e6e;
  }
}

/* The classmeter logo: the theme's mark and the product name. Each tool adds its own tag after it. */
.cm-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.cm-logo img { display: block; width: 32px; height: 32px; }
.cm-logo .wordmark { font: 600 22px/1 var(--font-display); letter-spacing: -0.01em; }
:root:not([data-brand="majlisofai"]) .majlis-only, [data-brand="majlisofai"] .aurora-only { display: none !important; }
.cm-tag {
  font: 600 12px/16px var(--font-cond); letter-spacing: var(--label-tracking); text-transform: uppercase;
  color: var(--ink-muted); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 4px 8px;
}
.cm-theme { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/16px var(--font-cond); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--ink-muted); }
.cm-theme select {
  font: 14px/20px var(--font); text-transform: none; letter-spacing: 0; color: var(--ink); background: var(--surface-100);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 8px; cursor: pointer;
}
