/* ═══════════════════════════════════════
   SerpFlare — Base: Ignite Pulse tokens, fonts, reset
   B-DESIGN-PULSE (Mike 2026-11-27): Ignite Pulse is the one SerpFlare design. It is a dark design, so the app has
   a single theme; [data-theme="light"] keeps the same tokens so an old stored preference can't bring back the old look.
   ═══════════════════════════════════════ */

@font-face { font-family: 'Sora'; src: url(../fonts/sora.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(../fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(../fonts/jetbrains-mono.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root,
[data-theme="light"],
[data-theme="dark"] {
  color-scheme: dark;

  /* Ignite Pulse palette (the reference's own names) */
  --pulse-bg: #060813;
  --pulse-s1: #0D1124;
  --pulse-s2: #141A33;
  --pulse-line: rgba(255,255,255,.09);
  --pulse-tx: #F1F3FF;
  --pulse-mu: #A4ADCB;
  --pulse-vi: #7C5CFF;
  --pulse-cy: #18E0FF;
  --pulse-gr: #3DF5A0;
  --pulse-am: #FFC247;
  --pulse-rd: #FF6B81;
  --pulse-grad: linear-gradient(90deg, #7C5CFF, #18E0FF);
  --pulse-glow: 0 10px 40px -8px rgba(124,92,255,.8);

  /* App tokens, mapped onto Pulse */
  --color-primary: #9B87FF;            /* the violet, lifted so links pass contrast on the dark surfaces */
  --color-primary-hover: #B7A8FF;
  --color-primary-light: rgba(124,92,255,.18);
  --color-primary-text: #05060F;       /* text on gradient / violet fills, as in Pulse buttons */

  --color-danger: #FF6B81;
  --color-danger-hover: #FF8A9B;
  --color-danger-light: rgba(255,107,129,.14);

  --color-success: #3DF5A0;
  --color-success-light: rgba(61,245,160,.12);

  --color-warning: #FFC247;
  --color-warning-light: rgba(255,194,71,.14);

  --color-info: #18E0FF;
  --color-info-light: rgba(24,224,255,.12);

  --color-bg: #060813;
  --color-surface: #0D1124;
  --color-surface-hover: #141A33;
  --color-surface-muted: #141A33;
  --color-border: rgba(255,255,255,.10);
  --color-border-focus: #18E0FF;

  --color-text: #F1F3FF;
  --color-text-secondary: #C3CAE6;
  --color-text-muted: #A4ADCB;
  --color-text-inverse: #F1F3FF;       /* text on the (dark) sidebar */

  --color-sidebar-bg: #0A0E1F;
  --color-sidebar-text: #A4ADCB;
  --color-sidebar-hover: rgba(255,255,255,.05);
  --color-sidebar-active: #F1F3FF;
  --color-sidebar-active-bg: rgba(124,92,255,.18);
  --color-sidebar-group: #8A94B8;

  --color-topbar-bg: rgba(6,8,19,.88);
  --color-topbar-border: rgba(255,255,255,.09);

  --color-footer-bg: transparent;
  --color-footer-text: #A4ADCB;

  --color-badge-draft: #FFC247;
  --color-badge-approved: #3DF5A0;
  --color-badge-awaiting: #18E0FF;
  --color-badge-rejected: #FF6B81;

  --color-confidential: #FF6B81;

  /* older aliases some rules still read */
  --text-muted: #A4ADCB;
  --text-2: #C3CAE6;
  --surface-2: #141A33;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', "SF Mono", Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 20px 50px -30px rgba(124,92,255,.45);
  --shadow-lg: 0 40px 90px -40px rgba(124,92,255,.6);

  --sidebar-width: 260px;
  --topbar-height: 64px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* ── Reset ──────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--pulse-cy);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}
button:focus-visible {
  outline: 2px solid var(--pulse-cy);
  outline-offset: 2px;
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.875rem;
}

img, svg {
  display: block;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -.02em;
  line-height: 1.25;
  font-weight: 700;
}

code, kbd, pre, samp { font-family: var(--font-mono); }

/* ── Accessibility ──────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  background: var(--pulse-cy);
  color: var(--color-primary-text);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* ── Theme toggle ───────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}
.theme-toggle:hover {
  background: var(--color-surface-hover);
}

/* ── Utility ────────────────────────── */
.empty-state {
  color: var(--color-text-muted);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9375rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.confidential-note {
  color: var(--color-confidential);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}