:root {
  --bg: #050816;
  --bg2: #0a1431;
  --glass: rgba(9, 18, 44, 0.58);
  --line: rgba(122, 222, 255, 0.18);
  --cyan: #66f0ff;
  --teal: #00ffb3;
  --violet: #9f8bff;
  --pink: #ff67d6;
  --amber: #ffc96c;
  --text: #eef5ff;
  --muted: #93a8c8;
  --danger: #ff5d78;
  --success: #5effb1;
  --shadow: 0 0 24px rgba(68, 202, 255, 0.16), inset 0 0 0 1px rgba(147, 168, 200, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: radial-gradient(circle at 50% 50%, #0f1c46 0%, var(--bg) 48%, #03050d 100%); color: var(--text); }
body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

#starfield, .grid, .scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.grid {
  background-image:
    linear-gradient(rgba(102,240,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102,240,255,0.08) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(68,180,255,0.06) 0%, transparent 55%);
  background-size: 60px 60px, 60px 60px, 100% 100%;
  transform: perspective(900px) rotateX(74deg) translateY(18vh) scale(1.6);
  transform-origin: center center;
  opacity: 0.45;
}
.scanlines {
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 2px, transparent 4px);
  mix-blend-mode: soft-light;
  opacity: 0.15;
}

.hud {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  padding: 1rem;
  display: grid;
  grid-template-rows: auto 1.35fr auto auto auto;
  gap: 0.85rem;
}
.glass {
  background: linear-gradient(180deg, rgba(14, 23, 52, 0.72), rgba(8, 13, 30, 0.62));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.topbar, .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 22px;
  padding: 0.9rem 1.1rem;
}
.eyebrow {
  font-size: 0.70rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.3rem;
}
h1 {
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.45rem);
  font-weight: 800;
}
.status-cluster {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.status-pill {
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}
.live { color: var(--success); }
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 0.45rem;
  box-shadow: 0 0 12px var(--success);
  animation: pulseDot 1.6s infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 0.45; transform: scale(0.9);} 50% { opacity: 1; transform: scale(1.1);} }

.hero {
  display: grid;
  grid-template-columns: 1.85fr 0.85fr;
  gap: 0.85rem;
}
.core {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  min-height: 38vh;
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.4rem 1.5rem;
}
.ticker-wrap {
  width: min(100%, 82rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 0.75rem;
  margin: 0.35rem 0 0.8rem;
}
.currency {
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.ticker {
  display: inline-block;
  width: 100%;
  text-align: right;
  font-size: clamp(2.8rem, 8.2vw, 7.3rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 0 22px rgba(102,240,255,0.24), 0 0 42px rgba(159,139,255,0.18);
  white-space: nowrap;
  overflow: hidden;
}
.subline {
  max-width: 58rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.mini-metrics {
  display: flex;
  gap: 0.85rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.mini-metrics > div {
  min-width: 12rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.metric-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}
.metric-value {
  font-size: 0.95rem;
}
.orbital, .pulse {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.orbital-a { width: 34vw; height: 34vw; border: 1px solid rgba(102,240,255,0.2); animation: spin 18s linear infinite; }
.orbital-b { width: 25vw; height: 25vw; border: 1px dashed rgba(159,139,255,0.22); animation: spinReverse 13s linear infinite; }
.orbital-c { width: 17vw; height: 17vw; border: 1px solid rgba(255,201,108,0.18); animation: spin 8s linear infinite; }
.pulse {
  width: 12vw;
  height: 12vw;
  background: radial-gradient(circle, rgba(102,240,255,0.28), rgba(159,139,255,0.14) 32%, transparent 70%);
  filter: blur(8px);
  animation: breathe 3.8s ease-in-out infinite;
}
@keyframes spin { from { transform: translate(-50%, -50%) rotate(0deg);} to { transform: translate(-50%, -50%) rotate(360deg);} }
@keyframes spinReverse { from { transform: translate(-50%, -50%) rotate(360deg);} to { transform: translate(-50%, -50%) rotate(0deg);} }
@keyframes breathe { 0%,100% { transform: translate(-50%, -50%) scale(0.95);} 50% { transform: translate(-50%, -50%) scale(1.06);} }

.right-stack {
  display: grid;
  gap: 0.85rem;
}
.panel {
  border-radius: 24px;
  padding: 0.95rem 1rem;
}
.panel-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}
.emphasis { padding-top: 1.05rem; }
.bar-shell {
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  box-shadow: 0 0 16px rgba(102,240,255,0.36);
}
.progress-row {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.phase-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.08rem;
  margin-bottom: 0.55rem;
}
.phase-note { color: var(--muted); line-height: 1.45; font-size: 0.95rem; }

.channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.channel {
  border-radius: 26px;
  padding: 0.95rem 1rem 1rem;
}
.channel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}
.tag {
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.confidence {
  font-size: 0.72rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.confidence.high { color: var(--success); background: rgba(94,255,177,0.08); }
.confidence.med { color: var(--amber); background: rgba(255,201,108,0.08); }
.channel-cost {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.channel-cost span {
  color: var(--cyan);
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}
.channel-cost strong {
  display: block;
  width: 100%;
  text-align: right;
  font-size: clamp(1.5rem, 2.9vw, 2.7rem);
  line-height: 0.98;
  overflow: hidden;
  white-space: nowrap;
}
.channel-rate {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.spark-shell {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.7rem;
}
.spark {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(102,240,255,0.8), rgba(159,139,255,0.9));
}
.channel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 0.85rem;
}
.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.signal-card {
  border-radius: 18px;
  padding: 0.8rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.signal-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 0.35rem;
}
.signal-card strong {
  font-size: 0.98rem;
}
.assumption-list {
  display: grid;
  gap: 0.65rem;
}
.assumption-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.assumption-list div:last-child { border-bottom: none; }
.assumption-list span { color: var(--muted); }
.assumption-list strong { white-space: nowrap; }

.foot {
  font-size: 0.84rem;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .hero, .channels, .lower-grid {
    grid-template-columns: 1fr;
  }
  .hud {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }
  html, body {
    overflow: auto;
  }
}
