:root {
  --bg-0: #0b1220;
  --bg-1: #121d33;
  --bg-2: rgba(20, 30, 52, 0.75);
  --card: rgba(15, 24, 43, 0.84);
  --line: rgba(138, 160, 219, 0.22);
  --text: #edf3ff;
  --muted: #a7b6dd;
  --buy: #3ac19d;
  --sell: #f36f8d;
  --accent: #4d8df2;
  --accent-strong: #316fda;
  --warning: #ffaf59;
  --danger: #ff7488;
  --success: #5dd49c;
  --shadow: 0 14px 34px rgba(5, 10, 24, 0.34);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  /* Reserve the scrollbar gutter at all times so pages whose content height
     changes (loading, dropdowns, modals, async content) never shift
     horizontally when the vertical scrollbar appears or disappears. */
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  width: 100%;
}

/* Media never overflows its container or stretches the layout on resize.
   Canvases/iframes are intentionally excluded — they are sized by their own
   JS (Classic Lab, WebGL backdrops) and must not be clamped here. */
img,
svg,
video {
  max-width: 100%;
}

img {
  height: auto;
}

body {
  min-height: 100vh;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(68, 127, 231, 0.16), transparent 40%),
    radial-gradient(circle at 88% 6%, rgba(47, 155, 172, 0.11), transparent 36%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 58%, #0a1120 100%);
  padding: 22px 0 34px;
}

body::selection {
  background: rgba(93, 118, 255, 0.34);
}

body[data-mode='paper'] {
  --line: rgba(124, 147, 212, 0.28);
}

body[data-mode='live'] {
  --line: rgba(73, 168, 255, 0.33);
}

body[data-mode='backtest'] {
  --line: rgba(93, 197, 173, 0.32);
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(114, 154, 245, 0.05),
      rgba(114, 154, 245, 0.05) 4px,
      transparent 4px,
      transparent 12px
    );
  mix-blend-mode: screen;
}

#galaxy-topo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

body:has(#galaxy-topo) {
  background:
    radial-gradient(circle at 50% 42%, rgba(20, 30, 64, 0.55), transparent 55%),
    radial-gradient(circle at 12% 8%, rgba(68, 127, 231, 0.12), transparent 42%),
    linear-gradient(160deg, #050912, #070d1d 55%, #04070f 100%);
}

body:has(#galaxy-topo) .aurora {
  opacity: 0.09;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(10, 17, 32, 0.74);
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow);
}

.brand-block {
  min-width: 240px;
}

.brand {
  margin: 0;
  font-family: 'Syne', 'Space Grotesk', sans-serif;
  font-size: 24px;
  letter-spacing: 0.8px;
}

.brand-tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.infra-stack {
  margin: 7px 0 0;
  color: #d2dcff;
  font-size: 11px;
  letter-spacing: 0.02em;
  max-width: 100%;
  white-space: normal;
}

.badge {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(10, 16, 31, 0.46);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.compliance-banner {
  margin-top: 12px;
  border: 1px solid rgba(255, 175, 89, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(100deg, rgba(66, 43, 16, 0.72), rgba(53, 36, 15, 0.52));
  box-shadow: var(--shadow);
}

.compliance-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe4b7;
  font-weight: 700;
}

.compliance-copy {
  margin: 6px 0 0;
  font-size: 12px;
  color: #ffeed5;
  line-height: 1.35;
  max-width: 100%;
}

.system-health {
  display: none;
  gap: 6px;
  align-content: start;
}

.maintenance-banner {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 175, 89, 0.45);
  background: linear-gradient(100deg, rgba(78, 51, 16, 0.72), rgba(72, 39, 16, 0.52));
  color: #ffefd1;
  font-size: 12px;
  display: none;
  line-height: 1.35;
}

.maintenance-banner.is-open {
  display: block;
  animation: fadeIn 0.25s ease;
}

body.admin-mode .system-health {
  display: grid;
}

.system-health .status-pill {
  margin: 0;
}

.system-health .small-note {
  margin: 0;
}

.health-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 25;
  max-width: min(360px, 70vw);
  background: rgba(17, 26, 48, 0.95);
  border: 1px solid rgba(255, 116, 136, 0.45);
  color: #ffd0d7;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.3;
  display: none;
}

.health-toast.is-visible {
  display: block;
  animation: toastIn 0.22s ease;
}

