/**
 * Shared matchup shell — additive utilities aligned with football_matchup.html.
 * Grade palette: A+ green, A blue, B amber.
 * Safe to load alongside page-local <style> blocks (does not override sport-specific layouts).
 */

:root {
  --mu-grade-aplus-bg: rgba(34, 197, 94, 0.18);
  --mu-grade-aplus: #22c55e;
  --mu-grade-a-bg: rgba(59, 130, 246, 0.15);
  --mu-grade-a: #3b82f6;
  --mu-grade-b-bg: rgba(234, 179, 8, 0.15);
  --mu-grade-b: #eab308;
  --mu-grade-c-bg: rgba(156, 163, 175, 0.15);
  --mu-grade-c: #9ca3af;
  --mu-section-radius: 14px;
  --mu-away: #3b82f6;
  --mu-home: #f59e0b;
}

/* ── Section card (shared container) ── */
.section-card {
  background: var(--bg-secondary, #111);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--mu-section-radius);
  padding: var(--space-lg, 1.25rem);
  margin-bottom: var(--space-md, 1rem);
}

.section-card .section-title,
.section-card > h2.section-title,
.section-card > h3.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 var(--space-md, 1rem);
  color: var(--text-primary, inherit);
}

/* ── Grade badge (inline / pick box) ── */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.grade-badge.grade-aplus,
.grade-badge.grade-Aplus {
  background: var(--mu-grade-aplus-bg);
  color: var(--mu-grade-aplus);
}
.grade-badge.grade-a,
.grade-badge.grade-A {
  background: var(--mu-grade-a-bg);
  color: var(--mu-grade-a);
}
.grade-badge.grade-b,
.grade-badge.grade-B {
  background: var(--mu-grade-b-bg);
  color: var(--mu-grade-b);
}
.grade-badge.grade-c,
.grade-badge.grade-C,
.grade-badge.grade-na,
.grade-badge.grade-NA {
  background: var(--mu-grade-c-bg);
  color: var(--mu-grade-c);
}

/* ── Hero grade (center of matchup hero) ── */
.hero-grade,
.grade-badge-hero,
.fb-grade-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
  min-width: 2.25rem;
}

.hero-grade.grade-aplus,
.hero-grade.grade-Aplus,
.grade-badge-hero.grade-aplus,
.fb-grade-hero.grade-aplus {
  background: var(--mu-grade-aplus-bg);
  color: var(--mu-grade-aplus);
}
.hero-grade.grade-a,
.hero-grade.grade-A,
.grade-badge-hero.grade-a,
.fb-grade-hero.grade-a {
  background: var(--mu-grade-a-bg);
  color: var(--mu-grade-a);
}
.hero-grade.grade-b,
.hero-grade.grade-B,
.grade-badge-hero.grade-b,
.fb-grade-hero.grade-b {
  background: var(--mu-grade-b-bg);
  color: var(--mu-grade-b);
}
.hero-grade.grade-c,
.hero-grade.grade-C,
.hero-grade.grade-na,
.grade-badge-hero.grade-c,
.grade-badge-hero.grade-na,
.fb-grade-hero.grade-c,
.fb-grade-hero.grade-na {
  background: var(--mu-grade-c-bg);
  color: var(--mu-grade-c);
}

/* ── Factor row (edge factor list) ── */
.factor-row,
.fb-factor-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 0.5rem);
  padding: 7px 0;
  border-bottom: 1px solid var(--bg-tertiary, rgba(255, 255, 255, 0.06));
}

.factor-row:last-child,
.fb-factor-row:last-child {
  border-bottom: none;
}

.factor-row .factor-name,
.fb-factor-row .fb-factor-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, inherit);
}

.factor-row .factor-score,
.fb-factor-row .fb-factor-score {
  font-size: 12px;
  font-weight: 700;
}

/* Grid-style factor rows (NHL / soccer style) keep readable defaults when shell loads first */
.factors-list .factor-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  padding: 8px 10px;
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.04));
  border-radius: 6px;
  border-bottom: none;
  font-size: 13px;
  margin-bottom: 6px;
}

/* Basketball mega-template: model frames stats, does not replace them */
.mu-model-rail {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent 60%);
  padding: 0.9rem 1.1rem;
}
.mu-model-rail-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mu-model-rail-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.7;
}
.mu-model-rail-pick {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 1.15rem;
}
.mu-model-rail-pick.muted { font-size: 0.95rem; opacity: 0.8; }
.mu-model-rail-meta { font-size: 0.85rem; opacity: 0.75; }
.mu-model-rail-link {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-link, #60a5fa);
  text-decoration: none;
}
.mu-model-rail-note {
  margin: 0.55rem 0 0;
  font-size: 12px;
  opacity: 0.7;
}
.mu-grade-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--mu-grade-a-bg);
  color: var(--mu-grade-a);
}
.mu-grade-pill.grade-Aplus,
.mu-grade-pill.grade-A\+ { background: var(--mu-grade-aplus-bg); color: var(--mu-grade-aplus); }
.mu-model-lean-chip {
  font-size: 11px !important;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}
.mu-compare-hint {
  font-size: 12px;
  opacity: 0.7;
  margin: 0 0 0.85rem;
}
.mu-verdict-card .card-title { color: #f59e0b; }
.mu-verdict-headline { font-size: 1.05rem; margin-bottom: 0.5rem; }
.mu-verdict-cap, .mu-verdict-proj { font-size: 0.9rem; opacity: 0.9; margin-bottom: 0.35rem; }
.mu-verdict-cap .agree { color: #22c55e; font-weight: 700; }
.mu-verdict-cap .split { color: #eab308; font-weight: 700; }
.mu-verdict-note { font-size: 12px; opacity: 0.65; margin: 0.5rem 0 0.75rem; }
.mu-verdict-edges { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.mu-verdict-loading { font-size: 0.9rem; opacity: 0.75; }
