/* GENERATED by brand/sync-brand.ps1 (tokens.css + splash/splash.css) - do not edit. */
/* Circuit design tokens. Palette and motion come from tokens.json (kit block below, generated); app aliases are edited here. */

/* BEGIN kit-tokens (generated from tokens.json by sync-brand.ps1 - edit tokens.json, not this block) */
:root {
  --circuit-navy-950: #040E24;
  --circuit-navy-900: #06142A;
  --circuit-navy-800: #0B2343;
  --circuit-blue-700: #0752A0;
  --circuit-blue-500: #1689E8;
  --circuit-blue-400: #32B3FF;
  --circuit-cyan-400: #45D9F4;
  --circuit-cyan-200: #8DEBFA;
  --circuit-white-ice: #F5F8FF;
  --circuit-text-muted: #A9C6DF;
  --circuit-background: #040E24;
  --circuit-surface: #06142A;
  --circuit-surface-raised: #0B2343;
  --circuit-primary: #1689E8;
  --circuit-primary-hover: #32B3FF;
  --circuit-highlight: #45D9F4;
  --circuit-text: #F5F8FF;
  --circuit-text-secondary: #A9C6DF;
  --circuit-border: #23405E;
  --circuit-motion-logo-enter: 700ms;
  --circuit-motion-glow-pulse: 3600ms;
  --circuit-motion-orbit-rotation: 45000ms;
  --circuit-motion-particle-drift: 8000ms;
  --circuit-motion-screen-exit: 350ms;
}
/* END kit-tokens */

/* App tokens: the names the apps, homepage and backend use, mapped onto the kit palette. */
:root {
  /* Brand */
  --navy: var(--circuit-navy-950);
  --navy-light: var(--circuit-navy-800);
  --navy-dark: var(--circuit-navy-900);
  --primary: var(--circuit-primary);
  --accent: var(--circuit-primary);
  --accent-dark: var(--circuit-blue-700);
  --accent-hover: var(--circuit-primary-hover);
  --highlight: var(--circuit-highlight);

  /* Surfaces */
  --bg: #f0f0f0;
  --bg-subtle: #f7f8fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --white: #ffffff;
  --border: #d4d4d4;
  --border-light: #e8e8e8;

  /* Text */
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;

  /* Navy-tinted neutrals for light surfaces; text tokens are >= 4.5:1 on white and on --bg (see brand-guidelines.md). */
  --text-muted-aa: #46566B;
  --text-faint-aa: #5A687C;
  --surface-1: #F3F6FA;
  --surface-2: #E6ECF3;
  --border-subtle: #DDE4EC;
  --border-strong: #C3CDDB;
  --control-border: #7D8DA3;

  /* Status text on light surfaces (>= 4.5:1) */
  --status-green-text: #1A6B2D;
  --status-red-text: #B02A37;
  --status-amber-text: #8A5A00;
  --status-purple-text: #5A32A3;

  /* Status / palette */
  --green: #28a745;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --red: #e74c3c;
  --grey: #6c757d;
  --purple: #9b59b6;
  --blue: var(--accent);
  --gold: #f39c12;

  /* Shape */
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);

  /* Login / splash backdrop */
  --brand-gradient: linear-gradient(135deg, var(--circuit-blue-700) 20%, var(--circuit-navy-800) 60%, var(--circuit-navy-950) 100%);

  /* Top bar across all apps */
  --topbar-gradient: linear-gradient(90deg, var(--circuit-blue-700) 0%, var(--circuit-navy-800) 55%, var(--circuit-navy-950) 100%);
}

/* Installed-app splash. Needs brand/tokens.css loaded first (sync-brand.ps1 prepends it). */

#brand-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  overflow: hidden;
  color: var(--circuit-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  /* Matches the manifest background so the OS launch screen hands off without a visible change. */
  background: var(--circuit-background);
}

.bs-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Shown only when launched as an installed app (or forced with ?splash=1). */
@media (display-mode: standalone), (display-mode: fullscreen) {
  #brand-splash { display: flex; }
  html { background: var(--circuit-background); }
}
html.bs-on #brand-splash { display: flex; }
#brand-splash [hidden] { display: none !important; }


.bs-env {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 16px);
  right: calc(env(safe-area-inset-right) + 16px);
  z-index: 3;
  padding: 4px 10px;
  border: 1px solid var(--circuit-cyan-400);
  border-radius: 12px;
  background: var(--circuit-surface-raised);
  color: var(--circuit-cyan-200);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bs-stall {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 32px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bs-stall p { margin: 0; color: var(--circuit-text-secondary); font-size: 0.95rem; }
.bs-retry {
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--circuit-primary);
  color: var(--circuit-white-ice);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bs-retry:hover { background: var(--circuit-primary-hover); }

