*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg:         #0d1117;
  --surface:    #161b22;
  --border:     rgba(255,255,255,0.08);
  --accent:     #3b82f6;
  --accent2:    #60a5fa;
  --accent-red: #ef4444;
  --text:       #e6edf3;
  --muted:      #8b949e;
  --nav-bg:     rgba(13,17,23,0.92);
  --banner-bg:  rgba(13,17,23,0.92);
  --font-head:  'Outfit', sans-serif;
  --font-body:  'DM Sans', sans-serif;
}

[data-theme="light"] {
  --bg:         #ffffff;
  --surface:    #f6f8fa;
  --border:     rgba(0,0,0,0.09);
  --accent:     #1d4ed8;
  --accent2:    #3b82f6;
  --accent-red: #dc2626;
  --text:       #0f172a;
  --muted:      #64748b;
  --nav-bg:     rgba(255,255,255,0.95);
  --banner-bg:  rgba(255,255,255,0.92);
}

body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }

/* NAV */
nav { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 3rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 100; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { background: var(--accent); color: #fff; font-weight: 600; padding: 0.5rem 1.25rem; border-radius: 8px; text-decoration: none; font-size: 14px; font-family: var(--font-head); letter-spacing: 0.01em; transition: opacity 0.2s, transform 0.15s; }
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* HERO */
.hero { height: clamp(480px, 42vw, 85vh); background: url('../img/league_photo.jpg') center/cover no-repeat; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,14,20,0.30) 0%, rgba(10,14,20,0.75) 100%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 820px; padding: 2rem; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.12em; color: #ff6b6b; text-transform: uppercase; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.hero-eyebrow::before { content: ''; display: block; width: 30px; height: 2px; background: #ff6b6b; border-radius: 2px; }
h1 { font-family: var(--font-head); font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.5rem; color: #fff; }
h1 .accent { color: #93c5fd; }
.hero-desc { color: rgba(255,255,255,0.78); font-size: 17px; line-height: 1.8; max-width: 560px; margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.hero-event-bar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center; gap: 1.25rem; padding: 0.9rem 3rem; background: rgba(0,0,0,0.52); backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.hero-event-label { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.hero-event-name { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: #fff; }
.hero-event-name span { color: rgba(255,255,255,0.6); font-weight: 400; }
.hero-event-badge { font-family: var(--font-head); font-size: 12px; color: #ff6b6b; font-weight: 600; }
.hero-event-link { margin-left: auto; font-family: var(--font-head); font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }
.hero-event-link:hover { text-decoration: underline; }

/* NEXT EVENT SECTION */
.next-event-section { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; padding: 4rem 3rem; border-bottom: 1px solid var(--border); }
.next-event-left { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; padding-top: 0.5rem; }
.next-event-heading { font-family: var(--font-head); font-size: clamp(1.6rem, 2.5vw, 2.4rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
.next-event-desc { color: var(--muted); font-size: 15px; line-height: 1.8; margin: 0; }
.next-event-right { display: flex; flex-direction: column; gap: 1rem; }
.next-event-label-tag { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.next-event-title { font-family: var(--font-head); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.2; }
.next-event-title span { color: var(--accent); }

/* BUTTONS */
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; padding: 0.75rem 1.75rem; border-radius: 8px; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.15s, opacity 0.15s; font-family: var(--font-head); }
.btn-primary:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-secondary { border: 1px solid var(--border); color: var(--text); padding: 0.75rem 1.75rem; border-radius: 8px; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s, border-color 0.2s; font-family: var(--font-head); font-weight: 500; }
.btn-secondary:hover { background: var(--surface); border-color: var(--accent); }

/* HERO CARD */
.hero-visual { position: relative; }
.robot-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.robot-card-img { width: 100%; height: 340px; background: linear-gradient(135deg, #1a2030 0%, #0e1218 100%); display: flex; align-items: center; justify-content: center; }
.robot-placeholder { font-family: var(--font-head); font-size: 13px; color: var(--muted); text-align: center; }
.robot-card-footer { padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
.live-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font-head); font-weight: 600; color: #ef4444; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.robot-stat { font-size: 12px; color: var(--muted); }
.robot-stat strong { color: var(--text); font-family: var(--font-head); }

/* LIVE BANNER */
@keyframes banner-slide-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#live-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: var(--banner-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(59,130,246,0.3); padding: 14px 3rem; animation: banner-slide-up 0.35s ease-out; }
.live-banner-inner { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto; }
.live-banner-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: pulse 2s infinite; box-shadow: 0 0 8px rgba(59,130,246,0.6); }
.live-banner-label { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); flex-shrink: 0; font-weight: 600; }
#live-banner-text { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.live-banner-btn { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); text-decoration: none; padding: 9px 20px; border-radius: 8px; white-space: nowrap; transition: opacity 0.15s; }
.live-banner-btn:hover { opacity: 0.85; }
@media (max-width: 900px) { #live-banner { padding: 12px 1.5rem; } #live-banner-text { font-size: 13px; } }

/* STATS */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); }
.stat-cell { padding: 2.5rem 3rem; border-right: 1px solid var(--border); }
.stat-cell:last-child { border-right: none; }
.stat-number { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
.stat-number .plus { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }

/* SECTIONS */
.section { padding: 5rem 3rem; border-bottom: 1px solid var(--border); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 3rem; }
.section-tag { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600; }
.section-title { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.see-all { font-size: 14px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.see-all:hover { color: var(--accent); }

/* LEAGUES */
.leagues-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.league-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.league-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.08); }
.league-badge { display: inline-block; font-family: var(--font-head); font-size: 11px; letter-spacing: 0.06em; font-weight: 600; padding: 4px 10px; border-radius: 6px; margin-bottom: 1.25rem; }
.badge-dspl { background: rgba(59,130,246,0.12); color: var(--accent); }
.badge-opl  { background: rgba(96,165,250,0.12); color: var(--accent2); }
.badge-sspl { background: rgba(239,68,68,0.12); color: #ef4444; }
.league-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.league-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* NEWS */
.news-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.news-main { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.news-tag { font-family: var(--font-head); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin-bottom: 0.75rem; }
.news-headline { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.news-date { font-size: 12px; color: var(--muted); font-family: var(--font-head); }
.news-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.news-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; transition: border-color 0.2s; }
.news-item:hover { border-color: rgba(59,130,246,0.3); }
.news-item-title { font-size: 14px; font-weight: 500; line-height: 1.4; margin-bottom: 0.5rem; }
.news-item-meta { font-size: 12px; color: var(--muted); font-family: var(--font-head); }

/* CTA */
.cta-section { padding: 5rem 3rem; text-align: center; }
.cta-title { font-family: var(--font-head); font-size: 2rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
.cta-sub { color: var(--muted); max-width: 480px; margin: 0 auto 2.5rem; font-size: 15px; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 2rem 3rem; display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 13px; color: var(--muted); font-family: var(--font-head); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hero { height: clamp(380px, 55vw, 85vh); }
  .next-event-section { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.5rem; }
  .next-event-right { order: -1; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { padding: 1.5rem; }
  .leagues-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 1.5rem; }
  .cta-section { padding: 3rem 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 1.5rem; }
}

/* MAP */
.map-section { padding: 3rem; }
#map { width: 100%; height: 560px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }

/* TEAM LIST */
.teams-section { padding: 0 3rem 4rem; }
.section-label { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600; }
.section-title { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; margin-bottom: 0; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; }
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.team-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(59,130,246,0.08); }
.team-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.team-institution { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.team-location { font-size: 12px; color: var(--muted); margin-bottom: 0.75rem; }
.team-links { display: flex; gap: 0.75rem; }
.team-link { font-size: 12px; color: var(--accent); text-decoration: none; font-family: var(--font-head); font-weight: 600; }
.team-link:hover { opacity: 0.8; }

/* PAGE HEADER */
.page-header { padding: 4rem 3rem 2rem; border-bottom: 1px solid var(--border); }
.page-tag { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.1em; color: var(--accent-red); text-transform: uppercase; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.page-tag::before { content: ''; display: block; width: 30px; height: 2px; background: var(--accent-red); border-radius: 2px; }
.page-title { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.page-desc { color: var(--muted); font-size: 15px; max-width: 560px; }

/* CONTENT */
.container { max-width: 860px; margin: 0 auto; padding: 4rem 3rem; }

/* BACK LINK */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; margin-bottom: 2.5rem; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }

/* REFEREE-TOOL "BACK TO MENU" LINK — compact pill, used across referee pages */
.ref-menu-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); transition: color 0.2s, border-color 0.2s; }
.ref-menu-link:hover { color: var(--accent); border-color: var(--accent); }
.ref-menu-bar { padding: 16px 20px 0; }

/* TEAM HEADER */
.team-header { border-bottom: 1px solid var(--border); padding-bottom: 2rem; margin-bottom: 2.5rem; }
.team-tag { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.team-tag::before { content: ''; display: block; width: 30px; height: 2px; background: var(--accent); border-radius: 2px; }
.team-name { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.team-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem; }
.team-meta-item { display: flex; flex-direction: column; gap: 2px; }
.team-meta-label { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.team-meta-value { font-size: 14px; color: var(--text); }
.team-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.team-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.5rem 1rem; border-radius: 8px; font-family: var(--font-head); font-size: 13px; font-weight: 500; text-decoration: none; border: 1px solid var(--border); color: var(--text); transition: border-color 0.2s, background 0.2s; }
.team-link-btn:hover { border-color: var(--accent); color: var(--accent); }
.team-link-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.team-link-btn.primary:hover { opacity: 0.85; color: #fff; }

/* SECTIONS (inner) */
.section { margin-bottom: 3rem; }
.section-label { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; font-weight: 600; }
.section-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: 1.25rem; }

/* RESULTS TABLE */
.results-table { width: 100%; border-collapse: collapse; }
.results-table th { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.results-table td { font-size: 14px; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--surface); }
.place-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-head); font-size: 12px; font-weight: 700; }
.place-1 { background: rgba(255,215,0,0.15); color: #ffd700; }
.place-2 { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.place-3 { background: rgba(205,127,50,0.15); color: #cd7f32; }
.place-other { background: var(--surface); color: var(--muted); }

/* NO RESULTS */
.no-results { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; text-align: center; color: var(--muted); font-size: 14px; }

/* LOADING */
.loading { color: var(--muted); font-size: 14px; padding: 1rem 0; }

/* FILTERS */
.history-filters-wrap { padding: 2rem 3rem 0; max-width: 860px; margin: 0 auto; }
.filter-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.filter-label { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: 0.5rem; white-space: nowrap; font-weight: 600; }
.filter-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 0.3rem 0.75rem; border-radius: 6px; font-family: var(--font-head); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* SLIDER */
.slider-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
input[type="range"] { accent-color: var(--accent); }

/* HISTORY TIMELINE */
.history-section { padding: 3rem; }
.timeline { position: relative; padding-left: 2rem; max-width: 860px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 0.45rem; top: 0.5rem; bottom: 0; width: 1px; background: var(--border); }
.tl-year-block { margin-bottom: 3rem; }
.tl-year-label { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tl-year-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 1.25rem; }
.tl-dot { position: absolute; left: -1.78rem; top: 1.1rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.tl-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.tl-comp-name { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.tl-comp-loc { font-size: 12px; color: var(--muted); }
.tl-league { padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border); }
.tl-league-last { border-bottom: none; }
.tl-league-name { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; font-weight: 600; }
.tl-places { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.tl-place { display: flex; align-items: center; gap: 7px; }
.tl-medal { width: 32px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; font-family: var(--font-head); }
.m-gold   { background: rgba(255,215,0,0.15); color: #ffd700; }
.m-silver { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.m-bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }
.m-other  { background: var(--border); color: var(--muted); }
.tl-team-link { font-size: 13px; color: var(--text); text-decoration: none; transition: color 0.2s; }
.tl-team-link:hover { color: var(--accent); }
.tl-team-name { font-size: 13px; color: var(--text); }
.tl-no-results { padding: 1rem 1.25rem; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .history-section { padding: 1.5rem; }
  .tl-places { gap: 0.75rem; }
}

/* RULES PAGE */
.rules-hero { padding: 4rem 3rem; border-bottom: 1px solid var(--border); }
.rules-hero-inner { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
.rules-hero-title { font-family: var(--font-head); font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800; margin: 0.5rem 0 1rem; letter-spacing: -0.02em; }
.rules-hero-desc { color: var(--muted); font-size: 15px; line-height: 1.8; max-width: 500px; margin-bottom: 2rem; }
.rules-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.rules-hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; text-align: center; min-width: 220px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.rules-doc-icon { width: 64px; height: 64px; border-radius: 12px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.rules-doc-label { font-family: var(--font-head); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.rules-doc-sub { font-size: 12px; color: var(--muted); }

.rules-cards-wrap { padding: 4rem 3rem; border-bottom: 1px solid var(--border); }
.rules-cards-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.rules-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; transition: border-color 0.2s, box-shadow 0.2s; }
.rules-card:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 4px 20px rgba(59,130,246,0.06); }
.rules-card-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.rules-icon-new { background: rgba(59,130,246,0.12); color: var(--accent); }
.rules-icon-existing { background: rgba(96,165,250,0.12); color: var(--accent2); }
.rules-card-tag { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; font-weight: 600; }
.rules-card-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.rules-card-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; }
.rules-card-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
.rules-card-note { font-size: 12px; color: var(--muted); line-height: 1.6; padding-top: 1rem; border-top: 1px solid var(--border); }

.rules-criteria-section { padding: 4rem 3rem; }
.rules-criteria-inner { max-width: 960px; margin: 0 auto; }
.criteria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.criteria-item { display: flex; align-items: center; gap: 0.75rem; font-size: 14px; color: var(--text); padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.criteria-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

@media (max-width: 900px) {
  .rules-hero-inner { grid-template-columns: 1fr; }
  .rules-hero-card { display: none; }
  .rules-cards-section { grid-template-columns: 1fr; }
  .rules-cards-wrap { padding: 2rem 1.5rem; }
  .rules-hero { padding: 2rem 1.5rem; }
  .rules-criteria-section { padding: 2rem 1.5rem; }
}

/* GUIDE PAGE */
.guide-wrap { max-width: 760px; margin: 0 auto; padding: 4rem 3rem; }
.guide-intro { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); }
.guide-intro p { font-size: 16px; color: var(--muted); line-height: 1.8; }
.guide-steps { display: flex; flex-direction: column; gap: 0; }
.guide-step { display: grid; grid-template-columns: 56px 1fr; gap: 2rem; padding: 3rem 0; border-bottom: 1px solid var(--border); }
.guide-step:last-child { border-bottom: none; }
.guide-step-number { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; color: var(--accent); letter-spacing: 0.05em; padding-top: 4px; }
.guide-step-tag { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; font-weight: 600; }
.guide-step-title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
.guide-step-content p { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.guide-step-content ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.guide-step-content li { font-size: 15px; color: var(--muted); line-height: 1.7; }

@media (max-width: 600px) {
  .guide-wrap { padding: 2rem 1.5rem; }
  .guide-step { grid-template-columns: 1fr; gap: 0.5rem; }
  .guide-step-number { padding-top: 0; }
}

/* COMMITTEE PAGE */
.committee-section { padding: 4rem 3rem; border-bottom: 1px solid var(--border); }
.committee-inner { max-width: 960px; margin: 0 auto; }
.committee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.committee-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.committee-card-header { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.committee-card-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-bottom: 0.4rem; }
.committee-email { font-size: 11px; color: var(--accent); text-decoration: none; font-family: var(--font-head); word-break: break-all; }
.committee-email:hover { opacity: 0.8; }
.committee-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.committee-list li { font-size: 13px; line-height: 1.5; }
.committee-affil { display: block; font-size: 11px; color: var(--muted); }
.committee-role { display: inline-block; font-family: var(--font-head); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: rgba(59,130,246,0.1); padding: 2px 6px; border-radius: 4px; margin-right: 4px; vertical-align: middle; font-weight: 600; }

.committee-history-wrap { padding: 3rem; }
.hist-year { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.75rem; overflow: hidden; }
.hist-year-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--surface); border: none; color: var(--text); font-family: var(--font-head); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: background 0.15s; }
.hist-year-btn:hover { background: rgba(59,130,246,0.06); }
.hist-chevron { font-size: 18px; color: var(--accent); }
.hist-year-body { padding: 1.5rem 1.25rem; }
.hist-committee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.hist-committee-title { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; font-weight: 600; }

@media (max-width: 900px) {
  .committee-section { padding: 2rem 1.5rem; }
  .committee-grid { grid-template-columns: 1fr; }
  .committee-history-wrap { padding: 1.5rem; }
  .hist-committee-grid { grid-template-columns: 1fr; }
}

/* NEWS PAGE */
.news-page-section { padding: 4rem 3rem; }
.news-page-inner { max-width: 960px; margin: 0 auto; }
.news-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; transition: border-color 0.2s, box-shadow 0.2s; }
.news-card:hover { border-color: rgba(59,130,246,0.35); box-shadow: 0 4px 16px rgba(59,130,246,0.06); }
.news-card-featured { grid-column: 1 / -1; }
.news-card-tag { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.25rem; font-weight: 600; }
.news-card-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; line-height: 1.4; }
.news-card-featured .news-card-title { font-size: 1.1rem; }
.news-card-title a { color: var(--text); text-decoration: none; }
.news-card-title a:hover { color: var(--accent); }
.news-card-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; }
.news-card-date { font-family: var(--font-head); font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.news-loading { color: var(--muted); font-size: 14px; grid-column: 1 / -1; padding: 2rem 0; }

@media (max-width: 900px) {
  .news-page-section { padding: 2rem 1.5rem; }
  .news-page-grid { grid-template-columns: 1fr; }
  .news-card-featured { grid-column: 1; }
}

/* COMPETITIONS PAGE */
.comp-page-section { padding: 4rem 3rem; }
.comp-page-inner { max-width: 960px; margin: 0 auto; }

.comp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; transition: border-color 0.2s, box-shadow 0.2s; }
.comp-card:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 4px 16px rgba(59,130,246,0.06); }

.comp-card-featured { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 0; border-color: rgba(59,130,246,0.25); }
.comp-card-left { flex: 1; }
.comp-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.comp-card-featured .comp-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.comp-tagline { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 1.75rem; max-width: 520px; }
.comp-meta-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.75rem; }
.comp-meta-item { display: flex; flex-direction: column; gap: 3px; }
.comp-meta-label { font-family: var(--font-head); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.comp-meta-value { font-size: 14px; color: var(--text); }
.comp-status-open   { color: #22c55e; font-family: var(--font-head); font-size: 12px; font-weight: 600; }
.comp-status-closed { color: #ef4444; font-family: var(--font-head); font-size: 12px; font-weight: 600; }
.comp-status-tbc    { color: var(--muted); font-family: var(--font-head); font-size: 12px; }
.comp-link { color: var(--accent); text-decoration: none; font-size: 13px; }
.comp-link:hover { opacity: 0.8; }
.comp-card-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.comp-card-badge { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1.5rem; background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.18); border-radius: 12px; min-width: 140px; text-align: center; flex-shrink: 0; }
.comp-badge-label { font-family: var(--font-head); font-size: 11px; color: var(--accent); letter-spacing: 0.04em; line-height: 1.4; font-weight: 600; }

.comp-regionals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.comp-card-regional { display: flex; flex-direction: column; gap: 1rem; }
.comp-regional-header { display: flex; align-items: center; gap: 0.75rem; }
.comp-flag { font-size: 28px; line-height: 1; }
.comp-region { font-size: 12px; color: var(--muted); font-family: var(--font-head); margin-top: 2px; font-weight: 500; }
.comp-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }
.comp-meta-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.comp-card-regional .comp-card-actions { margin-top: auto; }

@media (max-width: 900px) {
  .comp-page-section { padding: 2rem 1.5rem; }
  .comp-card-featured { flex-direction: column; }
  .comp-card-badge { display: none; }
  .comp-regionals-grid { grid-template-columns: 1fr; }
}

/* MOBILE NAV */
.ham-bar { display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; }
.nav-mobile-only { display: none; }

@media (max-width: 900px) {
  #nav-hamburger { display: flex !important; }
  .nav-desktop-only { display: none !important; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    z-index: 99;
  }
  .nav-links.nav-open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 0.75rem 0; font-size: 15px; color: var(--text); }
  .nav-mobile-only { display: list-item; }
}

/* MEDIA PAGE */
.media-hero-section { padding: 3rem 3rem 0; }
.media-section { padding: 3rem; }
.media-section-alt { border-top: 1px solid var(--border); }
.media-inner { max-width: 960px; margin: 0 auto; }

.media-video-featured { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.media-video-featured iframe { width: 100%; height: 100%; }
.media-video-caption { font-size: 13px; color: var(--muted); margin-top: 0.75rem; }

.media-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.media-video-card { display: flex; flex-direction: column; gap: 0.5rem; }
.media-video-thumb { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.media-video-thumb iframe { width: 100%; height: 100%; }
.media-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: var(--muted); font-size: 12px; font-family: var(--font-head); }
.media-video-title { font-family: var(--font-head); font-size: 12px; font-weight: 700; }
.media-video-sub { font-size: 12px; color: var(--muted); }

.media-gallery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.media-gallery-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.media-tab { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 0.3rem 0.75rem; border-radius: 6px; font-family: var(--font-head); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.media-tab:hover { border-color: var(--accent); color: var(--text); }
.media-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.media-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; gap: 0.75rem; }
.media-photo { background-size: cover; background-position: center; border-radius: 10px; overflow: hidden; position: relative; cursor: pointer; }
.media-photo-tall { grid-row: span 2; }
.media-photo-wide { grid-column: span 2; }
.media-photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); display: flex; align-items: flex-end; padding: 0.75rem; opacity: 0; transition: opacity 0.2s; }
.media-photo:hover .media-photo-overlay { opacity: 1; }
.media-photo-overlay span { font-size: 12px; color: #fff; font-family: var(--font-head); line-height: 1.3; }

@media (max-width: 900px) {
  .media-hero-section { padding: 1.5rem 1.5rem 0; }
  .media-section { padding: 1.5rem; }
  .media-video-grid { grid-template-columns: 1fr; }
  .media-photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .media-photo-wide { grid-column: span 2; }
  .media-photo-tall { grid-row: span 1; }
  .media-gallery-header { flex-direction: column; align-items: flex-start; }
}

/* COMPETITION DETAIL PAGE */
.comp-detail-back { padding: 1.25rem 3rem 0; max-width: 960px; margin: 0 auto; }
.comp-detail-header { padding: 2.5rem 3rem; border-bottom: 1px solid var(--border); }
.comp-detail-inner { max-width: 960px; margin: 0 auto; }
.comp-detail-meta { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.comp-detail-body { padding: 3rem; }
.comp-detail-block { margin-bottom: 3rem; }
.comp-detail-block-title { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; font-weight: 600; }
.comp-detail-leagues { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.comp-detail-league { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; min-width: 220px; flex: 1; }
.comp-detail-league-title { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; font-weight: 600; }
.comp-detail-results-list { display: flex; flex-direction: column; gap: 0.6rem; }
.comp-detail-result-row { display: flex; align-items: center; gap: 0.75rem; }
.comp-detail-result-team { font-size: 14px; }
.comp-detail-no-results { font-size: 13px; color: var(--muted); }
.comp-detail-team-link { color: var(--text); text-decoration: none; }
.comp-detail-team-link:hover { color: var(--accent); }
.comp-detail-participants-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.comp-detail-participant { font-size: 13px; padding: 0.5rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }

/* TIMELINE COMP LINK */
.tl-comp-link { color: var(--text); text-decoration: none; }
.tl-comp-link:hover { color: var(--accent); }

/* PARTICIPATION ENTRY */
.tl-participated { padding: 0.75rem 1.25rem; font-size: 12px; color: var(--muted); font-family: var(--font-head); letter-spacing: 0.04em; }

@media (max-width: 900px) {
  .comp-detail-back { padding: 1rem 1.5rem 0; }
  .comp-detail-header { padding: 1.5rem; }
  .comp-detail-body { padding: 1.5rem; }
  .comp-detail-leagues { flex-direction: column; }
}
