/* Chart Lab Owner Auto Trader — canonical Futures layout */

:root {
  --fxo-bg: #0a0e13;
  --fxo-card: #151c26;
  --fxo-inset: #0d131a;
  --fxo-border: #2a3444;
  --fxo-text: #f3f6fa;
  --fxo-muted: #b4becc;
  --fxo-pos: #3ee89a;
  --fxo-neg: #ff7b7b;
  --fxo-warn: #f5c14a;
  --fxo-crit: #ff4d5c;
  --fxo-info: #4fd4c8;
  --fxo-fiona: #2dd4bf;
  --fxo-why: #f5c14a;
  --fxo-money: #7dd3fc;
  --fxo-health: #93c5fd;
  --fxo-long: #3ee89a;
  --fxo-short: #ff7b7b;
  --fxo-protected: #3ee89a;
  --fxo-radius: 12px;
  --fxo-gap: 16px;
}

body.fx-owner-app {
  background: var(--fxo-bg);
  color: var(--fxo-text);
  min-height: 100vh;
}

.fxo-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: var(--fxo-gap);
}

.fxo-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--fxo-border);
}

.fxo-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--fxo-fiona);
  font-weight: 700;
}

.fxo-title {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.fxo-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fxo-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--fxo-border);
  background: var(--fxo-inset);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fxo-text);
}

.fxo-pill--ok {
  color: #9af0c8;
  background: rgba(62, 232, 154, 0.14);
  border-color: rgba(62, 232, 154, 0.35);
}
.fxo-pill--warn {
  color: #f0d48a;
  background: rgba(245, 193, 74, 0.14);
  border-color: rgba(245, 193, 74, 0.35);
}
.fxo-pill--crit {
  color: #ffb0b6;
  background: rgba(255, 77, 92, 0.16);
  border-color: rgba(255, 77, 92, 0.4);
}
.fxo-pill--muted { color: var(--fxo-muted); background: var(--fxo-inset); }

.fxo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fxo-env-select {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fxo-muted);
}

.fxo-env-select select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--fxo-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fxo-text);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}

.fxo-mainnet-lock {
  margin: 0;
  color: var(--fxo-warn);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.fxo-controls .btn {
  font-size: 0.8rem;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--fxo-border);
  color: var(--fxo-text);
}

.fxo-controls .btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.fx-owner-app #fxAutoToggle.is-on {
  background: rgba(62, 232, 154, 0.18);
  border: 1px solid rgba(62, 232, 154, 0.5);
  color: #7dffc0;
  font-weight: 800;
}

body.fx-owner-app #fxAutoToggle.is-on:hover {
  background: rgba(62, 232, 154, 0.26);
}

body.fx-owner-app #fxAutoToggle.is-off {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #c5ced9;
  font-weight: 800;
  box-shadow: none;
}

body.fx-owner-app #fxAutoToggle.is-off:hover {
  background: rgba(148, 163, 184, 0.18);
}

body.fx-owner-app #fxAutoToggle:disabled,
body.fx-owner-app #fxAutoToggle.is-locked {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--fxo-border);
  color: var(--fxo-muted);
  font-weight: 700;
}

body.fx-owner-app #fxKillBtn {
  background: rgba(255, 77, 92, 0.18);
  border: 1px solid rgba(255, 77, 92, 0.45);
  color: #ffb0b6;
  font-weight: 800;
}

body.fx-owner-app #fxKillClearBtn {
  border-color: rgba(245, 193, 74, 0.45);
  color: #f0d48a;
  background: rgba(245, 193, 74, 0.12);
}

.fxo-version-mismatch {
  margin: 0;
  color: var(--fxo-warn);
  font-size: 0.8rem;
}

.fxo-selftest {
  font-size: 0.78rem;
}

.fxo-card {
  background: var(--fxo-card);
  border: 1px solid var(--fxo-border);
  border-radius: var(--fxo-radius);
  padding: 16px 18px;
  border-left-width: 4px;
}

.fxo-card--fiona { border-left-color: var(--fxo-fiona); }

.fxo-phase {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--fxo-fiona);
  line-height: 1.35;
}
.fxo-phase.is-ok { color: var(--fxo-pos); }
.fxo-phase.is-info { color: var(--fxo-info); }
.fxo-phase.is-warn { color: var(--fxo-warn); }
.fxo-phase.is-crit { color: var(--fxo-crit); }
.fxo-phase-sub {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.fxo-steps {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.fxo-steps li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--fxo-inset);
  border: 1px solid transparent;
  font-size: 0.88rem;
  color: var(--fxo-muted);
}
.fxo-steps li.is-done { color: var(--fxo-text); border-color: rgba(45, 212, 191, 0.25); }
.fxo-steps li.is-now {
  color: var(--fxo-text);
  border-color: var(--fxo-fiona);
  background: rgba(45, 212, 191, 0.08);
}
.fxo-steps li.is-locked { opacity: 0.55; }
.fxo-steps .fxo-step-mark { font-weight: 700; color: var(--fxo-fiona); }
.fxo-steps .fxo-step-title { font-weight: 650; color: inherit; }
.fxo-steps .fxo-step-hint { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--fxo-muted); }

.fxo-action {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--fxo-border);
  background: var(--fxo-inset);
}
.fxo-action.is-ok { border-color: rgba(62, 232, 154, 0.45); }
.fxo-action.is-warn { border-color: rgba(245, 193, 74, 0.5); }
.fxo-action.is-crit { border-color: rgba(255, 77, 92, 0.5); }
.fxo-action.is-info { border-color: rgba(79, 212, 200, 0.45); }
.fxo-action strong { display: block; margin-bottom: 4px; }
.fxo-action p { margin: 0; line-height: 1.45; }
.fxo-action-cta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fxo-owner-action-banner {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 193, 74, 0.55);
  background: rgba(245, 193, 74, 0.08);
}
.fxo-owner-action-banner strong {
  display: block;
  margin-bottom: 4px;
}
.fxo-owner-action-banner p {
  margin: 0 0 10px;
  line-height: 1.45;
}
.fxo-owner-action-flash,
.fxrm-block.is-flash,
#fxRealMoneySafety.is-flash {
  outline: 2px solid rgba(245, 193, 74, 0.9);
  box-shadow: 0 0 0 4px rgba(245, 193, 74, 0.25);
  transition: outline 0.2s ease, box-shadow 0.2s ease;
}
.fxo-mainnet-lock.is-owner-action,
#fxOccMainnetCard.is-owner-action {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fxlim-owner-action {
  margin: 8px 0 0;
}
.fxo-check.is-flash {
  outline: 2px solid rgba(245, 193, 74, 0.95);
  outline-offset: 4px;
  border-radius: 8px;
  transition: outline-color 0.2s ease;
}

