/* Watchboard styles — semantic, scoped, no inline. */

.wb-header {
  margin: 2rem 0 1.5rem;
}
.wb-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wb-subtitle {
  margin: 0.5rem 0 1rem;
  color: var(--color-text-dim, #94a3b8);
  font-size: 1rem;
  max-width: 60ch;
}
.wb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--color-text-muted, #6b7280);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
}
.wb-meta-sep { opacity: 0.5; }

.wb-legend-swatch {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 2px;
  vertical-align: -2px;
  margin: 0 0.3rem 0 0.65rem;
}

.wb-table-wrap {
  background: var(--color-bg-card, #15151a);
  border: 1px solid var(--color-border, #2a2a32);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.wb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.wb-table thead th {
  text-align: left;
  padding: 0.85rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--color-border, #2a2a32);
  color: var(--color-text-dim, #94a3b8);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.wb-table tbody tr {
  border-bottom: 1px solid var(--color-border, #2a2a32);
  transition: background-color 0.15s;
}
.wb-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}
.wb-table tbody tr:last-child { border-bottom: none; }
.wb-table td {
  padding: 0.85rem 0.85rem;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.wb-col-rank {
  width: 3rem;
  color: var(--color-text-muted, #6b7280);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  text-align: center;
}
.wb-rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0a0a0a;
  border: 1px solid transparent;
}
.wb-rank-medal.wb-medal-gold {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  border-color: rgba(252, 211, 77, 0.55);
  box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.25);
}
.wb-rank-medal.wb-medal-silver {
  background: linear-gradient(135deg, #e5e7eb, #9ca3af);
  border-color: rgba(229, 231, 235, 0.45);
}
.wb-rank-medal.wb-medal-bronze {
  background: linear-gradient(135deg, #d97706, #92400e);
  border-color: rgba(217, 119, 6, 0.45);
  color: #fffbeb;
}

.wb-col-symbol {
  font-weight: 600;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.wb-col-score {
  width: 15rem;
  font-weight: 700;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
}

/* Market stats — CoinGecko-style numeric columns. */
.wb-col-price,
.wb-col-chg,
.wb-col-vol,
.wb-col-vol7,
.wb-col-mcap {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  text-align: right;
  white-space: nowrap;
}
.wb-col-price { width: 6.5rem; font-weight: 600; }
.wb-col-chg   { width: 5rem; }
.wb-col-vol   { width: 5.5rem; color: var(--color-text-dim, #94a3b8); }
.wb-col-vol7  { width: 5.5rem; color: var(--color-text-dim, #94a3b8); }
.wb-col-mcap  { width: 6rem; }

.wb-col-chg.pct-up   { color: var(--color-positive, #4ade80); }
.wb-col-chg.pct-down { color: var(--color-negative, #f87171); }
.wb-col-chg.pct-flat { color: var(--color-text-muted, #6b7280); }

/* 3-segment composite score bar. Each segment is one weighted
   contribution; the total filled width equals the composite score
   (max 100). Right-aligned numeric overlay rides on top of the bar
   regardless of fill width so it always reads cleanly. */
.wb-score-bar {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}
.wb-score-fill { height: 100%; transition: width 0.25s ease-out; }
.wb-fill-se   { background: linear-gradient(180deg, #60a5fa, #3b82f6); }
.wb-fill-flow { background: linear-gradient(180deg, #34d399, #10b981); }
.wb-fill-ent  { background: linear-gradient(180deg, #a78bfa, #8b5cf6); }
.wb-score-num {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.02em;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Δ-arrow next to the score number — tiny indicator so we don't need
   a dedicated Δ24h column. */
.wb-score-delta {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.05rem 0.32rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
}
.wb-score-delta-up   { color: #4ade80; }
.wb-score-delta-down { color: #f87171; }

.wb-col-headline {
  font-size: 0.9rem;
  color: var(--color-text, #e5e7eb);
  min-width: 14rem;
}

/* Clickable row affordance — cursor + hover lift + focus ring. */
.wb-row-link {
  cursor: pointer;
}
.wb-row-link:hover {
  background: rgba(96, 165, 250, 0.04);
}
.wb-row-link:focus-visible {
  outline: 2px solid var(--color-accent, #60a5fa);
  outline-offset: -2px;
}
.wb-row-link .wb-col-symbol::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7em;
  color: var(--color-text-muted, #6b7280);
  transition: transform 0.15s, color 0.15s;
}
.wb-row-link:hover .wb-col-symbol::after {
  color: var(--color-accent, #60a5fa);
  transform: translate(2px, -2px);
}

.wb-table tbody tr.wb-stale {
  opacity: 0.45;
}
.wb-table tbody tr.wb-stale .wb-col-headline::after {
  content: " · STALE";
  font-size: 0.7rem;
  color: var(--color-warning, #fbbf24);
  letter-spacing: 0.08em;
  margin-left: 0.4rem;
}

.wb-empty {
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted, #6b7280);
}

.wb-explain {
  background: var(--color-bg-card, #15151a);
  border: 1px solid var(--color-border, #2a2a32);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 3rem;
}
.wb-explain h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}
.wb-explain p,
.wb-explain ul {
  margin: 0.5rem 0;
  color: var(--color-text-dim, #94a3b8);
  font-size: 0.88rem;
  line-height: 1.55;
}
.wb-explain code {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.85em;
  padding: 0.05em 0.35em;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.wb-fineprint {
  font-size: 0.78rem !important;
  opacity: 0.7;
  margin-top: 1rem !important;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile reflow — collapse least-actionable columns first.
   Priority (most → least): rank, symbol, score bar, price, 24h%,
   vol7, vol24, mcap, headline. The score bar AND price are kept all
   the way down — they're the two reasons to look at the page. */
@media (max-width: 1200px) {
  .wb-col-vol7 { display: none; }
  .wb-col-headline { font-size: 0.82rem; min-width: 11rem; }
}
@media (max-width: 1050px) {
  .wb-col-vol { display: none; }
}
@media (max-width: 900px) {
  .wb-col-mcap { display: none; }
  .wb-col-score { width: 11rem; }
}
@media (max-width: 720px) {
  .wb-col-headline { display: none; }
}
@media (max-width: 520px) {
  .wb-col-chg { display: none; }
  .wb-col-score { width: 8rem; }
  .wb-table th, .wb-table td { padding: 0.65rem 0.4rem; }
  .wb-rank-medal { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }
  .wb-row-link .wb-col-symbol::after { display: none; }
}
