/* ==========================================================================
   TERMINAL — live mode
   --------------------------------------------------------------------------
   When TRADING_MODE=live, every accent token is reassigned to crimson and the
   chrome grows a hazard edge. The intent is that you can never mistake which
   account you are looking at from across the room, which is the whole point.
   ========================================================================== */

[data-mode="live"] {
  --accent:      #FF5A52;
  --accent-hi:   #FF837C;
  --accent-lo:   #8E2820;
  --accent-wash: rgba(255, 90, 82, 0.11);
  --accent-edge: rgba(255, 90, 82, 0.36);
  --accent-text: #FFFFFF;
  --line-accent: #3A1D1B;
}

/* A 2px hazard line along the top of the viewport. Present on every page,
   impossible to scroll away from. */
[data-mode="live"] .shell::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, #8E2820 50%, var(--accent) 100%);
  z-index: 200;
  pointer-events: none;
}

[data-mode="live"] .rail,
[data-mode="live"] .topbar { background: #0C0809; }

[data-mode="live"] .brand-mark {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
}

[data-mode="live"] .statusbar { background: #0C0809; border-top-color: var(--line-accent); }

/* Disarmed live mode: connected to the real account but not permitted to
   trade. Shown as a distinct state so "live" never silently means "armed". */
[data-mode="live"][data-armed="false"] .mode-badge::after {
  content: "DISARMED";
  color: var(--text-lo);
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--accent-edge);
  background: var(--accent-wash);
  border-radius: var(--r-sm);
  font-family: var(--f-num);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

/* Kill switch engaged — the strongest visual state in the product. */
[data-killed="true"] .shell::after {
  content: "";
  position: fixed;
  inset: 0;
  border: 2px solid var(--neg);
  pointer-events: none;
  z-index: 199;
}

.kill-banner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s4);
  background: var(--neg-wash);
  border-bottom: 1px solid var(--neg);
  color: var(--neg);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* An inline <svg> carrying only a viewBox falls back to the replaced-element
   default of 300x150, and inside a flex row it then stretches to the row's
   height. Every other icon in the interface is sized by its container -- this
   one was not, so the alert triangle filled the screen. Loud is the point of
   this banner; that was not loud, it was broken. */
.kill-banner svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 1.8;
}
