:root {
  --bg: #05070a;
  --bg-alt: #0a0f16;
  --panel: rgba(11, 15, 20, 0.95);
  --panel-strong: rgba(16, 22, 31, 0.98);
  --border: rgba(255, 170, 55, 0.14);
  --border-strong: rgba(255, 170, 55, 0.28);
  --text: #edf2f7;
  --muted: #8f9aa7;
  --accent: #ff9f1c;
  --accent-soft: rgba(255, 159, 28, 0.14);
  --positive: #47d6a4;
  --negative: #ff6b6b;
  --warning: #ffd166;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Price Change Animations */
@keyframes flash-green {
  0% { background-color: rgba(71, 214, 164, 0.4); }
  100% { background-color: transparent; }
}

@keyframes flash-red {
  0% { background-color: rgba(255, 107, 107, 0.4); }
  100% { background-color: transparent; }
}

.flash-up { animation: flash-green 1s ease-out; }
.flash-down { animation: flash-red 1s ease-out; }

.watch-pricing strong, .focus-price-block strong, .ticker-item strong {
  transition: all 0.3s ease;
  padding: 0 4px;
  border-radius: 3px;
  display: inline-block;
}


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 159, 28, 0.13), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(71, 214, 164, 0.08), transparent 22%),
    linear-gradient(180deg, #06080c 0%, #030406 100%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1640px;
  margin: 0 auto;
  padding: 22px;
}

.topbar,
.topbar-actions,
.language-toggle,
.topbar-center,
.hero-status,
.status-block,
.context-topline,
.context-meta,
.panel-header,
.watch-main,
.watch-subline,
.focus-header,
.focus-price-block,
.history-foot,
.account-switch {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.ticker-strip {
  display: grid;
  grid-template-columns: 180px max-content minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 12px 18px;
}

.ticker-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-label {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ticker-toggle,
.ticker-filter {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.ticker-toggle:hover,
.ticker-filter:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

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

.ticker-filter {
  color: var(--muted);
  font-size: 0.8rem;
}

.ticker-filter.is-active,
.ticker-toggle {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.18), rgba(255, 159, 28, 0.06));
  border-color: rgba(255, 159, 28, 0.28);
}

.ticker-marquee {
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: ticker-scroll 38s linear infinite;
}

.ticker-marquee:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-track.is-paused {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.ticker-symbol {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.topbar-brand h1,
.panel h2,
.focus-price-block strong {
  margin: 0;
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
  letter-spacing: 0.04em;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 600px;
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
}

.search-shell {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.search-shell:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-label {
  margin: 0 0 2px;
  font-size: 0.65rem;
  opacity: 0.8;
}

.search-shell input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 0.95rem;
  padding: 2px 0;
}


.topbar-actions,
.language-toggle {
  gap: 10px;
}

.account-menu {
  position: relative;
}

.account-toggle.is-open {
  border-color: rgba(255, 159, 28, 0.36);
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.22), rgba(255, 159, 28, 0.06));
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 19, 27, 0.99), rgba(8, 11, 16, 0.98));
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 30;
}

.account-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-button,
.action-button,
.market-tab {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.lang-button:hover,
.action-button:hover,
.market-tab:hover,
.watch-row:hover,
.heatmap-tile:hover,
.news-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.lang-button.is-active,
.market-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.22), rgba(255, 159, 28, 0.06));
  border-color: rgba(255, 159, 28, 0.36);
}

.panel {
  background: linear-gradient(180deg, rgba(14, 19, 27, 0.98), rgba(8, 11, 16, 0.96));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
}

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

.hero-text {
  max-width: 42rem;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-metrics,
.focus-stats,
.pulse-grid {
  display: grid;
  gap: 12px;
}

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

.metric-card,
.insight-card,
.pulse-card,
.focus-stat,
.context-card,
.news-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.metric-card,
.pulse-card,
.focus-stat,
.context-card,
.news-card {
  padding: 16px;
}

.metric-label {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.55rem;
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
}

.plan-pill,
.plan-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 159, 28, 0.1);
  border: 1px solid rgba(255, 159, 28, 0.16);
  color: #ffd8a4;
  font-size: 0.82rem;
}

.hero-status {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.status-block {
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 159, 28, 0.08);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 18px rgba(71, 214, 164, 0.72);
}

.insight-rail {
  display: grid;
  gap: 12px;
}

.insight-card {
  padding: 14px 16px;
}

.insight-card h3,
.pulse-card h3,
.context-card strong,
.news-card strong {
  margin: 0 0 8px;
}

.terminal-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1.45fr) 420px;
  gap: 18px;
  align-items: start;
}

.column {
  display: grid;
  gap: 18px;
}

.panel-header {
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 0;
}

.panel-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 159, 28, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
}