.fxo-notify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.fxo-card--why { border-left-color: var(--fxo-why); }
.fxo-card--account,
.fxo-card--positions { border-left-color: var(--fxo-money); }
.fxo-card--health { border-left-color: var(--fxo-health); }
.fxo-card--quiet { border-left-color: #3d4a5c; opacity: 0.96; }

.fxo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.fxo-card-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fxo-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--fxo-border);
  color: var(--fxo-text);
  background: var(--fxo-inset);
}

.fxo-badge.is-ok {
  color: #9af0c8;
  background: rgba(62, 232, 154, 0.14);
  border-color: rgba(62, 232, 154, 0.35);
}
.fxo-badge.is-warn {
  color: #f0d48a;
  background: rgba(245, 193, 74, 0.14);
  border-color: rgba(245, 193, 74, 0.35);
}
.fxo-badge.is-crit {
  color: #ffb0b6;
  background: rgba(255, 77, 92, 0.16);
  border-color: rgba(255, 77, 92, 0.4);
}

.fxo-connection .fxo-conn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .fxo-connection .fxo-conn-grid { grid-template-columns: 1fr; }
}
.fxo-conn-env {
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.fxo-conn-env__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.fxo-conn-env__head h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.fxo-conn-env p { margin: 4px 0; font-size: 0.85rem; }
.fxo-conn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.fxo-conn-form {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--fxo-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fxo-conn-form .fxo-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--fxo-muted);
}
.fxo-conn-form input {
  background: #0a0e14;
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  color: var(--fxo-text);
  padding: 8px 10px;
  font-size: 0.9rem;
}
.fxo-badge.is-long { color: var(--fxo-long); }
.fxo-badge.is-short { color: var(--fxo-short); }

.fxo-equity {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.fxo-equity-label {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--fxo-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fxo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 14px;
}

.fxo-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 8px 10px;
}

.fxo-grid .muted,
.fxo-pipe-step span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fxo-muted);
}

.fxo-grid strong,
.fxo-pipe-step strong {
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  color: var(--fxo-text);
}

.fx-val-pos, .fx-pnl-pos { color: var(--fxo-pos) !important; }
.fx-val-neg, .fx-pnl-neg { color: var(--fxo-neg) !important; }
.fx-val-neutral { color: var(--fxo-text); }

.fxo-pos-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fxo-pos-list--compact {
  gap: 4px;
  max-height: min(42vh, 360px);
  overflow: auto;
}

.fxo-positions--compact {
  padding-bottom: 10px;
}

.fxo-empty {
  margin: 4px 0;
  font-size: 0.85rem;
}

/* Compact position rows — replace bulky cards */
.fxo-pos-row {
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.18);
}

.fxo-pos-row.fx-pnl-pos { border-color: rgba(61, 255, 154, 0.28); }
.fxo-pos-row.fx-pnl-neg { border-color: rgba(255, 107, 107, 0.28); }

