:root {
  color-scheme: dark;
  --canvas: #080a0f;
  --canvas-2: #0b1017;
  --surface: #111722;
  --surface-2: #151d28;
  --surface-3: #182130;
  --border: rgba(119, 134, 156, 0.18);
  --border-strong: rgba(245, 184, 75, 0.34);
  --text: #f2f5fb;
  --muted: #8f9bad;
  --accent: #f5b84b;
  --strong: #34d399;
  --risk: #f87171;
  --oi: #f5b84b;
  --chain: #60a5fa;
  --divergence: #b794f4;
  --neutral: #79879b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --radius-sm: 12px;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(245, 184, 75, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    var(--canvas);
  color: var(--text);
  font-family: var(--sans);
}

body {
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 430px;
  gap: 18px;
  padding: 18px;
  min-height: 100vh;
}

.side-nav,
.detail-panel,
.card,
.section-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-nav {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong,
.brand-copy span,
.nav-item span,
.topbar-title,
.meta-pill,
.status-chip {
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(245, 184, 75, 0.1);
  border-color: rgba(245, 184, 75, 0.22);
  color: var(--text);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-note {
  margin-top: auto;
  padding: 14px;
}

.side-note p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.main-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(10, 14, 22, 0.92);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-title {
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-family: var(--mono);
}

.status-chip,
.meta-pill,
.filter-chip,
.tag,
.rank-pill,
.stage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.status-chip {
  background: rgba(255, 255, 255, 0.03);
}

.signal-oi {
  border-color: rgba(245, 184, 75, 0.25);
  color: var(--oi);
}

.signal-chain {
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--chain);
}

.hero-grid,
.visual-grid,
.bottom-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
}

.hero-card,
.market-summary-card,
.section-card,
.detail-panel {
  overflow: hidden;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 16px;
  padding: 22px;
}

.hero-card::after,
.section-card::after,
.detail-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 76%, rgba(245, 184, 75, 0.07) 76% 76.4%, transparent 76.4%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02), transparent 30%);
}

.hero-copy h1 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-description {
  margin: 18px 0 0;
  max-width: 46ch;
  color: #c9d2df;
  line-height: 1.7;
}

.hero-meta,
.summary-keywords,
.detail-chip-row,
.keyword-row,
.filter-row,
.bubble-legend,
.stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.04);
}

.hero-visual {
  display: flex;
  align-items: stretch;
}

.hero-visual-frame {
  width: 100%;
  min-height: 260px;
  border-radius: 18px;
  border: 1px solid rgba(245, 184, 75, 0.18);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(245, 184, 75, 0.06), transparent),
    #0f141d;
}

.hero-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: screen;
}

.market-summary-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(245, 184, 75, 0.08), rgba(96, 165, 250, 0.03)),
    var(--surface-2);
}

.market-summary-card h2,
.section-head h2,
.detail-header h2 {
  margin: 6px 0 0;
  font-size: 1.2rem;
}

.market-summary-card p {
  margin: 0;
  color: #d5dce7;
  line-height: 1.7;
}

.summary-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: auto;
}

.summary-foot strong,
.metric-value,
.detail-score strong {
  font-family: var(--mono);
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
  min-width: 0;
}

.metric-top,
.metric-value,
.metric-note,
.metric-spark {
  min-width: 0;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.metric-label,
.detail-stat span,
.progress-top span,
.risk-bar-top span,
.weight-top span,
.timeline-top span,
.compact-insights span {
  color: var(--muted);
}

.metric-delta {
  font-size: 0.76rem;
  font-family: var(--mono);
}

.metric-delta.positive,
.positive,
.metric-spark.positive {
  color: var(--strong);
}

.metric-delta.negative,
.negative,
.metric-spark.negative {
  color: var(--risk);
}

.metric-delta.muted,
.muted,
.metric-spark.muted {
  color: var(--muted);
}

.metric-value {
  margin-top: 14px;
  font-size: 1.36rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.metric-note {
  margin-top: 10px;
  color: #c0cad8;
  line-height: 1.5;
  font-size: 0.84rem;
}

.sparkline {
  width: 100%;
  height: 28px;
}

.section-card {
  padding: 18px;
}

.section-head,
.detail-header,
.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-actions,
.compact-insights {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-row {
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.filter-row::-webkit-scrollbar,
.table-shell::-webkit-scrollbar,
.detail-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.filter-row::-webkit-scrollbar-thumb,
.table-shell::-webkit-scrollbar-thumb,
.detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.filter-chip.active {
  background: rgba(245, 184, 75, 0.14);
  color: var(--text);
  border-color: rgba(245, 184, 75, 0.3);
}

.filter-state,
.chart-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.table-shell {
  margin-top: 14px;
  overflow: auto;
}

.token-table,
.mini-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.token-table th,
.token-table td,
.mini-table th,
.mini-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  vertical-align: top;
}

.token-table th,
.mini-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(10, 14, 22, 0.96);
  color: var(--muted);
  font-weight: 500;
}

.token-table tr:hover,
.token-table tr.selected {
  background: rgba(245, 184, 75, 0.08);
}

.token-table tr.top-rank {
  box-shadow: inset 2px 0 0 rgba(245, 184, 75, 0.7);
}

.symbol-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.symbol-cell span,
.reason-cell {
  color: var(--muted);
}

.rank-pill {
  min-width: 34px;
  background: rgba(245, 184, 75, 0.12);
  border-color: rgba(245, 184, 75, 0.2);
  font-family: var(--mono);
}

.tag {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.76rem;
  width: max-content;
}

.tag.strong {
  color: var(--strong);
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
}

.tag.risk {
  color: var(--risk);
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.08);
}

.tag.oi,
.range-card.oi {
  color: var(--oi);
  border-color: rgba(245, 184, 75, 0.24);
  background: rgba(245, 184, 75, 0.08);
}

.tag.chain,
.range-card.chain {
  color: var(--chain);
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.08);
}

