:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1729;
  --surface: #0d1729;
  --panel-soft: #13223a;
  --surface-2: #13223a;
  --soft: #172842;
  --text: #f7fbff;
  --muted: #a9b8cc;
  --line: #263953;
  --pink: #f72585;
  --blue: #4361ee;
  --green: #4cc9f0;
  --gold: #7209b7;
  --amber: #7209b7;
  --red: #f72585;
  --teal: #4cc9f0;
  --accent: #4cc9f0;
  --accent-2: #f72585;
  --purple: #7209b7;
  --indigo: #3a0ca3;
  --cyan: #4cc9f0;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 6px;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.7rem); max-width: 920px; }
h2 { font-size: 1.3rem; margin-bottom: 14px; }
h3 { font-size: 1.08rem; }
h4 { font-size: 0.95rem; }
p { color: var(--muted); margin: 6px 0 0; }
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.metric-tile {
  min-height: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric-tile strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.tile-label, .tile-sub {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.tile-sub {
  display: block;
  text-transform: none;
  font-weight: 400;
}
.metric-tile.blue { border-top: 4px solid var(--blue); }
.metric-tile.green { border-top: 4px solid var(--green); }
.metric-tile.red { border-top: 4px solid var(--red); }
.metric-tile.amber { border-top: 4px solid var(--amber); }
section { margin: 0 0 28px; }
.legend-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.legend-grid dl {
  margin: 0;
}
.legend-grid dt {
  font-weight: 700;
  margin-top: 12px;
}
.legend-grid dt:first-child {
  margin-top: 0;
}
.legend-grid dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.panel,
.fixture-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.result-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.result-line span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.result-line strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.wide-split {
  grid-template-columns: repeat(2, minmax(420px, 1fr));
}
.panel-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.top-team-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.summary-strip .metric-tile {
  min-height: 74px;
  padding: 10px;
}
.summary-strip .metric-tile strong {
  font-size: 1.15rem;
}
.compact {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}
.expand-panel {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.expand-panel summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}
.expand-panel .table-scroll {
  margin-top: 12px;
}
.histogram {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}
.hist-row {
  display: grid;
  grid-template-columns: 38px minmax(90px, 1fr) 58px;
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
}
.hist-track {
  height: 14px;
  border-radius: 7px;
  background: var(--surface-2);
  overflow: hidden;
}
.hist-fill {
  display: block;
  height: 100%;
  border-radius: 7px;
}
.hist-freq { color: var(--muted); font-weight: 700; }
.hist-prob { text-align: right; color: var(--muted); }
.actual-outcome .hist-freq { color: var(--pink); }
.actual-tag {
  display: inline-block;
  margin-right: 5px;
  color: var(--pink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table thead th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  background: var(--soft);
}
.data-table tbody tr:hover { background: var(--soft); }
.opportunity-table th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 3px;
}
.sparkline {
  width: 132px;
  height: 46px;
  display: block;
}
.sparkline text {
  fill: var(--muted);
  font-size: 8px;
}
.method {
  display: inline-flex;
  align-items: center;
  min-width: 62px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
}
.method-direct { background: rgba(76, 201, 240, 0.16); color: var(--cyan); }
.method-fitted { background: rgba(67, 97, 238, 0.18); color: var(--blue); }
.method-derived { background: rgba(114, 9, 183, 0.22); color: #c999f2; }
.method-prior { background: rgba(247, 37, 133, 0.18); color: var(--red); }
.fixture-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.fixture-card-head,
.detail-head,
.comparison-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.fixture-card-head strong,
.detail-head strong {
  font-size: 1.4rem;
  white-space: nowrap;
}
.mini-chart { margin-top: 14px; }
.mini-chart > span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}
.mini-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: fixed;
}
.mini-table th,
.mini-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}
.index-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 16px;
}
.link-cloud,
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.link-cloud a,
.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
}
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
@media (max-width: 860px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-actions { justify-content: flex-start; }
  .split,
  .wide-split,
  .top-team-detail-grid,
  .index-grid,
  .legend-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .page { padding: 22px 14px 42px; }
}
.global-header {
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 16px 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      background: transparent;
      position: relative;
      z-index: 1;
    }
    body::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: 112px;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(76, 201, 240, 0.22), rgba(247, 37, 133, 0.16), rgba(67, 97, 238, 0.18)),
        linear-gradient(180deg, rgba(13, 23, 41, 0.48), rgba(13, 23, 41, 0));
      z-index: 0;
    }
    .global-title {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      min-height: 32px;
      color: var(--text, #f7fbff);
      font-size: 17px;
      font-weight: 900;
      line-height: 1.2;
      letter-spacing: 0;
      overflow-wrap: anywhere;
      text-decoration: none;
    }
    .main-site-link {
      flex: 0 0 auto;
      min-height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line, #263953);
      border-radius: 8px;
      padding: 0 12px;
      background: rgba(13, 23, 41, 0.78);
      color: var(--muted, #a9b8cc);
      font-size: 12px;
      font-weight: 850;
      text-decoration: none;
      white-space: nowrap;
    }
    .main-site-link:hover {
      color: var(--text, #f7fbff);
      border-color: var(--cyan, #4cc9f0);
      background: var(--soft, #172842);
    }
    .site-tabs {
      width: min(1280px, 100%);
      margin: 0 auto;
      padding: 10px 20px 0;
      display: flex;
      gap: 6px;
      overflow-x: auto;
      background: transparent;
      border-bottom: 1px solid var(--line, #263953);
      position: relative;
      z-index: 1;
    }
    .site-tab {
      --tab-accent: #4cc9f0;
      --tab-accent-rgb: 76, 201, 240;
      flex: 0 0 auto;
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      padding: 0 12px;
      border: 1px solid rgba(var(--tab-accent-rgb), 0.36);
      border-bottom: 0;
      border-radius: 8px 8px 0 0;
      background: linear-gradient(180deg, rgba(var(--tab-accent-rgb), 0.24), rgba(13, 23, 41, 0.82));
      color: #d5e5f5;
      font-size: 13px;
      font-weight: 800;
      text-decoration: none;
      white-space: nowrap;
      box-shadow: inset 0 1px 0 rgba(var(--tab-accent-rgb), 0.38);
    }
    .site-tabs .site-tab:nth-child(5n + 1) {
      --tab-accent: #4cc9f0;
      --tab-accent-rgb: 76, 201, 240;
    }
    .site-tabs .site-tab:nth-child(5n + 2) {
      --tab-accent: #f72585;
      --tab-accent-rgb: 247, 37, 133;
    }
    .site-tabs .site-tab:nth-child(5n + 3) {
      --tab-accent: #4361ee;
      --tab-accent-rgb: 67, 97, 238;
    }
    .site-tabs .site-tab:nth-child(5n + 4) {
      --tab-accent: #7209b7;
      --tab-accent-rgb: 114, 9, 183;
    }
    .site-tabs .site-tab:nth-child(5n + 5) {
      --tab-accent: #3a0ca3;
      --tab-accent-rgb: 58, 12, 163;
    }
    .site-tab:hover {
      color: var(--text, #f7fbff);
      border-top-color: var(--tab-accent);
      background: linear-gradient(180deg, rgba(var(--tab-accent-rgb), 0.34), rgba(23, 40, 66, 0.92));
    }
    .site-tab.active {
      color: var(--text, #f7fbff);
      background: linear-gradient(180deg, rgba(var(--tab-accent-rgb), 0.42), rgba(13, 23, 41, 0.97));
      border-top-color: var(--tab-accent);
      box-shadow: 0 -1px 0 var(--panel, #0d1729) inset;
    }
    @media (max-width: 640px) {
      .global-header {
        padding-inline: 14px;
        align-items: flex-start;
      }
      .global-title {
        font-size: 15px;
      }
      .main-site-link {
        min-height: 30px;
        padding-inline: 10px;
        font-size: 11px;
      }
      .site-tabs {
        padding-inline: 14px;
      }
      .site-tab {
        min-height: 36px;
        padding-inline: 10px;
        font-size: 12px;
      }
    }
