/* =====================================================================
   CyberSphere Solutions theme: the one place the portal's colors, fonts
   and shapes are defined. Matches the website's Light and Dark themes.
   Every other style uses these semantic tokens, never raw colors.

   Light is the default. Dark applies when the person picks it with the
   sun/moon button (<html data-theme="dark">), or when they haven't
   picked and their computer is set to dark.
   ===================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); }

:root {
  /* ---- Typography & shape (both themes) */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --heading-weight: 800;
  --heading-tracking: -0.02em;
  --radius-btn: 10px;     /* primary / secondary buttons, header icon buttons */
  --radius-input: 10px;
  --radius-card: 14px;    /* cards, panels */
  --radius-sm: 8px;       /* small boxes inside cards */
  --border-w: 1px;
  --border-strong-w: 1.5px;
  --shadow-pop: 0 10px 28px rgb(10 25 49 / .12); /* only for menus that float over content */

  /* ---- Light mode (default) */
  color-scheme: light;
  --bg: #F7F5EE;            /* primary background, warm off-white */
  --surface: #FFFFFF;       /* cards, elevated surfaces */
  --heading: #0A1931;       /* headings */
  --text: #0A1931;          /* primary text and data */
  --muted: #4A5568;         /* secondary / body text, labels */
  --cta: #D9B343;           /* primary button fill */
  --cta-ink: #0A1931;       /* text on primary button */
  --accent: #3B82F6;        /* icons, bullets, focus rings, bars */
  --link: #2563EB;          /* links: the accent blue one step deeper so it reads on cream */
  --border: #E2E0D8;        /* subtle 1px borders */
  --border-strong: #0A1931; /* 1.5px outline buttons */
  --outline-ink: #0A1931;   /* text on outline buttons */
  --neutral-bg: #EFECE3;    /* hover fills, empty bar tracks */
  --accent-ink: #FFFFFF;    /* text on accent fills (chips, chat bubbles) */

  /* Status colors */
  --ok-bg: #E4F3E8; --ok: #1E7A3C;
  --warn-bg: #FBF0CF; --warn: #7A5600;
  --bad-bg: #FCE6E4; --bad: #B42318;
  --info-bg: #E3EDFD; --info: #1D4ED8;
  --danger: #C8322B;
  /* Chart categories (budget) */
  --cat-1: #3B82F6; --cat-2: #D9B343; --cat-3: #7C3AED; --cat-4: #0D9488; --cat-5: #64748B;
  /* E-Rate tag */
  --erate-bg: #E4F3E8; --erate: #1B6B3A;
}

/* ---- Dark mode tokens (applied by the two selectors below) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1117;            /* deep charcoal-navy */
  --surface: #161B24;       /* elevated dark slate */
  --heading: #F8FAFC;
  --text: #F8FAFC;          /* crisp off-white */
  --muted: #94A3B8;         /* muted cool gray */
  --cta: #2BA6E8;           /* electric sky blue */
  --cta-ink: #0A1931;
  --accent: #2BA6E8;
  --link: #2BA6E8;
  --border: #262D3A;
  --border-strong: #E2E8F0;
  --outline-ink: #F8FAFC;
  --neutral-bg: #1F2632;
  --accent-ink: #0A1931;
  --shadow-pop: 0 10px 28px rgb(0 0 0 / .45);
  --ok-bg: #12301F; --ok: #6FD08F;
  --warn-bg: #362B0F; --warn: #E9C463;
  --bad-bg: #3A1A1C; --bad: #FF8A80;
  --info-bg: #10283D; --info: #7CC8F2;
  --danger: #FF6B62;
  --cat-1: #2BA6E8; --cat-2: #D9B343; --cat-3: #A78BFA; --cat-4: #2DD4BF; --cat-5: #94A3B8;
  --erate-bg: #12301F; --erate: #6FD08F;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1117; --surface: #161B24; --heading: #F8FAFC; --text: #F8FAFC; --muted: #94A3B8;
    --cta: #2BA6E8; --cta-ink: #0A1931; --accent: #2BA6E8; --link: #2BA6E8;
    --border: #262D3A; --border-strong: #E2E8F0; --outline-ink: #F8FAFC; --neutral-bg: #1F2632; --accent-ink: #0A1931;
    --shadow-pop: 0 10px 28px rgb(0 0 0 / .45);
    --ok-bg: #12301F; --ok: #6FD08F; --warn-bg: #362B0F; --warn: #E9C463; --bad-bg: #3A1A1C; --bad: #FF8A80;
    --info-bg: #10283D; --info: #7CC8F2; --danger: #FF6B62;
    --cat-1: #2BA6E8; --cat-2: #D9B343; --cat-3: #A78BFA; --cat-4: #2DD4BF; --cat-5: #94A3B8;
    --erate-bg: #12301F; --erate: #6FD08F;
  }
}

/* ---- Logos: black letters on light, white letters on dark */
.logo-on-dark { display: none !important; }
:root[data-theme="dark"] .logo-on-light { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-on-dark { display: block !important; }
}

/* ---- Printing always uses light colors */
@media print {
  :root:root:root {
    color-scheme: light; --bg: #FFFFFF; --surface: #FFFFFF; --heading: #0A1931; --text: #111111; --muted: #4A5568;
    --border: #DDDDDD; --neutral-bg: #F1F1F1; --accent: #3B82F6; --link: #2563EB;
  }
  :root:root:root .logo-on-dark { display: none !important; }
  :root:root:root .logo-on-light { display: block !important; }
}