.tag.divergence,
.range-card.divergence {
  color: var(--divergence);
  border-color: rgba(183, 148, 244, 0.26);
  background: rgba(183, 148, 244, 0.08);
}

.tag.narrative,
.tag.neutral,
.range-card.neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.score-cell {
  display: grid;
  gap: 8px;
}

.score-bar,
.weight-bar,
.progress-bar {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.score-bar i,
.weight-bar i,
.progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(245, 184, 75, 0.3), var(--accent));
}

.progress-bar.strong i {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.2), var(--strong));
}

.progress-bar.oi i {
  background: linear-gradient(90deg, rgba(245, 184, 75, 0.2), var(--oi));
}

.progress-bar.risk i {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.2), var(--risk));
}

.progress-bar.divergence i {
  background: linear-gradient(90deg, rgba(183, 148, 244, 0.2), var(--divergence));
}

.visual-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
}

.chart-shell {
  position: relative;
  margin-top: 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(10, 14, 22, 0.86);
}

#bubbleChart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.2;
}

.chart-label,
.bubble-text {
  fill: #d7dee9;
  font-family: var(--mono);
  font-size: 12px;
}

.bubble-core {
  fill-opacity: 0.24;
  stroke-width: 1.4;
}

.bubble-halo {
  fill: none;
  stroke-width: 1.2;
  opacity: 0.85;
}

.bubble-core.strong,
.bubble-halo.strong,
.dot.strong {
  fill: rgba(52, 211, 153, 0.25);
  stroke: var(--strong);
}

.bubble-core.oi,
.bubble-halo.oi,
.dot.oi {
  fill: rgba(245, 184, 75, 0.24);
  stroke: var(--oi);
}

.bubble-core.risk,
.bubble-halo.risk,
.dot.risk {
  fill: rgba(248, 113, 113, 0.22);
  stroke: var(--risk);
}

.bubble-core.chain,
.bubble-halo.chain,
.dot.chain {
  fill: rgba(96, 165, 250, 0.22);
  stroke: var(--chain);
}

.bubble-core.divergence,
.bubble-halo.divergence,
.dot.divergence {
  fill: rgba(183, 148, 244, 0.22);
  stroke: var(--divergence);
}

.bubble-core.neutral,
.bubble-halo.neutral,
.dot.neutral {
  fill: rgba(121, 135, 155, 0.2);
  stroke: var(--neutral);
}

.bubble-node {
  cursor: pointer;
}

.bubble-tooltip {
  position: absolute;
  min-width: 160px;
  max-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 184, 75, 0.2);
  background: rgba(8, 10, 15, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  pointer-events: none;
}

.legend-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.heatmap-wrap {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 110px repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.heatmap-row.header {
  color: var(--muted);
  font-size: 0.8rem;
}

.heatmap-token {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.heat-cell {
  position: relative;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow: hidden;
}

.heat-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--heat);
  background: currentColor;
  opacity: 0.18;
}

.heat-cell > * {
  position: relative;
}

.heat-cell.strong {
  color: var(--strong);
}

.heat-cell.oi {
  color: var(--oi);
}

.heat-cell.risk {
  color: var(--risk);
}

.heat-cell.chain {
  color: var(--chain);
}

.heat-cell.divergence {
  color: var(--divergence);
}

.heat-cell.neutral {
  color: var(--neutral);
}

.bottom-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}

.insight-list {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
  color: #d2dae7;
  line-height: 1.65;
}

