:root {
  --neon-primary: #00d4ff;
  --neon-muted: #004d66;
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d1117;
  --ink: #e6edf3;
  --ink-muted: #8b949e;
  --success: #00ff88;
  --warning: #ffaa00;
  --danger: #ff3344;
  --font-heading: 'Share Tech Mono', 'Fira Code', 'Courier New', monospace;
  --font-body: 'IBM Plex Mono', 'Fira Code', monospace;
  --font-label: 'Inter', system-ui, -apple-system, sans-serif;
  /* Cyan tint scale + glow — terminal flourish */
  --neon-tint: rgba(0, 212, 255, 0.10);
  --neon-tint-strong: rgba(0, 212, 255, 0.18);
  --text-glow-cyan: 0 0 6px rgba(0, 212, 255, 0.35);
  /* Neutral lines/tracks */
  --track: #2a2e36;
  --neon-sep: #2a2f38;
  /* Motion + shape */
  --transition-fast: 200ms;
  --border-radius-sm: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}

#v2-root { position: fixed; inset: 0; }

#v2-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#v2-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#v2-ui > * { pointer-events: auto; }

/* Modal backdrops are appended to <body> in init() with the `hidden`
 * attribute. Their CSS sets `display: flex` which would otherwise
 * override the user-agent rule for [hidden]. Re-assert it. */
[hidden] { display: none !important; }

/* ── Phase 3 polish ─────────────────────────────────────────────────────── */

/* Keyboard focus ring — terminal cyan, box-shadow so it never reflows. Mouse
 * :focus stays quiet; only :focus-visible (keyboard) shows the ring. */
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid transparent;   /* forced-colors / high-contrast fallback */
  box-shadow: 0 0 0 2px var(--neon-primary), 0 0 8px var(--neon-tint-strong);
}

/* Soft cyan glow on panel/section/modal titles — keeps monospace crisp. */
.ctx-title,
.queue-title,
.overlay-title,
.overlay-section-title,
.v2-modal-title,
.topbar-tooltip .tt-header {
  text-shadow: var(--text-glow-cyan);
}

/* Press feedback so a click registers even while a request is in flight. */
.topbar-btn:not(:disabled):active,
.ctx-btn:not(:disabled):active,
.overlay-tab:active {
  background: var(--neon-tint-strong);
}

/* Respect reduced-motion: near-instant transitions, no looping animations. */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
