*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --white: #ffffff;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --blue: #1a9e96;
  --blue-dark: #158a83;
  --blue-light: #e6f6f5;
  --navy: #0c2e2b;
  --text: #1a1a1a;
  --text-2: #555555;
  --text-3: #999999;
  --border: rgba(0,0,0,0.08);
  --orange: #e8640a;
  --orange-bg: #fff4ec;
  --red: #d32f2f;
  --green: #1a9e96;
  --gold: #d4a017;
  --hover: #f8f8f8;
  --radius: 8px;
}
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }

/* NAV */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.nav::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--blue); }
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { height: 40px; border-radius: 6px; }
.nav-brand .brand-text { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; color: var(--navy); }
.nav-brand .brand-sub { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-3); margin-top: -1px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; padding: 8px 16px; border-radius: 6px; transition: all 0.15s; }
.nav-links a:hover { color: var(--text); background: var(--bg); }
.nav-links a.active { color: var(--blue); }

/* FOOTER */
.footer { background: var(--navy); color: white; margin-top: 20px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 32px 24px; display: flex; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 32px; border-radius: 4px; opacity: 0.9; }
.footer-brand span { font-size: 14px; font-weight: 800; }
.footer p { font-size: 11px; opacity: 0.4; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; font-weight: 600; color: white; opacity: 0.5; text-decoration: none; transition: opacity 0.15s; }
.footer-links a:hover { opacity: 1; }

/* SHARED COMPONENTS */
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 48px; }
.page-title { font-size: 28px; font-weight: 900; color: var(--navy); letter-spacing: -0.5px; margin-bottom: 6px; }
.page-sub { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }

.stitle { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--text-3); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.stitle::before { content: ''; width: 4px; height: 16px; background: var(--blue); border-radius: 2px; }
.stitle .pill { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--blue); background: var(--blue-light); padding: 3px 10px; border-radius: 4px; letter-spacing: 0.5px; }

/* Leaderboard table */
.lb { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.lb-header { background: var(--navy); color: white; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.lb-header h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.lb-header .tour-badge { font-size: 10px; font-weight: 700; background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 4px; letter-spacing: 1px; text-transform: uppercase; }
.lb table { width: 100%; border-collapse: collapse; }
.lb thead th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-3); padding: 10px 16px; text-align: left; background: var(--bg); border-bottom: 1px solid var(--border); }
.lb tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.lb tbody tr:last-child { border-bottom: none; }
.lb tbody tr:hover { background: var(--hover); }
.lb td { padding: 12px 16px; }
.lb .pos { font-size: 16px; font-weight: 900; width: 44px; text-align: center; color: var(--text-3); }
.lb .pos.g { color: var(--gold); }
.lb .pos.s { color: #8a8a8a; }
.lb .pos.b { color: #b87333; }
.lb .player { display: flex; align-items: center; gap: 12px; }
.lb .av { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: white; flex-shrink: 0; }
.lb .pn { font-size: 14px; font-weight: 700; color: var(--text); }
.lb .pg { font-size: 10px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }
.lb .pts { font-size: 18px; font-weight: 900; color: var(--blue); letter-spacing: -0.5px; }
.lb .wv { font-size: 14px; font-weight: 800; color: var(--orange); }
.lb .sc { font-size: 13px; font-weight: 700; color: var(--green); }
.lb .dm { font-size: 12px; color: var(--text-3); font-weight: 500; }
.lb tbody tr.top1 { background: linear-gradient(90deg, #fffbeb 0%, var(--white) 40%); }
.lb tbody tr.top1:hover { background: linear-gradient(90deg, #fef3c7 0%, var(--hover) 40%); }

/* Match cards */
.match { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border-left: 4px solid var(--blue); transition: box-shadow 0.15s; }
.match:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.match.live-match { border-left-color: var(--red); }
.match.completed-match { border-left-color: var(--text-3); }
.match-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.match-week { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--text-3); }
.match-badges { display: flex; gap: 6px; }
.mbadge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.mbadge-grp { background: var(--blue-light); color: var(--blue); }
.mbadge-up { background: var(--bg); color: var(--text-2); }
.mbadge-live { background: #fef2f2; color: var(--red); font-weight: 800; }
.mbadge-done { background: var(--bg); color: var(--text-3); }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.match-name { font-size: 13px; font-weight: 700; text-align: center; padding: 10px 8px; background: var(--bg); border-radius: 6px; color: var(--text); }
.match-name .score { display: block; font-size: 15px; font-weight: 900; color: var(--blue); margin-top: 2px; }
.match-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-3); padding-top: 12px; border-top: 1px solid var(--border); }
.match-foot .course { color: var(--blue); font-weight: 700; }
/* Event cards */
.event-card { display: block; background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border-left: 4px solid var(--blue); transition: box-shadow 0.15s; text-decoration: none; color: inherit; }
.event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.event-card.live-match { border-left-color: var(--red); }
.event-card.completed-match { border-left-color: var(--text-3); }
.event-title { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.event-course { font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 12px; }
.event-participants { font-size: 12px; color: var(--text-2); margin-bottom: 12px; font-weight: 500; }
.event-results { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.event-result { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg); border-radius: 6px; font-size: 13px; }
.event-result .er-pos { font-size: 14px; }
.event-result .er-name { font-weight: 700; flex: 1; }
.event-result .er-score { font-weight: 900; color: var(--blue); font-size: 14px; }

.view-all { display: inline-block; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; margin-top: 12px; }
.view-all:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .lb .hm { display: none; }
}