.fxo-pos-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.fxo-pos-row__sym {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.fxo-pos-row__lev {
  font-size: 0.75rem;
}

.fxo-pos-row__pnl {
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fxo-pos-row__pnl small {
  font-weight: 600;
  opacity: 0.85;
  margin-left: 4px;
}

.fxo-pos-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.fxo-pos-row__meta strong {
  color: var(--fxo-text);
  font-weight: 650;
}

.fxo-badge--tiny {
  font-size: 0.62rem;
  padding: 1px 5px;
}

.fxo-pos-card {
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.fxo-pos-card.fx-pnl-pos { border-color: rgba(61, 255, 154, 0.35); }
.fxo-pos-card.fx-pnl-neg { border-color: rgba(255, 107, 107, 0.35); }

.fxo-pos-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fxo-pos-card__head .fxo-side-long,
.fxo-pos-row .fxo-side-long { color: var(--fxo-long); font-weight: 800; }
.fxo-pos-card__head .fxo-side-short,
.fxo-pos-row .fxo-side-short { color: var(--fxo-short); font-weight: 800; }

.fxo-pos-card__pnl {
  margin-left: auto;
  font-size: 1.15rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.fxo-pos-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px 12px;
}

.fxo-pos-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.fxo-prot-ok { color: var(--fxo-protected); border-color: rgba(61, 255, 154, 0.4); }
.fxo-prot-crit { color: var(--fxo-crit); border-color: rgba(255, 59, 74, 0.45); }

.fxo-pos-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fxo-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 14px;
}

.fxo-pipe-step {
  flex: 1 1 90px;
  min-width: 84px;
  padding: 10px;
  border-radius: 8px;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fxo-pipe-step.is-ok {
  background: rgba(45, 212, 191, 0.16);
  border-color: var(--fxo-fiona);
}
.fxo-pipe-step.is-ok strong { color: var(--fxo-fiona); }
.fxo-pipe-step.is-warn {
  background: rgba(245, 193, 74, 0.16);
  border-color: var(--fxo-warn);
}

/* Entries blocked reason (e.g. รอ SL ของ SKYAIUSDT) — 2026-09-29 */
.fxo-pipe-blocked {
  margin: -8px 0 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--fxo-warn);
  color: var(--fxo-warn);
  font-size: 0.85rem;
}
.fxo-pipe-blocked[hidden] { display: none; }

.fxo-pipe-step.is-warn strong { color: var(--fxo-warn); }
.fxo-pipe-step.is-crit {
  background: rgba(255, 77, 92, 0.16);
  border-color: var(--fxo-crit);
}
.fxo-pipe-step.is-crit strong { color: var(--fxo-crit); }

.fxo-pipe-arrow {
  align-self: center;
  color: var(--fxo-muted);
  font-size: 0.85rem;
}

.fxo-pipe-meta { margin-top: 4px; }

.fxo-top-body .fxo-top-sym {
  font-size: 1.35rem;
  font-weight: 750;
  margin: 0 0 8px;
}

.fxo-top-why {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--fxo-border);
  font-size: 0.86rem;
  color: var(--fxo-muted);
}

.fxo-pump-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.fxo-pump-card {
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
}

.fxo-pump-card.is-pulse {
  animation: fxo-pulse 600ms ease-out;
}

.fxo-pump-card.is-ext {
  border-color: rgba(240, 180, 41, 0.45);
}

.fxo-authority {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.fxo-sniper {
  margin-top: 0;
}

.fxo-sniper-grid {
  margin-top: 4px;
}

.fxo-sniper-grid .fxo-htf-span {
  grid-column: 1 / -1;
}

.fxo-watch-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.fxo-watch-list > div {
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fxo-text);
}

.fxo-cand-label {
  margin: 12px 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fxo-lead-trade {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--fxo-border);
  background: var(--fxo-inset);
}
.fxo-lead-trade__label {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fxo-lead-trade__main {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--fxo-text);
  line-height: 1.3;
}
.fxo-lead-trade__sub {
  margin: 2px 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}
.fxo-lead-trade.is-near {
  border-color: color-mix(in srgb, var(--fxo-ok, #3d9a6a) 55%, var(--fxo-border));
}
.fxo-lead-trade.is-empty {
  opacity: 0.85;
}
.fxo-card--path {
  margin-bottom: 14px;
  border-color: color-mix(in srgb, var(--fxo-ok, #3d9a6a) 35%, var(--fxo-border));
}
.fxo-owner-path {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.fxo-owner-path li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--fxo-muted, #8a93a3);
}
.fxo-owner-path li.is-done {
  color: var(--fxo-ok, #3d9a6a);
  font-weight: 600;
}
.fxo-owner-path li.is-current {
  color: var(--fxo-text);
  font-weight: 700;
}
.fxo-owner-path__mark {
  font-size: 0.75rem;
  opacity: 0.85;
}
.fxo-owner-path li.is-done .fxo-owner-path__mark::before {
  content: none;
}
.fxo-path-next {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 550;
}
.fxo-path-cta {
  margin: 0 0 8px;
}
.fxo-path-note {
  margin: 0;
  font-size: 0.75rem;
}
.fxrm-canary-steps {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fxo-border);
}
.fxrm-actions--canary {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.fxo-research-hint {
  margin: 6px 0 10px;
  font-size: 0.8rem;
}
.fxo-card--live-map.fxo-tech-fold > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
}
.fxo-deep-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.fxo-deep-card {
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.78rem;
}
.fxo-deep-card__top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.fxo-deep-card__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--fxo-muted);
  margin-top: 2px;
}
.fxo-deep-card__row strong {
  color: var(--fxo-text);
  font-weight: 650;
}

.fxo-pump-card__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

.fxo-pump-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  font-size: 0.75rem;
}

.fxo-why-code {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--fxo-why);
}

/* —— Simple Mode (42H) —— */
.fxo-header--simple {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fxo-doing {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--fxo-text);
}
.fxo-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.fxo-top-nav__link {
  color: var(--fxo-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.fxo-top-nav__link.is-active,
.fxo-top-nav__link:hover {
  color: var(--fxo-text);
  border-bottom-color: var(--fxo-accent, #3d8bfd);
}
.fxo-simple-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fxo-controls--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fxo-simple-flow {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.fxo-simple-flow li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--fxo-muted);
}
.fxo-simple-flow li.is-done { color: var(--fxo-ok, #2f9e44); }
.fxo-simple-flow li.is-now {
  color: var(--fxo-text);
  font-weight: 700;
}
.fxo-simple-flow__mark {
  width: 1.25rem;
  text-align: center;
  font-weight: 700;
}
.fxo-simple-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.fxo-glance-card {
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fxo-glance-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.fxo-glance-card p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
}
.fxo-glance-card .btn {
  margin-top: 8px;
  width: 100%;
}
.fxo-cand-card {
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.fxo-watch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.fxo-watch-list > div { display: contents; }
.fxo-cand-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.fxo-cand-card__sym { font-size: 1.05rem; }
.fxo-cand-card__dir {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fxo-cand-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 0.82rem;
}
.fxo-cand-card__grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fxo-cand-card__span { grid-column: 1 / -1; }
.fxo-cand-card__det {
  margin-top: 10px;
}
.fxo-cand-card__det > summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--fxo-card, transparent);
  border: 1px solid var(--fxo-border);
}
.fxo-cand-why { margin: 10px 0; font-size: 0.88rem; }
.fxo-strategy-scan {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px 14px;
  align-items: center;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 8px;
}
.fxo-strategy-scan p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.86rem;
}
.fxo-strategy-scan__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.fxo-strategy-scan__actions .btn {
  min-height: 44px;
  min-width: 120px;
}
.fxo-onboard {
  background: var(--fxo-inset);
  border: 1px dashed var(--fxo-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.fxo-onboard h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.fxo-onboard ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}
@media (max-width: 900px) {
  .fxo-strategy-scan {
    grid-template-columns: 1fr 1fr;
  }
  .fxo-strategy-scan__actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .fxo-strategy-scan__actions .btn {
    flex: 1;
  }
}
.fxo-occ-edit-fold > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 10px 0;
  color: var(--fxo-muted);
}
.fxo-tech-fold > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 8px 0;
}
.fxo-history-card .fxo-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
@media (max-width: 900px) {
  .fxo-simple-glance { grid-template-columns: 1fr; }
  .fxo-watch-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .fxo-header--simple .fxo-title { font-size: 1.6rem; }
  .fxo-simple-status .fxo-pill { font-size: 0.75rem; }
  .fxo-controls--compact .btn,
  .fxo-glance-card .btn,
  .fxo-cand-card__det > summary {
    min-height: 44px;
    padding: 10px 14px;
  }
}

.fxo-why .muted {
  color: var(--fxo-text);
  font-size: 0.95rem;
}

.fxo-brain-perf {
  margin-top: 10px;
}
.fxo-brain-perf summary {
  cursor: pointer;
  color: var(--muted, #8a93a6);
  font-size: 0.85rem;
}

.fxo-freshness {
  margin: 6px 0 0;
  font-size: 0.78rem;
}
.fxo-freshness.is-ok { color: var(--ok, #3d9a6a); }
.fxo-freshness.is-warn { color: var(--warn, #c4922a); }

.fxo-stuck {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.35;
  background: rgba(196, 146, 42, 0.12);
  border: 1px solid rgba(196, 146, 42, 0.35);
}
.fxo-stuck.is-crit {
  background: rgba(180, 60, 60, 0.12);
  border-color: rgba(180, 60, 60, 0.4);
}

.fxo-eq-strat {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fxo-eq-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  font-size: 0.85rem;
  align-items: baseline;
}

.fxo-matrix-wrap {
  margin-top: 8px;
  overflow-x: auto;
}
.fxo-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.fxo-matrix th,
.fxo-matrix td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.fxo-matrix tr.is-neg td {
  color: var(--warn, #c4922a);
}

.fxo-advanced summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.fxo-advanced summary::-webkit-details-marker { display: none; }

.fxo-advanced-inner {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fxo-settings-block h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.fxo-settings-sub {
  margin: 14px 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fxo-muted);
}

.fxo-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fxo-input-row input {
  flex: 1;
  min-width: 0;
}

.fxo-unit {
  font-size: 0.75rem;
  color: var(--fxo-muted);
  white-space: nowrap;
}

.fxo-form-grid label small {
  font-size: 0.68rem;
  line-height: 1.35;
}

.fxo-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.fxo-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--fxo-muted);
}

.fxo-form-grid input,
.fxo-form-grid select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--fxo-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fxo-text);
}

.fxo-check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}

.fxo-pre {
  max-height: 220px;
  overflow: auto;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--fxo-border);
}

.fxo-history {
  font-size: 0.82rem;
}

.fxo-hist-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fxo-border);
}