.market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px 0;
}

.watchlist {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.account-shell {
  padding: 18px 20px 20px;
}

.header-account-shell {
  padding: 16px;
}

.account-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.account-meta {
  display: grid;
  gap: 6px;
}

.account-switch {
  gap: 10px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form input {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

.account-action {
  width: fit-content;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.error-text {
  color: var(--negative);
  font-size: 0.88rem;
}

.favorite-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 159, 28, 0.12);
  border: 1px solid rgba(255, 159, 28, 0.18);
  font-size: 0.84rem;
}

.watch-row,
.heatmap-tile {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.watch-row.is-selected {
  border-color: rgba(255, 159, 28, 0.34);
  background: linear-gradient(180deg, rgba(255, 159, 28, 0.16), rgba(255, 159, 28, 0.04));
}

.watch-more-row {
  display: grid;
  gap: 6px;
  text-align: left;
  border-style: dashed;
  border-color: rgba(255, 159, 28, 0.22);
  background: rgba(255, 159, 28, 0.05);
}

.watch-main,
.watch-subline,
.context-topline,
.context-meta,
.history-foot {
  justify-content: space-between;
  gap: 12px;
}

.watch-subline,
.context-meta {
  flex-wrap: wrap;
}

.watch-subline {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.asset-cell {
  display: grid;
  gap: 4px;
  text-align: left;
}

.asset-class {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.watch-pricing {
  display: grid;
  gap: 4px;
  text-align: right;
}

.sparkline {
  width: 120px;
  height: 32px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 20px;
}

.heatmap-tile {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  text-align: left;
}

.heatmap-tile.positive {
  background: linear-gradient(180deg, rgba(71, 214, 164, 0.18), rgba(71, 214, 164, 0.05));
}

.heatmap-tile.negative {
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.18), rgba(255, 107, 107, 0.05));
}

.heatmap-tile.neutral {
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.14), rgba(255, 209, 102, 0.05));
}

.heatmap-tile strong,
.focus-price-block strong {
  font-size: 1.6rem;
}

.heatmap-price {
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
}

.focus-panel {
  padding-bottom: 20px;
}

.focus-header {
  align-items: flex-end;
}

.focus-price-block {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.favorite-toggle {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 159, 28, 0.08);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
}

.favorite-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.focus-price-block span {
  font-size: 1.1rem;
}

.focus-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 20px 0;
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px 0;
}

.timeframe-group,
.indicator-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.timeframe-button,
.indicator-button {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
}

.timeframe-button.is-active,
.indicator-button.is-active {
  color: var(--text);
  border-color: rgba(255, 159, 28, 0.28);
  background: rgba(255, 159, 28, 0.12);
}

.focus-stat {
  min-height: 96px;
}

.focus-stat strong {
  display: block;
  margin-top: 10px;
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
}

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

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

.neutral,
.warning {
  color: var(--warning);
}

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

.history-chart-wrap {
  position: relative;
  padding: 12px 0;
}

.lightweight-chart-container {
  width: 100%;
  height: 440px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  overflow: hidden;
}
}

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

.crosshair-line {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  opacity: 0;
}

.crosshair-overlay {
  fill: transparent;
  cursor: crosshair;
}

.crosshair-overlay:hover ~ .crosshair-line,
.history-chart:hover .crosshair-line {
  opacity: 1;
}

.candle-wick {
  stroke-width: 1.6;
}

.candle-body.positive,
.candle-wick.positive {
  fill: rgba(71, 214, 164, 0.74);
  stroke: rgba(71, 214, 164, 0.9);
}

.candle-body.negative,
.candle-wick.negative {
  fill: rgba(255, 107, 107, 0.74);
  stroke: rgba(255, 107, 107, 0.9);
}

.indicator-panel {
  padding: 12px 20px 0;
}

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

