/* SITREP design tokens — single source of truth.
   See DESIGN.md for descriptive names and named rules.
   Load before every page-specific stylesheet. */
:root {
  /* Neutrals */
  --bg:       #0a0b0d;
  --surface:  #111318;
  --surface2: #191c24;
  --border:   #252830;
  --text:     #e8eaf0;
  --muted:    #6b7280;

  /* Accent */
  --accent:   #CECE3A;

  /* Team identity */
  --t1:       #4a9eff;
  --t2:       #ff6b4a;

  /* Mode identity */
  --hp:       #4aff9e;
  --snd:      #FFAA33;
  --ol:       #c47bff;

  /* Status */
  --danger:   #c43c3c;

  /* Semantic state (same values as --hp/--ol today, but semantically distinct
     so chrome can stop borrowing mode-chip hues per DESIGN.md §2's
     Mode-Hue Containment Rule) */
  --success:  #4aff9e;
  --info:     #c47bff;
}

/* Honor reduced-motion preference globally.
   PRODUCT.md commits to this. DESIGN.md §4 also requires
   the ambient gradient pair to be disabled here. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Ambient gradient overlays disabled under reduced motion */
  body::before { background: none !important; }
}

/* Canonical focus ring per DESIGN.md §4.
   :focus-visible only — mouse clicks don't get the ring,
   keyboard tabs do. */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
  /* Some elements (inputs with their own borders) need an offset to avoid clipping */
  outline-offset: 2px;
}

/* Inputs already have a border — use outline instead of shadow
   so the ring doesn't fight the input's border-radius/border */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: none;
}

/* Respect user preference: disable GPU-expensive blurs globally */
@media (prefers-reduced-transparency: reduce) {
  * { backdrop-filter: none !important; }
}
