:root {
  --bg: #0d1321;
  --surface: rgba(17, 24, 39, 0.88);
  --surface-2: rgba(30, 41, 59, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --copy: #e5eefb;
  --muted: #9fb3cc;
  --accent: #3dd9b3;
  --accent-2: #5ea3ff;
  --danger: #ff7b72;
}

body {
  min-height: 100vh;
  color: var(--copy);
  background:
    radial-gradient(circle at top right, rgba(61, 217, 179, 0.14), transparent 32%),
    radial-gradient(circle at 20% 20%, rgba(94, 163, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #08111f 0%, #0d1321 48%, #111827 100%);
}

a {
  color: #9fd2ff;
}

.app-shell {
  min-height: 100vh;
}

.panel-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
  padding: 1.25rem;
}

.hero {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.32));
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.hero .search-panel {
  background: var(--surface-2);
}

.hero-copy {
  color: var(--muted);
  max-width: 52rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-results {
  max-height: 26rem;
  overflow-y: auto;
  border-radius: 1rem;
}

.result-item {
  background: rgba(15, 23, 42, 0.9);
  color: var(--copy);
  border-color: rgba(148, 163, 184, 0.1);
}

.result-item:hover,
.result-item:focus {
  background: rgba(30, 41, 59, 0.96);
  color: var(--copy);
}

.badge-symbol {
  background: rgba(94, 163, 255, 0.22);
  color: #dcebff;
}

.badge-meta {
  background: rgba(148, 163, 184, 0.14);
  color: #dbe7f6;
}

.yield-badge {
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem;
  text-transform: uppercase;
}

.yield-badge.source-api {
  background: rgba(94, 163, 255, 0.18);
  color: #dcebff;
}

.yield-badge.source-forward {
  background: rgba(168, 85, 247, 0.18);
  color: #f3e8ff;
}

.yield-badge.source-analytics {
  background: rgba(94, 163, 255, 0.18);
  color: #dcebff;
}

.yield-badge.source-calculated {
  background: rgba(61, 217, 179, 0.18);
  color: #d9fff5;
}

.yield-warning {
  border: 1px solid rgba(255, 196, 84, 0.28);
  border-radius: 999px;
  background: rgba(255, 196, 84, 0.12);
  color: #ffe4a3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  text-transform: uppercase;
}

.toggle-group .btn {
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted);
}

.toggle-group .btn.active,
.toggle-group .btn:hover,
.toggle-group .btn:focus {
  background: rgba(61, 217, 179, 0.14);
  border-color: rgba(61, 217, 179, 0.32);
  color: var(--copy);
}

.metric-card {
  display: flex;
  min-height: 7rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid rgba(94, 163, 255, 0.12);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.78);
  padding: 1rem;
}

.metric-card strong {
  font-size: 1.35rem;
}

.metric-card small,
.metric-label {
  color: var(--muted);
}

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.3rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: #dbe7f6;
  cursor: help;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.info-tip::before,
.info-tip::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.35rem);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 20;
}

.info-tip::before {
  bottom: calc(100% + 0.25rem);
  border-width: 0.35rem;
  border-style: solid;
  border-color: rgba(8, 17, 31, 0.96) transparent transparent transparent;
  content: "";
}

.info-tip::after {
  bottom: calc(100% + 0.95rem);
  width: min(18rem, 70vw);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.8rem;
  background: rgba(8, 17, 31, 0.96);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
  color: var(--copy);
  content: attr(data-tip);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  text-align: left;
  white-space: normal;
}

.info-tip:hover::before,
.info-tip:hover::after,
.info-tip:focus-visible::before,
.info-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.metadata-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metadata-grid .wide {
  grid-column: span 2;
}

.metadata-grid dt {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metadata-grid dd {
  margin: 0;
  font-weight: 500;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.pill-grid,
.rating-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pill-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(61, 217, 179, 0.14);
  background: rgba(15, 23, 42, 0.76);
  padding: 0.9rem 1rem;
}

.pill-card span {
  color: var(--muted);
  font-size: 0.83rem;
}

.pill-card strong {
  font-size: 1.1rem;
}

.spotlight-card {
  border-radius: 1rem;
  border: 1px solid rgba(94, 163, 255, 0.12);
  background: rgba(15, 23, 42, 0.76);
  padding: 1rem;
}

.spotlight-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.collection-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.spotlight-links a {
  border-radius: 999px;
  border: 1px solid rgba(61, 217, 179, 0.16);
  background: rgba(61, 217, 179, 0.08);
  color: #bdf7ea;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  text-decoration: none;
}

.spotlight-links a:hover,
.spotlight-links a:focus {
  background: rgba(61, 217, 179, 0.16);
  color: #ddfff7;
}

.table-shell {
  min-height: 12rem;
}

.rating-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.74);
  padding: 1rem;
}

.rating-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.rating-kicker,
.rating-target-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rating-headline {
  font-size: 1.05rem;
  font-weight: 700;
}

.rating-target {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.rating-target strong {
  font-size: 0.96rem;
}

.rating-meter {
  display: flex;
  overflow: hidden;
  height: 0.8rem;
  margin-top: 1rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.rating-segment {
  height: 100%;
}

.rating-segment.buy {
  background: linear-gradient(90deg, rgba(61, 217, 179, 0.95), rgba(29, 185, 84, 0.95));
}

.rating-segment.hold {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.9), rgba(245, 158, 11, 0.9));
}

.rating-segment.sell {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.92), rgba(239, 68, 68, 0.92));
}

.rating-breakdown {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 1rem;
}

.rating-breakdown-card {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(2, 6, 23, 0.24);
  padding: 0.85rem 0.9rem;
}

.rating-breakdown-card span,
.rating-breakdown-card small {
  color: var(--muted);
}

.rating-breakdown-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.rating-breakdown-card small {
  display: block;
  margin-top: 0.15rem;
}

.rating-breakdown-card.buy {
  border-color: rgba(61, 217, 179, 0.16);
}

.rating-breakdown-card.hold {
  border-color: rgba(250, 204, 21, 0.16);
}

.rating-breakdown-card.sell {
  border-color: rgba(248, 113, 113, 0.16);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(30, 41, 59, 0.45);
  --bs-table-hover-bg: rgba(51, 65, 85, 0.4);
  --bs-table-border-color: rgba(148, 163, 184, 0.1);
  font-size: 0.92rem;
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  color: var(--muted);
  padding: 1rem;
  background: rgba(15, 23, 42, 0.56);
}

.empty-state.compact {
  padding: 0.9rem;
}

.events-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 0.35rem;
  max-width: 42rem;
}

.dividend-frequency-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.dividend-frequency-badge {
  border-radius: 999px;
  border: 1px solid rgba(61, 217, 179, 0.22);
  background: rgba(61, 217, 179, 0.12);
  color: #d9fff5;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  text-transform: uppercase;
}

.details-panel {
  top: 1rem;
}

@media (max-width: 991.98px) {
  .metadata-grid,
  .metadata-grid .wide {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }

  .rating-overview {
    flex-direction: column;
  }
}