.health-toast strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
  color: #ffb0c2;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ghost-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(8, 14, 29, 0.62);
  border-radius: 11px;
  padding: 8px 13px;
  font: inherit;
  text-decoration: none;
  font-size: 13px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.ghost-btn:hover {
  border-color: rgba(77, 141, 242, 0.62);
  background: rgba(21, 34, 61, 0.92);
  transform: translateY(-1px);
}

.ghost-btn--compact {
  padding: 7px 11px;
}

.churn-window-btn.active {
  border-color: rgba(77, 141, 242, 0.85);
  background: rgba(21, 34, 61, 0.92);
  color: #7ff0e2;
}

.hero,
.panel,
.panel-grid > .panel,
.grid-two > .panel,
.grid-three > .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow);
}

.hero {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  animation: fadeIn 0.45s ease;
}

.hero > div:first-child {
  min-width: 280px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.08;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.topology-feature {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  align-items: end;
  border: 1px solid rgba(93, 212, 198, 0.26);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(120deg, rgba(15, 24, 43, 0.92), rgba(9, 17, 31, 0.82)),
    linear-gradient(90deg, rgba(93, 212, 198, 0.12), rgba(255, 175, 89, 0.08));
  box-shadow: var(--shadow);
}

.section-kicker {
  margin: 0 0 8px;
  color: #83eee7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topology-feature h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.04;
}

.topology-feature p:not(.section-kicker) {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

.topology-feature__actions {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(131, 238, 231, 0.42);
  border-radius: 11px;
  padding: 9px 14px;
  color: #041214;
  background: #83eee7;
  font-weight: 800;
  text-decoration: none;
}

.topology-feature__actions span {
  color: var(--muted);
  font-size: 12px;
}

.rails-feature {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid rgba(255, 211, 105, 0.24);
  border-radius: var(--radius);
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(18, 27, 45, 0.94), rgba(9, 16, 29, 0.86)),
    linear-gradient(90deg, rgba(255, 211, 105, 0.12), rgba(93, 197, 173, 0.08));
  box-shadow: var(--shadow);
}

.rails-feature h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.06;
}

.rails-feature p:not(.section-kicker) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.48;
}

.rails-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rails-grid article {
  border: 1px solid rgba(124, 147, 212, 0.24);
  border-radius: 12px;
  padding: 12px;
  background: rgba(6, 11, 24, 0.58);
}

.rails-grid h3 {
  margin: 0;
  font-size: 24px;
  color: #ffe5a1;
}

.rails-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.arb-model {
  display: grid;
  gap: 14px;
}

.quote-request-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-request-form__wide,
.quote-request-form button {
  grid-column: 1 / -1;
}

.hidden-field {
  display: none;
}

.arb-inputs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quote-intake-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.desk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.desk-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 14, 29, 0.5);
}

.desk-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.desk-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.arb-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.arb-summary article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(8, 14, 29, 0.5);
}

.arb-projection {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(8, 14, 29, 0.62), rgba(8, 14, 29, 0.42));
}

.arb-projection__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.arb-projection__head h3 {
  margin: 0;
  font-size: 1rem;
}

.arb-projection__tag {
  font-size: 0.72rem;
  color: var(--muted);
}

.arb-projection__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.arb-projection__card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(8, 14, 29, 0.5);
}

.arb-projection__card span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.arb-projection__card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: #d7e3ff;
}

/* Subtle "flowing" shimmer so the projected figures read as live. */
.arb-projection__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(77, 141, 242, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: arbFlow 3.4s ease-in-out infinite;
  pointer-events: none;
}

.arb-projection__card--captured {
  border-color: rgba(93, 197, 173, 0.4);
  background: rgba(10, 24, 22, 0.5);
}

.arb-projection__card--captured strong {
  color: #8ff0d4;
}

.arb-projection__card--captured small {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
}

@keyframes arbFlow {
  0% {
    transform: translateX(-100%);
  }
  60%,
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arb-projection__card::after {
    animation: none;
  }
}

.arb-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.arb-summary strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

.arb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.arb-table {
  min-width: 760px;
}

.arb-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.arb-pill--go {
  color: #062115;
  background: var(--success);
}

.arb-pill--hold {
  color: #261702;
  background: var(--warning);
}

.arb-pill--pass {
  color: #ffe0e5;
  background: rgba(255, 116, 136, 0.28);
}

