/* ==========================================================================
   VEKLO SIGNALS - DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Colors */
  --bg: #050714;
  --bg2: #02030a;
  --panel: rgba(13, 20, 47, 0.65);
  --panel-hover: rgba(22, 32, 74, 0.85);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(255, 255, 255, 0.18);
  
  --blue: #3B82F6;
  --cyan: #06B6D4;
  --green: #10B981;
  --violet: #8B5CF6;
  --pink: #EC4899;
  --amber: #F59E0B;
  --danger: #EF4444;
  
  --ink: #FFFFFF;
  --body: #BFCBE5;
  --mut: #8B97BC;
  --line: rgba(255, 255, 255, 0.07);
  
  /* Gradients */
  --primary-grad: linear-gradient(90deg, var(--green), var(--cyan), var(--violet), var(--pink));
  --accent-grad: linear-gradient(135deg, var(--cyan), var(--violet));
  --lead-grad: linear-gradient(180deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.05));
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
  color: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Video & Effects */
#bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  filter: saturate(0.7) contrast(1.15) brightness(0.8);
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(13, 20, 47, 0.25) 0%, rgba(5, 7, 20, 0.75) 80%);
  z-index: 1;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 200px;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Links */
a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #fff;
}

/* Glassmorphism Helper */
.glass {
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */

header.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 7, 20, 0.65);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.wc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
  background: var(--primary-grad);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--mut);
  font-weight: 600;
  font-size: 14px;
  position: relative;
  padding: 6px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-grad);
  transition: width var(--transition-normal);
}

nav a.active, nav a:hover {
  color: #fff;
}

nav a.active::after, nav a:hover::after {
  width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.wrap {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px 0;
  flex: 1;
}

.hero {
  padding: 48px 0 24px;
  text-align: center;
}

.kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  font-size: clamp(38px, 6.5vw, 68px);
  line-height: 1.05;
  margin: 16px 0 18px;
}

.hero h1 .em {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--body);
  max-width: 640px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.6;
}

.sub {
  margin-top: 16px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--mut);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Risk Banner */
.risk {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 900px;
  margin: 28px auto 0;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
  color: #FCA5A5;
  text-align: left;
  line-height: 1.5;
}

.risk span:first-child {
  font-size: 16px;
  line-height: 1;
  color: var(--danger);
}

/* ==========================================================================
   INTERACTIVE CONTROLS (FILTER / SEARCH BAR)
   ========================================================================== */

.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 20px;
  padding: 16px 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.search-box .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mut);
  pointer-events: none;
}

.filter-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--mut);
  padding: 8px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-box label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: var(--mut);
  font-weight: 600;
}

