/* Fuentes alojadas localmente: sin dependencia de Google Fonts. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --paper: #f8faff;
  --paper-2: #ffffff;
  --paper-3: #f0f3fa;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: rgba(99, 102, 241, 0.12);
  --line-strong: rgba(99, 102, 241, 0.22);
  --lime: #c084fc;
  --lime-soft: rgba(192, 132, 252, 0.16);
  --coral: #f43f5e;
  --coral-soft: rgba(244, 63, 94, 0.12);
  --blue: #3b82f6;
  --purple: #7c3aed;
  --indigo: #6366f1;
  --serif: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 18px;
  --shadow: 0 20px 48px -12px rgba(30, 27, 75, 0.12), 0 2px 6px rgba(30, 27, 75, 0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% -8%, rgba(124, 58, 237, 0.12), transparent 40%),
    radial-gradient(circle at -5% 42%, rgba(59, 130, 246, 0.08), transparent 35%);
}
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}
::selection { background: var(--purple); color: #ffffff; }
[hidden] { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 26px 20px 18px;
  border-right: 1px solid var(--line);
  background: rgba(243, 240, 233, 0.9);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-family: var(--sans);
  font-size: 35px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.brand span {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  margin: 7px 0 24px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.sidebar-block { margin-bottom: 18px; }
.match-block { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-bottom: 8px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.section-count { color: var(--muted-2); letter-spacing: 0.06em; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 9px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
}
.search svg { width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: 0 0 auto; }
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}
.search input::placeholder { color: var(--muted-2); }
.match-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.match-list::-webkit-scrollbar { width: 4px; }
.match-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.empty-list { padding: 20px 8px; font-size: 12.5px; color: var(--muted); }
.match-item {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.match-item:hover { background: rgba(255, 255, 255, 0.48); border-color: var(--line); }
.match-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(23, 23, 22, 0.12);
}
.match-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.match-item.is-active .match-item-top { color: rgba(243, 240, 233, 0.52); }
.match-item-main { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.match-item-team { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }
.match-item-vs { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.match-item.is-active .match-item-vs { color: rgba(243, 240, 233, 0.38); }
.match-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.match-type {
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.match-item.is-active .match-type { color: rgba(243, 240, 233, 0.55); }
.match-favorite {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
.match-favorite strong { font-size: 11.5px; color: var(--ink); }
.match-item.is-active .match-favorite { color: rgba(243, 240, 233, 0.5); }
.match-item.is-active .match-favorite strong { color: var(--lime); }
.sidebar-foot {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.55;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}
.status-line { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #7d9a22; box-shadow: 0 0 0 3px rgba(125, 154, 34, 0.12); }
.sidebar-foot p { margin: 7px 0 0; text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 11px; line-height: 1.45; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(23, 23, 22, 0.34);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s;
}
.sidebar-backdrop.is-open { opacity: 1; }

/* Main shell */
.main {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  padding: 20px clamp(20px, 3vw, 44px) 32px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.breadcrumb {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.topbar-brand {
  display: none;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.055em;
}
.topbar-brand span { color: var(--coral); }
.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.menu-btn span { display: block; width: 16px; height: 1.5px; margin: 3.5px 0; border-radius: 2px; background: var(--ink); }
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--lime-soft);
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: help;
}
.demo-dot { width: 5px; height: 5px; border-radius: 50%; background: #7d9a22; box-shadow: 0 0 0 3px rgba(125, 154, 34, 0.12); }
.demo-badge.is-custom { background: rgba(36, 87, 214, 0.07); }
.demo-badge.is-custom .demo-dot { background: #2457d6; box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12); }
.ghost-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  padding: 8px 13px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.ghost-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 30px 19px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% -18%, rgba(139, 92, 246, 0.25), transparent 38%),
    radial-gradient(circle at 8% 118%, rgba(59, 130, 246, 0.2), transparent 35%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 76%);
}
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
}
.slash { color: rgba(255, 255, 255, 0.3); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}
.hero-actions { display: flex; gap: 6px; }
.hero-action {
  border: 1px solid rgba(243, 240, 233, 0.16);
  border-radius: 999px;
  background: transparent;
  color: rgba(243, 240, 233, 0.68);
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.hero-action:hover { background: rgba(255, 255, 255, 0.1); color: var(--paper); }
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 26px 0 22px;
}
.team { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.team-away { align-items: flex-end; text-align: right; }
.team-name {
  max-width: 100%;
  margin: 11px 0 0;
  font-family: var(--serif);
  font-size: clamp(31px, 3.25vw, 50px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.team-meta {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243, 240, 233, 0.45);
}
.crest {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.crest-lg { width: 62px; height: 62px; font-size: 12.5px; }
.crest-sm { width: 26px; height: 26px; font-size: 9px; }
.crest-xs { width: 18px; height: 18px; font-size: 7px; vertical-align: middle; }
.form-dots { display: flex; gap: 3px; margin-top: 11px; }
.form-dots i {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}
.form-w { background: var(--lime); color: var(--ink); }
.form-d { border: 1px solid rgba(243, 240, 233, 0.24); color: var(--paper); }
.form-l { background: rgba(255, 107, 74, 0.82); color: #fff; }
.team-away .form-dots { justify-content: flex-end; }
.hero-center { min-width: 238px; text-align: center; }
.hero-score {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.02em;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--lime);
  font-family: var(--serif);
  font-size: clamp(54px, 5.9vw, 84px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.075em;
  cursor: pointer;
}
.hero-score em { margin: 0 0.06em; color: rgba(243, 240, 233, 0.28); font-size: 0.55em; font-style: normal; letter-spacing: 0; }
.hero-score:hover { color: #e8ff9e; }
.hero-score-label {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(243, 240, 233, 0.42);
}
.hero-score-prob {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.1);
  color: #c084fc;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.hero-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 15px; }
.hero-outcome {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(243, 240, 233, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.hero-outcome:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(243, 240, 233, 0.24); }
.hero-outcome span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(243, 240, 233, 0.45);
}
.hero-outcome strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 15.5px; font-weight: 500; }
.hero-bar { display: flex; gap: 2px; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.hero-bar span { display: block; height: 100%; }
.hero-bar .lime { background: var(--lime); }
.hero-bar .draw { background: #8b887e; }
.hero-bar .coral { background: var(--coral); }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(243, 240, 233, 0.11);
}
.hero-facts div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hero-facts span { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(243, 240, 233, 0.36); }
.hero-facts strong { font-family: var(--mono); font-size: 11px; font-weight: 400; color: rgba(243, 240, 233, 0.78); }

/* Dashboard and panels */
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 346px;
  align-items: start;
  gap: 18px;
  margin-top: 18px;
}
.main-column, .rail { display: grid; gap: 18px; min-width: 0; }
.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.panel h2 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}
.panel-note {
  flex: 0 0 auto;
  max-width: 120px;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* Key strip */
.key-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.key-chip {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
}
.key-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.key-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.key-chip strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 15.5px; font-weight: 500; }

/* Metric cards */
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metric-card {
  display: flex;
  flex-direction: column;
  min-height: 124px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.metric-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 23, 22, 0.08);
}
.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.metric-info {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--muted-2);
}
.metric-value {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.metric-value em { margin: 0 2px; font-size: 19.5px; font-style: normal; color: var(--muted-2); }
.metric-sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.metric-bars { display: flex; gap: 3px; height: 4px; margin-top: auto; padding-top: 12px; border-radius: 999px; overflow: hidden; }
.metric-bars span { display: block; height: 4px; border-radius: 999px; }
.metric-bar-home { background: var(--ink); }
.metric-bar-away { background: var(--coral); }

/* Scorers */
.scorers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.scorers-team-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.scorers-team-head div { display: flex; flex-direction: column; gap: 1px; }
.scorers-team-head strong { font-size: 12.5px; font-weight: 600; }
.scorers-team-head span { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.scorer-row {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) 58px 33px;
  gap: 7px;
  align-items: center;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.scorer-row:hover { background: rgba(23, 23, 22, 0.025); }
.scorer-rank { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.scorer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.scorer-name small { margin-left: 4px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.scorer-bar { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(23, 23, 22, 0.07); }
.scorer-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.scorers-team.away .scorer-bar i { background: var(--coral); }
.scorer-pct { text-align: right; font-family: var(--mono); font-size: 11px; }
.panel-footnote { margin: 13px 0 0; font-size: 10px; line-height: 1.5; color: var(--muted-2); }

/* Distribution */
.dist-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 146px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}
.dist-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dist-value {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.18s;
}
.dist-col:hover .dist-value { opacity: 1; }
.dist-bar {
  width: 100%;
  max-width: 40px;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, var(--ink), #515048);
  transition: background 0.18s;
}
.dist-col:hover .dist-bar { background: var(--lime); }
.dist-label { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.top-scores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.top-score {
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s;
}
.top-score:hover { border-color: var(--ink); }
.top-score strong { display: block; font-family: var(--serif); font-size: 19.5px; font-weight: 400; letter-spacing: -0.03em; }
.top-score span { font-family: var(--mono); font-size: 9px; color: var(--muted); }

/* Context */
.context-list { display: flex; flex-direction: column; }
.context-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.context-row > span {
  flex: 0 0 auto;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.context-row strong { font-size: 11.5px; font-weight: 500; line-height: 1.35; text-align: right; }
.context-row small { display: block; margin-top: 2px; font-size: 10px; font-weight: 400; color: var(--muted); }
.context-row:hover strong { color: var(--coral); }
.match-note {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Factors */
.factor-list { display: flex; flex-direction: column; }
.factor-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.factor-icon {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}
.factor-main { min-width: 0; }
.factor-main strong { display: block; font-size: 11.5px; font-weight: 600; }
.factor-main small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
}
.factor-impact {
  padding: 3px 6px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}
.factor-impact.pos { background: var(--lime-soft); color: #556b12; }
.factor-impact.neg { background: var(--coral-soft); color: #a83a22; }
.factor-impact.neutral { background: rgba(23, 23, 22, 0.05); color: var(--muted); }
.factor-row:hover .factor-main strong { text-decoration: underline; text-underline-offset: 2px; }

/* Insights */
.insight-panel { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.insight-panel .eyebrow { color: var(--lime); }
.insight-panel h2 { color: var(--paper); }
.insight-panel .panel-note { color: rgba(243, 240, 233, 0.4); }
.insight-list { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.insight-list li { display: flex; gap: 9px; }
.insight-dot { flex: 0 0 auto; width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: #c084fc; box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.25); }
.insight-label { display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(243, 240, 233, 0.42); }
.insight-list p { margin: 0; font-size: 11.5px; line-height: 1.55; color: rgba(243, 240, 233, 0.78); }

/* Confidence */
.confidence-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.confidence-ring {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(var(--ink) calc(var(--score) * 1%), rgba(23, 23, 22, 0.08) 0);
}
.confidence-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper-2); }
.confidence-ring span { position: relative; z-index: 1; font-family: var(--mono); font-size: 12.5px; }
.confidence-head .eyebrow { margin-bottom: 2px; }
.confidence-head h2 { margin: 0; font-size: 21px; }
.confidence-panel p { margin: 0 0 12px; font-size: 11px; line-height: 1.55; color: var(--muted); }
.certainty-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.certainty-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.certainty-head .eyebrow { display: block; margin-bottom: 2px; }
.certainty-head strong { font-size: 15px; }
.certainty-gap { flex: 0 0 auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.certainty-meter { position: relative; display: flex; height: 9px; overflow: hidden; border-radius: 999px; background: rgba(23, 23, 22, 0.06); }
.certainty-zone { display: block; height: 100%; }
.certainty-zone.open { width: 28.57%; background: var(--coral-soft); }
.certainty-zone.lean { width: 34.29%; background: var(--lime-soft); }
.certainty-zone.clear { width: 37.14%; background: var(--lime); opacity: 0.5; }
.certainty-meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
.certainty-scale { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); }
.certainty-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.certainty-facts > div { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.6); }
.certainty-facts span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); }
.certainty-facts strong { display: block; margin-top: 2px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.certainty-facts small { display: block; margin-top: 1px; font-size: 9px; color: var(--muted); }
.confidence-panel .certainty-note { margin: 10px 0 8px; font-size: 10px; line-height: 1.5; color: var(--muted); }
.certainty-block .text-link { margin-top: 2px; }
@media (max-width: 520px) {
  .certainty-facts { grid-template-columns: 1fr; }
}
.text-link {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
}
.text-link span { margin-left: 4px; }

/* Footer */
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

/* Tooltip */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 318px;
  max-width: calc(100vw - 24px);
  padding: 14px 15px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s, visibility 0.14s;
}
.tooltip.is-visible { opacity: 1; visibility: visible; }
.tt-eyebrow { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime); }
.tt-title { margin-top: 4px; font-family: var(--serif); font-size: 22px; line-height: 1.02; letter-spacing: -0.03em; }
.tt-value { margin-top: 4px; font-family: var(--mono); font-size: 13.5px; color: var(--lime); }
.tt-summary { margin: 8px 0 10px; font-size: 11px; line-height: 1.5; color: rgba(243, 240, 233, 0.7); }
.tt-drivers { display: flex; flex-direction: column; gap: 5px; padding-top: 8px; border-top: 1px solid rgba(243, 240, 233, 0.12); }
.tt-driver { display: flex; justify-content: space-between; gap: 9px; font-size: 10px; }
.tt-driver span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(243, 240, 233, 0.52); }
.tt-driver strong { flex: 0 0 auto; font-family: var(--mono); font-size: 10px; font-weight: 400; }
.tt-driver .pos { color: var(--lime); }
.tt-driver .neg { color: var(--coral); }
.tt-driver .neutral { color: rgba(243, 240, 233, 0.68); }
.tt-foot { margin-top: 9px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(243, 240, 233, 0.38); }
.tt-foot span { color: var(--lime); }

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 15, 14, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.22s;
}
.drawer-backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(480px, 100vw);
  padding: 24px 24px 36px;
  border-left: 1px solid var(--line);
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.13);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.drawer.is-open { transform: translateX(0); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.drawer-eyebrow { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.drawer-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.drawer-close:hover { background: var(--ink); color: var(--paper); }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-size: 39px; font-weight: 400; line-height: 1; letter-spacing: -0.045em; }
.drawer-value { margin-top: 10px; font-family: var(--mono); font-size: 24px; }
.drawer-summary { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.drawer-section { margin-top: 25px; padding-top: 17px; border-top: 1px solid var(--line); }
.drawer-section h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.drawer-section h3 span { color: var(--muted-2); letter-spacing: 0.05em; }
.drawer-drivers { display: flex; flex-direction: column; gap: 11px; }
.drawer-driver-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.drawer-driver-top strong { font-family: var(--mono); font-size: 11px; font-weight: 400; }
.drawer-driver p { margin: 3px 0 6px; font-size: 10px; line-height: 1.4; color: var(--muted); }
.drawer-driver-bar { height: 3px; overflow: hidden; border-radius: 999px; background: rgba(23, 23, 22, 0.08); }
.drawer-driver-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.drawer-driver-top .pos { color: #5c7611; }
.drawer-driver-top .neg { color: #b83d23; }
.drawer-driver-top .neutral { color: var(--muted); }
.calc-steps { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.calc-steps li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.calc-steps li div { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; }
.calc-steps small { font-size: 10px; color: var(--muted); }
.calc-steps strong { font-family: var(--mono); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.step-index { text-align: right; font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.drawer-formula { margin-top: 22px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.drawer-formula > span { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.drawer-formula code { display: block; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.drawer-caveat { margin-top: 17px; padding: 13px; border: 1px solid rgba(23, 23, 22, 0.08); border-radius: 12px; background: var(--lime-soft); }
.drawer-caveat strong { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; }
.drawer-caveat p { margin: 6px 0 0; font-size: 11px; line-height: 1.55; color: var(--ink-2); }
.drawer-meta { margin-top: 22px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

body.drawer-open { overflow: hidden; }

/* Responsive */
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 278px minmax(0, 1fr); }
  .main { padding: 18px 24px 30px; }
  .dashboard { grid-template-columns: minmax(0, 1fr) 320px; }
  .team-name { font-size: 37px; }
  .hero-main { gap: 14px; }
  .hero-center { min-width: 220px; }
}
@media (max-width: 1300px) {
  .dashboard { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr 1fr; display: grid; }
  .rail .insight-panel,
  .rail .confidence-panel { grid-column: 1 / -1; }
  .hero-facts { gap: 16px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    height: 100dvh;
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.25s;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.16);
  }
  body.sidebar-open .sidebar {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
  }
  body.sidebar-open { overflow: hidden; }
  .sidebar-close { display: grid; place-items: center; }
  .menu-btn { display: inline-grid; place-content: center; }
  .topbar-brand { display: inline-block; }
  .sidebar-backdrop { display: block; visibility: hidden; }
  .sidebar-backdrop.is-open { visibility: visible; }
  .main { padding: 14px 20px 28px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: -14px -20px 14px;
    padding: 12px 20px;
    background: rgba(243, 240, 233, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .hero { padding: 22px 20px 17px; border-radius: 22px; }
  .hero-main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 9px; }
  .team-name { font-size: 30px; }
  .crest-lg { width: 48px; height: 48px; font-size: 11px; }
  .hero-score { font-size: 59px; }
  .hero-center { min-width: 190px; }
  .hero-outcome strong { font-size: 13.5px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .main { padding: 12px 14px 24px; }
  .topbar { margin: -12px -14px 12px; padding: 10px 14px; }
  .breadcrumb { display: none; }
  .topbar-right .ghost-btn { display: none; }
  .demo-badge { padding: 6px 9px; font-size: 8px; }
  .rail { grid-template-columns: 1fr; }
  .rail .insight-panel,
  .rail .confidence-panel { grid-column: auto; }
  .scorers-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero { padding: 18px 16px 15px; border-radius: 18px; }
  .hero-kicker { font-size: 9px; }
  .hero-actions .hero-action:last-child { display: none; }
  .hero-main { gap: 5px; padding: 20px 0 16px; }
  .team-name { margin-top: 8px; font-size: 23px; }
  .team-meta { font-size: 8px; }
  .crest-lg { width: 40px; height: 40px; font-size: 9px; }
  .form-dots { margin-top: 8px; gap: 2px; }
  .form-dots i { width: 13px; height: 13px; font-size: 7px; }
  .hero-center { min-width: 0; }
  .hero-score { font-size: 48px; }
  .hero-score-label { margin-top: 7px; font-size: 8px; }
  .hero-score-prob { margin-top: 6px; padding: 3px 7px; font-size: 10px; }
  .hero-outcomes { grid-template-columns: 1fr; gap: 4px; margin-top: 10px; }
  .hero-outcome { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 7px; }
  .hero-outcome span { white-space: normal; font-size: 8px; }
  .hero-outcome strong { margin: 0; font-size: 12.5px; }
  .hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; padding-top: 12px; }
  .hero-facts strong { font-size: 10px; }
  .panel { padding: 16px; border-radius: 16px; }
  .panel h2 { font-size: 23px; }
  .panel-note { max-width: 90px; font-size: 8px; }
  .metric-grid { gap: 6px; }
  .metric-card { min-height: 112px; padding: 11px; }
  .metric-value { font-size: 24px; margin-top: 10px; }
  .metric-value em { font-size: 16.5px; }
  .metric-sub { font-size: 10px; }
  .key-chip { padding: 8px; }
  .key-chip strong { font-size: 13.5px; }
  .top-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dist-chart { height: 124px; }
  .dist-value { display: none; }
  .drawer { padding: 20px 18px 30px; }
  .drawer-head h2 { font-size: 33px; }
  .drawer-value { font-size: 21px; }
  .page-footer { display: block; line-height: 1.7; }
  .page-footer span { display: block; }
}

@media (max-width: 375px) {
  .topbar-brand { font-size: 24px; }
  .hero-main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "home away"
      "center center";
    gap: 14px 10px;
    padding: 18px 0 14px;
  }
  .team-home { grid-area: home; }
  .team-away { grid-area: away; }
  .hero-center { grid-area: center; min-width: 0; }
  .team-name { font-size: 21px; }
  .crest-lg { width: 36px; height: 36px; font-size: 9px; }
  .hero-score { font-size: 45px; }
  .hero-outcomes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 11px; }
  .hero-outcome { display: block; padding: 5px 6px; }
  .hero-outcome span { white-space: nowrap; font-size: 8px; }
  .hero-outcome strong { margin-top: 2px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .topbar, .hero-actions, .tooltip, .drawer, .drawer-backdrop, .page-footer, .sidebar-backdrop { display: none !important; }
  .app-shell { display: block; }
  .main { max-width: none; padding: 0; }
  .hero { background: #fff; color: #000; box-shadow: none; border: 1px solid #ccc; }
  .hero::before, .hero::after { display: none; }
  .hero-kicker, .team-meta, .hero-score-label, .hero-score-prob, .hero-outcome span, .hero-facts span { color: #555; }
  .hero-score, .hero-outcome strong, .team-name { color: #000; }
  .hero-score em { color: #777; }
  .hero-outcome, .hero-bar { border: 1px solid #ddd; }
  .panel { break-inside: avoid; }
  .dashboard { grid-template-columns: 1fr; }
}

/* Live, valor y tabla */
.crest { position: relative; overflow: hidden; }
.crest-abbr { position: relative; z-index: 0; }
.crest img {
  position: absolute;
  inset: 10%;
  z-index: 1;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
.crest-xs img { inset: 8%; width: 84%; height: 84%; }
.crest.has-logo { background: #fff; border-color: var(--line); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  vertical-align: middle;
}
.live-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}
.league-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}
.league-filter label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.league-filter select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  outline: 0;
}
.league-filter[hidden] { display: none; }
.confidence-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.3);
}
.confidence-filter label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.confidence-filter select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  outline: 0;
}
.confidence-hint {
  flex-basis: 100%;
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.45;
  color: var(--muted-2);
}
.confidence-hint[hidden] { display: none; }
.match-favorite.is-high strong { color: #4f46e5; }
.match-item.is-active .match-favorite.is-high strong { color: var(--lime); }
.match-item-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-item-top span:last-child { flex: 0 0 auto; }
.hero-odds {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(243, 240, 233, 0.11);
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(243, 240, 233, 0.45);
}
.hero-odds strong { font-weight: 400; color: rgba(243, 240, 233, 0.82); }
.panel-info {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
}
.panel-info:hover { border-color: var(--ink); color: var(--ink); }
.value-form {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 0.7fr));
  gap: 8px;
  margin-bottom: 12px;
}
.value-form label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.value-form label span {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.value-form select,
.value-form input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  outline: 0;
}
.value-form select:focus,
.value-form input:focus { border-color: var(--ink); }
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.value-grid div { padding: 9px 10px; background: #fff; }
.value-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.value-grid strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 13.5px; font-weight: 500; }
.value-grid .pos { color: #4d6b12; }
.value-grid .neg { color: #b4432c; }
.value-verdict {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--paper-3);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.value-verdict.pos { background: var(--lime-soft); color: #40570f; }
.value-verdict.neg { background: var(--coral-soft); color: #8f2f1c; }
.table-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 10px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.table-meta span { color: var(--muted-2); }
.table-scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.league-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.league-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 7px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
}
.league-table th:nth-child(2) { text-align: left; }
.league-table td {
  padding: 7px;
  border-bottom: 1px solid rgba(23, 23, 22, 0.06);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}
.league-table td.team-cell { text-align: left; font-family: var(--sans); font-size: 11.5px; font-weight: 600; }
.league-table tr:last-child td { border-bottom: 0; }
.league-table tr.is-home { background: rgba(59, 130, 246, 0.08); }
.league-table tr.is-away { background: rgba(139, 92, 246, 0.08); }
.league-table tr.is-home td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
.league-table tr.is-away td:first-child { box-shadow: inset 3px 0 0 #8b5cf6; }
.league-table td.pts { font-weight: 700; }
.table-logo {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--paper-3);
  vertical-align: middle;
}
.table-logo img {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  background: #fff;
  object-fit: contain;
}
.table-logo i { font-style: normal; font-family: var(--mono); font-size: 8px; color: var(--muted); }
.empty-copy { margin: 0; max-width: 640px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.empty-copy code { padding: 1px 4px; border-radius: 4px; background: var(--paper-3); color: var(--ink); font-family: var(--mono); font-size: 11.5px; }
.refresh-btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.refresh-btn:hover { background: #2b2b27; }
.refresh-btn:disabled { opacity: 0.55; cursor: default; }
.demo-badge.is-live { background: rgba(125, 154, 34, 0.14); }
@media (max-width: 980px) {
  .value-form { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 600px) {
  .value-form { grid-template-columns: 1fr 1fr; }
  .value-form label:first-child { grid-column: 1 / -1; }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-sm { display: none; }
  .hero-odds { font-size: 9px; }
  .table-scroll { max-height: 300px; }
  .topbar-right .refresh-btn { display: inline-flex; padding: 6px 9px; font-size: 8px; }
}

/* OX V1.0 */
.engine-panel { overflow: hidden; }
.engine-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.engine-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.engine-top p { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.engine-outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.engine-outcome { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.engine-outcome > span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.engine-outcome em { font-style: normal; color: var(--muted-2); }
.engine-outcome strong { display: block; margin-top: 6px; font-family: var(--mono); font-size: 18.5px; font-weight: 500; }
.engine-outcome small { display: block; margin-top: 5px; font-size: 10px; line-height: 1.4; color: var(--muted-2); }
.engine-bars { position: relative; height: 8px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: rgba(23, 23, 22, 0.06); }
.engine-bars i { position: absolute; inset: 0 auto 0 0; display: block; height: 100%; border-radius: 999px; }
.engine-bars .raw { background: rgba(23, 23, 22, 0.16); }
.engine-bars .final { top: 2px; height: 4px; background: var(--ink); }
.engine-outcome:nth-child(2) .engine-bars .final { background: #8b887e; }
.engine-outcome:nth-child(3) .engine-bars .final { background: var(--coral); }
.engine-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.engine-card { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-3); }
.engine-card span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.engine-card strong { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.engine-card small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.45; color: var(--muted-2); }
.engine-table { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.engine-table-head,
.engine-table-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 0.7fr));
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
}
.engine-table-head {
  background: var(--paper-3);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.engine-table-row { border-top: 1px solid rgba(23, 23, 22, 0.06); font-family: var(--mono); font-size: 11px; }
.engine-table-row span:first-child { font-family: var(--sans); font-size: 11.5px; font-weight: 600; }
.engine-table-row span:not(:first-child) { color: var(--muted); }
.engine-table-row strong { text-align: left; font-weight: 600; }
.picks-list { display: flex; flex-direction: column; gap: 6px; }
.pick-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 44px 58px;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.pick-row.is-value { border-color: rgba(99, 102, 241, 0.4); background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), #fff 55%); }
.pick-rank { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.pick-main { min-width: 0; }
.pick-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 600; }
.pick-main small { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.pick-odds { font-family: var(--mono); font-size: 11.5px; text-align: right; }
.pick-ev { font-family: var(--mono); font-size: 11.5px; text-align: right; }
.pick-ev.pos { color: #4f46e5; }
.pick-ev.neg { color: #e11d48; }
@media (max-width: 600px) {
  .engine-outcomes { grid-template-columns: 1fr; }
  .engine-grid { grid-template-columns: 1fr; }
  .engine-table-head,
  .engine-table-row { grid-template-columns: 1.1fr repeat(3, minmax(0, 0.7fr)); }
  .pick-row { grid-template-columns: 18px minmax(0, 1fr) 40px 54px; }
}

/* ============================================================
   OX V1.0 · capa visual moderna (Azul y Morado)
   ============================================================ */

:root {
  --paper: #f8faff;
  --paper-2: #ffffff;
  --paper-3: #f1f4fb;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: rgba(99, 102, 241, 0.12);
  --line-strong: rgba(99, 102, 241, 0.22);
  --forest: #4f46e5;
  --forest-deep: #1e1b4b;
  --forest-soft: rgba(99, 102, 241, 0.10);
  --lime: #c084fc;
  --lime-soft: rgba(192, 132, 252, 0.18);
  --coral: #f43f5e;
  --coral-soft: rgba(244, 63, 94, 0.12);
  --blue: #3b82f6;
  --purple: #7c3aed;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 16px 36px -12px rgba(30, 27, 75, 0.12), 0 2px 6px rgba(30, 27, 75, 0.04);
  --shadow-soft: 0 8px 24px -6px rgba(30, 27, 75, 0.08), 0 1px 3px rgba(30, 27, 75, 0.03);
  --serif: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

body {
  background:
    radial-gradient(circle at 88% -12%, rgba(124, 58, 237, 0.12), transparent 38%),
    radial-gradient(circle at -8% 58%, rgba(59, 130, 246, 0.08), transparent 38%),
    var(--paper);
}

body::before {
  background:
    radial-gradient(circle at 82% -8%, rgba(124, 58, 237, 0.08), transparent 35%),
    radial-gradient(circle at -5% 42%, rgba(59, 130, 246, 0.05), transparent 35%);
}

::selection { background: #7c3aed; color: #ffffff; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

.app-shell { grid-template-columns: 296px minmax(0, 1fr); }

.sidebar {
  padding: 28px 18px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
}

.brand {
  font-family: var(--sans);
  font-size: 33px;
  font-weight: 800;
  letter-spacing: -0.055em;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: baseline;
}
.brand span {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  margin: 5px 0 26px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.section-head {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-count { color: var(--muted-2); }

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.18s ease;
}
.chip:hover { border-color: rgba(99, 102, 241, 0.35); color: var(--ink); transform: translateY(-1px); }
.chip.is-active {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #7c3aed 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.45);
}

.search {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  padding: 9px 12px;
}
.search:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); background: #ffffff; }
.search input { font-size: 12.5px; color: var(--ink); }

.match-item {
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 12px 11px;
  transition: all 0.18s ease;
}
.match-item:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateX(3px);
  box-shadow: 0 6px 18px -6px rgba(30, 27, 75, 0.08);
}
.match-item.is-active {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border-color: rgba(167, 139, 250, 0.35);
  color: #ffffff;
  box-shadow: 0 12px 28px -10px rgba(79, 70, 229, 0.55);
}
.match-item.is-active .match-favorite strong { color: #c084fc; }
.match-item.is-active .match-item-top { color: rgba(255, 255, 255, 0.7); }

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.status-dot { background: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }

.main {
  max-width: 1560px;
  padding: 0 clamp(18px, 3.4vw, 48px) 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 calc(-1 * clamp(18px, 3.4vw, 48px)) 24px;
  padding: 14px clamp(18px, 3.4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
}
.breadcrumb { font-size: 9.5px; letter-spacing: 0.16em; }
.topbar-brand {
  font-family: var(--sans);
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.055em;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar-brand span {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ghost-btn {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 13px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: 10px;
  transition: all 0.18s ease;
}
.ghost-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(99, 102, 241, 0.4);
}
.ghost-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.precision-btn {
  border-color: rgba(99, 102, 241, 0.35);
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
}
.precision-btn:hover { color: #ffffff; }

.demo-badge {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.08);
  font-size: 9.5px;
  color: #4f46e5;
  border-radius: 10px;
}
.demo-dot { background: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.demo-badge.is-live { background: rgba(99, 102, 241, 0.12); }

.hero {
  padding: 32px 36px 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, #0b0f19 0%, #151838 42%, #1e1b4b 75%, #2a1548 100%);
  box-shadow: 0 32px 70px -30px rgba(30, 27, 75, 0.7), 0 10px 24px -10px rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.22);
}
.hero::before {
  background:
    radial-gradient(circle at 84% -20%, rgba(139, 92, 246, 0.35), transparent 45%),
    radial-gradient(circle at 4% 118%, rgba(59, 130, 246, 0.28), transparent 45%);
}
.hero::after { opacity: 0.6; }
.hero-kicker { color: rgba(255, 255, 255, 0.65); }
.hero-score { font-size: clamp(62px, 7vw, 94px); color: #ffffff; }
.hero-score-prob {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(192, 132, 252, 0.08);
}
.hero-outcome {
  border-color: rgba(167, 139, 250, 0.2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  backdrop-filter: blur(8px);
}
.hero-outcome:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}
.hero-facts { border-top-color: rgba(255, 255, 255, 0.14); }
.hero-odds { border-top-color: rgba(255, 255, 255, 0.14); }

.dashboard { gap: 20px; }
.main-column, .rail { gap: 20px; }

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.panel-head { margin-bottom: 16px; }
.eyebrow {
  color: #6366f1;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.panel h2 { margin-top: 5px; font-size: clamp(21px, 2vw, 27px); letter-spacing: -0.035em; }
.panel-note { font-size: 9px; color: var(--muted-2); }

.key-chip {
  border-color: var(--line);
  border-radius: 13px;
  background: rgba(241, 244, 251, 0.6);
  padding: 10px 11px;
}
.key-chip:hover { border-color: #6366f1; transform: translateY(-1px); }
.key-chip strong { font-size: 16.5px; }

.metric-card {
  border-color: var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  transition: all 0.18s ease;
}
.metric-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -12px rgba(30, 27, 75, 0.12);
}
.metric-bar-home { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.metric-bar-away { background: linear-gradient(90deg, #8b5cf6, #c084fc); }

.engine-card, .engine-outcome, .value-grid div {
  border-color: var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
}
.engine-badge { background: rgba(99, 102, 241, 0.1); color: #4f46e5; }
.engine-bars .final { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.engine-outcome:nth-child(3) .engine-bars .final { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.engine-table { border-color: var(--line); border-radius: 13px; }

.insight-panel {
  background: linear-gradient(150deg, #0d1224 0%, #17183d 50%, #26133f 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 24px 50px -20px rgba(30, 27, 75, 0.5);
  color: #ffffff;
}
.insight-panel .eyebrow { color: #c084fc; }
.insight-panel h2 { color: #ffffff; }
.insight-panel .panel-note { color: rgba(255, 255, 255, 0.6); }
.insight-list p { color: rgba(255, 255, 255, 0.85); }

.factor-impact.pos { background: rgba(99, 102, 241, 0.1); color: #4f46e5; }
.factor-impact.neg { background: var(--coral-soft); color: #e11d48; }
.factor-row:hover .factor-main strong { color: #4f46e5; }

.value-grid .pos { color: #4f46e5; }
.value-verdict.pos { background: rgba(99, 102, 241, 0.1); color: #3730a3; }
.table-meta, .panel-footnote { color: var(--muted-2); }
.league-table tr.is-home { background: rgba(59, 130, 246, 0.08); }
.league-table tr.is-away { background: rgba(139, 92, 246, 0.08); }
.league-table tr.is-home td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
.league-table tr.is-away td:first-child { box-shadow: inset 3px 0 0 #8b5cf6; }

.drawer { background: #ffffff; }
.drawer-close { border-color: var(--line-strong); }
.drawer-close:hover { background: #6366f1; border-color: #6366f1; color: #ffffff; }
.drawer-driver-bar i { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.drawer-formula { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.16); }

/* H2H */
.h2h-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}
.h2h-score > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.h2h-score > div:first-child { align-items: flex-start; }
.h2h-score > div:last-child { align-items: flex-end; }
.h2h-score strong { font-family: var(--serif); font-size: 35px; font-weight: 400; line-height: 1; letter-spacing: -0.04em; }
.h2h-score span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.h2h-draw strong { color: var(--muted-2); }
.h2h-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2h-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.h2h-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(23, 25, 20, 0.06);
  font-size: 11px;
}
.h2h-date { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.h2h-teams { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-teams strong { font-family: var(--mono); font-size: 11px; }
.h2h-venue { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); text-align: right; }

/* Últimos 10 */
.recent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recent-team { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 243, 250, 0.6); }
.recent-team-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.recent-team-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.recent-team-head > span:last-child { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--muted-2); white-space: nowrap; }
.recent-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 9px 0; }
.recent-rates div { padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.9); }
.recent-rates span { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.recent-rates strong { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.recent-list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
.recent-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 5px; font-size: 10px; }
.recent-list li small { grid-column: 2 / 4; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.recent-res { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-family: var(--mono); font-size: 8px; font-weight: 700; background: rgba(23, 25, 20, 0.07); }
.recent-res.w { background: linear-gradient(135deg, #3b82f6, #7c3aed); color: #ffffff; }
.recent-res.d { background: rgba(148, 163, 184, 0.18); color: var(--ink); }
.recent-res.l { background: var(--coral-soft); color: #e11d48; }
.recent-opp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.recent-list strong { font-family: var(--mono); font-size: 10px; font-weight: 500; }

/* Matriz 7x7 */
.matrix-legend {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.matrix-legend strong { color: #6366f1; font-weight: 600; }
.matrix-grid {
  display: grid;
  grid-template-columns: 28px repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}
.matrix-corner, .matrix-col-label, .matrix-row-label {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}
.matrix-corner { font-size: 8px; letter-spacing: 0.04em; text-transform: uppercase; }
.matrix-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.24;
  min-width: 0;
  padding: 2px;
  border: 1px solid rgba(99, 102, 241, 0.08);
  border-radius: 7px;
  background: rgba(99, 102, 241, var(--heat, 0));
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(6px, 0.72vw, 9px);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.matrix-cell:hover { transform: scale(1.08); border-color: #6366f1; z-index: 2; box-shadow: 0 8px 18px -6px rgba(99, 102, 241, 0.35); }
.matrix-cell.is-hot { color: #ffffff; }
.matrix-cell.is-top { box-shadow: inset 0 0 0 2px #7c3aed, 0 0 12px rgba(124, 58, 237, 0.35); background: rgba(124, 58, 237, 0.35); }
.matrix-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.matrix-top-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(240, 243, 250, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}
.matrix-top-score:hover { border-color: #6366f1; background: rgba(99, 102, 241, 0.08); }
.matrix-top-score strong { font-family: var(--serif); font-size: 17.5px; font-weight: 500; }
.matrix-top-score span { font-family: var(--mono); font-size: 9px; color: var(--muted); }

/* Goles por tiempo */
.timing-split { display: flex; gap: 3px; height: 30px; overflow: hidden; border-radius: 9px; }
.timing-split span { display: flex; align-items: center; justify-content: center; min-width: 0; }
.timing-split .first { background: linear-gradient(90deg, #3b82f6, #6366f1); color: #ffffff; }
.timing-split .second { background: rgba(139, 92, 246, 0.15); color: #6d28d9; }
.timing-split i { font-family: var(--mono); font-size: 10px; font-style: normal; }
.timing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.timing-card { padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(240, 243, 250, 0.6); }
.timing-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.timing-head span { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.timing-head strong { font-family: var(--mono); font-size: 11px; font-weight: 600; color: #6366f1; }
.timing-bars { display: flex; flex-direction: column; gap: 5px; }
.timing-bars div { display: grid; grid-template-columns: 46px minmax(0, 1fr) 30px; align-items: center; gap: 6px; }
.timing-bars span { font-size: 10px; color: var(--muted); }
.timing-bars i { display: block; height: 5px; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #6366f1); }
.timing-bars strong { font-family: var(--mono); font-size: 10px; font-weight: 500; text-align: right; }

/* Escenarios */
.combo-groups { display: flex; flex-direction: column; gap: 10px; }
.combo-group-label { display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.combo-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.combo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(240, 243, 250, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}
.combo-chip span { font-size: 11px; }
.combo-chip strong { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--muted); }
.combo-chip:hover { border-color: #6366f1; transform: translateY(-1px); background: rgba(99, 102, 241, 0.08); }
.combo-chip.is-active { background: linear-gradient(135deg, #3b82f6, #7c3aed); border-color: transparent; color: #ffffff; }
.combo-chip.is-active strong { color: #e0e7ff; }
.combo-legs { display: flex; flex-direction: column; gap: 5px; margin-top: 13px; }
.combo-leg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 86px 24px;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}
.combo-leg-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.combo-leg-prob { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: right; }
.combo-odd { display: flex; align-items: center; gap: 4px; }
.combo-odd span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; color: var(--muted-2); }
.combo-odd input { width: 52px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-2); font-family: var(--mono); font-size: 10px; }
.combo-remove { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted-2); cursor: pointer; }
.combo-remove:hover { background: var(--coral-soft); color: var(--coral); }
.combo-controls { display: flex; align-items: end; gap: 10px; margin-top: 12px; }
.combo-controls label { display: flex; flex-direction: column; gap: 4px; }
.combo-controls label span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.combo-controls input { width: 80px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); font-family: var(--mono); font-size: 11px; }
.combo-count { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.combo-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.combo-summary > div { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(240, 243, 250, 0.6); }
.combo-summary span { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.combo-summary strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 16.5px; font-weight: 500; }
.combo-summary strong.pos { color: #4f46e5; }
.combo-summary strong.neg { color: var(--coral); }
.combo-summary small { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); }
.combo-warnings { margin: 10px 0 0; padding: 9px 11px 9px 24px; border-radius: 9px; background: rgba(224, 90, 63, 0.06); color: #8f3b26; font-size: 10px; line-height: 1.5; }
.combo-note { margin: 9px 0 0; font-size: 10px; line-height: 1.5; color: var(--muted); }
.combo-empty { margin-top: 13px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(244, 242, 236, 0.36); }
.combo-empty strong { display: block; font-size: 11.5px; }
.combo-empty p { margin: 4px 0 0; font-size: 10px; line-height: 1.5; color: var(--muted); }

/* Panel de precisión */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(18, 24, 20, 0.42);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal-backdrop.is-open { opacity: 1; }
.validation-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 70;
  width: min(1080px, calc(100vw - 36px));
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 26px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper-2);
  box-shadow: 0 40px 100px -40px rgba(15, 30, 22, 0.7);
  transform: translate(-50%, -48%) scale(0.98);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.validation-modal.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.validation-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.validation-top h2 { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -0.04em; }
.precision-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0e1329 0%, #1e1b4b 55%, #312e81 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #ffffff;
}
.precision-hero .eyebrow { color: #c084fc; }
.precision-hero h3 { margin: 5px 0 4px; font-family: var(--sans); font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.04em; color: #ffffff; }
.precision-hero p { margin: 0; font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.precision-badge { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100px; height: 100px; border-radius: 50%; border: 1px solid rgba(192, 132, 252, 0.4); background: rgba(192, 132, 252, 0.12); box-shadow: 0 0 25px rgba(192, 132, 252, 0.2); }
.precision-badge strong { font-family: var(--sans); font-size: 29px; font-weight: 700; line-height: 1; color: #c084fc; }
.precision-badge span { margin-top: 4px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.7); }
.precision-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.precision-card { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(240, 243, 250, 0.6); }
.precision-card > span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.precision-card > strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 18.5px; font-weight: 500; }
.precision-card > strong.pos { color: #4f46e5; }
.precision-card > strong.neg { color: var(--coral); }
.precision-card small { display: block; margin-top: 3px; font-size: 9px; line-height: 1.4; color: var(--muted-2); }
.precision-card em { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8px; font-style: normal; color: var(--muted-2); }
.precision-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.precision-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.precision-section-head h4 { margin: 0; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.precision-section-head span { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.precision-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.precision-table th { padding: 7px 8px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 8px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); text-align: right; }
.precision-table th:first-child, .precision-table td:first-child { text-align: left; }
.precision-table td { padding: 7px 8px; border-bottom: 1px solid rgba(99, 102, 241, 0.08); text-align: right; font-family: var(--mono); font-size: 10px; }
.precision-table td.pos { color: #4f46e5; }
.precision-table td.neg { color: var(--coral); }
.coverage-callouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.coverage-callouts > div { padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(240, 243, 250, 0.6); }
.coverage-callouts > div:first-child { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); }
.coverage-callouts > div:first-child strong { color: #059669; }
.coverage-callouts span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.coverage-callouts strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 19px; font-weight: 600; color: #4f46e5; }
.coverage-callouts small { display: block; margin-top: 2px; font-size: 8.5px; line-height: 1.35; color: var(--muted-2); }
.coverage-table tr.is-sparse td { color: var(--muted-2); }
.coverage-table tr.is-high td { background: rgba(99, 102, 241, 0.07); }
.coverage-table tr.is-high td:first-child { font-weight: 600; color: #4f46e5; }
.coverage-table tr.is-mid td:first-child { font-weight: 600; }
.calibration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calibration-block h4 { margin: 0 0 7px; font-size: 11px; font-weight: 600; }
.calibration-rows { display: flex; flex-direction: column; gap: 4px; }
.calibration-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 64px 22px; align-items: center; gap: 6px; }
.calibration-row > span { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.calibration-row i { position: relative; display: block; height: 8px; border-radius: 999px; background: rgba(99, 102, 241, 0.08); }
.calibration-row i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pred); border-radius: 999px; background: rgba(99, 102, 241, 0.35); }
.calibration-row i::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: var(--obs); width: 2px; border-radius: 999px; background: #6366f1; }
.calibration-row strong { font-family: var(--mono); font-size: 9px; font-weight: 500; text-align: right; }
.calibration-row small { font-family: var(--mono); font-size: 8px; color: var(--muted-2); text-align: right; }
.calibration-key { display: flex; align-items: center; gap: 5px; margin: 6px 0 0; font-family: var(--mono); font-size: 8px; text-transform: uppercase; color: var(--muted-2); }
.calibration-key span { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.calibration-key .pred { background: rgba(99, 102, 241, 0.35); }
.calibration-key .obs { background: #6366f1; }
.timeline-bars { display: flex; flex-direction: column; gap: 4px; }
.timeline-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 42px 26px; align-items: center; gap: 7px; }
.timeline-row span, .timeline-row small { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.timeline-row i { display: block; height: 7px; border-radius: 999px; }
.timeline-row i.pos { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.timeline-row i.neg { background: var(--coral); }
.timeline-row strong { font-family: var(--mono); font-size: 9px; font-weight: 500; text-align: right; }
.precision-notes { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.precision-notes h4 { margin: 0 0 7px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.precision-notes ul { margin: 0; padding-left: 14px; font-size: 10px; line-height: 1.55; color: var(--muted); }
.precision-notes p { margin: 0 0 8px; font-size: 10px; line-height: 1.55; color: var(--muted); }
.precision-foot { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 8px; line-height: 1.6; color: var(--muted-2); }
.validation-empty { padding: 30px 10px; text-align: center; }
.validation-empty h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: 29px; font-weight: 400; }
.validation-empty p { max-width: 520px; margin: 0 auto 12px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.validation-empty code { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--paper-3); font-family: var(--mono); font-size: 11px; }
body.modal-open { overflow: hidden; }

@media (max-width: 1200px) {
  .precision-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calibration-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .dashboard { grid-template-columns: 1fr; }
  .rail { grid-row: auto; }
  .precision-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .precision-notes { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main { padding: 0 14px 28px; }
  .topbar { margin: 0 -14px 18px; padding: 11px 14px; }
  .hero { padding: 22px 20px 16px; border-radius: 24px; }
  .panel { padding: 18px 16px; border-radius: 18px; }
  .matrix-grid { grid-template-columns: 22px repeat(7, minmax(0, 1fr)); gap: 2px; }
  .matrix-cell { aspect-ratio: 1.08; border-radius: 5px; font-size: 8px; }
  .matrix-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-grid { grid-template-columns: 1fr; }
  .timing-grid { grid-template-columns: 1fr; }
  .combo-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combo-leg { grid-template-columns: minmax(0, 1fr) 38px 76px 22px; }
  .validation-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; padding: 18px 16px 26px; }
  .precision-hero { align-items: flex-start; }
  .precision-badge { width: 82px; height: 82px; }
  .precision-badge strong { font-size: 24px; }
  .precision-grid { grid-template-columns: 1fr 1fr; }
  .calibration-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .precision-grid { grid-template-columns: 1fr 1fr; }
  .coverage-callouts { grid-template-columns: 1fr; }
  .precision-hero { flex-direction: column; }
  .precision-badge { align-self: flex-start; }
  .combo-leg { grid-template-columns: minmax(0, 1fr) 70px 22px; }
  .combo-leg-prob { display: none; }
  .combo-controls { flex-wrap: wrap; }
  .h2h-list li { grid-template-columns: 48px minmax(0, 1fr); }
  .h2h-venue { display: none; }
}

@media print {
  .precision-btn, .combo-panel, .validation-modal, .modal-backdrop { display: none !important; }
}

/* ============================================================
   Aciertos, equipos latentes y rendimiento de jugadores
   ============================================================ */

.topbar-right { flex-wrap: wrap; justify-content: flex-end; }
.ghost-btn.refresh-btn { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.ghost-btn.refresh-btn:hover { background: #1e1b4b; border-color: #1e1b4b; }
.hits-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(99, 102, 241, 0.35);
  color: #4f46e5;
}
.hits-btn-label { font-size: 9px; letter-spacing: 0.08em; }
.hits-btn-value { font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: 0; color: #4338ca; }
.hits-btn-rate {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: #4338ca;
}
.latent-btn { border-color: rgba(99, 102, 241, 0.35); color: #4f46e5; }

.mobile-tools { display: none; }
.mobile-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink);
  text-align: left;
}
.mobile-tool span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.mobile-tool strong { font-family: var(--sans); font-size: 19.5px; font-weight: 700; color: #4f46e5; }
.mobile-tool .mobile-tool-figure {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  font-family: var(--sans);
  font-size: inherit;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
}
.mobile-tool-figure small { font-family: var(--mono); font-size: 8px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; }

.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.validation-modal { display: flex; flex-direction: column; overflow: hidden; }
.validation-modal .validation-top { flex: 0 0 auto; margin: 0 0 18px; padding: 0 0 12px; }
.validation-modal > #validation-content,
.validation-modal > #latent-content,
.validation-modal > #record-content { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; }

.record-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-left: 3px solid #6366f1;
  border-radius: 0 12px 12px 0;
  background: rgba(99, 102, 241, 0.06);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.record-note strong { color: var(--ink); }
.record-pending { color: var(--muted-2); font-family: var(--mono); font-size: 9px; }

.precision-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; }
.precision-divider span { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); white-space: nowrap; }
.precision-divider i { flex: 1; height: 1px; background: var(--line); }

/* Total de aciertos */
.hits-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(139, 92, 246, 0.2), transparent 45%),
    linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.98));
}
.hits-info { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, 0.9); }
.hits-copy { min-width: 0; }
.hits-copy h3 { margin: 5px 0 6px; font-family: var(--sans); font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.04em; }
.hits-copy p { max-width: 620px; margin: 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.hits-meter { height: 8px; margin-top: 15px; overflow: hidden; border-radius: 999px; background: rgba(99, 102, 241, 0.1); }
.hits-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%); }
.hits-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.hits-meta strong { color: #4f46e5; font-weight: 600; }
.hits-big {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 25px -8px rgba(99, 102, 241, 0.25);
}
.hits-big strong {
  font-family: var(--sans);
  font-size: 33px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hits-big span { margin-top: 5px; font-family: var(--mono); font-size: 9px; color: var(--muted-2); }

.hits-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hits-stats > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(240, 243, 250, 0.6); }
.hits-stats span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.hits-stats strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 17.5px; font-weight: 500; }

.hits-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); gap: 12px; margin-top: 14px; }
.hits-panel { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.85); }
.hits-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.hits-panel-head h4 { margin: 0; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; }
.hits-panel-head span { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.hits-table { font-size: 10px; }
.hits-table td, .hits-table th { padding: 6px 5px; }
.hit-list { display: flex; flex-direction: column; gap: 5px; max-height: 318px; margin: 0; padding: 0; overflow: auto; list-style: none; scrollbar-width: thin; }
.hit-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(240, 243, 250, 0.45); }
.hit-row.is-hit { border-left: 2px solid #4f46e5; }
.hit-row.is-miss { border-left: 2px solid var(--coral); }
.hit-badge { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-family: var(--mono); font-size: 11px; }
.is-hit .hit-badge { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.is-miss .hit-badge { background: var(--coral-soft); color: var(--coral); }
.hit-teams { min-width: 0; }
.hit-teams strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 500; }
.hit-teams b { font-family: var(--mono); font-weight: 500; }
.hit-teams small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.hit-pick { text-align: right; }
.hit-pick small { display: block; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.hit-pick strong { display: block; margin-top: 2px; font-family: var(--mono); font-size: 9px; font-weight: 500; color: #4f46e5; }
.is-miss .hit-pick strong { color: var(--coral); }
.hits-note { margin: 14px 0 0; padding: 10px 12px; border-left: 2px solid var(--line-strong); font-size: 10px; line-height: 1.6; color: var(--muted); }

/* Equipos latentes */
.latent-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #131432 0%, #24133f 50%, #381254 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #ffffff;
}
.latent-hero .eyebrow { color: #c084fc; }
.latent-hero-copy { min-width: 0; }
.latent-hero-copy h3 { margin: 5px 0 6px; font-family: var(--sans); font-size: clamp(25px, 3vw, 34px); font-weight: 700; letter-spacing: -0.04em; color: #ffffff; }
.latent-hero-copy p { max-width: 620px; margin: 0; font-size: 11px; line-height: 1.6; color: rgba(255, 255, 255, 0.72); }
.latent-kpis { display: grid; grid-template-columns: repeat(3, minmax(64px, 1fr)); gap: 7px; flex: 0 0 auto; }
.latent-kpis > div { padding: 10px; border: 1px solid rgba(192, 132, 252, 0.25); border-radius: 12px; background: rgba(192, 132, 252, 0.1); text-align: center; }
.latent-kpis strong { display: block; font-family: var(--sans); font-size: 24px; font-weight: 700; line-height: 1; color: #c084fc; }
.latent-kpis span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.7); }

.latent-toolbar { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.latent-select { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.latent-select select { padding: 7px 28px 7px 9px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper-2); font-family: var(--sans); font-size: 11px; color: var(--ink); }
.latent-count { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.latent-legend { display: flex; align-items: center; gap: 5px; margin-left: auto; font-family: var(--mono); font-size: 8px; text-transform: uppercase; color: var(--muted-2); }
.latent-legend i { width: 7px; height: 7px; border-radius: 50%; }
.latent-legend i.pos { background: #4f46e5; }
.latent-legend i.neutral { background: var(--muted-2); }
.latent-legend i.neg { background: var(--coral); }

.latent-table-wrap { max-height: 560px; }
.latent-table { width: 100%; min-width: 660px; border-collapse: collapse; }
.latent-table th { padding: 8px 9px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 8px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); text-align: left; }
.latent-table td { padding: 10px 9px; border-bottom: 1px solid rgba(99, 102, 241, 0.06); vertical-align: middle; font-size: 10px; }
.latent-table tr:last-child td { border-bottom: 0; }
.latent-team { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.latent-team strong { display: block; font-size: 11px; font-weight: 600; }
.latent-team small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.latent-crest { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--paper-3); }
.latent-crest-abbr { font-family: var(--mono); font-size: 8px; color: var(--muted); }
.latent-crest img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.latent-crest.has-logo .latent-crest-abbr { opacity: 0; }
.latent-streak { display: block; margin-bottom: 4px; font-size: 10px; }
.streak-dots { display: flex; gap: 2px; }
.streak-dots i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-family: var(--mono); font-size: 7px; font-style: normal; }
.streak-w { background: linear-gradient(135deg, #3b82f6, #7c3aed); color: #ffffff; }
.streak-d { background: var(--paper-3); color: var(--muted); }
.streak-l { background: var(--coral-soft); color: var(--coral); }
.latent-record { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.latent-table td small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.latent-table td strong + small { margin-top: 2px; }
.latent-table td > strong { display: block; font-size: 10px; }
.support-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; }
.support-pill strong { font-family: var(--mono); font-size: 11px; font-weight: 500; }
.support-pill span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.support-pill.pos { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.support-pill.neutral { background: var(--paper-3); color: var(--muted); }
.support-pill.neg { background: var(--coral-soft); color: var(--coral); }
.support-bar { width: 88px; height: 4px; margin: 4px 0; overflow: hidden; border-radius: 999px; background: rgba(99, 102, 241, 0.1); }
.support-bar i { display: block; height: 100%; border-radius: 999px; }
.support-bar i.pos { background: linear-gradient(90deg, #3b82f6, #7c3aed); }
.support-bar i.neutral { background: var(--muted-2); }
.support-bar i.neg { background: var(--coral); }
.latent-empty { padding: 18px; text-align: center; color: var(--muted); }

.latent-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.latent-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.latent-section-head h4 { margin: 4px 0 0; font-family: var(--sans); font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.latent-section-head > span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); text-align: right; }
.latent-section-copy { margin: 0 0 12px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.upset-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.upset-stats > div { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(240, 243, 250, 0.6); }
.upset-stats strong { display: block; font-family: var(--mono); font-size: 15.5px; font-weight: 500; }
.upset-stats span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-2); }
.upset-patterns { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 12px 0; padding-left: 16px; font-size: 10px; line-height: 1.55; color: var(--muted); }
.upset-table { min-width: 640px; }
.upset-table td small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.upset-table td strong { font-size: 10px; }
.latent-footnote { margin: 10px 0 0; font-size: 9px; line-height: 1.55; color: var(--muted-2); }

.streak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.streak-card { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.85); }
.streak-card.pos { border-top: 2px solid #6366f1; }
.streak-card.neg { border-top: 2px solid var(--coral); }
.streak-card.neutral { border-top: 2px solid var(--muted-2); }
.streak-card-head { display: flex; justify-content: space-between; gap: 8px; }
.streak-card-head strong { font-size: 11px; font-weight: 600; }
.streak-card-head span { font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.streak-card-rates { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; font-family: var(--mono); font-size: 9px; }
.streak-card-rates .pos { color: #4f46e5; }
.streak-card-rates .neg { color: var(--coral); }
.streak-card p { margin: 7px 0 0; font-size: 9px; line-height: 1.55; color: var(--muted); }
.latent-notes { margin-top: 22px; }

/* Rendimiento de jugadores y cronología */
.player-source { margin: 0 0 12px; padding: 8px 10px; border-left: 2px solid #6366f1; background: rgba(99, 102, 241, 0.08); font-size: 9px; line-height: 1.5; color: var(--muted); }
.player-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.player-team { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 243, 250, 0.45); }
.player-team.is-empty { opacity: 0.72; }
.player-team-head { display: flex; align-items: center; gap: 8px; }
.player-team-head > div { min-width: 0; }
.player-team-head strong { display: block; font-size: 11.5px; }
.player-team-head span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--muted-2); }
.player-sample { margin-left: auto; font-family: var(--mono); font-size: 8px; color: var(--muted-2); white-space: nowrap; }
.player-story { margin: 9px 0; font-size: 10px; line-height: 1.6; color: var(--ink-2); }
.player-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.player-stat-grid > div { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.85); }
.player-stat-grid span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); }
.player-stat-grid strong { display: block; margin-top: 2px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.player-stat-grid small { display: block; margin-top: 1px; font-size: 8px; color: var(--muted-2); }
.player-table { width: 100%; min-width: 400px; border-collapse: collapse; }
.player-table th { padding: 6px 5px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 8px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); text-align: right; }
.player-table th:first-child, .player-table td:first-child { text-align: left; }
.player-table td { padding: 6px 5px; border-bottom: 1px solid rgba(99, 102, 241, 0.06); text-align: right; font-family: var(--mono); font-size: 9px; }
.player-table td strong { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; }
.player-table td small { display: block; margin-top: 1px; font-size: 8px; color: var(--muted-2); }
.player-impact { display: inline-block; padding: 2px 5px; border-radius: 999px; background: var(--paper-3); font-size: 9px; }
.player-impact.pos { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.player-impact.neg { background: var(--coral-soft); color: var(--coral); }
.player-empty { margin: 8px 0; font-size: 9px; line-height: 1.55; color: var(--muted-2); }
.player-timeline { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.player-timeline summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.player-timeline summary::-webkit-details-marker { display: none; }
.player-timeline summary span { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.07em; color: #4f46e5; }
.player-timeline summary strong { font-family: var(--mono); font-size: 8px; font-weight: 400; color: var(--muted-2); }
.timeline-list { display: flex; flex-direction: column; gap: 0; margin: 9px 0 0; padding: 0; list-style: none; }
.timeline-item { display: grid; grid-template-columns: 38px 58px minmax(0, 1fr); gap: 7px; padding: 7px 0; border-top: 1px solid rgba(99, 102, 241, 0.08); }
.timeline-minute { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.timeline-kind { align-self: start; padding: 2px 5px; border-radius: 5px; background: var(--paper-3); font-family: var(--mono); font-size: 7.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); text-align: center; }
.timeline-item.is-goal .timeline-kind, .timeline-item.is-penalty .timeline-kind { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }
.timeline-item.is-yellow .timeline-kind { background: rgba(216, 180, 40, 0.14); color: #8a6b0c; }
.timeline-item.is-red .timeline-kind, .timeline-item.is-own-goal .timeline-kind { background: var(--coral-soft); color: var(--coral); }
.timeline-item.is-sub .timeline-kind { background: rgba(77, 111, 216, 0.1); color: var(--blue); }
.timeline-body strong { display: block; font-size: 10.5px; line-height: 1.4; }
.timeline-score { display: inline-block; margin-left: 5px; padding: 1px 4px; border-radius: 4px; background: rgba(99, 102, 241, 0.12); font-family: var(--mono); font-size: 9px; font-style: normal; color: #4f46e5; vertical-align: 1px; }
.timeline-body p { margin: 2px 0 0; font-size: 10px; line-height: 1.45; color: var(--muted); }
.timeline-item.is-rival { opacity: 0.72; }
.muted { color: var(--muted-2); }

@media (max-width: 1200px) {
  #engine-btn { display: none; }
}

@media (max-width: 980px) {
  .hits-grid { grid-template-columns: 1fr; }
  .latent-hero { align-items: flex-start; }
  .latent-kpis { grid-template-columns: repeat(3, minmax(58px, 1fr)); }
  .player-teams { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  #refresh-btn, #hits-btn, #latent-btn, #precision-btn { display: none !important; }
  .mobile-tools:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: -8px 0 18px; }
}

@media (max-width: 720px) {
  .hits-hero { flex-direction: column; align-items: flex-start; }
  .hits-big { align-self: flex-start; width: 104px; height: 104px; }
  .hits-big strong { font-size: 27px; }
  .hits-stats { grid-template-columns: 1fr 1fr; }
  .latent-hero { flex-direction: column; }
  .latent-kpis { width: 100%; }
  .latent-toolbar { flex-wrap: wrap; }
  .latent-legend { display: none; }
  .upset-stats { grid-template-columns: 1fr 1fr; }
  .upset-patterns { grid-template-columns: 1fr; }
  .latent-section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .latent-section-head > span { text-align: left; }
  .latent-table-wrap { max-height: 62vh; overflow: auto; border: 0; background: transparent; }
  .latent-table { min-width: 0; }
  .latent-table thead { display: none; }
  .latent-table, .latent-table tbody, .latent-table tr, .latent-table td { display: block; width: 100%; }
  .latent-table tr { margin-bottom: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
  .latent-table td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .latent-table td::before { content: attr(data-label); flex: 0 0 auto; padding-top: 2px; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); text-align: left; }
  .latent-table td:first-child { display: block; padding-bottom: 8px; border-bottom: 1px solid var(--line); text-align: left; }
  .latent-table td:first-child::before { display: none; }
  .latent-table td:last-child { display: block; padding-top: 8px; text-align: left; }
  .latent-table td:last-child::before { display: block; margin-bottom: 3px; }
  .support-bar { width: 100%; max-width: 160px; }
  .player-stat-grid { grid-template-columns: 1fr 1fr; }
  .timeline-item { grid-template-columns: 34px 52px minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .mobile-tools:not([hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-tool { flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 10px; }
  .mobile-tool span { font-size: 8px; line-height: 1.3; }
  .mobile-tool strong { font-size: 18.5px; }
  .mobile-tool .mobile-tool-figure { align-items: flex-start; }
  .mobile-tool-figure small { font-size: 8.5px; }
  .hits-meta { gap: 8px; }
  .latent-kpis { grid-template-columns: 1fr; }
  .latent-kpis > div { display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
  .latent-kpis span { margin-top: 0; }
  .hits-panel { padding: 9px; }
  .hit-row { grid-template-columns: 18px minmax(0, 1fr); }
  .hit-pick { grid-column: 2; display: flex; gap: 8px; justify-content: flex-start; text-align: left; }
  .hit-pick small, .hit-pick strong { display: inline; margin: 0; }
  .player-team { padding: 10px; }
}

@media print {
  .mobile-tools, .hits-btn, .latent-btn, .latent-modal, #latent-backdrop { display: none !important; }
}

/* ============================================================
   Paneles con pestañas, tabla de mercados y calidad del motor
   ============================================================ */

.panel-stack { margin-top: 18px; }
.panel-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.tab-panel { padding-bottom: 18px; }
.panel-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(241, 244, 251, 0.72);
  scrollbar-width: none;
}
.panel-tabs::-webkit-scrollbar { display: none; }
.panel-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.panel-tab:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); }
.panel-tab.is-active {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 5px 14px -8px rgba(30, 27, 75, 0.35);
}
.tab-pane[hidden] { display: none; }
.tab-pane .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.tab-pane .panel > .panel-head { display: none; }
.tab-pane .panel + .panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tab-pane .insight-panel {
  padding: 20px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  background: linear-gradient(150deg, #0d1224 0%, #17183d 50%, #26133f 100%);
  box-shadow: 0 24px 50px -20px rgba(30, 27, 75, 0.5);
}
.tab-pane .insight-panel .panel-head { display: none; }
.tab-pane .confidence-panel { padding-top: 0; }

/* Jugadores: contenido apilado sin pestañas */
.panel-stack-body > .panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.panel-stack-body > .panel > .panel-head {
  margin-bottom: 10px;
  padding: 0;
}
.panel-stack-body > .panel > .panel-head .eyebrow { display: none; }
.panel-stack-body > .panel > .panel-head h2 { font-size: 14.5px; }
.panel-stack-body > .panel + .panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Tabla de mercados */
.market-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}
.market-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 72px 88px 82px;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.market-row:first-child { border-top: 0; }
.market-head {
  background: rgba(241, 244, 251, 0.85);
  font-family: var(--mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.market-row strong { font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.market-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-ref { display: flex; flex-direction: column; gap: 1px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.market-ref small { font-size: 8px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); }
.market-diff { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--muted-2); }
.market-diff.pos { color: #4f46e5; }
.market-diff.neg { color: var(--coral); }
.market-group-label {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: rgba(241, 244, 251, 0.52);
  font-family: var(--mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

/* Calidad del motor */
.quality-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quality-strip > div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
}
.quality-strip span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.quality-strip strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: 18.5px; font-weight: 500; }
.quality-strip small { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); }
.quality-strip .pos { color: #4f46e5; }
.quality-strip .neg { color: var(--coral); }
.quality-markets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}
.quality-market { padding: 9px 10px; background: rgba(255, 255, 255, 0.92); }
.quality-market span { display: block; font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); }
.quality-market strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.quality-market small { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); }
.quality-market .pos { color: #4f46e5; }
.quality-market .neg { color: var(--coral); }

/* Escenarios sin precios externos */
.combo-leg { grid-template-columns: minmax(0, 1fr) 44px 76px 24px; }
.combo-leg-kind { font-family: var(--mono); font-size: 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); text-align: right; }
.combo-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.combo-summary strong.pos { color: #4f46e5; }
.combo-summary strong.neg { color: var(--coral); }

/* Proyección: valor esperado en puntos */
.projection-formula {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.projection-formula > div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}
.projection-formula .eyebrow { display: block; margin-bottom: 5px; }
.projection-formula strong {
  display: block;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}
.projection-formula p {
  margin: 6px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}
.projection-reading {
  border-color: rgba(139, 92, 246, 0.25) !important;
  background: linear-gradient(150deg, #0d1224 0%, #17183d 60%, #26133f 100%) !important;
}
.projection-reading .eyebrow { color: rgba(255, 255, 255, 0.55); }
.projection-reading p { color: rgba(255, 255, 255, 0.82); font-size: 11px; }
.projection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.projection-team {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}
.projection-team-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 244, 251, 0.72);
}
.projection-team-name { flex: 1; min-width: 0; }
.projection-team-name strong { display: block; font-size: 12.5px; }
.projection-team-name span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.projection-team-ve {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 16.5px;
  font-weight: 500;
  text-align: right;
}
.projection-team-ve small {
  display: block;
  margin-top: 1px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.projection-team-ve.pos { color: #4f46e5; }
.projection-team-ve.neg { color: var(--coral); }
.projection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.projection-summary > div { padding: 9px 10px; background: rgba(255, 255, 255, 0.92); }
.projection-summary span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.projection-summary strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 14.5px; font-weight: 500; }
.projection-summary small { display: block; margin-top: 2px; font-size: 8.5px; line-height: 1.3; color: var(--muted-2); }
.projection-table { display: flex; flex-direction: column; }
.projection-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 118px 50px 54px;
  gap: 7px;
  align-items: center;
  padding: 9px 11px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.projection-row:first-child { border-top: 0; }
.projection-head {
  background: rgba(241, 244, 251, 0.85);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.projection-match { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.projection-row-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.projection-match strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.projection-match small { font-size: 9px; color: var(--muted-2); }
.projection-badge {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  font-size: 7.5px;
  letter-spacing: 0.05em;
}
.projection-badge.is-real { background: rgba(16, 185, 129, 0.1); color: #047857; }
.projection-probs { display: flex; gap: 5px; justify-content: flex-end; font-family: var(--mono); font-size: 10px; }
.projection-probs span { display: inline-flex; align-items: baseline; gap: 2px; }
.projection-probs small { font-size: 7.5px; color: var(--muted-2); text-transform: uppercase; }
.projection-expected, .projection-ve { font-family: var(--mono); text-align: right; }
.projection-expected strong, .projection-ve strong { display: block; font-size: 11px; font-weight: 500; }
.projection-expected small, .projection-ve small {
  display: block;
  font-size: 7.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.projection-ve.pos strong { color: #4f46e5; }
.projection-ve.neg strong { color: var(--coral); }
.projection-row.is-current { background: rgba(79, 70, 229, 0.035); }
.projection-row.is-current .projection-row-label { color: #4f46e5; }

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

@media (max-width: 980px) {
  .market-row { grid-template-columns: minmax(0, 1.5fr) 66px 80px 76px; }
  .quality-markets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .panel-stack { margin-top: 14px; }
  .panel-tabs { margin-bottom: 12px; }
  .market-row { grid-template-columns: minmax(0, 1.4fr) 58px 72px 66px; padding: 8px 9px; gap: 5px; }
  .market-head { font-size: 8px; }
  .quality-strip { grid-template-columns: 1fr 1fr; }
  .quality-markets { grid-template-columns: 1fr 1fr; }
  .combo-summary { grid-template-columns: 1fr 1fr; }
  .tab-pane .panel + .panel { margin-top: 14px; padding-top: 14px; }
  .projection-formula { grid-template-columns: 1fr; }
  .projection-row { grid-template-columns: minmax(0, 1.5fr) 104px 46px 50px; padding: 8px 9px; gap: 5px; }
}

@media (max-width: 520px) {
  .market-row { grid-template-columns: minmax(0, 1.3fr) 52px 62px 58px; }
  .market-ref small { display: none; }
  .market-diff { font-size: 10px; }
  .quality-strip strong { font-size: 16.5px; }
  .combo-leg { grid-template-columns: minmax(0, 1fr) 40px 22px; }
  .combo-leg-prob { display: block; }
  .combo-leg-kind { display: none; }
  .projection-formula > div { padding: 11px 12px; }
  .projection-formula strong { font-size: 12px; }
  .projection-row {
    grid-template-columns: minmax(0, 1fr) 52px;
    grid-template-areas:
      "match ve"
      "probs expected";
    row-gap: 5px;
  }
  .projection-head { display: none; }
  .projection-match { grid-area: match; }
  .projection-probs { grid-area: probs; justify-content: flex-start; }
  .projection-expected { grid-area: expected; }
  .projection-ve { grid-area: ve; }
  .projection-summary > div { padding: 8px; }
  .projection-summary strong { font-size: 13.5px; }
  .projection-summary small { font-size: 8px; }
}

/* ============================================================
   Rediseño 2026-11 · lectura tipo Sofascore
   Menos recuadros, filas compactas y tipografía más legible.
   ============================================================ */

:root {
  --radius: 16px;
  --shadow: 0 12px 30px -18px rgba(30, 27, 75, 0.18);
}

body { font-size: 16px; }
.main { max-width: 1440px; }
.topbar { margin-bottom: 14px; }
.sidebar { background: rgba(255, 255, 255, 0.94); }
.brand-sub { margin-bottom: 16px; }
.sidebar-block { margin-bottom: 14px; }
.main-column, .rail { gap: 14px; }
.panel-stack { margin-top: 14px; }
.panel { padding: 20px 22px; border-radius: 16px; box-shadow: none; }
.panel-head { margin-bottom: 12px; }
.panel h2 { font-size: clamp(22px, 1.8vw, 26px); }
.panel-note { max-width: none; font-size: 10px; }
.panel-footnote { font-size: 11px; line-height: 1.55; }

/* Franja de deporte: fútbol activo, otros deportes aparte */
.sport-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.sport-bar::-webkit-scrollbar { display: none; }
.sport-bar-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}
.sport-bar-tab small {
  font-size: 9px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted-2);
}
.sport-bar-tab.is-active { background: var(--ink); color: #ffffff; }
.sport-bar-tab:not(.is-active):hover { background: rgba(241, 244, 251, 0.9); color: var(--ink); }

/* Lista de partidos agrupada por día */
.match-day { margin-bottom: 12px; }
.match-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.match-day-head span:last-child { color: var(--muted-2); letter-spacing: 0.04em; }
.match-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}
.match-item + .match-item { border-top: 1px solid var(--line); border-radius: 0; }
.match-item:hover { background: rgba(241, 244, 251, 0.9); border-color: transparent; }
.match-item.is-active { border-radius: 9px; border-top-color: transparent; }
.match-item-time {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}
.match-item-time small { font-size: 9px; font-weight: 400; color: var(--muted-2); }
.match-item-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.match-item-meta {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-item-main { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.match-item-team { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }
.match-item-vs { font-family: var(--mono); font-size: 9px; color: var(--muted-2); }
.match-favorite {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.match-favorite strong { font-size: 12px; color: var(--ink); }
.match-item.is-high-conf { border-left: 3px solid #10b981; }
.match-item.is-active.is-high-conf { border-left-color: #34d399; }
.conf-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 2px;
}
.conf-badge.high-conf-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.conf-badge.mid-conf-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.match-item.is-active .conf-badge.high-conf-pill {
  background: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.5);
}
.match-item.is-active .conf-badge.mid-conf-pill {
  background: rgba(147, 197, 253, 0.25);
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.5);
}
.hero-conf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero-conf-pill.high {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.hero-conf-pill.mid {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.28);
}
.match-item.is-active .match-item-time,
.match-item.is-active .match-item-team { color: var(--paper); }
.match-item.is-active .match-item-time small,
.match-item.is-active .match-item-meta,
.match-item.is-active .match-item-vs,
.match-item.is-active .match-favorite { color: rgba(243, 240, 233, 0.58); }
.match-item.is-active .match-favorite strong { color: var(--lime); }

/* Menos recuadros: grupos con separadores finos */
.key-strip, .metric-grid, .engine-grid, .quality-strip {
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.key-chip, .metric-card, .engine-card, .quality-strip > div {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}
.key-chip:hover, .metric-card:hover {
  transform: none;
  box-shadow: none;
  background: #f8faff;
}
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { padding: 13px 14px; }
.metric-card:hover { border-color: transparent; }
.engine-grid { margin-top: 12px; }
.engine-card { padding: 11px 12px; }

.recent-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}
.recent-team { border: 0; border-radius: 0; background: transparent; }
.recent-team + .recent-team { border-left: 1px solid var(--line); }

.projection-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}
.projection-team { border: 0; border-radius: 0; background: transparent; }
.projection-team + .projection-team { border-left: 1px solid var(--line); }
.projection-formula { gap: 10px; }
.projection-formula > div {
  padding: 0 0 0 13px;
  border: 0;
  border-left: 2px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}
.projection-reading {
  border: 0 !important;
  border-left: 3px solid var(--purple) !important;
  border-radius: 0 !important;
  background: rgba(124, 58, 237, 0.05) !important;
}
.projection-reading .eyebrow { color: var(--purple); }
.projection-reading p { color: var(--ink-2); }

.section-subtitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.section-subtitle span {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.section-subtitle small { font-size: 10px; color: var(--muted-2); text-align: right; }

/* Próximos 7 días */
.upcoming-panel { margin-top: 0; }
.upcoming-panel .panel-head { align-items: center; }
.panel-link {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: #4f46e5;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
}
.panel-link:hover { background: rgba(99, 102, 241, 0.08); }
.upcoming-days { display: flex; flex-direction: column; }
.upcoming-day { border-top: 1px solid var(--line); }
.upcoming-day:first-child { border-top: 0; }
.upcoming-day summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.upcoming-day summary::-webkit-details-marker { display: none; }
.upcoming-day-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.upcoming-day-count { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.upcoming-chevron { font-size: 16px; line-height: 1; color: var(--muted-2); transition: transform 0.18s; }
.upcoming-day[open] .upcoming-chevron { transform: rotate(90deg); }
.upcoming-rows {
  max-height: 320px;
  padding: 0 0 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.upcoming-rows::-webkit-scrollbar { width: 4px; }
.upcoming-rows::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.upcoming-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.upcoming-row:hover { background: rgba(241, 244, 251, 0.8); }
.upcoming-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.upcoming-teams { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12.5px; font-weight: 600; }
.upcoming-teams > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.upcoming-teams > span:not(.upcoming-vs) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-vs { font-family: var(--mono); font-size: 9px; font-weight: 400; color: var(--muted-2); }
.upcoming-comp {
  max-width: 150px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .panel { padding: 16px 15px; }
  .panel-head { flex-wrap: wrap; gap: 8px; }
  .panel-head > div:first-child { min-width: 0; }
  .panel-head-actions { width: 100%; justify-content: space-between; }
  .panel-tabs { max-width: 100%; }
  .table-scroll { overflow-x: auto; }
  .panel h2 { font-size: 21px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .match-item { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 8px 6px; }
  .upcoming-comp { display: none; }
  .upcoming-row { grid-template-columns: 42px minmax(0, 1fr); }
  .upcoming-panel .panel-head { flex-wrap: wrap; }
  .upcoming-panel .panel-head-actions { width: 100%; justify-content: space-between; }
}

@media (max-width: 860px) and (min-width: 601px) {
  .breadcrumb {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-right { flex-wrap: nowrap; }
  .topbar-right .ghost-btn { padding: 6px 9px; font-size: 9px; }
  #ve-btn { display: none; }
}

@media (max-width: 520px) {
  .match-item-team { font-size: 12px; }
  .metric-grid { grid-template-columns: 1fr; }
  .panel-tabs { flex-wrap: wrap; overflow-x: visible; }
  .panel-tab { flex: 1 1 calc(50% - 4px); text-align: center; }
  .section-subtitle { flex-direction: column; gap: 3px; }
  .section-subtitle small { text-align: left; }
  .upcoming-teams { font-size: 11.5px; }
}

/* Desempate de partidos parejos */
.tiebreak-panel { margin-top: 0; }
.tiebreak-panel.is-muted { background: rgba(255, 255, 255, 0.86); }
.tiebreak-verdict {
  --tie: var(--muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(241, 244, 251, 0.6);
}
.tiebreak-verdict.draw {
  --tie: #d97706;
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.06);
}
.tiebreak-verdict.pos {
  --tie: #2563eb;
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.06);
}
.tiebreak-verdict.neg {
  --tie: #e11d48;
  border-color: rgba(244, 63, 94, 0.22);
  background: rgba(244, 63, 94, 0.06);
}
.tiebreak-verdict-main { min-width: 0; }
.tiebreak-verdict-main .eyebrow { color: var(--tie); }
.tiebreak-verdict-main strong {
  display: block;
  margin-top: 4px;
  color: var(--tie);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.tiebreak-verdict-main p {
  max-width: 62ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.tiebreak-verdict-metrics { display: flex; gap: 8px; }
.tiebreak-verdict-metrics > div {
  min-width: 94px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}
.tiebreak-verdict-metrics span {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.tiebreak-verdict-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}
.tiebreak-verdict-metrics small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.35;
  color: var(--muted-2);
}
.tiebreak-table {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.tiebreak-row {
  display: grid;
  grid-template-columns: 88px repeat(3, minmax(0, 1fr));
  align-items: center;
  min-height: 38px;
  border-top: 1px solid var(--line);
}
.tiebreak-row:first-child { border-top: 0; }
.tiebreak-row.head {
  min-height: 32px;
  background: var(--paper-3);
}
.tiebreak-row > span:first-child {
  padding-left: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.tiebreak-row.head > span {
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-align: center;
}
.tiebreak-row.head > span:first-child { padding-left: 12px; text-align: left; }
.tiebreak-row strong {
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
}
.tiebreak-row.is-adjusted { background: rgba(99, 102, 241, 0.035); }
.tiebreak-row strong.is-lean {
  color: var(--indigo);
  font-weight: 650;
}
.tiebreak-row.is-adjusted strong.is-lean::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto 0;
  border-radius: 999px;
  background: currentColor;
}
.tiebreak-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.7);
}
.tiebreak-gap span {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.tiebreak-gap strong { color: var(--ink-2); font-weight: 600; }
.tiebreak-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.tiebreak-signal {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 250, 255, 0.72);
}
.tiebreak-signal.is-unavailable { opacity: 0.55; }
.tiebreak-signal.is-estimated { border-style: dashed; }
.tiebreak-signal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.tiebreak-signal-head > span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.tiebreak-signal-head small {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}
.tiebreak-est {
  padding: 1px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.tiebreak-signal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(44px, 0.8fr) 34px;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.tiebreak-signal-values {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
}
.tiebreak-signal-values em {
  font-size: 8px;
  font-style: normal;
  color: var(--muted-2);
}
.tiebreak-signal-sep { color: var(--muted-2); }
.tiebreak-signal-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: var(--paper-3);
}
.tiebreak-signal-track::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 1px;
  height: 9px;
  background: var(--line-strong);
}
.tiebreak-signal-track i {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
}
.tiebreak-signal-track i.pos { background: var(--blue); }
.tiebreak-signal-track i.neg { background: var(--coral); }
.tiebreak-signal-track i.neutral { background: var(--muted-2); }
.tiebreak-signal-body > strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.tiebreak-signal-body > strong.pos { color: var(--blue); }
.tiebreak-signal-body > strong.neg { color: var(--coral); }
.tiebreak-signal-body > strong.neutral { color: var(--muted-2); }
.tiebreak-signal-detail {
  display: block;
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--muted-2);
}
.tiebreak-formula {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-3);
}
.tiebreak-formula code {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: normal;
}
.tiebreak-formula p {
  margin: 6px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
}
.tiebreak-muted-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}
.hero-tiebreak {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  max-width: 100%;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: background 0.18s, border-color 0.18s;
}
.hero-tiebreak:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(192, 132, 252, 0.5);
}
.hero-tiebreak span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.hero-tiebreak strong {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}
.hero-tiebreak small {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.65);
}
.hero-tiebreak.draw strong { color: #fbbf24; }
.hero-tiebreak.pos strong { color: #a3e635; }
.hero-tiebreak.neg strong { color: #fb7185; }

@media (max-width: 720px) {
  .tiebreak-verdict { grid-template-columns: 1fr; gap: 12px; }
  .tiebreak-verdict-metrics { display: grid; grid-template-columns: 1fr 1fr; }
  .tiebreak-verdict-metrics > div { min-width: 0; }
  .tiebreak-signals { grid-template-columns: 1fr; }
  .tiebreak-row { grid-template-columns: 64px repeat(3, minmax(0, 1fr)); }
  .tiebreak-row > span:first-child { padding-left: 9px; }
  .tiebreak-row.head > span:first-child { padding-left: 9px; }
  .tiebreak-gap { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 420px) {
  .tiebreak-row { grid-template-columns: 54px repeat(3, minmax(0, 1fr)); }
  .tiebreak-row > span:first-child, .tiebreak-row strong { font-size: 10px; }
  .tiebreak-row.head > span { font-size: 8px; }
  .tiebreak-verdict-main strong { font-size: 20px; }
  .tiebreak-signal-body { grid-template-columns: minmax(0, 1.4fr) minmax(36px, 0.6fr) 32px; }
}

.tiebreak-signals-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
}
.tiebreak-signals-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.tiebreak-signals-legend i {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 999px;
}
.tiebreak-signals-legend i.pos { background: var(--blue); }
.tiebreak-signals-legend i.neg { background: var(--coral); }

/* Procedencia de datos: observado / estimado / placeholder */
.prov {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prov-observed { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.prov-estimated { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.prov-placeholder { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.prov-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  margin: 0 0 12px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted);
}
.prov-legend > span:not(.prov) { margin-right: 4px; }
.metric-top-right { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.metric-top-right .prov { padding: 1px 5px; font-size: 7px; }

/* Frescura, cobertura y campos faltantes */
.freshness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.freshness-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-3);
}
.freshness-card > span {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.freshness-card strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.freshness-card small {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted);
}
.freshness-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.freshness-status.ok { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.freshness-status.warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.freshness-status.stale { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.freshness-status.unknown { color: var(--muted); background: var(--paper-3); }
.api-sources {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-3);
}
.api-sources-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin-bottom: 8px;
}
.api-sources-head > span {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.api-sources-head > small {
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}
.api-sources-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.api-source-row {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2, var(--paper-3));
}
.api-source-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.api-source-name {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.api-source-status {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.api-source-status.ok { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.api-source-status.stale { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.api-source-status.unknown { color: var(--muted); background: var(--paper-3); }
.api-source-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  font-size: 9px;
  line-height: 1.35;
  color: var(--muted);
}
.api-source-meta strong { color: var(--text, inherit); font-weight: 600; }
.api-source-row > small {
  display: block;
  margin-top: 6px;
  font-size: 8.5px;
  line-height: 1.35;
  color: var(--muted);
}
.freshness-missing {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}
.freshness-missing > span {
  flex: 0 0 auto;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.freshness-missing > div { display: flex; flex-wrap: wrap; gap: 4px; }
.missing-chip {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}
.data-warning {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #fde68a;
  border-radius: 9px;
  background: #fffbeb;
  color: #92400e;
  font-size: 10.5px;
  line-height: 1.45;
}
.h2h-panel.is-insufficient { border-color: #fde68a; }

@media (max-width: 900px) {
  .coverage-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .freshness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api-sources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .freshness-grid { grid-template-columns: 1fr; }
  .api-sources-grid { grid-template-columns: 1fr; }
  .freshness-missing { flex-direction: column; gap: 5px; }
  .prov-legend { font-size: 9px; gap: 4px 7px; }
}

/* Identidad OX: marca compacta para sidebar y topbar móvil */
.brand { font-size: 27px; }
.topbar-brand { font-size: 22px; }

/* Sección 3 · ensamble, comparación de modelos y benchmark */
.ensemble-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.live-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.precision-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.model-table td:first-child,
.weight-table td:first-child { white-space: nowrap; }
.model-table tr.is-best td { background: rgba(99, 102, 241, 0.06); }
.model-table tr.is-ensemble td {
  background: rgba(99, 102, 241, 0.1);
  border-top: 1px solid rgba(99, 102, 241, 0.3);
}
.weight-table { font-size: 10px; }
.weight-table th,
.weight-table td { padding: 6px 6px; }
.weight-table td:first-child { font-family: var(--mono); font-size: 9px; }
.benchmark-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(255, 255, 255, 0.9));
}
.benchmark-copy h4 { margin: 4px 0 6px; font-family: var(--sans); font-size: 16px; }
.benchmark-copy p { margin: 0; font-size: 10px; line-height: 1.55; color: var(--muted); }
.benchmark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.benchmark-grid > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}
.benchmark-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.benchmark-grid strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 18px; color: #4f46e5; }
.benchmark-grid small { display: block; margin-top: 2px; font-size: 9px; line-height: 1.4; color: var(--muted-2); }
.quality-live {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
}
.quality-live span {
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.quality-live strong { font-family: var(--mono); font-size: 15px; color: #4f46e5; }
.quality-live small { font-size: 9px; color: var(--muted-2); }
.precision-secondary { margin-top: 28px; }

@media (max-width: 980px) {
  .precision-split { grid-template-columns: 1fr; }
  .benchmark-card { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ensemble-metrics,
  .live-metrics { grid-template-columns: 1fr 1fr; }
  .benchmark-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .benchmark-grid { grid-template-columns: 1fr; }
}

/* AIFUT: inicio esencial y análisis bajo demanda */
.topbar-more { position: relative; }
.topbar-more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}
.topbar-more > summary::-webkit-details-marker { display: none; }
.topbar-more > summary::after { content: "▾"; font-size: 9px; }
.topbar-more[open] > summary::after { content: "▴"; }
.topbar-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.topbar-more-menu [hidden] { display: none !important; }
.topbar-more-menu #refresh-btn:not([hidden]),
.topbar-more-menu #hits-btn:not([hidden]),
.topbar-more-menu #latent-btn:not([hidden]),
.topbar-more-menu #precision-btn:not([hidden]),
.topbar-more-menu #engine-btn:not([hidden]),
.topbar-more-menu #ve-btn:not([hidden]) {
  display: flex !important;
}
.topbar-more-menu .ghost-btn,
.topbar-more-menu .demo-badge {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
}
.topbar-more-menu .hits-btn { flex-wrap: wrap; gap: 4px; }

.hero-simple { padding: 24px 28px 20px; }
.hero-simple .hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243, 240, 233, 0.62);
}
.hero-simple .hero-meta > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-simple .live-pill { flex: 0 0 auto; }
.hero-simple .hero-main { padding: 22px 0 18px; }
.hero-simple .hero-center { min-width: 64px; }
.hero-simple .hero-vs {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 240, 233, 0.38);
}
.hero-simple .hero-outcomes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.hero-simple .hero-outcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  cursor: default;
}
.hero-simple .hero-outcome:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  transform: none;
}
.hero-simple .hero-outcome span {
  font-size: 10px;
  letter-spacing: 0.09em;
  color: rgba(243, 240, 233, 0.58);
}
.hero-simple .hero-outcome strong {
  margin-top: 6px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.hero-simple .outcome-lime strong { color: var(--lime); }
.hero-simple .outcome-draw strong { color: #d8d4c9; }
.hero-simple .outcome-coral strong { color: var(--coral); }
.hero-simple .hero-bar { margin-top: 14px; height: 6px; }

.analysis-details {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
}
.analysis-details > .details-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.analysis-details > .details-summary::-webkit-details-marker { display: none; }
.analysis-details > .details-summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 400;
  color: var(--indigo);
}
.analysis-details[open] > .details-summary::after { content: "−"; }
.analysis-details > .details-summary small {
  flex: 1;
  text-align: right;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
}
.analysis-details > .main-column.panel-stack { margin-top: 0; padding: 0 0 18px; }
.analysis-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 6px 22px;
  color: var(--muted);
  font-size: 11px;
}
.analysis-loading > span {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(99, 102, 241, 0.18);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: analysis-spin 0.8s linear infinite;
}
.analysis-loading p { margin: 0; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }

.simple-analysis { display: grid; gap: 14px; padding: 14px; }
.simple-panel { padding: 16px 18px; }
.simple-highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.06);
}
.simple-highlight > span,
.simple-card > span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.simple-highlight > strong {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.simple-highlight > small,
.simple-card > small {
  font-size: 11px;
  color: var(--muted-2);
}
.simple-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.simple-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.simple-card > strong {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.simple-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 22px;
}
.simple-signal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.simple-signal:last-child { border-bottom: 0; }
.simple-signal > span {
  font-size: 12px;
  color: var(--muted-2);
}
.simple-signal > strong {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}
.simple-legend {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}
.simple-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.simple-team-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}
.simple-team-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.simple-team-title strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.simple-subhead {
  margin: 12px 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
}
.simple-compare-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.simple-compare-row:last-child { border-bottom: 0; }
.simple-compare-row > span {
  font-size: 11px;
  color: var(--muted-2);
}
.simple-compare-row > strong {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}
.simple-person-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.simple-person-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.simple-person-list li:last-child { border-bottom: 0; }
.simple-person-name {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.simple-person-name small {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted-2);
}
.simple-person-list li > strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo);
  text-align: right;
}
.simple-person-detail {
  grid-column: 1 / -1;
  font-size: 10px;
  color: var(--muted-2);
}
.simple-empty {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted-2);
}
.simple-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted-2);
}

@media (max-width: 860px) {
  .hero-simple { padding: 20px 18px 16px; }
  .hero-simple .hero-main { padding: 18px 0 14px; }
  .hero-simple .hero-outcome strong { font-size: 26px; }
  .analysis-details { margin-top: 14px; }
  .simple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar-more-menu { position: fixed; top: 58px; right: 12px; left: 12px; min-width: 0; }
  .hero-simple .hero-main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .hero-simple .hero-center { min-width: 46px; }
  .hero-simple .hero-vs { font-size: 10px; }
  .hero-simple .hero-outcomes { gap: 6px; }
  .hero-simple .hero-outcome { padding: 10px 5px; }
  .hero-simple .hero-outcome span { font-size: 9px; }
  .hero-simple .hero-outcome strong { font-size: 22px; }
  .hero-simple .team-name { font-size: 22px; }
  .analysis-details > .details-summary { flex-direction: column; align-items: flex-start; gap: 4px; }
  .analysis-details > .details-summary small { text-align: left; }
  .simple-analysis { gap: 10px; padding: 10px; }
  .simple-panel { padding: 14px; }
  .simple-signals { grid-template-columns: minmax(0, 1fr); }
  .simple-signal { padding: 9px 0; }
  .simple-compare { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .simple-team-block { padding: 10px; }
}
@media (max-width: 375px) {
  .hero-simple .hero-outcome strong { font-size: 20px; }
  .hero-simple .team-name { font-size: 20px; }
}

/* Los círculos de ayuda con «i» quedan ocultos en toda la interfaz. */
.panel-info,
.metric-info {
  display: none !important;
}

/* Precisión de OX · lectura rápida y barras de acierto */
.precision-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, #0e1329 0%, #1e1b4b 55%, #312e81 100%);
  color: #ffffff;
}
.precision-overview .eyebrow { color: #c084fc; }
.precision-overview h3 {
  margin: 5px 0 6px;
  font-family: var(--sans);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.precision-overview p {
  max-width: 640px;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}
.precision-overview-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 12px;
  border: 1px solid rgba(192, 132, 252, 0.4);
  border-radius: 14px;
  background: rgba(192, 132, 252, 0.12);
}
.precision-overview-badge strong {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #c084fc;
}
.precision-overview-badge span {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}
.precision-overview-badge small {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
}
.precision-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.precision-highlights > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(240, 243, 250, 0.6);
}
.precision-highlights span {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.precision-highlights strong {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.precision-highlights strong.pos { color: #4f46e5; }
.precision-highlights small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted-2);
}
.precision-market-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.precision-market-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 58px 76px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}
.precision-market-name {
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.precision-market-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
}
.precision-market-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}
.precision-market-track i.pos { background: linear-gradient(90deg, #10b981, #059669); }
.precision-market-track i.neg { background: linear-gradient(90deg, #fb7185, #e11d48); }
.precision-market-row > strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  color: var(--ink);
}
.precision-market-row > strong.pos { color: #4f46e5; }
.precision-market-row > strong.neg { color: var(--coral); }
.precision-market-row > small {
  font-family: var(--mono);
  font-size: 9px;
  text-align: right;
  color: var(--muted-2);
}
.precision-rate {
  display: block;
  width: 100%;
  min-width: 54px;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
}
.precision-rate i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}
.precision-rate i.neg { background: linear-gradient(90deg, #fb7185, #e11d48); }
.precision-table .rate-cell { min-width: 78px; }
.precision-inline-note {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted-2);
}
@media (max-width: 720px) {
  .precision-overview { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .precision-overview-badge { justify-self: start; min-width: 96px; }
  .precision-highlights { grid-template-columns: minmax(0, 1fr); }
  .precision-market-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 10px;
  }
  .precision-market-track { grid-column: 1 / -1; grid-row: 2; }
  .precision-market-row > strong { grid-column: 2; grid-row: 1; }
  .precision-market-row > small { grid-column: 3; grid-row: 1; }
}

/* Equipos latentes · guía rápida y barras de racha */
.latent-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(240, 243, 250, 0.55);
}
.latent-guide span { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted-2); }
.latent-guide strong { font-weight: 600; color: var(--ink); }
.latent-guide i { width: 7px; height: 7px; border-radius: 50%; }
.latent-guide i.pos { background: #4f46e5; }
.latent-guide i.neutral { background: var(--muted-2); }
.latent-guide i.neg { background: var(--coral); }
.support-caption {
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.72;
}
.streak-card-bar {
  position: relative;
  display: flex;
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
}
.streak-card-bar i { display: block; height: 100%; }
.streak-card-bar i.win { background: #6366f1; }
.streak-card-bar i.draw { background: #c7d2fe; }
.streak-card-bar b {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  border-radius: 999px;
  background: var(--coral);
}
.latent-table tbody tr:nth-child(even) { background: rgba(99, 102, 241, 0.025); }
@media (max-width: 520px) {
  .latent-guide { flex-direction: column; gap: 6px; }
}