.game-gate {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-gate article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 14, 29, 0.5);
}

.game-gate span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-gate strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.game-gate p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 170px));
  gap: 10px;
  align-content: start;
}

.kpis article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(17, 24, 47, 0.6), rgba(10, 15, 29, 0.66));
}

.kpis h2 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpis p {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

#balance {
  font-size: 19px;
  color: #dbe5ff;
}

.panel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.grid-two {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 14px;
}

.grid-three {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.75fr 0.85fr;
  gap: 14px;
}

.panel {
  animation: fadeIn 0.45s ease;
}

.panel-head h2 {
  margin: 0;
  font-size: 21px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.subtle {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.status-pill {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(124, 147, 212, 0.28);
  background: rgba(9, 18, 35, 0.58);
  color: #d5ddff;
  font-size: 12px;
}

.status-pill--ok {
  border-color: rgba(93, 197, 173, 0.5);
  color: #ccf4df;
  background: rgba(13, 46, 34, 0.32);
}

.status-pill--warn {
  border-color: rgba(255, 175, 89, 0.42);
  color: #ffe9cc;
  background: rgba(52, 35, 12, 0.4);
}

.status-pill--error {
  border-color: rgba(243, 110, 141, 0.42);
  color: #ffd0d7;
  background: rgba(65, 16, 26, 0.43);
}

.auto-run {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 150, 220, 0.22);
  border-radius: 10px;
  background: rgba(14, 22, 44, 0.4);
}

.auto-run__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.auto-run__toggle input {
  width: auto;
  margin: 0;
}

.auto-run__cap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #cdd7f0;
}

.auto-run__cap input {
  width: 72px;
  margin: 0;
}

.auto-run__status {
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid rgba(120, 150, 220, 0.22);
  color: #cdd7f0;
  background: rgba(8, 14, 30, 0.4);
}

.auto-run__status--ok {
  border-color: rgba(93, 197, 173, 0.5);
  color: #ccf4df;
  background: rgba(13, 46, 34, 0.32);
}

.auto-run__status--warn {
  border-color: rgba(255, 175, 89, 0.42);
  color: #ffe9cc;
  background: rgba(52, 35, 12, 0.4);
}

.auto-run__status--error {
  border-color: rgba(243, 110, 141, 0.42);
  color: #ffd0d7;
  background: rgba(65, 16, 26, 0.43);
}

.auto-basket {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(120, 150, 220, 0.22);
  background: rgba(8, 14, 30, 0.4);
}

.auto-basket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cdd7f0;
}

.auto-basket__count {
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(120, 150, 220, 0.3);
  background: rgba(14, 22, 44, 0.6);
  color: #e7eeff;
}

.auto-basket__count.is-full {
  border-color: rgba(255, 175, 89, 0.45);
  color: #ffe9cc;
  background: rgba(52, 35, 12, 0.4);
}

.auto-basket__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auto-basket__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(120, 150, 220, 0.3);
  background: rgba(14, 22, 44, 0.55);
  color: #e7eeff;
}

.auto-basket__chip--buy {
  border-color: rgba(93, 197, 173, 0.5);
}

.auto-basket__chip--sell {
  border-color: rgba(243, 110, 141, 0.42);
}

.auto-basket__chip-side {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.auto-basket__chip-pnl {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding-left: 6px;
  margin-left: 2px;
  border-left: 1px solid rgba(120, 150, 220, 0.28);
}

.auto-basket__chip-pnl.positive {
  color: #6fe0c2;
}

.auto-basket__chip-pnl.negative {
  color: #ff8da6;
}

.auto-basket__meta {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: #9fb0d6;
}

.auto-basket__warn {
  margin: 8px 0 0;
  padding: 7px 10px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #ffd9a0;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
}

.auto-basket__warn[hidden] {
  display: none;
}

.mode-switch {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.mode-btn {
  border: 1px solid var(--line);
  background: rgba(7, 12, 28, 0.68);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  transition: all 120ms ease;
}

.mode-btn--active {
  border-color: rgba(77, 141, 242, 0.86);
  box-shadow: 0 0 0 1px rgba(77, 141, 242, 0.3) inset;
  background: linear-gradient(120deg, rgba(77, 141, 242, 0.18), rgba(77, 141, 242, 0.08));
}

.mode-btn:hover {
  transform: translateY(-1px);
}

.mode-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  background: rgba(10, 15, 30, 0.58);
}

.backtest-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.revenue-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.subsidy-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.funding-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.scaling-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.matcher-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.security-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.credits-panel {
  margin-top: 14px;
}

.credits-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.credit-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(170deg, rgba(14, 24, 47, 0.74), rgba(10, 16, 33, 0.62));
}