.fxo-foot {
  margin: 8px 0 0;
  font-size: 0.75rem;
  text-align: center;
}

.fxo-dlg {
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
  background: var(--fxo-card);
  color: var(--fxo-text);
  padding: 0;
  max-width: 420px;
}

.fxo-dlg-inner {
  padding: 18px;
}

.fxo-dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

@keyframes fxo-pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.45); }
  100% { box-shadow: 0 0 0 10px rgba(78, 205, 196, 0); }
}

.fx-flash-up {
  animation: fx-flash-up 450ms ease-out;
}
.fx-flash-down {
  animation: fx-flash-down 450ms ease-out;
}
.fx-flash-once {
  animation: fxo-pulse 550ms ease-out;
}

@keyframes fx-flash-up {
  0% { background-color: rgba(61, 255, 154, 0.28); }
  100% { background-color: transparent; }
}
@keyframes fx-flash-down {
  0% { background-color: rgba(255, 107, 107, 0.28); }
  100% { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-flash-up, .fx-flash-down, .fx-flash-once, .fxo-pump-card.is-pulse {
    animation: none;
  }
}

@media (min-width: 800px) {
  .fxo-header {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .fxo-controls {
    grid-column: 1 / -1;
  }
}

.fxo-card--strategy {
  border-color: rgba(45, 212, 191, 0.35);
}
.fxo-strat-sub {
  margin: 0 0 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}
.fxo-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 8px;
}
.fxo-form-grid .fxo-span-2 {
  grid-column: 1 / -1;
}
/* Legacy compact list styles retired — colorful cards under .fxo-saved-always */
.fxo-strat-card__main,
.fxo-strat-card__meta {
  display: none;
}
.fxo-strat-primary,
.fxo-strat-link {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1.1;
}
.fxo-strat-primary {
  padding: 4px 8px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--fxo-fiona);
  border: 1px solid rgba(45, 212, 191, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
}
.fxo-strat-primary:hover {
  background: rgba(45, 212, 191, 0.2);
}
.fxo-strat-primary:disabled {
  opacity: 0.85;
  cursor: default;
}
.fxo-strat-link {
  padding: 4px 6px;
  color: var(--fxo-muted);
  font-size: 0.7rem;
  font-weight: 600;
}
.fxo-strat-link:hover {
  color: var(--fxo-text);
  background: rgba(255, 255, 255, 0.04);
}
.fxo-strat-link--quiet {
  opacity: 0.65;
}
/* Legacy hide retired — compact OCC reuses .fxo-strat-row (see fxoCompactOcc.css) */
.fxo-strat-more {
  display: none;
}
#fxStratInstruction {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  background: var(--fxo-inset);
  color: var(--fxo-text);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.fxo-occ-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* FIONA OWNER CONTROL CENTER — compact Owner panel */
.fxo-occ-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: var(--fxo-radius);
}
.fxo-occ-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fxo-occ-summary .muted {
  font-size: 0.7rem;
  color: var(--fxo-muted);
}
.fxo-occ-summary strong {
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Canonical MARKET vs EXECUTION readiness (aggregator display) */
.fxo-readiness {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.fxo-readiness .fxo-occ-h {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.fxo-readiness p {
  margin: 4px 0;
  font-size: 0.88rem;
}
.fxo-readiness details {
  margin-top: 8px;
}
.fxo-readiness summary {
  cursor: pointer;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Strategy workflow guide — real state only */
.fxo-flow {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--fxo-border);
  border-radius: var(--fxo-radius);
  background: rgba(0, 0, 0, 0.18);
}
.fxo-flow__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.fxo-flow__head strong {
  font-size: 0.9rem;
  white-space: normal;
}
.fxo-flow__head .muted {
  font-size: 0.72rem;
}
.fxo-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.fxo-flow__steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--fxo-muted);
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.fxo-flow__mark {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}
.fxo-flow__steps li.is-done {
  color: #9af0c8;
}
.fxo-flow__steps li.is-current {
  color: #f0d48a;
  border-color: rgba(245, 193, 74, 0.35);
  background: rgba(245, 193, 74, 0.08);
  font-weight: 650;
}
.fxo-flow__steps li.is-waiting {
  color: var(--fxo-muted);
  opacity: 0.85;
}
.fxo-flow__hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--fxo-muted);
  line-height: 1.4;
}
.fxo-flow__next {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fxo-flow__next .btn {
  font-size: 0.82rem;
}
@media (max-width: 640px) {
  .fxo-flow__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.fxo-occ-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fxo-occ-tabs::-webkit-scrollbar { display: none; }
.fxo-occ-tab {
  appearance: none;
  flex: 1 0 auto;
  min-width: 4.5rem;
  background: var(--fxo-inset);
  color: var(--fxo-text);
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
}
.fxo-occ-tab.is-active {
  border-color: var(--fxo-fiona);
  box-shadow: inset 0 0 0 1px var(--fxo-fiona);
  background: #122028;
  color: var(--fxo-fiona);
}
.fxo-occ-panel[hidden] { display: none !important; }
.fxo-occ-panel-title { margin: 0; font-size: 1.05rem; }
.fxo-occ-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fxo-occ-h {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}
.fxo-occ-block {
  margin: 0 0 16px;
  padding: 14px;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: var(--fxo-radius);
}
.fxo-occ-block--tight {
  padding: 10px 12px;
  margin-bottom: 10px;
}
.fxo-occ-block--tight .fxo-occ-h {
  margin-bottom: 6px;
  font-size: 0.88rem;
}
.fxo-occ-block textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  background: var(--fxo-card);
  color: var(--fxo-text);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  box-sizing: border-box;
}
.fxo-occ-actions { margin-top: 12px; gap: 8px; }
.fxo-form-grid--tight {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.fxo-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fxo-mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--fxo-card);
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
}
.fxo-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fxo-tf-with-badge { gap: 8px; flex-wrap: wrap; }
.fxo-badge--info {
  background: rgba(79, 212, 200, 0.12);
  border-color: rgba(79, 212, 200, 0.35);
  color: var(--fxo-info);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.fxo-badge--ok {
  background: rgba(62, 232, 154, 0.12);
  border-color: rgba(62, 232, 154, 0.35);
  color: var(--fxo-pos);
}
.fxo-badge--warn {
  background: rgba(245, 193, 74, 0.12);
  border-color: rgba(245, 193, 74, 0.35);
  color: var(--fxo-warn);
}
.fxo-tip {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fxo-muted);
  cursor: help;
  font-size: 0.78rem;
  padding: 0 2px;
  line-height: 1;
}
.fxo-muted-row {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--fxo-muted);
}
.fxo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fxo-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--fxo-border);
  background: var(--fxo-card);
  font-size: 0.78rem;
  font-weight: 600;
}
.fxo-risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 12px 0;
  min-width: 0;
}
.fxo-risk-grid > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.fxo-risk-grid > label > span:first-child {
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fxo-risk-grid .fxo-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.fxo-risk-grid input[type="number"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  min-height: 38px;
  box-sizing: border-box;
}
.fxo-risk-saved {
  overflow: visible;
}
.fxo-risk-saved .fxo-strat-sub,
.fxo-risk-saved .fxo-muted-row {
  margin: 6px 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.fxo-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 8px 0 4px;
  align-items: flex-start;
}
.fxo-toggle-row .fxo-check {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.fxo-dry-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.fxo-dry-card,
.fxo-status-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
}
.fxo-dry-card strong,
.fxo-status-card strong { font-size: 1.05rem; }
.fxo-status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.fxo-occ-details {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  background: var(--fxo-inset);
}
.fxo-occ-details > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--fxo-muted);
  list-style: none;
}
.fxo-occ-details > summary::-webkit-details-marker { display: none; }
.fxo-occ-details[open] > summary { margin-bottom: 10px; color: var(--fxo-text); }
.fxo-adv-grid {
  display: grid;
  gap: 12px;
}
.fxo-strat-more {
  position: relative;
}
.fxo-strat-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  background: var(--fxo-inset);
  font-size: 0.85rem;
  font-weight: 700;
}
.fxo-strat-more > summary::-webkit-details-marker { display: none; }
.fxo-strat-more[open] > .fxo-strat-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  min-width: 120px;
  padding: 6px;
  background: var(--fxo-card);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.fxo-strat-more:not([open]) > .fxo-strat-menu { display: none; }