.rsi-chart {
  width: 100%;
  height: 144px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.rsi-guide {
  stroke: rgba(255, 159, 28, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.rsi-guide.mid {
  stroke: rgba(255, 255, 255, 0.08);
}

.macd-bar.positive {
  fill: rgba(71, 214, 164, 0.55);
}

.macd-bar.negative {
  fill: rgba(255, 107, 107, 0.55);
}

.crosshair-tooltip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: none;
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 18, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.crosshair-tooltip.is-visible {
  display: grid;
  gap: 4px;
}

.crosshair-tooltip strong {
  font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
  font-size: 0.9rem;
}

.crosshair-tooltip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.history-foot {
  padding: 12px 20px 0;
}

.history-range,
.history-stats {
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  padding: 18px 20px 0;
  overflow: auto;
}

.table-wrap.compact {
  padding-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pulse-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px 20px 20px;
}

.calendar-list,
.news-list {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.context-note,
.plan-note,
.loading,
.error,
.empty-state {
  padding: 4px 0 10px;
  color: var(--muted);
}

.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-badge.market {
  background: rgba(255, 159, 28, 0.12);
}

.news-badge.official {
  background: rgba(71, 214, 164, 0.12);
}

.news-badge.social {
  background: rgba(102, 178, 255, 0.12);
}

.importance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.dot.level-2 {
  background: var(--accent);
}

.dot.level-3 {
  background: var(--negative);
}

@media (max-width: 1360px) {
  .ticker-strip {
    grid-template-columns: 1fr;
  }

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

  .terminal-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }

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

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

  .topbar-center {
    justify-content: flex-start;
  }

  .ticker-side {
    justify-content: space-between;
  }

  .account-menu {
    width: 100%;
  }

  .account-toggle {
    width: 100%;
  }

  .account-dropdown {
    left: 0;
    right: 0;
    width: 100%;
  }

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

  .column-right {
    grid-template-columns: 1fr;
  }

  .focus-stats,
  .pulse-grid,
  .hero-metrics,
  .heatmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 14px;
  }

  .topbar-actions,
  .focus-header,
  .history-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .ticker-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .ticker-item {
    padding: 7px 10px;
  }

  .focus-price-block {
    align-items: flex-start;
  }

  .focus-stats,
  .pulse-grid,
  .hero-metrics,
  .heatmap-grid {
    grid-template-columns: 1fr;
  }

  .sparkline {
    width: 92px;
  }
}

/* AI Feature Styles */
.ai-trigger-wrap {
  grid-column: span 2;
  margin-top: 8px;
}

.ai-button {
  background: linear-gradient(135deg, #ff9f1c 0%, #f77f00 100%);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 159, 28, 0.3);
}

.ai-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 159, 28, 0.4);
}

.ai-explanation-area {
  grid-column: span 4;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  display: none;
  line-height: 1.6;
}

.ai-explanation-area.is-visible {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.ai-content {
  white-space: pre-line;
  font-size: 0.95rem;
}

.ai-content h2,
.ai-content h3 {
  margin: 0 0 10px;
  color: var(--text);
}

.ai-content p {
  margin: 0 0 12px;
}

.ai-content ul {
  margin: 0 0 14px 18px;
  padding: 0;
}

.ai-content li {
  margin-bottom: 8px;
}

.catalyst-modal-body .ai-content {
  white-space: normal;
}

.ai-loading {
  font-style: italic;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.context-card.is-interactive,
.calendar-item.is-interactive {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.context-card.is-interactive:hover,
.calendar-item.is-interactive:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 15, 0.78);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--panel-strong);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.catalyst-modal-meta {
  margin-top: 8px;
  margin-bottom: 12px;
}

.catalyst-affected-wrap {
  margin-top: 14px;
}

.catalyst-affected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.catalyst-affected-card {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.catalyst-affected-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.catalyst-modal-body {
  display: block;
  margin-top: 0;
  min-height: 180px;
  white-space: pre-line;
}

.catalyst-forecast-panel {
  margin-bottom: 14px;
}

.analyst-grid {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.analyst-card {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 14px;
}

.analyst-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.analyst-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--panel);
}

.analyst-bio,
.analyst-summary,
.analyst-rationale {
  margin: 0 0 10px;
}

.analyst-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Header Search & Navigation */
.search-wrap {
  position: relative;
  width: 100%;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: var(--shadow);
}

.search-results-dropdown.is-visible {
  display: block;
}

.search-result-item {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.search-result-item:hover {
  background: var(--accent-soft);
}

.search-result-item:last-child {
  border-bottom: none;
}

/* Instrument View Layout */
.instrument-view {
  padding: 0 22px 22px;
  animation: fadeIn 0.4s ease-out;
}

.breadcrumb {
  margin-bottom: 16px;
}

.back-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.back-button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.universe-view {
  padding: 0 22px 22px;
  animation: fadeIn 0.4s ease-out;
}

.universe-panel {
  min-height: 60vh;
}

.universe-toolbar {
  display: grid;
  gap: 14px;
  padding: 18px 20px 0;
}

.universe-search-shell {
  max-width: 520px;
}

.universe-watchlist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.instrument-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  margin-bottom: 22px;
}

.instrument-header h1 {
  margin: 0 0 4px 0;
  font-size: 2rem;
  color: var(--accent);
}

.header-pricing {
  text-align: right;
}

.header-pricing strong {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.instrument-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 22px;
}

.instr-large-chart {
  height: 500px !important;
}

.ai-deep-panel {
  margin-top: 22px;
}

@media (max-width: 1200px) {
  .instrument-grid {
    grid-template-columns: 1fr;
  }

  .universe-watchlist {
    grid-template-columns: 1fr;
  }
}