.credit-stat h3 {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.credit-stat p {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.credits-meter {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 30, 0.82);
  overflow: hidden;
}

#credits-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #59a8ff, #3ac19d);
  transition: width 260ms ease;
}

.credits-cost-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credits-cost-list span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(124, 147, 212, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #cfe0ff;
  background: rgba(9, 18, 35, 0.5);
}

.algo-map {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.algo-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(12, 22, 42, 0.72), rgba(9, 15, 31, 0.62));
}

.algo-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.algo-row-symbol {
  font-weight: 700;
}

.algo-row-metric {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.algo-bar-track {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(8, 12, 27, 0.84);
}

.algo-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  transition: width 320ms ease;
}

.algo-row--positive .algo-bar-fill {
  background: linear-gradient(90deg, rgba(56, 194, 157, 0.6), #38c29d);
}

.algo-row--negative .algo-bar-fill {
  background: linear-gradient(90deg, rgba(244, 114, 152, 0.58), #f47298);
}

.backtest-actions {
  margin-top: 2px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 8px;
}

.revenue-actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(180px, 200px) minmax(180px, 200px);
  gap: 8px;
}

.subsidy-actions {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px);
  gap: 8px;
}

.privacy-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.privacy-option {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(13, 22, 45, 0.74), rgba(10, 16, 33, 0.62));
  padding: 12px;
}

.privacy-option-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #f8faff;
}

.privacy-option input[type='checkbox'] {
  margin: 0;
  padding: 0;
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  accent-color: var(--accent);
}

.privacy-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
}

.security-form {
  margin-top: 10px;
}

.security-inline-toggle {
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(8, 13, 30, 0.52);
}

.security-inline-toggle input[type='checkbox'] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.security-actions {
  margin-top: 2px;
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(190px, 240px);
  gap: 8px;
}

.security-policy-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.security-policy-chips span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(124, 147, 212, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #d3e1ff;
  background: rgba(9, 18, 35, 0.5);
}

.security-stack-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.security-stack-list span {
  display: inline-flex;
  border: 1px solid rgba(124, 147, 212, 0.24);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  color: #cde0ff;
  background: rgba(9, 18, 35, 0.42);
}

.matcher-insight {
  margin-top: 10px;
  border: 1px solid rgba(124, 147, 212, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(9, 18, 35, 0.5);
}

#privacy-withdraw {
  border-color: rgba(255, 175, 89, 0.58);
  background: linear-gradient(120deg, #a35f1c, #7a3e14);
}

#privacy-withdraw:hover {
  box-shadow: 0 6px 20px rgba(255, 175, 89, 0.22);
}

.pair-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.pair-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(16, 22, 44, 0.62);
}

.pair-symbol {
  font-weight: 700;
}

.pair-price {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.pair-delta {
  justify-self: end;
  font-weight: 700;
}

.pair-delta.up {
  color: var(--buy);
}

.pair-delta.down {
  color: var(--sell);
}

form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 4px;
  color: #c8d3ff;
  font-size: 13px;
}

input,
select,
button,
textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 30, 0.82);
  color: var(--text);
  padding: 10px;
  font: inherit;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(93, 118, 255, 0.45);
  outline-offset: 1px;
}

input::placeholder,
textarea::placeholder {
  color: #8996cb;
}

textarea {
  resize: vertical;
  min-height: 72px;
}