.weight-list {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.weight-top,
.progress-top,
.risk-bar-top,
.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.score-range-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.range-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.detail-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-scroll {
  margin-top: 16px;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  gap: 14px;
}

.detail-section {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-section.primary {
  background:
    linear-gradient(180deg, rgba(245, 184, 75, 0.08), transparent),
    rgba(255, 255, 255, 0.03);
}

.token-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.token-heading h3,
.panel-empty h3 {
  margin: 8px 0 0;
}

.token-subline,
.analysis-text p,
.stage-note,
.timeline-body p,
.panel-empty p {
  color: #cbd4df;
  line-height: 1.65;
}

.detail-score {
  min-width: 88px;
  text-align: right;
}

.detail-score strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.detail-stats-grid,
.pressure-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.detail-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-stat,
.progress-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.analysis-text {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.analysis-text p,
.stage-note,
.timeline-body p,
.panel-empty p {
  margin: 0;
}

.stage-row {
  margin-top: 16px;
}

.stage-pill {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.stage-pill.active {
  border-color: rgba(245, 184, 75, 0.3);
  background: rgba(245, 184, 75, 0.14);
  color: var(--text);
}

.pressure-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-table {
  min-width: 0;
}

.timeline {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
}

.timeline-time {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.82rem;
}

.timeline-body {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.timeline-item.positive .timeline-body {
  border-color: rgba(52, 211, 153, 0.18);
}

.timeline-item.negative .timeline-body {
  border-color: rgba(248, 113, 113, 0.2);
}

.risk-bars {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.alert-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  color: #ffd3d3;
  background: rgba(248, 113, 113, 0.08);
  font-size: 0.84rem;
}

.risk-summary-card {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.risk-summary-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.risk-score-badge {
  min-width: 52px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  border-radius: 14px;
  border: 1px solid rgba(245, 184, 75, 0.26);
  background: rgba(245, 184, 75, 0.08);
}

.empty-state,
.panel-empty {
  padding: 22px 8px;
  color: var(--muted);
}

.page-footer {
  padding: 4px 6px 18px;
}

.page-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-banner-copy h2 {
  margin: 6px 0 0;
  font-size: 1.08rem;
}

.status-banner-copy p {
  margin: 10px 0 0;
  color: #cad3df;
  line-height: 1.65;
  max-width: 72ch;
}

.status-banner-meta {
  display: grid;
  gap: 14px;
  justify-items: end;
  min-width: 260px;
}

.status-banner-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
}

.status-pill strong {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
}

.status-pill.positive {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.08);
}

.status-pill.negative {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.08);
}

.status-pill.oi {
  border-color: rgba(245, 184, 75, 0.24);
  background: rgba(245, 184, 75, 0.08);
}

.status-pill.chain {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.08);
}

.mini-spark {
  width: 100%;
  height: 44px;
  display: block;
}

.mini-stat-grid,
.pressure-grid,
.compact-grid {
  display: grid;
  gap: 12px;
}

.mini-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-stat,
.compact-card {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.mini-stat strong,
.compact-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.mini-stat span,
.compact-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-card p {
  margin: 8px 0 0;
  color: #d3dbe6;
  font-size: 0.84rem;
  line-height: 1.5;
}

.placeholder-text {
  color: var(--muted);
  line-height: 1.65;
}

.trend-shell {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 14, 22, 0.64);
}

.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trend-head strong {
  font-size: 0.9rem;
}

.trend-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.trend-grid,
.trend-list {
  display: grid;
  gap: 12px;
}

.trend-list {
  margin-top: 14px;
  gap: 8px;
}

.trend-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d6ddea;
  font-size: 0.84rem;
}

.trend-list-item span {
  color: var(--muted);
}

.chart-empty {
  fill: var(--muted);
  font-size: 14px;
  font-family: var(--sans);
}

.sort-button,
.icon-button,
.close-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.sort-button {
  padding: 0;
  color: inherit;
  font-weight: inherit;
}

.sort-button.active {
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.close-button {
  font-size: 1.5rem;
  line-height: 1;
}

.mobile-only,
.mobile-nav-backdrop {
  display: none;
}

#menuToggle {
  gap: 4px;
}

#menuToggle span {
  display: block;
  width: 16px;
  height: 1.6px;
  background: currentColor;
  border-radius: 999px;
}

@media (max-width: 1680px) {
  .app-shell {
    grid-template-columns: 228px minmax(0, 1fr) 390px;
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .app-shell {
    grid-template-columns: 208px minmax(0, 1fr) 360px;
  }

  .hero-grid,
  .visual-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .side-nav {
    position: fixed;
    inset: 14px auto 14px 14px;
    width: min(320px, calc(100vw - 28px));
    transform: translateX(-120%);
    transition: transform 180ms ease;
    z-index: 30;
  }

  .side-nav.mobile-open {
    transform: translateX(0);
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 24;
  }

  .mobile-nav-backdrop.visible {
    display: block;
  }

  .mobile-only {
    display: inline-grid;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .detail-panel {
    position: fixed;
    inset: auto 10px 10px 10px;
    max-height: 78vh;
    transform: translateY(calc(100% + 20px));
    transition: transform 180ms ease;
    z-index: 26;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .detail-panel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 780px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-banner-meta {
    width: 100%;
    justify-items: stretch;
  }

  .status-banner-kpis {
    justify-content: flex-start;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-foot,
  .detail-stats-grid,
  .pressure-grid,
  .mini-stat-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .heatmap-row {
    grid-template-columns: 88px repeat(5, minmax(0, 1fr));
  }

  .section-card,
  .hero-card,
  .market-summary-card,
  .detail-panel {
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 10px;
    gap: 12px;
  }

  .topbar,
  .section-card,
  .hero-card,
  .market-summary-card {
    padding: 14px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .heatmap-wrap,
  .chart-shell,
  .table-shell {
    overflow-x: auto;
  }

  .heatmap-row {
    min-width: 420px;
  }
}
