:root {
  --bg: #070a12;
  --panel: #0b1020;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef8;
  --dim: rgba(232, 238, 248, 0.82);
  --glow: #6ee7ff;
  --ember: #ff9b6a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Noto Sans", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.dim {
  color: var(--dim);
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(110, 231, 255, 0.12), transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(255, 155, 106, 0.10), transparent 40%),
    radial-gradient(circle at 40% 85%, rgba(255, 255, 255, 0.06), transparent 45%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns=%22http%3A//www.w3.org/2000/svg%22%20width=%224%22%20height=%224%22%3E%3Cpath%20d=%22M0%200h1v1H0z%22%20fill=%22%23fff%22/%3E%3C/svg%3E");
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.75);
  backdrop-filter: blur(10px);
}

.brand {
  min-width: 240px;
  max-width: 60vw;
}

.title {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sub {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.err {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 140, 140, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn,
.btnPrimary,
.btnLink {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  text-decoration: none;
}

.btn:hover,
.btnLink:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btnPrimary {
  border-color: rgba(110, 231, 255, 0.28);
  background: rgba(110, 231, 255, 0.10);
  color: var(--text);
}

.btnPrimary:hover {
  background: rgba(110, 231, 255, 0.14);
}

.btnPrimary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
}

.pill input[type="checkbox"] {
  accent-color: var(--glow);
}

.sec {
  width: 56px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  text-align: right;
  font-family: inherit;
}

.grid {
  position: relative;
  padding: 12px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 58px);
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 58px);
  }
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--panel);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panelTitle {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rightHead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.90);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  max-width: 220px;
}

.select option {
  background: var(--panel);
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.80);
}

.list {
  padding: 10px;
  overflow: auto;
  flex: 1;
}

.item {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  display: block;
  margin-bottom: 8px;
}

.item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.item.active {
  border-color: rgba(110, 231, 255, 0.30);
  background: rgba(110, 231, 255, 0.10);
}

.itMain {
  min-width: 0;
  flex: 1;
}

.itTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.sym {
  font-weight: 800;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf {
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 255, 0.28);
  background: rgba(110, 231, 255, 0.10);
  color: var(--glow);
  padding: 3px 10px;
}

.fn {
  margin-top: 6px;
  font-size: 12px;
  opacity: 1;
  color: rgba(255, 255, 255, 0.90);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis {
  padding: 12px;
  overflow: auto;
  flex: 1;
}

.card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.stack {
  display: grid;
  gap: 10px;
}

.hidden {
  display: none;
}

.k {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.v {
  margin-top: 6px;
  font-size: 14px;
}

.alt {
  margin-top: 6px;
  font-size: 12px;
}

.conf {
  margin-top: 10px;
}

.confRow {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.bar {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
}

.barIn {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--glow), var(--ember));
}

.kv {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
  padding: 10px 10px;
  font-size: 12px;
}

.summary {
  margin-top: 8px;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  font-size: 13px;
}

.chartWrap {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.chartImg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: contain;
}

.chartMeta {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.92;
}