button {
  margin-top: 8px;
  cursor: pointer;
  border: 1px solid rgba(77, 141, 242, 0.56);
  background: linear-gradient(120deg, var(--accent-strong), #2459c0);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(60, 115, 214, 0.28);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

button.plan-select:disabled {
  background: rgba(10, 15, 30, 0.55);
  border-color: rgba(124, 147, 212, 0.28);
}

.small-note {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.status-note {
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(124, 147, 212, 0.26);
  margin-bottom: 2px;
}

.status-note--muted,
.status-note--info {
  border-color: rgba(124, 147, 212, 0.32);
  background: rgba(9, 18, 35, 0.52);
  color: #c9d6ff;
}

.status-note--success {
  border-color: rgba(93, 197, 173, 0.5);
  background: rgba(13, 46, 34, 0.38);
  color: #ccf4df;
}

.status-note--warning {
  border-color: rgba(255, 175, 89, 0.48);
  background: rgba(62, 38, 12, 0.34);
  color: #ffe9cc;
}

.status-note--error {
  border-color: rgba(243, 110, 141, 0.45);
  background: rgba(65, 16, 26, 0.38);
  color: #ffd0d7;
}

.arb-freshness {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(93, 197, 173, 0.4);
  background: rgba(13, 46, 34, 0.32);
  color: #ccf4df;
  width: fit-content;
  margin: 6px 0 2px;
}

.arb-freshness--stale {
  border-color: rgba(255, 175, 89, 0.48);
  background: rgba(62, 38, 12, 0.32);
  color: #ffe9cc;
}

.arb-freshness__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5dc5ad;
  box-shadow: 0 0 0 0 rgba(93, 197, 173, 0.6);
  animation: arbPulse 2s ease-out infinite;
}

.arb-freshness--stale .arb-freshness__dot {
  background: #ffaf59;
  box-shadow: 0 0 0 0 rgba(255, 175, 89, 0.6);
  animation: none;
}

@keyframes arbPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(93, 197, 173, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(93, 197, 173, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(93, 197, 173, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arb-freshness__dot {
    animation: none;
  }
}

#lead-feedback.lead-success {
  color: var(--success);
}

#lead-feedback.lead-error {
  color: var(--danger);
}

.pricing-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.store-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pay-rails-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.pay-rail {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(13, 22, 45, 0.74), rgba(10, 16, 33, 0.62));
  padding: 14px;
  display: grid;
  gap: 10px;
}

.pay-rail h3 {
  margin: 0;
  color: #f8faff;
  font-size: 1.05rem;
}

.pay-rail--wallet {
  border-color: rgba(120, 180, 255, 0.35);
}

.pay-wallet-addr {
  display: block;
  word-break: break-all;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: #dbeafe;
}

.pay-rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(13, 22, 45, 0.74), rgba(10, 16, 33, 0.62));
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  transition: transform 140ms ease, border-color 140ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 141, 242, 0.55);
}

.plan-card h3 {
  margin: 0;
  color: #f8faff;
}

.plan-price {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 700;
}

.plan-card ul {
  margin: 8px 0 12px;
  padding-left: 18px;
  color: var(--muted);
}

.plan-card li {
  margin: 6px 0;
}

.plan-select {
  margin: 0;
  width: 100%;
}

.plan-select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.plan-card--selected {
  border-color: rgba(93, 118, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(93, 118, 255, 0.35);
}

.plan-card--disabled {
  filter: grayscale(24%);
  opacity: 0.72;
  border-color: rgba(124, 147, 212, 0.18);
}

.plan-select--disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.store-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(13, 22, 45, 0.74), rgba(10, 16, 33, 0.62));
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 10px;
  transition: transform 140ms ease, border-color 140ms ease;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 141, 242, 0.55);
}

.store-card h3 {
  margin: 0;
  color: #f8faff;
}

.store-price {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.store-description {
  margin: 0;
}

.store-save {
  margin: -4px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6ee7b7;
}

.store-card--disabled {
  filter: grayscale(24%);
  opacity: 0.72;
  border-color: rgba(124, 147, 212, 0.18);
}

.store-select {
  margin: 0;
}

.store-select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.store-select--disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

#chart {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 11, 24, 0.72);
}

.meter-wrap {
  margin-top: 8px;
}

.meter {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(8, 12, 27, 0.9);
}

#risk-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--warning), #ff7e5e);
}

table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(126, 151, 213, 0.16);
}

