/* Leaderboard cards → match Fed liquidity-card look */
.leaderboard-box {
  background: radial-gradient(circle at top left, rgba(24, 34, 60, 0.95), rgba(10, 14, 26, 0.95));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 204, 153, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.7);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}
.leaderboard-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 204, 153, 0.4);
  border-color: rgba(0, 204, 153, 0.4);
}

/* Leaderboard titles → match liq-title */
.leaderboard-box h6 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #d7f4ff;
  font-weight: 600;
}

/* Leaderboard table → match yield-table and Fed palette */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  color: #e8f6f8;
}

.leaderboard-table thead th {
  position: sticky; top: 0; z-index: 2;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9bb6ff;
  background-color: rgba(91, 104, 225, 0.06);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.leaderboard-table tbody tr {
  transition: background 120ms ease, box-shadow 120ms ease;
}
.leaderboard-table tbody tr:hover {
  background: rgba(0, 204, 153, 0.05);
  box-shadow: inset 3px 0 0 rgba(0, 204, 153, 0.45); /* left accent without layout shift */
}

/* Links */
.leaderboard-link { color: #d7f4ff; text-decoration: none; }
.leaderboard-link:hover { color: #00cc99; text-decoration: underline; }

/* Keep rows clickable */
.leaderboard-row { cursor: pointer; }

/* Sentiment grid */
.sentiment-grid {
  row-gap: 1rem;
}

/* Sentiment card styles */
.sentiment-grid .sent-card {
  background: radial-gradient(circle at top left, rgba(26, 32, 54, 0.95), rgba(13, 18, 33, 0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  color: #e8f6f8;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.7);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sentiment-grid .sent-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 204, 153, 0.35);
  border-color: rgba(0, 204, 153, 0.35);
  background: radial-gradient(circle at top left, rgba(26, 38, 60, 0.95), rgba(10, 16, 30, 0.95));
}

/* Header: sector + pill */
.sent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.sent-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #d7f4ff;
  text-transform: uppercase;
}

/* little status dot to reinforce up/down/neutral */
.sent-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.sent-status-dot.up {
  color: #00d2a8;
}
.sent-status-dot.down {
  color: #ff6e6e;
}
.sent-status-dot.neutral {
  color: #5b68e1;
}

/* Score row */
.sent-main {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.sent-score {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.sent-score strong {
  font-weight: 700;
}

.sent-sub {
  font-size: 0.8rem;
  color: #9bbcc0;
}

/* Reasoning text */
.sent-reason {
  font-size: 0.82rem;
  color: #b9e6ea;
  line-height: 1.35;
  margin-top: 0.6rem;
}

/* small caps pill */
.pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pill-neutral {
  color: #aac3ff;
  border-color: rgba(170,195,255,0.35);
  background: rgba(91,104,225,0.15);
}
.pill-up {
  color: #00d2a8;
  border-color: rgba(0,210,168,0.4);
  background: rgba(0,210,168,0.12);
}
.pill-down {
  color: #ff7878;
  border-color: rgba(255,120,120,0.4);
  background: rgba(255,120,120,0.1);
}

/* Left accent rail */
.left-accent {
  border-left: 3px solid rgba(255,255,255,0.04);
  padding-left: 12px;
}
.left-accent.up {
  border-left-color: #00cc99;
}
.left-accent.down {
  border-left-color: #ff5e5e;
}
.left-accent.neutral {
  border-left-color: #5b68e1;
}

/* Make overall card breathe a bit more on larger screens */
@media (min-width: 992px) {
  .sent-overall-wrapper {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

/* Slightly tighter cards on very small devices */
@media (max-width: 575.98px) {
  .sentiment-grid .sent-card {
    padding: 12px 12px;
  }
  .sent-title {
    font-size: 0.9rem;
  }
}

.scrollable-box { max-height: 320px; overflow-y: auto; }
.leaderboard-table thead th {
    position: sticky; top: 0; z-index: 2;
    background-color: rgba(0, 204, 153, 0.08);
}

/* Market snapshot tiles */
.market-snapshot-row {
    row-gap: 1rem;
}

.snapshot-tile {
    background: radial-gradient(circle at top left, rgba(24, 34, 60, 0.95), rgba(10, 14, 26, 0.95));
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(0, 204, 153, 0.18);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.7);
    transition:
        transform 140ms ease,
        box-shadow 140ms ease,
        border-color 140ms ease,
        background 140ms ease;
    cursor: pointer;
    height: 100%;
}

.snapshot-tile:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(0, 204, 153, 0.4);
    border-color: rgba(0, 204, 153, 0.4);
    background: radial-gradient(circle at top left, rgba(26, 38, 70, 0.98), rgba(9, 14, 30, 0.98));
}

.snapshot-ticker {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.82rem;
    color: #e8fdfb;
}

.snapshot-name {
    font-size: 0.8rem;
    color: #9fb8c6;
    max-width: 100%;
}

.snapshot-price {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.snapshot-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.snapshot-change.up {
    color: #00d2a8;
    border-color: rgba(0, 210, 168, 0.45);
    background: rgba(0, 210, 168, 0.12);
}
.snapshot-change.down {
    color: #ff7878;
    border-color: rgba(255, 120, 120, 0.45);
    background: rgba(255, 120, 120, 0.1);
}

/* Treasury yield mini-card */
.yield-card {
    background: radial-gradient(circle at top, rgba(16, 24, 46, 0.96), rgba(6, 10, 22, 0.96));
    border-radius: 12px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(91, 104, 225, 0.35);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.7);
}

.yield-title {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #d7e2ff;
    font-weight: 600;
}

.yield-sub {
    font-size: 0.75rem;
    color: #8898c0;
}

.yield-spread-pill {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.yield-spread-pill.normal {
    color: #00d2a8;
    border-color: rgba(0, 210, 168, 0.45);
    background: rgba(0, 210, 168, 0.12);
}
.yield-spread-pill.inverted {
    color: #ff7878;
    border-color: rgba(255, 120, 120, 0.45);
    background: rgba(255, 120, 120, 0.12);
}

.yield-table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9bb6ff;
    background-color: rgba(91, 104, 225, 0.06);
}

.yield-table td {
    font-size: 0.8rem;
}

.liquidity-card {
    background: radial-gradient(circle at top left, rgba(24, 34, 60, 0.95), rgba(10, 14, 26, 0.95));
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 204, 153, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.7);
    height: 100%;
}
.liq-title {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #d7f4ff;
    font-weight: 600;
}
.liq-sub { font-size: 0.78rem; color: #8898c0; }
.liq-value { margin-top: 0.25rem; font-size: 1.05rem; font-weight: 700; color: #fff; }
.liq-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.liq-badge.normal { color:#aac3ff; border-color:rgba(170,195,255,.35); background:rgba(91,104,225,.15); }
.liq-badge.stress { color:#ff7878; border-color:rgba(255,120,120,.45); background:rgba(255,120,120,.12); }
.liq-badge.glut   { color:#00d2a8; border-color:rgba(0,210,168,.45); background:rgba(0,210,168,.12); }

.liquidity-chart-card {
    background: radial-gradient(circle at top, rgba(16, 24, 46, 0.96), rgba(6, 10, 22, 0.96));
    border-radius: 12px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.7);
}

/* SOMA metric grid inside liquidity-card */
.soma-metrics {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.65rem;
}

.soma-metric {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

.soma-metric-label {
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #9bbcc0;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.soma-metric-value {
    font-size: 0.98rem;
    font-weight: 400;
    color: #ffffff;
    /* line-height: 1.1; */
}

/* .soma-metric-value .pos { color: #00d2a8; }
.soma-metric-value .neg { color: #ff7878; } */
.soma-metric-value .neu { color: #aac3ff; }
.soma-metric-value .pos { color: #aac3ff; }
.soma-metric-value .neg { color: #aac3ff; }


.soma-metrics-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin-top: 0.6rem;
}

/* Doughnut area: give it a real height so Chart.js can fill it */
.soma-composition-wrap{
    height: 200px; /* tune 220–280 */
    display:flex;
    align-items:center;
    justify-content:center;
}
.soma-composition-wrap canvas{
    max-height: 240px !important;
}

.soma-breakdown{
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: .75rem;
}
.soma-break-row{
    display:flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .22rem 0;
    color: #b9e6ea;
    font-size: .85rem;
}
.soma-break-row span:first-child{
    color:#9bbcc0;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
}
/* Entitlement locked card overlay */
.locked-card {
    position: relative;
}

.locked-card .locked-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

.locked-card .locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
    border-radius: 8px;
    color: #fff;
}

.locked-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}


/* ========================================
   Anomaly Signal Cards (Drift, Flow, etc.)
   ======================================== */

.anomaly-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.anomaly-card {
    min-width: 0;
    background: radial-gradient(ellipse at top left, rgba(20, 28, 48, 0.95), rgba(8, 12, 24, 0.98));
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: inherit;
    transition: all 150ms ease;
    position: relative;
    overflow: hidden;
}

.anomaly-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0.8;
}

.anomaly-card.bullish::before {
    background: linear-gradient(90deg, transparent 0%, #00d9a5 50%, transparent 100%);
}

.anomaly-card.bearish::before {
    background: linear-gradient(90deg, transparent 0%, #ff6b6b 50%, transparent 100%);
}

.anomaly-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.anomaly-card.bullish:hover {
    border-color: rgba(0, 217, 165, 0.4);
    background: radial-gradient(ellipse at top left, rgba(0, 217, 165, 0.08), rgba(8, 12, 24, 0.98));
}

.anomaly-card.bearish:hover {
    border-color: rgba(255, 107, 107, 0.4);
    background: radial-gradient(ellipse at top left, rgba(255, 107, 107, 0.08), rgba(8, 12, 24, 0.98));
}

.anomaly-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.anomaly-ticker {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e8f6f8;
    letter-spacing: 0.02em;
}

.anomaly-direction {
    font-size: 0.7rem;
    /* width: 18px;
    height: 18px; */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.anomaly-direction.up {
    background: rgba(0, 217, 165, 0.18);
    color: #00d9a5;
}

.anomaly-direction.down {
    background: rgba(255, 107, 107, 0.18);
    color: #ff6b6b;
}

.anomaly-z-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.anomaly-z-value.bullish {
    color: #00d9a5;
}

.anomaly-z-value.bearish {
    color: #ff6b6b;
}

.anomaly-z-value .sigma {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
    margin-left: 1px;
}

.anomaly-bar-wrap {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.anomaly-bar {
    height: 100%;
    border-radius: 2px;
}

.anomaly-bar.bullish {
    background: linear-gradient(90deg, rgba(0, 217, 165, 0.5), #00d9a5);
}

.anomaly-bar.bearish {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.5), #ff6b6b);
}

.anomaly-date {
    font-size: 0.7rem;
    color: #6b7a94;
    letter-spacing: 0.02em;
}

.signal-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #5a6a8a;
    font-size: 0.9rem;
    background: rgba(15, 20, 35, 0.4);
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 576px) {
    .anomaly-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .anomaly-card-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========================================
   Anomaly Cards - Neutral (non-directional)
   Purple/violet for "unusual" without bullish/bearish
   ======================================== */

.anomaly-card.anomaly::before {
    background: linear-gradient(90deg, transparent 0%, #77bbff 50%, transparent 100%);
}

.anomaly-card.anomaly:hover {
    border-color: rgba(119, 187, 255, 0.5);
    background: radial-gradient(ellipse at top left, rgba(91, 104, 225, 0.12), rgba(8, 12, 24, 0.98));
}

.anomaly-direction.anomaly {
    background: rgba(91, 104, 225, 0.2);
    color: #9bb6ff;
}

.anomaly-z-value.anomaly {
    color: #77bbff;
}

.anomaly-bar.anomaly {
    background: linear-gradient(90deg, rgba(91, 104, 225, 0.5), #77bbff);
}

/* High/Low flow direction indicators - softer neutral tones */
.anomaly-direction.high {
    background: rgba(119, 187, 255, 0.18);
    color: #77bbff;
}

.anomaly-direction.low {
    background: rgba(187, 199, 255, 0.15);
    color: #bbc7ff;
}

.anomaly-ticker-name {
    font-size: 0.62rem;
    color: #4a5a70;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 3px;
}

.anomaly-asset-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 4px;
}
.anomaly-asset-badge--equity   { background: rgba(91,104,225,0.15); color: #aac3ff; }
.anomaly-asset-badge--etf      { background: rgba(0,180,120,0.12);  color: #5df2b5; }
.anomaly-asset-badge--leveraged_etf { background: rgba(255,138,80,0.12); color: #ffb07a; }