.sort-box select {
  padding: 10px 32px 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.sort-box select:focus {
  border-color: var(--cyan);
  background-color: rgba(255, 255, 255, 0.07);
}

/* ==========================================================================
   CARDS GRID
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin: 12px 0 24px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(12, 16, 38, 0.92) 0%, rgba(6, 9, 23, 0.94) 100%);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  padding: 24px 22px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), 
              border-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-grad);
  opacity: 0.8;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 45px -10px rgba(6, 182, 212, 0.15), 
              0 0 1px 1px rgba(255, 255, 255, 0.1) inset;
}

.card .date {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  color: var(--mut);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card .match {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin: 8px 0 18px;
}

.card .match .vs {
  color: var(--mut);
  font-weight: 500;
  font-size: 15px;
  margin: 0 8px;
}

/* Outcomes probabilities grid */
.outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.oc {
  text-align: center;
  padding: 12px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.oc.lead {
  background: var(--lead-grad);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.05);
}

.oc .ocl {
  font-size: 12px;
  color: var(--mut);
  font-weight: 600;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.oc.lead .ocl {
  color: #7FFFD4;
}

.oc .ocp {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.oc.lead .ocp {
  color: #5EEAD4;
}

/* Progress micro-bar */
.oc .track {
  margin-top: 8px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.oc .fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.oc.lead .fill {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

/* Card metadata footer */
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--mut);
  font-family: 'Space Grotesk', sans-serif;
}

.chip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  text-transform: uppercase;
}

.chip.High {
  background: rgba(16, 185, 129, 0.35);
  color: #A7F3D0;
  border: 1px solid rgba(16, 185, 129, 0.6);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.chip.Medium {
  background: rgba(245, 158, 11, 0.32);
  color: #FDE68A;
  border: 1px solid rgba(245, 158, 11, 0.55);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.chip.Lean {
  background: rgba(139, 92, 246, 0.35);
  color: #E9D5FF;
  border: 1px solid rgba(139, 92, 246, 0.6);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.decide {
  text-align: center;
  color: var(--mut);
  font-size: 11.5px;
  margin-top: 14px;
  letter-spacing: 0.03em;
  font-family: 'Space Grotesk', sans-serif;
}

/* No results state */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.no-results h3 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-size: 20px;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--mut);
  font-size: 14px;
}

/* ==========================================================================
   INTERACTIVE SIDE DETAIL DRAWER
   ========================================================================== */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 10, 0.6);
  backdrop-filter: blur(8px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 440px;
  max-width: 100%;
  height: 100vh;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10, 15, 36, 0.96) 0%, rgba(5, 7, 20, 0.98) 100%);
  border-left: 1px solid var(--panel-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.open {
  right: 0;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  font-weight: 700;
}

/* Team Display block */
.drawer-matchup-header {
  text-align: center;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1px solid var(--line);
}

.drawer-teams-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 0;
}

.drawer-team {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.drawer-team.home {
  text-align: right;
}

.drawer-team.away {
  text-align: left;
}

.drawer-vs-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--mut);
  font-family: 'Space Grotesk', sans-serif;
}

/* Detail Form section */
.form-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.form-team-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 14.5px;
  margin-bottom: 6px;
}

.form-badges-flex {
  display: flex;
  gap: 5px;
}

.form-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}

.form-badge.W {
  background: var(--green);
}

.form-badge.D {
  background: #556285;
}

.form-badge.L {
  background: var(--danger);
}

/* Most recent of the last 5 — subtle ring so the newest match reads clearly */
.form-badge.latest {
  box-shadow: 0 0 0 2px var(--bg, #050714), 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.form-hint {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--mut);
  text-transform: none;
}

.form-empty {
  font-size: 12px;
  color: var(--mut);
}

/* Injury Feed Lists */
.injury-feed-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.injury-team-list {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.injury-team-list h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: #fff;
  margin-bottom: 8px;
}

.injury-team-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.injury-team-list li {
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 4px;
}

.injury-team-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.injury-player {
  color: #fff;
  font-weight: 500;
}

.injury-reason {
  color: var(--mut);
}

.injury-clean-state {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--green);
}

/* ==========================================================================
   PROSE / TEXT SECTION (how-it-works.html)
   ========================================================================== */

.prose {
  background: linear-gradient(180deg, rgba(20, 27, 61, 0.7) 0%, rgba(13, 18, 43, 0.75) 100%);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 40px;
  max-width: 800px;
  margin: 32px auto 0;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.8);
}

.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
  font-size: 24px;
  margin: 36px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p, .prose li {
  color: var(--body);
  margin: 12px 0;
  font-size: 15.5px;
  line-height: 1.6;
}

.prose ul {
  margin-left: 24px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.stat {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 14px;
  margin: 6px 8px 6px 0;
  font-size: 13.5px;
}

.note {
  border-left: 3px solid var(--cyan);
  background: rgba(6, 182, 212, 0.05);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  color: #C0EBF2;
  font-size: 14.5px;
  margin-top: 24px;
}

/* ==========================================================================
   TABLE SECTION (history.html)
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(20, 27, 61, 0.7) 0%, rgba(13, 18, 43, 0.75) 100%);
  box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.6);
  margin-top: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 16px 22px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
}

tr:last-child td {
  border-bottom: none;
}

th {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--mut);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: rgba(5, 7, 20, 0.4);
}

td strong {
  color: #fff;
  font-weight: 600;
}

tr {
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 40px 24px 50px;
  color: var(--mut);
  font-size: 12.5px;
  text-align: center;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

footer a {
  color: var(--cyan);
  font-weight: 600;
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  .card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 900px) {
  .control-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }
  
  .search-box {
    max-width: 100%;
  }
  
  .sort-box {
    justify-content: space-between;
  }
  
  .sort-box select {
    flex: 1;
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  header.bar {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
    text-align: center;
  }
  
  nav {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }
  
  .wrap {
    padding: 20px 16px 0;
  }
  
  .hero {
    padding: 28px 0 16px;
  }
  
  .hero h1 {
    margin: 12px 0 14px;
  }
  
  .prose {
    padding: 24px;
  }
  
  th, td {
    padding: 12px 14px;
    font-size: 13.5px;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 18px;
  }
  
  .wc {
    font-size: 10px;
    padding: 3px 10px;
  }
  
  .filter-tabs {
    flex-direction: column;
    width: 100%;
  }
  
  .tab-btn {
    text-align: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .drawer {
    width: 100%;
  }
  
  .form-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   HERO MEDIA & HOST CITIES
   ========================================================================== */

.hero-media {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 36px auto 0;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg2);
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: linear-gradient(0deg, rgba(5, 7, 20, 0.95) 0%, rgba(5, 7, 20, 0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.host-section {
  margin: 56px 0 24px;
  padding: 40px 32px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 8px 0;
}

.host-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.host-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.host-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.host-bg-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.12;
  top: -40px;
  right: -40px;
  pointer-events: none;
}

.host-card.usa .host-bg-glow {
  background: var(--blue);
}

.host-card.mexico .host-bg-glow {
  background: var(--green);
}

.host-card.canada .host-bg-glow {
  background: var(--pink);
}

.host-card.usa {
  background-image: linear-gradient(135deg, rgba(10, 15, 30, 0.75) 0%, rgba(5, 7, 20, 0.95) 100%), url('assets/stadium_usa.png');
  background-size: cover;
  background-position: center;
}

.host-card.mexico {
  background-image: linear-gradient(135deg, rgba(10, 15, 30, 0.75) 0%, rgba(5, 7, 20, 0.95) 100%), url('assets/stadium_mexico.png');
  background-size: cover;
  background-position: center;
}

.host-card.canada {
  background-image: linear-gradient(135deg, rgba(10, 15, 30, 0.75) 0%, rgba(5, 7, 20, 0.95) 100%), url('assets/stadium_canada.png');
  background-size: cover;
  background-position: center;
}

.host-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-content .flag {
  font-size: 32px;
  margin-bottom: 8px;
}

.host-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
}

.host-content p {
  font-size: 13.5px;
  color: var(--mut);
}

.venue-highlight {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .host-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Typography Font overrides to Inter */
body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, th, td, strong, span, p, a, div, section, article {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}


/* ---- folded-in: flags, confidence explanation, injury feed note ---- */
.flag{width:22px;height:15px;border-radius:3px;object-fit:cover;vertical-align:-2px;
  margin-right:8px;box-shadow:0 0 0 1px rgba(255,255,255,.14)}
.match .flag{width:24px;height:16px}
.drawer-team .flag,.injury-team-list h4 .flag{margin-right:7px}
.conf-explain{margin-top:8px;font-size:12.5px;color:var(--mut,#7E89B0);line-height:1.45}
.feed-note{font-size:12px;color:var(--mut,#7E89B0);line-height:1.45;margin:2px 0 12px}
.injury-clean-state.muted{opacity:.7}

/* History: realized track-record summary line */
.track-record {
  margin-top: 8px;
  font-weight: 600;
  color: var(--green);
}