.fxo-strat-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fxo-text);
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.fxo-strat-menu button:hover { background: var(--fxo-inset); }
.fxo-occ-info { color: var(--fxo-info); }

@media (max-width: 720px) {
  .fxo-occ-summary { grid-template-columns: 1fr 1fr; }
  .fxo-mini-grid,
  .fxo-risk-grid,
  .fxo-dry-cards { grid-template-columns: 1fr; }
  .fxo-mini-grid--color { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fxo-wrap { padding: 12px 12px 40px; }
  .fxo-pipe-arrow { display: none; }
  .fxo-hist-row { grid-template-columns: 1fr 1fr; }
  .fxo-pos-card__pnl { margin-left: 0; width: 100%; }
}


/* 42H live status visual signal */
.fxo-doing--live {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fxo-doing--live.is-fading { opacity: 0.35; transform: translateY(2px); }
.fxo-doing--live.is-fading-in { opacity: 1; transform: translateY(0); }
.fxo-doing__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #94a3b8;
}
.fxo-doing__dot.is-active {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
  animation: fxo-dot-pulse 1.6s ease-in-out infinite;
}
.fxo-doing__dot.is-wait {
  background: #f5c14a;
  box-shadow: 0 0 0 4px rgba(245, 193, 74, 0.18);
  animation: fxo-dot-pulse 1.8s ease-in-out infinite;
}
.fxo-doing__dot.is-ready {
  background: #3ee89a;
  box-shadow: 0 0 0 4px rgba(62, 232, 154, 0.16);
}
.fxo-doing__dot.is-error {
  background: #ff7b7b;
  box-shadow: 0 0 0 4px rgba(255, 123, 123, 0.18);
}
.fxo-doing__dot.is-idle {
  background: #94a3b8;
}
.fxo-doing__act { font-weight: 500; color: var(--fxo-text, #f3f6fa); }
.fxo-doing__sym {
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--fxo-text, #f3f6fa);
}
.fxo-doing__sep { color: var(--fxo-muted, #b4becc); }
.fxo-doing__life { font-weight: 650; color: var(--fxo-muted, #b4becc); }
.fxo-doing__life.is-ready { color: #7dffc0; }
.fxo-doing__life.is-wait { color: #f5c14a; }
.fxo-doing__life.is-error { color: #ffb0b6; }
.fxo-doing--live.is-sym-flash .fxo-doing__sym {
  animation: fxo-sym-flash 0.65s ease-out 1;
}
.fxo-doing--live.is-life-flash .fxo-doing__life {
  animation: fxo-life-flash 0.75s ease-out 1;
}
@keyframes fxo-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes fxo-sym-flash {
  0% { text-shadow: 0 0 0 transparent; }
  35% { text-shadow: 0 0 12px rgba(56, 189, 248, 0.55); }
  100% { text-shadow: 0 0 0 transparent; }
}
@keyframes fxo-life-flash {
  0% { box-shadow: none; }
  40% { box-shadow: 0 0 0 4px rgba(62, 232, 154, 0.22); border-radius: 4px; }
  100% { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fxo-doing__dot.is-active,
  .fxo-doing__dot.is-wait,
  .fxa-chip.is-busy .fxa-dot {
    animation: none !important;
  }
  .fxo-doing--live.is-sym-flash .fxo-doing__sym,
  .fxo-doing--live.is-life-flash .fxo-doing__life {
    animation: none !important;
  }
}

body.fx-owner-app #fxKillBtn,
body.fx-owner-app .fxo-kill {
  background: rgba(255, 77, 92, 0.14);
  border: 1px solid rgba(255, 77, 92, 0.55);
  color: #ff8f98;
  font-weight: 800;
  letter-spacing: 0.04em;
  min-height: 40px;
  padding-inline: 14px;
}
body.fx-owner-app #fxKillBtn:hover,
body.fx-owner-app .fxo-kill:hover,
body.fx-owner-app #fxKillBtn:focus-visible {
  background: rgba(255, 77, 92, 0.24);
  border-color: rgba(255, 77, 92, 0.75);
  color: #ffc0c5;
}
body.fx-owner-app #fxKillBtn:active {
  transform: translateY(1px);
  background: rgba(255, 77, 92, 0.32);
}
@media (max-width: 640px) {
  body.fx-owner-app #fxKillBtn {
    min-height: 44px;
    margin-top: 4px;
  }
}


/* 42H mobile compaction + status strip */
.fxo-onboard--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.fxo-onboard--compact h2 { display: none; }
.fxo-onboard__line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 0.85rem;
  flex: 1 1 auto;
}
.fxo-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.fxo-pill--acct.is-wait {
  background: rgba(245, 193, 74, 0.14);
  border-color: rgba(245, 193, 74, 0.45);
  color: #f0d48a;
}
.fxo-pill--acct.is-ok {
  background: rgba(62, 232, 154, 0.14);
  border-color: rgba(62, 232, 154, 0.4);
  color: #7dffc0;
}
.fxo-pill--acct.is-crit {
  background: rgba(255, 77, 92, 0.16);
  border-color: rgba(255, 77, 92, 0.5);
  color: #ffb0b6;
}
.fxo-strategy-scan--compact {
  gap: 6px 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.fxo-strategy-scan--compact p {
  margin: 0;
  font-size: 0.82rem;
}
@media (max-width: 720px) {
  .fxo-header--simple {
    gap: 8px;
  }
  .fxo-header--simple .fxo-title {
    font-size: 1.35rem;
    margin: 0;
  }
  .fxo-header--simple .fxo-kicker {
    margin: 0;
    font-size: 0.7rem;
  }
  .fxo-doing--live {
    font-size: 0.82rem;
    margin: 2px 0 0;
  }
  .fxo-top-nav {
    gap: 4px;
    margin: 4px 0;
  }
  .fxo-top-nav__link {
    padding: 6px 8px;
    font-size: 0.78rem;
  }
  .fxo-strategy-scan--compact {
    grid-template-columns: 1fr 1fr;
    padding: 8px 10px;
  }
  /* Mode + Live Auto already in status strip — hide duplicates on small screens */
  .fxo-strategy-scan--compact > p:nth-child(3),
  .fxo-strategy-scan--compact > p:nth-child(4) {
    display: none;
  }
  .fxo-strategy-scan__actions {
    margin-top: 4px;
  }
  .fxo-strategy-scan__actions .btn {
    min-height: 40px;
    min-width: 0;
    padding: 8px 12px;
  }
  .fxo-status-strip .fxo-pill--secondary {
    display: none;
  }
  .fxo-controls--compact {
    gap: 6px;
  }
  .fxo-env-select {
    font-size: 0.8rem;
  }
  /* Keep Fiona step flow visible on phone — compact 2-col, not hidden */
  .fxo-simple-hero .fxo-simple-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin: 8px 0 12px;
  }
  .fxo-simple-hero .fxo-simple-flow li {
    font-size: 0.8rem;
    gap: 6px;
  }
  .fxo-simple-hero .fxo-simple-flow__mark {
    width: 1rem;
    font-size: 0.78rem;
  }
  .fxo-card--fiona .fxo-phase,
  .fxo-card--fiona .fxo-phase-sub {
    font-size: 0.95rem;
  }
  .fxo-why {
    padding: 10px 12px;
  }
  .fxo-why .fxo-why-code {
    font-size: 0.85rem;
  }
}

/* —— Compact Owner toolbar / smaller controls —— */
.fxo-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.fxo-brand--compact { gap: 2px; }
.fxo-brand--compact .fxo-title { margin: 0; font-size: 1.35rem; }
.fxo-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  background: var(--fxo-inset);
  margin: 2px 0 6px;
}
.fxo-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  font-size: 0.82rem;
}
.fxo-toolbar__sep { color: var(--fxo-muted); }
.fxo-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fxo-toolbar__actions .btn {
  flex: 1 1 auto;
  min-height: 36px;
  min-width: 0;
  padding: 6px 10px;
  font-size: 0.84rem;
}
.fxo-toolbar__hint {
  margin: 0;
  font-size: 0.75rem;
}
.fxo-status-strip--slim {
  gap: 6px;
}
.fxo-status-strip--slim .fxa-chip--slim,
.fxo-status-strip--slim .fxo-pill {
  font-size: 0.72rem;
  padding: 3px 8px;
  min-height: 0;
}
.fxo-controls--slim {
  gap: 6px;
  align-items: center;
}
.fxo-controls--slim .btn {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.82rem;
}
.fxo-env-select--slim select {
  min-height: 36px;
  font-size: 0.82rem;
  padding: 4px 8px;
  max-width: 11rem;
}
body.fx-owner-app .fxo-controls--slim #fxKillBtn {
  min-height: 36px;
  margin-top: 0;
  flex: 0 0 auto;
}
.fxo-freshness {
  font-size: 0.72rem;
  margin: 2px 0 0;
}
@media (max-width: 720px) {
  .fxo-header--simple { gap: 6px; }
  .fxo-toolbar { padding: 8px; }
  .fxo-toolbar__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .fxo-toolbar__actions .btn { width: 100%; flex: none; }
  .fxo-controls--slim {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .fxo-controls--slim .fxo-env-select--slim {
    flex: 1 1 100%;
  }
  .fxo-controls--slim .fxo-env-select--slim select { max-width: none; width: 100%; }
}

/* —— Strategy UI polish: scan bar · colorful saved cards · dense setup —— */
.fxo-scanbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 10px 12px;
  margin: 2px 0 8px;
  border-radius: 12px;
  border: 1px solid var(--fxo-border);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent 55%),
    var(--fxo-inset);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}
.fxo-scanbar[data-scan-state="loading"] {
  border-color: rgba(154, 163, 178, 0.35);
  opacity: 0.92;
}
.fxo-scanbar[data-scan-state="idle"] {
  border-color: rgba(245, 193, 74, 0.45);
  background:
    linear-gradient(135deg, rgba(245, 193, 74, 0.12), transparent 60%),
    var(--fxo-inset);
}
.fxo-scanbar[data-scan-state="ready"] {
  border-color: rgba(79, 212, 200, 0.45);
  background:
    linear-gradient(135deg, rgba(79, 212, 200, 0.14), transparent 60%),
    var(--fxo-inset);
}
.fxo-scanbar[data-scan-state="scanning"] {
  border-color: rgba(62, 232, 154, 0.55);
  box-shadow: 0 0 0 1px rgba(62, 232, 154, 0.18);
  background:
    linear-gradient(135deg, rgba(62, 232, 154, 0.16), transparent 55%),
    var(--fxo-inset);
}
.fxo-scanbar__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.fxo-scanbar__pulse {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--fxo-muted);
  box-shadow: 0 0 0 0 rgba(180, 190, 204, 0.4);
}
.fxo-scanbar[data-scan-state="idle"] .fxo-scanbar__pulse {
  background: var(--fxo-warn);
}
.fxo-scanbar[data-scan-state="ready"] .fxo-scanbar__pulse {
  background: var(--fxo-info);
}
.fxo-scanbar[data-scan-state="scanning"] .fxo-scanbar__pulse {
  background: var(--fxo-pos);
  animation: fxo-scan-pulse 1.4s ease-out infinite;
}
.fxo-scanbar[data-scan-state="loading"] .fxo-scanbar__pulse {
  background: #9aa3b2;
}
@keyframes fxo-scan-pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 232, 154, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(62, 232, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 232, 154, 0); }
}
.fxo-scanbar__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.fxo-scanbar__state {
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--fxo-text);
  line-height: 1.25;
}
.fxo-scanbar[data-scan-state="scanning"] .fxo-scanbar__state { color: #7dffc0; }
.fxo-scanbar[data-scan-state="ready"] .fxo-scanbar__state { color: #7ee8df; }
.fxo-scanbar[data-scan-state="idle"] .fxo-scanbar__state { color: #f0d48a; }
.fxo-scanbar__strat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 0.78rem;
  color: var(--fxo-muted);
  min-width: 0;
}
.fxo-scanbar__strat strong {
  color: var(--fxo-text);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 28rem);
}
.fxo-scanbar__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.fxo-scanbar__actions .btn {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
}
.fxo-btn--scan-start {
  background: linear-gradient(180deg, #3ee89a, #22c57a) !important;
  border-color: rgba(62, 232, 154, 0.65) !important;
  color: #04150e !important;
}
.fxo-btn--scan-stop {
  background: linear-gradient(180deg, #ff8a8a, #f25563) !important;
  border-color: rgba(255, 77, 92, 0.65) !important;
  color: #1a0507 !important;
}
.fxo-btn--create {
  background: linear-gradient(180deg, #5ce0d4, #2dd4bf) !important;
  border-color: rgba(45, 212, 191, 0.6) !important;
  color: #04201c !important;
}
.fxo-btn--pick {
  border-color: rgba(125, 211, 252, 0.45) !important;
  color: #9ad8f8 !important;
}
.fxo-scanbar__hint {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
}
.fxo-auto-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.fxo-auto-block #fxAutoToggle {
  width: 100%;
  min-height: 40px;
}
.fxo-auto-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
}
/* Legacy direction radios — select is the sole control; must take zero space */
#fxOwnerControlCenter #fxStratDirRow[hidden] {
  display: none !important;
}
/* Do not mask overflow here — horizontal issues must wrap/size correctly */
.fxo-wrap {
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 641px) {
  .fxo-scanbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    align-items: center;
  }
  .fxo-scanbar__actions { width: auto; }
  .fxo-scanbar__hint { grid-column: 1 / -1; }
  .fxo-auto-block { flex: 0 1 180px; }
}
@media (max-width: 640px) {
  .fxo-controls--slim { flex-wrap: wrap; }
  .fxo-env-select--slim { flex: 1 1 100%; order: 1; }
  .fxo-auto-block { flex: 1 1 100%; order: 2; }
  .fxo-kill { order: 3; width: 100%; }
}

