:root {
  --bg: #0a0e1a;
  --surface: #141a2a;
  --surface2: #1d2537;
  --accent: #00d4ff;
  --green: #14cc79;
  --red: #ff3b6a;
  --amber: #ffb800;
  --text: #e6edf7;
  --muted: #6b7690;
  --border: #22304a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 48px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 8px; min-width: 200px; }
.logo { font-weight: 800; font-size: 1.1rem; color: var(--accent); }
.tag { font-size: 0.75rem; color: var(--muted); }
.session { font-size: 0.7rem; background: var(--surface2); padding: 2px 8px; border-radius: 6px; }
.toolbar { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.dropdown { position: relative; }
.drop-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 4px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.dropdown:hover .drop-menu,
.dropdown:focus-within .drop-menu { display: block; }
.drop-menu a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  border-radius: 6px;
}
.drop-menu a:hover { background: var(--border); }
.refresh-btn {
  background: var(--accent);
  color: #001823;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
main { padding: 16px; max-width: 1200px; margin: 0 auto; }
.regime-banner {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.regime-label { font-size: 0.65rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.regime-value { font-size: 1.5rem; font-weight: 800; flex: 1; }
.regime-meta { font-size: 0.75rem; color: var(--muted); }
.regime-banner.bull .regime-value { color: var(--green); }
.regime-banner.bear .regime-value { color: var(--red); }
.regime-banner.neutral .regime-value { color: var(--amber); }
.regime-banner.wartime .regime-value { color: var(--red); }
.regime-banner.risk-on .regime-value { color: var(--green); }
.regime-banner.cautious-bull .regime-value { color: var(--green); }
.regime-banner.risk-off .regime-value { color: var(--amber); }
.regime-banner.bear .regime-value { color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.card h2 { font-size: 0.85rem; margin-bottom: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.list .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.list .row:last-child { border-bottom: none; }
.dim { color: var(--muted); font-weight: 400; }
.ok { color: var(--green); }
.err { color: var(--red); }
.warn { color: var(--amber); }
.mono {
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.7rem;
  overflow: auto;
  max-height: 200px;
  white-space: pre-wrap;
  word-break: break-word;
}
.mono.small { max-height: 80px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}
.statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
.pulse.err { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }