:root {
  color-scheme: dark;
  --bg: #070a09;
  --panel: rgba(15, 20, 18, 0.92);
  --line: rgba(230, 255, 245, 0.09);
  --line-strong: rgba(230, 255, 245, 0.16);
  --text: #f2f7f5;
  --text-soft: #bbc6c1;
  --muted: #788580;
  --muted-deep: #4e5a56;
  --green: #36ec9b;
  --green-soft: rgba(54, 236, 155, 0.1);
  --red: #ff5b70;
  --red-soft: rgba(255, 91, 112, 0.1);
  --amber: #ffbc5b;
  --amber-soft: rgba(255, 188, 91, 0.1);
  --blue: #64a8ff;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

/* GERA TRADE ARENA live stage */
.arena-stage { position:relative; overflow:hidden; margin:22px 0 36px; padding:26px; border:1px solid rgba(118,255,169,.28); border-radius:22px; background:linear-gradient(130deg,rgba(9,24,18,.98),rgba(8,10,13,.98) 58%,rgba(28,10,16,.95)); box-shadow:0 24px 90px rgba(0,0,0,.35),inset 0 1px rgba(255,255,255,.05); }
.arena-stage::after { content:""; position:absolute; inset:-60% -10% auto 55%; height:340px; background:radial-gradient(circle,rgba(55,255,137,.12),transparent 65%); pointer-events:none; }
.arena-kicker { color:#6dffab; font:700 11px/1.2 ui-monospace,monospace; letter-spacing:.18em; }
.arena-main { display:grid; grid-template-columns:1.5fr .75fr .8fr; gap:24px; align-items:end; padding:18px 0 24px; }
.arena-identity h2 { margin:8px 0 4px; font-size:clamp(28px,4vw,58px); letter-spacing:-.055em; }
.arena-state { color:#9ca8a2; font:700 12px/1.2 ui-monospace,monospace; }
.arena-pair { color:#e7fff0; font:800 17px/1.3 ui-monospace,monospace; }
.arena-direction { justify-self:center; padding:15px 28px; border-radius:12px; font:900 clamp(22px,3vw,42px)/1 ui-monospace,monospace; border:2px solid #39413d; }
.arena-direction.long { color:#65ffab; border-color:#27c971; background:rgba(25,205,109,.16); box-shadow:0 0 30px rgba(25,205,109,.13); text-shadow:0 0 18px rgba(101,255,171,.16); }
.arena-direction.short { color:#ff6b7b; border-color:#ef4961; background:rgba(239,73,97,.16); box-shadow:0 0 30px rgba(239,73,97,.13); text-shadow:0 0 18px rgba(255,107,123,.16); }
.arena-direction.watch { color:#ffd36a; border-color:#d99c2f; background:rgba(255,184,45,.17); box-shadow:0 0 30px rgba(255,184,45,.13); text-shadow:0 0 18px rgba(255,211,106,.14); }
.arena-direction.search,
.arena-direction.info,
.arena-direction.neutral { color:#67d9ff; border-color:#329bc7; background:rgba(50,155,199,.17); box-shadow:0 0 30px rgba(50,155,199,.13); text-shadow:0 0 18px rgba(103,217,255,.14); }
.arena-direction.search { max-width:620px; font-size:clamp(18px,2.2vw,32px); line-height:1.18; }
.arena-direction.danger { color:#ff6b7b; border-color:#ef4961; background:rgba(239,73,97,.18); box-shadow:0 0 32px rgba(239,73,97,.15); text-shadow:0 0 18px rgba(255,107,123,.16); }
.arena-timer-wrap { text-align:right; }
.arena-entry-clock { margin-bottom:16px; }
.arena-entry-clock[hidden] { display:none; }
.arena-timer-wrap .arena-entry-clock span { color:#65ffab; font-size:12px; margin-bottom:4px; }
.arena-timer-wrap .arena-entry-clock strong { color:#65ffab; font-size:clamp(40px,5vw,66px); }
.arena-entry-clock:not([hidden]) ~ #arenaTimer { font-size:clamp(26px,3vw,42px); }
.arena-timer-wrap span { display:block; color:#7f8c85; font:700 10px/1.2 ui-monospace,monospace; letter-spacing:.14em; }
.arena-timer-wrap strong { color:#fff; font:800 clamp(34px,5vw,66px)/1 ui-monospace,monospace; letter-spacing:-.08em; }
.arena-levels { display:grid; grid-template-columns:repeat(5,1fr); gap:1px; border:1px solid rgba(255,255,255,.08); border-radius:14px; overflow:hidden; }
.arena-levels>div { padding:15px 17px; background:rgba(255,255,255,.025); }
.arena-levels span { display:block; color:#748179; font:700 10px/1.3 ui-monospace,monospace; }
.arena-levels b { display:block; margin-top:7px; color:#fff; font:800 17px/1.2 ui-monospace,monospace; }
.arena-levels .positive { color:#59f59d; }
.arena-levels .negative { color:#ff6578; }
.arena-scoreboard { display:flex; flex-wrap:wrap; gap:13px; align-items:center; margin-top:16px; color:#8b9891; font:700 11px/1.3 ui-monospace,monospace; }
.arena-scoreboard>span { color:#effff5; letter-spacing:.12em; }
.arena-scoreboard b { padding:7px 10px; border-radius:7px; background:rgba(255,255,255,.06); color:#d9e4de; }
body.obs .arena-stage { margin:12px; min-height:calc(100vh - 120px); display:flex; flex-direction:column; justify-content:center; }
body.obs .arena-stage~* { display:none!important; }
@media (max-width:760px) { .arena-main{grid-template-columns:1fr 1fr}.arena-identity{grid-column:1/-1}.arena-direction{justify-self:start}.arena-levels{grid-template-columns:repeat(2,1fr)} }

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(54, 236, 155, 0.105), transparent 33rem),
    radial-gradient(circle at 96% 28%, rgba(35, 127, 83, 0.07), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 48%, rgba(54, 236, 155, 0.015) 49% 51%, transparent 52% 100%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.shell {
  position: relative;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 34px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(54, 236, 155, 0.35);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(54, 236, 155, 0.16), rgba(54, 236, 155, 0.025));
  box-shadow: inset 0 0 22px rgba(54, 236, 155, 0.07), 0 10px 26px rgba(0, 0, 0, 0.18);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 1px;
  background: rgba(54, 236, 155, 0.35);
  transform: rotate(-42deg);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.08em;
  transform: skew(-8deg);
}

.brand-copy,
.brand-name,
.brand-sub { display: block; }

.brand-name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.brand-name em { color: var(--green); font-style: normal; }

.brand-sub {
  margin-top: 4px;
  color: #65706c;
  font: 700 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.connection-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.connection-dot,
.health-dot,
.obs-health i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(120, 133, 128, 0.08);
}

.connection-label.online .connection-dot,
.health-dot.online,
.obs-health.online i {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(54, 236, 155, 0.08), 0 0 14px rgba(54, 236, 155, 0.55);
}

.connection-label.scanning .connection-dot,
.health-dot.scanning,
.obs-health.scanning i {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(100, 168, 255, 0.08), 0 0 14px rgba(100, 168, 255, 0.5);
  animation: pulseDot 1.1s ease-in-out infinite;
}

.connection-label.demo .connection-dot,
.connection-label.waiting .connection-dot,
.connection-label.stale .connection-dot,
.health-dot.demo,
.health-dot.waiting,
.health-dot.stale,
.obs-health.demo i,
.obs-health.waiting i,
.obs-health.stale i {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 188, 91, 0.08), 0 0 14px rgba(255, 188, 91, 0.45);
}

.connection-label.offline .connection-dot,
.health-dot.offline,
.obs-health.offline i {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 91, 112, 0.08), 0 0 14px rgba(255, 91, 112, 0.5);
}

.mode-badge {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font: 850 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.mode-badge.live { color: var(--green); border-color: rgba(54, 236, 155, 0.2); background: rgba(54, 236, 155, 0.065); }
.mode-badge.demo { color: var(--amber); border-color: rgba(255, 188, 91, 0.2); background: rgba(255, 188, 91, 0.065); }

.scan-button,
.notice-action,
.empty-action {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.scan-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #03130c;
  background: var(--green);
  box-shadow: 0 9px 26px rgba(54, 236, 155, 0.13);
  font-size: 11px;
  font-weight: 900;
}

.scan-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scan-button:hover:not(:disabled),
.notice-action:hover,
.empty-action:hover { filter: brightness(1.08); transform: translateY(-1px); }

.scan-button:focus-visible,
.notice-action:focus-visible,
.empty-action:focus-visible,
.filter-button:focus-visible,
.brand:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.scan-button:disabled { opacity: 0.5; cursor: wait; }
.scan-button.scanning svg { animation: spin 1s linear infinite; }

.system-notice {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 188, 91, 0.22);
  border-radius: 12px;
  background: rgba(255, 188, 91, 0.075);
}

.system-notice[hidden] { display: none; }
.system-notice.critical { border-color: rgba(255, 91, 112, 0.22); background: rgba(255, 91, 112, 0.075); }

.notice-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--amber);
  background: rgba(255, 188, 91, 0.12);
  font-weight: 900;
}

.critical .notice-icon { color: var(--red); background: rgba(255, 91, 112, 0.12); }
.system-notice strong { display: block; font-size: 12px; }
.system-notice p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.notice-action { padding: 8px 11px; border-radius: 8px; color: var(--text); background: rgba(255, 255, 255, 0.075); font-size: 10px; font-weight: 800; }

.overview {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(560px, 1.08fr);
  align-items: end;
  gap: clamp(36px, 6vw, 90px);
  padding: 46px 0 38px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--green);
  font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.15em;
}

.pulse {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(54, 236, 155, 0.07), 0 0 17px rgba(54, 236, 155, 0.65);
}

.pulse.demo,
.pulse.waiting,
.pulse.stale { background: var(--amber); box-shadow: 0 0 0 5px rgba(255, 188, 91, 0.07), 0 0 17px rgba(255, 188, 91, 0.55); }
.pulse.offline { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 91, 112, 0.07), 0 0 17px rgba(255, 91, 112, 0.55); }
.pulse.neutral { background: var(--muted); box-shadow: none; }

h1 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(36px, 4.3vw, 64px);
  line-height: 0.99;
  letter-spacing: -0.06em;
}

h1 span { color: #697570; }

.overview-copy > p {
  max-width: 650px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.source-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 19px;
}

.source-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font: 850 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.source-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-deep); }
.source-pill.online { color: var(--text-soft); border-color: rgba(54, 236, 155, 0.17); background: rgba(54, 236, 155, 0.045); }
.source-pill.online i { background: var(--green); box-shadow: 0 0 9px rgba(54, 236, 155, 0.65); }
.source-pill.error { color: var(--red); border-color: rgba(255, 91, 112, 0.18); background: rgba(255, 91, 112, 0.05); }
.source-pill.error i { background: var(--red); }
.source-pill.disabled { opacity: 0.38; filter: grayscale(1); }

.source-note { margin-left: 3px; color: var(--muted-deep); font: 700 8px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(11, 15, 14, 0.67);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.metric:last-child { border-right: 0; }
.metric-primary::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--green), transparent); opacity: 0.6; }
.metric > span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: 0.13em; }
.metric strong { font-size: clamp(27px, 2.5vw, 36px); line-height: 1; letter-spacing: -0.055em; }
.metric small { min-height: 22px; color: #66726e; font-size: 9px; line-height: 1.3; }
.metric small.positive { color: var(--green); }
.metric small.negative { color: var(--red); }

.data-strip {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #68746f;
  background: rgba(255, 255, 255, 0.016);
  font: 700 9px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.035em;
}

.health-summary { min-width: 0; display: flex; align-items: center; gap: 9px; }
.health-summary b { overflow: hidden; color: #98a49f; text-overflow: ellipsis; white-space: nowrap; }
.payout-context.available { color: var(--green); }
.audit-context.verified { color: var(--green); }
.audit-context.broken { color: var(--red); }
#clock { color: var(--green); font-variant-numeric: tabular-nums; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.heading-copy,
.panel-title { display: flex; align-items: flex-start; gap: 12px; }

.section-index,
.panel-title > span {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 6px;
  border: 1px solid rgba(54, 236, 155, 0.22);
  border-radius: 6px;
  color: var(--green);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

h2 { margin: 0; font-size: 16px; letter-spacing: -0.025em; }
.heading-copy p,
.panel-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; }

.venue-filters {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.filter-button {
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.035em;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.filter-button span { display: inline-grid; min-width: 17px; min-height: 17px; margin-left: 4px; place-items: center; border-radius: 5px; color: #65716d; background: rgba(255, 255, 255, 0.055); font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.filter-button:hover:not(:disabled) { color: var(--text); }
.filter-button.active { color: var(--text); border-color: var(--line); background: rgba(255, 255, 255, 0.06); }
.filter-button.active span { color: var(--green); background: rgba(54, 236, 155, 0.09); }
.filter-button:disabled { opacity: 0.3; cursor: not-allowed; }

.signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; min-height: 330px; }

.signal-card,
.signal-skeleton { min-width: 0; min-height: 338px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(18, 24, 21, 0.97), rgba(10, 14, 12, 0.97)); }

.signal-skeleton { position: relative; overflow: hidden; }
.signal-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent); animation: shimmer 1.5s infinite; }

.signal-card { --accent: var(--amber); position: relative; overflow: hidden; padding: 19px; box-shadow: 0 15px 44px rgba(0, 0, 0, 0.18); }
.signal-card::after { content: ""; position: absolute; right: -25%; bottom: -58%; width: 72%; height: 75%; border-radius: 50%; background: var(--accent); filter: blur(72px); opacity: 0.055; pointer-events: none; }
.signal-card.long { --accent: var(--green); }
.signal-card.short { --accent: var(--red); }
.signal-card.wait { --accent: var(--amber); }
.signal-card.active { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.signal-card.expired { opacity: 0.62; filter: saturate(0.58); }

.card-topline,
.card-head,
.score-row,
.entry-banner,
.card-foot { position: relative; z-index: 1; }
.card-topline,
.card-head,
.score-row,
.entry-banner { display: flex; align-items: center; justify-content: space-between; }

.rank { color: var(--muted-deep); font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.signal-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font: 850 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; }
.signal-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.signal-status.live { color: var(--green); }
.signal-status.live i { box-shadow: 0 0 9px rgba(54, 236, 155, 0.65); animation: pulseDot 1.4s ease-in-out infinite; }
.signal-status.blocked { color: var(--amber); }
.signal-status.expired { color: var(--muted-deep); }

.card-head { align-items: flex-start; margin-top: 14px; }
.venues { min-height: 19px; display: flex; flex-wrap: wrap; gap: 5px; }
.venue-chip { display: inline-flex; align-items: center; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: rgba(255, 255, 255, 0.028); font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.venue-chip.bybit { color: #f5bf52; border-color: rgba(245, 191, 82, 0.18); background: rgba(245, 191, 82, 0.055); }
.venue-chip.mexc { color: #75aaff; border-color: rgba(117, 170, 255, 0.18); background: rgba(117, 170, 255, 0.055); }
.venue-chip.muted { color: var(--muted); }

.pair { margin-top: 6px; font-size: 23px; font-weight: 920; letter-spacing: -0.045em; }
.pair span { margin-left: 5px; color: #59645f; font-size: 11px; font-weight: 650; letter-spacing: -0.015em; }
.side { min-width: 67px; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--accent) 21%, transparent); border-radius: 9px; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); text-align: right; font-size: 12px; font-weight: 900; letter-spacing: 0.035em; }
.side small { display: block; margin-bottom: 3px; color: color-mix(in srgb, var(--accent) 70%, #66716d); font-size: 7px; letter-spacing: 0.1em; }

.score-row { align-items: flex-end; margin-top: 18px; }
.score-label { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.1em; }
.score { margin-top: 2px; color: var(--accent); font-size: 37px; font-weight: 920; line-height: 1; letter-spacing: -0.06em; }
.score small { margin-left: 3px; color: #53605b; font-size: 11px; letter-spacing: 0; }
.mini-chart { width: 45%; height: 58px; overflow: visible; color: var(--accent); }
.mini-chart polyline { fill: none; stroke: currentColor; stroke-width: 1.7; vector-effect: non-scaling-stroke; }

.entry-banner { margin-top: 11px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 8px; color: color-mix(in srgb, var(--accent) 85%, var(--text)); background: color-mix(in srgb, var(--accent) 5%, transparent); font: 850 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.075em; }
.entry-banner strong { font-size: 10px; font-variant-numeric: tabular-nums; }
.countdown.ended { color: var(--muted-deep); }

.levels { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 13px; }
.level { min-width: 0; padding: 9px; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; background: rgba(255, 255, 255, 0.023); }
.level > span { display: block; margin-bottom: 5px; color: #5e6a65; font-size: 7px; font-weight: 800; letter-spacing: 0.075em; }
.level b { display: block; overflow: hidden; color: var(--text-soft); font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }

.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; }
.reasons { min-height: 22px; display: flex; flex-wrap: wrap; gap: 5px; }
.reason { padding: 5px 7px; border-radius: 20px; color: #87938f; background: rgba(255, 255, 255, 0.035); font-size: 8px; line-height: 1.25; }
.reason.muted { color: var(--muted-deep); }
.card-foot time { flex: 0 0 auto; padding-bottom: 4px; color: var(--muted-deep); font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }

.empty-state { grid-column: 1 / -1; min-height: 318px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; border: 1px dashed var(--line-strong); border-radius: var(--radius-xl); color: var(--muted); background: rgba(255, 255, 255, 0.012); text-align: center; }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--green); background: var(--green-soft); font-size: 20px; }
.empty-state.error .empty-icon { color: var(--red); background: var(--red-soft); }
.empty-state.filtered .empty-icon { color: var(--amber); background: var(--amber-soft); }
.empty-state strong { color: var(--text-soft); font-size: 13px; }
.empty-state p { max-width: 430px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.empty-action { margin-top: 17px; padding: 9px 12px; border-radius: 8px; color: #04130c; background: var(--green); font-size: 10px; font-weight: 850; }

.bottom-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: 13px; margin-top: 13px; }
.panel { min-height: 232px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(12, 16, 14, 0.76); }

.factor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 18px; }
.factor-grid > div { position: relative; min-width: 0; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.035); border-radius: 9px; background: rgba(255, 255, 255, 0.022); }
.factor-grid i { position: absolute; top: 10px; right: 10px; color: #45504c; font: 750 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; }
.factor-grid b,
.factor-grid span { display: block; }
.factor-grid b { margin-bottom: 5px; font-size: 10px; }
.factor-grid span { overflow: hidden; color: #66726e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.history-head,
.history-row { display: grid; grid-template-columns: 1.3fr 0.9fr 0.7fr 0.6fr 0.65fr; align-items: center; gap: 8px; }
.history-head { margin-top: 16px; padding: 0 5px 7px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); color: var(--muted-deep); font: 750 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.history-list { max-height: 175px; overflow: auto; scrollbar-width: thin; scrollbar-color: #26312d transparent; }
.history-row { min-height: 42px; padding: 7px 5px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); font-size: 9px; }
.history-row:last-child { border-bottom: 0; }
.history-row b { color: var(--text-soft); font-size: 10px; }
.history-row b small { display: block; margin-top: 3px; color: var(--muted-deep); font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.history-row > span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.history-side.long { color: var(--green); }
.history-side.short { color: var(--red); }
.history-side.wait { color: var(--amber); }
.result { width: fit-content; padding: 5px 6px; border-radius: 6px; font: 850 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.result.win { color: var(--green); background: var(--green-soft); }
.result.loss { color: var(--red); background: var(--red-soft); }
.result.open { color: var(--amber); background: var(--amber-soft); }
.result.void { color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.result.draw { color: var(--muted); background: rgba(255, 255, 255, 0.04); }
.result.conflict { color: var(--amber); background: var(--amber-soft); }
.history-empty { padding: 48px 0; color: var(--muted-deep); text-align: center; font-size: 10px; }
.history-empty.error { color: var(--red); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 22px 3px 0; color: #46514d; font: 700 8px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
footer span { white-space: nowrap; }
footer b { color: #5f6b67; font-weight: 800; }
footer p { max-width: 780px; margin: 0; text-align: right; }

.obs-bar { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot { 50% { opacity: 0.42; transform: scale(0.82); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }

@media (max-width: 1180px) {
  .overview { grid-template-columns: 1fr; gap: 28px; padding: 38px 0 30px; }
  .overview-copy { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: end; }
  .overview-copy .eyebrow,
  .overview-copy h1 { grid-column: 1 / -1; }
  .overview-copy > p { margin-top: 16px; }
  .source-line { justify-content: flex-end; margin-top: 14px; }
  .metric { min-height: 112px; }
}

@media (max-width: 980px) {
  .signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid { grid-template-columns: 1fr; }
  .history-list { max-height: 250px; }
  .data-strip { grid-template-columns: minmax(0, 1fr) auto auto; }
  .payout-context { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 620px); }
  .topbar { min-height: 74px; }
  .brand-sub,
  .connection-label { display: none; }
  .top-actions { gap: 7px; }
  .mode-badge { max-width: 94px; overflow: hidden; text-overflow: ellipsis; }
  .scan-button { width: 39px; padding: 10px; }
  .scan-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .system-notice { grid-template-columns: auto 1fr; }
  .notice-action { grid-column: 2; justify-self: start; }
  .overview { padding-top: 31px; }
  .overview-copy { display: block; }
  h1 { font-size: clamp(34px, 10.2vw, 50px); }
  .overview-copy > p { font-size: 13px; }
  .source-line { justify-content: flex-start; }
  .source-note { flex-basis: 100%; margin: 3px 0 0; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 104px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(3),
  .metric:nth-child(4) { border-bottom: 0; }
  .data-strip { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .health-summary { grid-column: 1 / -1; }
  .audit-context { grid-column: 1 / -1; }
  .payout-context { grid-column: 1 / -1; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .venue-filters { width: 100%; }
  .filter-button { flex: 1; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-card,
  .signal-skeleton { min-height: 330px; }
  .factor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { display: block; }
  footer p { margin-top: 8px; text-align: left; }
}

@media (max-width: 470px) {
  .brand-mark { width: 39px; height: 39px; }
  .brand-name { font-size: 14px; }
  .mode-badge { display: none; }
  .overview { padding: 27px 0 26px; }
  .eyebrow { font-size: 8px; }
  .metric { padding: 15px; }
  .data-strip { font-size: 8px; }
  #marketCoverage { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .panel { padding: 16px; }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-foot { display: block; }
  .card-foot time { display: block; margin-top: 9px; }
  .history-head { display: none; }
  .history-list { margin-top: 13px; }
  .history-row { grid-template-columns: 1fr auto; gap: 7px 12px; padding: 11px 4px; }
  .history-row > span::before { content: attr(data-label) ": "; color: var(--muted-deep); }
  .history-row b { grid-column: 1 / -1; }
  .history-row .result { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body.obs { min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: transparent; }

body.booting #arenaStage { visibility: hidden; }

body.obs .ambient,
body.obs .noise,
body.obs .topbar,
body.obs .system-notice,
body.obs .overview,
body.obs .data-strip,
body.obs .section-heading,
body.obs .bottom-grid,
body.obs footer { display: none !important; }

body.obs .shell { order: 1; width: 100%; padding: 0; }
body.obs .opportunities { padding: 0; }

body.obs .obs-bar {
  order: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border: 1px solid rgba(230, 255, 245, 0.1);
  border-radius: 14px 14px 0 0;
  background: rgba(7, 10, 9, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.26);
}

body.obs .obs-brand .brand-mark { width: 38px; height: 38px; }
body.obs .obs-brand .brand-name { font-size: 14px; }
body.pocket-view .brand-sub { display: none !important; }
body.obs .obs-status { display: flex; align-items: center; gap: 10px; font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; }
body.obs .obs-health { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
body.obs .obs-health.online { color: var(--green); }
body.obs .obs-health.offline { color: var(--red); }
body.obs .obs-health.demo,
body.obs .obs-health.waiting,
body.obs .obs-health.stale { color: var(--amber); }
body.obs .obs-mode { padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text-soft); background: rgba(255, 255, 255, 0.04); }
body.obs #obsClock { color: var(--green); font-variant-numeric: tabular-nums; }

body.obs .signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 8px;
  border: 1px solid rgba(230, 255, 245, 0.1);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(7, 10, 9, 0.9);
}

body.obs .signal-card,
body.obs .signal-skeleton { min-height: 272px; border-radius: 14px; }
body.obs .signal-card { padding: 14px; }
body.obs .card-topline { margin-bottom: 8px; }
body.obs .card-head { margin-top: 8px; }
body.obs .pair { font-size: 19px; }
body.obs .score-row { margin-top: 13px; }
body.obs .score { font-size: 31px; }
body.obs .mini-chart { height: 46px; }
body.obs .entry-banner { margin-top: 8px; }
body.obs .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
body.obs .level { padding: 7px; }
body.obs .card-foot { margin-top: 8px; }
body.obs .reasons { display: none; }
body.obs .card-foot time { margin-left: auto; }
body.obs .empty-state { min-height: 272px; background: rgba(10, 14, 12, 0.92); }

@media (max-width: 900px) {
  body.obs { overflow: auto; }
  body.obs .signal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body.obs .obs-brand .brand-sub,
  body.obs .obs-mode { display: none; }
  body.obs .obs-status { gap: 7px; }
}