/* Dense strategy + market setup */
.fxo-form-grid--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.fxo-form-grid--dense label {
  gap: 3px;
  font-size: 0.78rem;
}
.fxo-form-grid--dense input,
.fxo-form-grid--dense select {
  padding: 7px 9px;
  font-size: 0.88rem;
  min-height: 36px;
}
.fxo-strat-setup {
  margin-bottom: 10px;
}
.fxo-mini-grid--color {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fxo-mini-card {
  padding: 10px;
  gap: 6px;
}
.fxo-mini-card--pump {
  border-color: rgba(62, 232, 154, 0.4);
  background: linear-gradient(180deg, rgba(62, 232, 154, 0.1), var(--fxo-card));
}
.fxo-mini-card--pump strong { color: #7dffc0; }
.fxo-mini-card--dump {
  border-color: rgba(255, 123, 123, 0.4);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.1), var(--fxo-card));
}
.fxo-mini-card--dump strong { color: #ffb0b6; }
.fxo-mini-card--long {
  border-color: rgba(125, 211, 252, 0.4);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.1), var(--fxo-card));
}
.fxo-mini-card--long > strong { color: #9ad8f8; }
.fxo-mini-card--short {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), var(--fxo-card));
}
.fxo-mini-card--short > strong { color: #fcd34d; }
.fxo-occ-details--filters {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px dashed var(--fxo-border);
  border-radius: 10px;
  background: rgba(13, 19, 26, 0.5);
}
.fxo-occ-details--filters > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--fxo-muted);
}
.fxo-occ-details--filters[open] > summary {
  margin-bottom: 8px;
  color: var(--fxo-text);
}