thead th {
  color: #ced8ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: rgba(126, 151, 213, 0.28);
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.checklist {
  padding-left: 18px;
  color: #c6d2f7;
  margin: 10px 0 0;
}

.checklist li {
  margin: 8px 0;
}

.positive {
  color: var(--buy);
}

.negative {
  color: var(--sell);
}

.close-btn {
  border: none;
  background: rgba(255, 110, 110, 0.18);
  color: #ffdede;
  border-radius: 8px;
  padding: 6px 10px;
}

.admin-panel {
  animation: pulseIn 0.35s ease;
}

.admin-hidden {
  display: none;
}

.admin-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.admin-section h3 {
  margin: 0;
  font-size: 16px;
}

.admin-inline-actions {
  margin-top: 4px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.token-actions {
  margin-top: 4px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr);
  gap: 8px;
}

.admin-actions button:nth-child(4) {
  grid-column: span 2;
}

.admin-leads {
  margin-top: 12px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(6, 10, 23, 0.32);
}

.admin-log table {
  font-size: 11px;
}

.admin-log th,
.admin-log td {
  padding: 8px 7px;
  vertical-align: top;
}

.admin-log th {
  white-space: nowrap;
}

.admin-log td:nth-child(2) {
  text-transform: uppercase;
}

.admin-leads table {
  margin-top: 0;
}

span.positive,
span.negative {
  font-weight: 600;
}

.scaling-callout {
  margin: 10px 0 0;
  border: 1px solid rgba(124, 147, 212, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(9, 18, 35, 0.52);
}

.scaling-callout strong {
  color: #f1f6ff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1100px) {
  .grid-two,
  .grid-three,
  .panel-grid,
  .admin-actions,
  .admin-inline-actions {
    grid-template-columns: 1fr;
  }

  .pricing-grid,
  .credits-grid,
  .arb-inputs,
  .quote-request-form,
  .arb-summary,
  .quote-intake-grid,
  .desk-grid,
  .game-gate,
  .rails-feature,
  .rails-grid,
  .store-grid,
  .backtest-grid,
  .revenue-grid,
  .subsidy-grid,
  .funding-grid,
  .scaling-grid,
  .matcher-grid,
  .security-grid,
  .privacy-grid,
  .privacy-actions,
  .admin-section,
  .admin-actions {
    grid-template-columns: 1fr;
  }

  .security-actions {
    grid-template-columns: 1fr;
  }

  .admin-actions button:nth-child(4) {
    grid-column: span 1;
  }
}

@media (max-width: 960px) {
  body {
    padding-top: 14px;
    overflow-x: hidden;
  }

  .shell {
    width: min(1180px, calc(100vw - 20px));
    overflow: hidden;
  }

  .hero,
  .topbar,
  .topology-feature,
  .rails-feature {
    display: block;
  }

  .topology-feature__actions {
    margin-top: 14px;
  }

  .topbar-actions {
    margin-top: 12px;
  }

  .badge {
    margin-top: 10px;
  }

  .kpis {
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .brand-block,
  .hero > div:first-child,
  .topology-feature__copy,
  .rails-feature > div:first-child {
    min-width: 0;
  }

  .brand,
  .infra-stack,
  .compliance-copy,
  .hero h1,
  .hero p,
  .topology-feature h2,
  .topology-feature p,
  .rails-feature h2,
  .rails-feature p {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .topology-feature,
  .rails-feature {
    padding: 16px;
  }

  .topology-feature h2,
  .rails-feature h2 {
    font-size: 25px;
    width: min(310px, calc(100vw - 64px));
    max-width: min(310px, calc(100vw - 64px));
  }

  .topology-feature p:not(.section-kicker),
  .rails-feature p:not(.section-kicker) {
    width: min(310px, calc(100vw - 64px));
    max-width: min(310px, calc(100vw - 64px));
  }
}

/* ===== Compute Pods (/compute-pod) ===== */
.pod-honesty {
  max-width: 980px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(77, 141, 242, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.pod-honesty strong { color: var(--text); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.muted.small { color: var(--muted); font-size: 0.82rem; }

.primary-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(120deg, var(--accent-strong), #2459c0);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }

.pod-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pod-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.pod-form input,
.pod-form select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.pod-form input:focus,
.pod-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pod-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pod-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.pod-inline label { flex: 1 1 180px; }
.pod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.pod-span { grid-column: 1 / -1; }

.pod-msg { margin: 6px 0 0; font-size: 0.88rem; min-height: 1em; }
.pod-msg.ok { color: var(--success); }
.pod-msg.warn { color: var(--warning); }
.pod-msg.bad { color: var(--danger); }

.pod-auth { max-width: 460px; }

.pod-wallet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pod-balance { text-align: right; }
.pod-balance-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pod-balance-value { display: block; font-size: 1.7rem; font-weight: 700; color: var(--text); }

.pod-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(167, 182, 221, 0.12);
  color: var(--muted);
  white-space: nowrap;
}
.pod-pill.ok { color: var(--success); border-color: rgba(93, 212, 156, 0.4); background: rgba(93, 212, 156, 0.12); }
.pod-pill.warn { color: var(--warning); border-color: rgba(255, 175, 89, 0.4); background: rgba(255, 175, 89, 0.12); }
.pod-pill.bad { color: var(--danger); border-color: rgba(255, 116, 136, 0.4); background: rgba(255, 116, 136, 0.12); }

.pod-gpu-snapshot { margin: 14px 0 4px; }
.pod-gpu-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(77, 141, 242, 0.06); }
.pod-gpu-name { display: block; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.pod-gpu-sub { display: block; color: var(--text); font-size: 0.95rem; }
.pod-est { display: flex; flex-direction: column; justify-content: flex-end; }

.pod-broker-status { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1); }

.pod-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pod-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1); }
.pod-row-main { color: var(--text); font-size: 0.92rem; }
.pod-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.pod-row-note { grid-column: 1 / -1; }

/* ML environments (compute pod) */
.pod-env-panel .muted.small { margin-top: 6px; }
.pod-regime { text-align: right; }
.pod-env-locked { margin-top: 14px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg-1); }
.pod-env-locked p { margin: 0 0 12px; color: var(--text-muted); }
.pod-env-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.pod-env-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); }
.pod-env-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pod-env-name { font-weight: 700; color: var(--text); }
.pod-env-assigned { font-size: 0.92rem; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pod-env-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.pod-env-form select { grid-column: 1 / -1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-0); color: var(--text); }
.pod-env-form .primary-btn, .pod-env-form .pod-env-clear { padding: 8px 12px; font-size: 0.85rem; }
.pod-env-archive { margin-top: 2px; }
.pod-env-archive summary { cursor: pointer; color: var(--text-muted); font-size: 0.85rem; }
.pod-env-archive ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pod-env-archive li { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; }

/* ===== Forex VPS ===== */
.vps-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.vps-plan-card { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.vps-plan-card:hover { border-color: rgba(77, 141, 242, 0.5); }
.vps-plan-card input { margin-top: 4px; accent-color: var(--accent, #4d8df2); }
.vps-plan-card:has(input:checked) { border-color: rgba(77, 141, 242, 0.8); background: rgba(77, 141, 242, 0.08); }
.vps-plan-body { display: flex; flex-direction: column; gap: 4px; }
.vps-plan-name { font-weight: 700; color: var(--text); }
.vps-plan-price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.vps-plan-sub { font-size: 0.85rem; color: var(--text-muted); }
.vps-plan-locked { opacity: 0.55; }
.vps-plan-locked:hover { border-color: var(--line); }
.vps-archive-empty { padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-1); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.vps-archive-empty p { margin: 0; color: var(--text-muted); }
.vps-stop { padding: 6px 10px; font-size: 0.82rem; }

/* ════════════════════════════════════════════════════════════════════
   STELLAR BLACK · GALACTIC ASTEROID THEME  (Trading Console only)
   Scoped under body.galactic so the 15 other pages on styles.css
   keep their original look. Concept: deep-space obsidian field — the
   console floats over a drifting starfield with distant asteroid haze.
   ════════════════════════════════════════════════════════════════════ */
body.galactic {
  --bg-0: #04060e;
  --bg-1: #070a16;
  --card: rgba(11, 14, 26, 0.86);
  --line: rgba(120, 142, 210, 0.18);
  background:
    radial-gradient(circle at 50% -8%, rgba(72, 92, 180, 0.20), transparent 46%),
    radial-gradient(circle at 86% 14%, rgba(150, 92, 200, 0.13), transparent 40%),
    radial-gradient(circle at 8% 26%, rgba(40, 120, 170, 0.12), transparent 38%),
    radial-gradient(circle at 70% 82%, rgba(120, 96, 70, 0.10), transparent 42%),
    #03040a;
  background-attachment: fixed;
}

/* ── Drifting starfield (two parallax layers + slow twinkle) ── */
body.galactic .starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  animation: starTwinkle 7s ease-in-out infinite alternate;
}
body.galactic .starfield::before,
body.galactic .starfield::after {
  content: "";
  position: absolute;
  inset: -60%;
  background-repeat: repeat;
}
/* near layer — small dense stars, faster drift */
body.galactic .starfield::before {
  background-image:
    radial-gradient(1px 1px at 10% 20%, #ffffff, transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.4px 1.4px at 62% 38%, #ffffff, transparent),
    radial-gradient(1px 1px at 82% 12%, rgba(186, 206, 255, 0.85), transparent),
    radial-gradient(1px 1px at 90% 78%, #ffffff, transparent),
    radial-gradient(1.4px 1.4px at 48% 90%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 16% 56%, #ffffff, transparent),
    radial-gradient(1px 1px at 44% 26%, rgba(202, 212, 255, 0.7), transparent);
  background-size: 300px 300px;
  opacity: 0.55;
  animation: starDrift 150s linear infinite;
}
/* far layer — larger, sparser, tinted stars, slower drift */
body.galactic .starfield::after {
  background-image:
    radial-gradient(2px 2px at 25% 15%, rgba(180, 215, 255, 0.95), transparent),
    radial-gradient(1.6px 1.6px at 75% 55%, rgba(255, 244, 214, 0.9), transparent),
    radial-gradient(2.2px 2.2px at 55% 80%, rgba(190, 170, 255, 0.85), transparent),
    radial-gradient(1.6px 1.6px at 12% 88%, #ffffff, transparent),
    radial-gradient(2px 2px at 92% 30%, rgba(150, 230, 220, 0.8), transparent);
  background-size: 540px 540px;
  opacity: 0.5;
  animation: starDrift 270s linear infinite reverse;
}
@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-300px, -180px, 0); }
}
@keyframes starTwinkle {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

/* aurora is too busy against stars — fade it to a faint nebula sheen */
body.galactic .aurora {
  opacity: 0.06;
}

/* ── Obsidian / asteroid-rock panels ── */
body.galactic .topbar,
body.galactic .hero,
body.galactic .panel,
body.galactic .panel-grid > .panel,
body.galactic .grid-two > .panel,
body.galactic .grid-three > .panel {
  background:
    linear-gradient(165deg, rgba(16, 19, 34, 0.94), rgba(7, 9, 18, 0.92));
  border: 1px solid rgba(124, 146, 214, 0.16);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body.galactic .topbar {
  background: linear-gradient(165deg, rgba(13, 16, 30, 0.9), rgba(6, 8, 16, 0.9));
}

/* feature bands keep their accent tint but ride the deep-space base */
body.galactic .topology-feature {
  background:
    linear-gradient(120deg, rgba(12, 16, 30, 0.94), rgba(6, 9, 18, 0.9)),
    linear-gradient(90deg, rgba(93, 212, 198, 0.12), rgba(255, 175, 89, 0.07));
  border-color: rgba(93, 212, 198, 0.22);
}
body.galactic .rails-feature {
  background:
    linear-gradient(135deg, rgba(14, 17, 31, 0.95), rgba(6, 9, 18, 0.9)),
    linear-gradient(90deg, rgba(255, 211, 105, 0.11), rgba(93, 197, 173, 0.07));
  border-color: rgba(255, 211, 105, 0.2);
}

/* starlight on the big headings */
body.galactic .hero h1,
body.galactic .topology-feature h2,
body.galactic .rails-feature h2 {
  text-shadow: 0 0 26px rgba(120, 150, 255, 0.28);
}
body.galactic .brand {
  text-shadow: 0 0 22px rgba(90, 140, 255, 0.35);
}

/* ── Clean-up / organisation: tidy the topbar quick-link cluster ── */
body.galactic .topbar-actions {
  gap: 6px;
  max-width: 640px;
  justify-content: flex-end;
}
body.galactic .topbar-actions .ghost-btn {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 999px;
  border-color: rgba(124, 146, 214, 0.22);
  background: rgba(12, 16, 30, 0.6);
}
body.galactic .topbar-actions .ghost-btn:hover {
  border-color: rgba(150, 175, 255, 0.5);
  background: rgba(22, 28, 48, 0.7);
}

/* consistent breathing room between the stacked console sections */
body.galactic .shell > section,
body.galactic .shell > .panel-grid,
body.galactic .shell > .grid-two,
body.galactic .shell > .grid-three {
  margin-top: 16px;
}

/* keep form fields legible on the darker base */
body.galactic input,
body.galactic select,
body.galactic textarea {
  background: rgba(6, 9, 18, 0.7);
  border-color: rgba(124, 146, 214, 0.24);
}
