:root {
  color-scheme: dark;
  --bg: #05070d;
  --panel: rgba(12, 18, 30, 0.78);
  --panel-strong: rgba(15, 24, 39, 0.94);
  --line: rgba(138, 177, 217, 0.24);
  --line-hot: rgba(99, 230, 190, 0.56);
  --text: #eef7ff;
  --muted: #8fa5bb;
  --cyan: #3be7ff;
  --mint: #63e6be;
  --amber: #ffd166;
  --red: #ff5470;
  --violet: #9b7cff;
  --blue: #4dabf7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: radial-gradient(circle at 28% 42%, rgba(40, 112, 220, 0.22), transparent 34%), var(--bg);
  color: var(--text);
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 29vw);
  width: 100vw;
  height: 100vh;
}

.globe-zone {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.globe {
  position: absolute;
  inset: 0;
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(59, 231, 255, 0.35);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 520px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: rgba(4, 8, 14, 0.66);
  color: #cfe7ff;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.pill::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  content: "";
}

.pill.warn::before {
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}

.left-rail {
  position: absolute;
  z-index: 6;
  top: 150px;
  left: 20px;
  width: 190px;
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.compact {
  padding: 10px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #d9eeff;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

input {
  accent-color: var(--mint);
}

.feed-health {
  display: grid;
  gap: 6px;
}

.feed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.feed i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
}

.feed.online i {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.ticker {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 28px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 12, 0.8);
  color: #d9eeff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.ticker span {
  animation: drift 36s linear infinite;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-620px); }
}

.intel-board {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto auto minmax(145px, 1fr) minmax(150px, 1fr) auto auto;
  gap: 10px;
  height: 100vh;
  padding: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.97), rgba(8, 11, 18, 0.94));
}

.hero-card {
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 84, 112, 0.18), rgba(12, 18, 30, 0.93) 48%, rgba(59, 231, 255, 0.12));
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.metric-row strong {
  display: block;
  font-size: 52px;
  line-height: 0.95;
  color: var(--amber);
}

.metric-row span {
  align-self: center;
  padding: 5px 8px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: #ffe8a6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.meter {
  height: 7px;
  margin: 12px 0 9px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.meter i {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--mint));
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.45);
}

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

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

.stat {
  min-height: 70px;
  padding: 10px;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 5px;
  color: #e9f8ff;
  font-size: 29px;
}

.scroll-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 100%;
  padding: 0 8px 8px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 230, 190, 0.5) transparent;
}

.event,
.news {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(138, 177, 217, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.event-top,
.news-top,
.market-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag {
  padding: 3px 6px;
  border: 1px solid rgba(99, 230, 190, 0.3);
  color: var(--mint);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.event strong,
.news a {
  color: #f4fbff;
  font-size: 12px;
  line-height: 1.25;
  text-decoration: none;
}

.event small,
.news small {
  color: var(--muted);
  font-size: 10px;
}

.weather-grid,
.markets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 8px 8px;
}

.weather,
.market-row {
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(138, 177, 217, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.weather b,
.market-row b {
  display: block;
  color: #f3fbff;
  font-size: 12px;
}

.weather span,
.market-row span {
  color: var(--muted);
  font-size: 11px;
}

.up { color: var(--mint) !important; }
.down { color: var(--red) !important; }
.amber { color: var(--amber) !important; }

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
  }

  .shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .globe-zone {
    min-height: 62vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar {
    left: 14px;
    right: 14px;
  }

  .status-strip,
  .left-rail {
    display: none;
  }

  .intel-board {
    height: auto;
    overflow: visible;
    grid-template-rows: auto;
  }

  .scroll-list {
    max-height: 300px;
  }
}