/* Compact glance strip */
.fxo-simple-glance {
  gap: 8px;
  margin: 8px 0 12px;
}
.fxo-glance-card {
  padding: 10px 12px;
  gap: 4px;
}
.fxo-glance-card h3 { font-size: 0.88rem; }
.fxo-glance-card p { font-size: 0.8rem; }
.fxo-glance-card .btn {
  margin-top: 6px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
}
@media (max-width: 820px) {
  .fxo-simple-glance {
    grid-template-columns: 1fr;
  }
}

/* Saved strategy cards — natural height (list max-height must NOT shrink children) */
.fxo-saved-always {
  position: relative;
  z-index: 1;
  margin: 8px 0 12px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.06), transparent 40%),
    var(--fxo-inset);
}
.fxo-saved-always.fxo-occ-block {
  padding: 10px 12px 12px;
}
.fxo-saved-always__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.fxo-saved-always__head .fxo-occ-h { margin: 0; }
.fxo-saved-always__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
}
.fxo-saved-always .fxo-strat-list,
.fxo-strat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-x: auto;
  overflow-y: auto;
  padding: 2px 0;
  margin: 0;
  min-width: 0;
  /* critical: allow children to keep natural height and scroll the list */
  align-items: stretch;
}
.fxo-strat-empty {
  margin: 0;
  padding: 10px 4px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--fxo-muted);
}
.fxo-saved-always .fxo-strat-card,
.fxo-strat-card {
  /* ROOT FIX: default flex-shrink:1 inside max-height list collapsed cards to ~29px */
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  height: auto;
  min-height: min-content;
  max-height: none;
  background: var(--fxo-card);
  border: 1px solid var(--fxo-border);
  border-radius: 10px;
  overflow: visible;
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.fxo-strat-card__rail {
  flex: 0 0 4px;
  width: 4px;
  align-self: stretch;
  border-radius: 10px 0 0 10px;
  background: var(--fxo-info);
}
.fxo-strat-card.is-long .fxo-strat-card__rail { background: var(--fxo-long); }
.fxo-strat-card.is-short .fxo-strat-card__rail { background: var(--fxo-short); }
.fxo-strat-card.is-auto .fxo-strat-card__rail { background: var(--fxo-fiona); }
.fxo-strat-card.is-active {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.2);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.1), var(--fxo-card) 28%);
}
.fxo-strat-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
  height: auto;
  max-height: none;
  box-sizing: border-box;
}
.fxo-strat-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
}
.fxo-strat-card__name {
  margin: 0;
  flex: 1 1 8rem;
  min-width: 0;
  max-width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--fxo-text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fxo-strat-card__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.fxo-dir-pill,
.fxo-ver-pill,
.fxo-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-sizing: border-box;
}
.fxo-dir-pill--long {
  color: #7dffc0;
  background: rgba(62, 232, 154, 0.14);
  border-color: rgba(62, 232, 154, 0.35);
}
.fxo-dir-pill--short {
  color: #ffb0b6;
  background: rgba(255, 123, 123, 0.14);
  border-color: rgba(255, 123, 123, 0.35);
}
.fxo-dir-pill--auto {
  color: #7ee8df;
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.35);
}
.fxo-ver-pill {
  color: var(--fxo-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--fxo-border);
  text-transform: none;
}
.fxo-live-pill {
  color: #04150e;
  background: var(--fxo-pos);
  border-color: rgba(62, 232, 154, 0.7);
}
.fxo-strat-card__hunt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.fxo-hunt-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
  border: 1px solid transparent;
}
.fxo-hunt-chip--pump {
  color: #7dffc0;
  background: rgba(62, 232, 154, 0.12);
  border-color: rgba(62, 232, 154, 0.28);
}
.fxo-hunt-chip--dump {
  color: #ffb0b6;
  background: rgba(255, 123, 123, 0.12);
  border-color: rgba(255, 123, 123, 0.28);
}
.fxo-hunt-chip--tf,
.fxo-hunt-chip--uni {
  color: #c5d0e0;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--fxo-border);
}
.fxo-hunt-chip--long {
  color: #9ad8f8;
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.28);
}
.fxo-hunt-chip--short {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}
.fxo-strat-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.fxo-saved-always .fxo-strat-primary,
.fxo-saved-always .fxo-strat-link {
  flex: 0 0 auto;
  min-height: 34px;
  height: auto;
  padding: 6px 11px;
  font-size: 0.78rem;
  border-radius: 8px;
  border: 1px solid var(--fxo-border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.3;
  box-sizing: border-box;
}
.fxo-saved-always .fxo-strat-primary {
  background: linear-gradient(180deg, rgba(255, 160, 80, 0.28), rgba(255, 120, 40, 0.18));
  border-color: rgba(255, 140, 66, 0.6);
  color: #ffd2a8;
  font-weight: 750;
}
.fxo-saved-always .fxo-strat-primary:disabled {
  opacity: 0.55;
  cursor: default;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
  color: var(--fxo-fiona);
}
.fxo-saved-always .fxo-strat-link--quiet {
  opacity: 0.75;
  font-weight: 500;
}
@media (max-width: 640px) {
  .fxo-mini-grid--color {
    grid-template-columns: 1fr 1fr;
  }
  .fxo-form-grid--dense {
    grid-template-columns: 1fr;
  }
  .fxo-form-grid--dense .fxo-span-2 {
    grid-column: auto;
  }
  /* Simple vertical saved-strategy card on mobile */
  .fxo-saved-always .fxo-strat-card {
    flex-direction: column;
  }
  .fxo-saved-always .fxo-strat-card__rail {
    width: 100%;
    height: 3px;
    flex: 0 0 3px;
    border-radius: 10px 10px 0 0;
  }
  .fxo-saved-always .fxo-strat-card__body {
    padding: 10px 12px 12px;
  }
  .fxo-saved-always .fxo-strat-card__actions {
    width: 100%;
  }
  .fxo-saved-always .fxo-strat-primary,
  .fxo-saved-always .fxo-strat-link {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Rate-limit governor chip — backend sheds; UI informs only */
.fxo-rl-chip {
  margin: 4px 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  border: 1px solid var(--fxo-border);
  background: var(--fxo-inset);
}
.fxo-rl-chip.is-caution {
  color: #f0d48a;
  border-color: rgba(245, 193, 74, 0.45);
  background: rgba(245, 193, 74, 0.12);
}
.fxo-rl-chip.is-throttle,
.fxo-rl-chip.is-cooldown {
  color: #f0d48a;
  border-color: rgba(245, 193, 74, 0.55);
  background: rgba(245, 193, 74, 0.16);
}
.fxo-rl-chip.is-hard {
  color: #ffb0b6;
  border-color: rgba(255, 77, 92, 0.55);
  background: rgba(255, 77, 92, 0.16);
}

/* Site Guardian — compact secondary chip */
.fxo-guardian-chip {
  margin: 2px 0 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--fxo-muted, #9aa3b2);
}
.fxo-guardian-chip.is-recovering,
.fxo-guardian-chip.is-degraded {
  color: #f0d48a;
  border-color: rgba(245, 193, 74, 0.35);
}
.fxo-guardian-chip.is-critical {
  color: #ffb0b6;
  border-color: rgba(255, 77, 92, 0.5);
  font-weight: 700;
}

/* Binance pressure banner — color by severity */
.fxo-ban-banner {
  display: block;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 193, 74, 0.45);
  background: rgba(245, 193, 74, 0.12);
  color: #f5e6b8;
}
.fxo-ban-banner[hidden] {
  display: none !important;
}
.fxo-ban-banner__head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  margin-bottom: 4px;
}
.fxo-ban-banner__head strong {
  font-size: 0.92rem;
  font-weight: 750;
}
.fxo-ban-banner__until {
  font-size: 0.78rem;
  opacity: 0.9;
}
.fxo-ban-banner__body {
  margin: 0 0 6px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.fxo-ban-banner__do {
  margin: 0 0 8px;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.fxo-ban-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* CAUTION / quiet — amber */
.fxo-ban-banner[data-level='quiet'] {
  color: #f0d48a;
  border-color: rgba(245, 193, 74, 0.45);
  background: rgba(245, 193, 74, 0.12);
}

/* 429 throttle — strong amber / orange */
.fxo-ban-banner[data-level='throttle'] {
  color: #ffd089;
  border-color: rgba(255, 160, 40, 0.65);
  background: rgba(255, 140, 0, 0.18);
}

/* Account REST hold — orange-red */
.fxo-ban-banner[data-level='hold'] {
  color: #ffc4a8;
  border-color: rgba(255, 110, 70, 0.7);
  background: rgba(220, 70, 40, 0.22);
}

/* 418 ban — critical red */
.fxo-ban-banner[data-level='ban'] {
  color: #ffc0c6;
  border-color: rgba(255, 70, 90, 0.85);
  background: rgba(180, 20, 40, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 60, 80, 0.25);
}
.fxo-ban-banner[data-level='ban'] .fxo-ban-banner__head strong {
  color: #fff0f2;
}

/* Fiona Bot Decision (#fxLimBrain) — top placement after Path; same component, layout only */
.fxo-card--fiona-decision {
  padding: 12px 14px;
  border-left: 3px solid var(--fxo-fiona, #8b7cf7);
}
.fxo-card--fiona-decision:not(:has(#fxLimBrain:not([hidden]))) {
  display: none;
}
.fxo-card--fiona-decision .fxlim-brain {
  margin: 0;
}
.fxo-card--fiona-decision .fxlim-brain-head {
  margin: 0 0 8px;
}
.fxo-card--fiona-decision .fxlim-brain h4 {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.fxo-card--fiona-decision .fxlim-brain-sym {
  font-size: 1.1rem;
}
.fxo-card--fiona-decision .fxlim-scores {
  margin: 0 0 6px;
}
@media (max-width: 640px) {
  .fxo-card--fiona-decision {
    padding: 10px 12px;
  }
  .fxo-card--fiona-decision .fxlim-decision {
    font-size: 0.9rem;
  }
  .fxo-card--fiona-decision .fxlim-reason {
    font-size: 0.75rem;
    margin: 0;
  }
}
