:root {
  --green: #07583c;
  --green-deep: #003c2b;
  --black: #111312;
  --gold: #dda91f;
  --gold-soft: #fff3c8;
  --paper: #f3f5f1;
  --white: #ffffff;
  --ink: #171a18;
  --muted: #647067;
  --line: #d7ddd7;
  --win: #087247;
  --win-bg: #e8f6ef;
  --loss: #bb2d3b;
  --loss-bg: #fdecef;
  --shadow: 0 12px 34px rgba(0, 60, 43, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.masthead {
  color: var(--white);
  background:
    linear-gradient(110deg, rgba(221,169,31,.15), transparent 45%),
    linear-gradient(135deg, var(--black) 0%, #141815 42%, var(--green-deep) 100%);
  border-bottom: 4px solid var(--gold);
}

.masthead__inner, main {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
}

.masthead__inner {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand__logo {
  width: 68px;
  height: 68px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .3));
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--gold);
  font: 700 13px/1.2 Inter, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}
h1 { font-size: clamp(38px, 7vw, 54px); line-height: .92; }
h2 { font-size: 31px; line-height: 1; }

.share-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: var(--white);
  cursor: pointer;
}
.share-button svg { width: 19px; fill: currentColor; }
.share-button:hover { background: rgba(255,255,255,.16); }

main { padding-bottom: 48px; }

.team-switcher {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 18px rgba(0,60,43,.07);
  backdrop-filter: blur(10px);
}

.team-tab {
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}
.team-tab.is-active { background: var(--green); color: var(--white); }

.scoreboard {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 220px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--black) 0%, var(--green-deep) 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}
.scoreboard::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -92px;
  border: 22px solid rgba(241,183,53,.13);
  border-radius: 50%;
}
.scoreboard__record {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scoreboard__label {
  margin: 0;
  color: #d5ddd6;
  font-weight: 600;
}
.record {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 4px 0 0;
  font: 800 64px/.95 "Barlow Condensed", sans-serif;
}
.record small { color: var(--gold); font-size: 22px; }
.record i { color: rgba(255,255,255,.27); font-style: normal; font-size: 34px; }
.record-detail { margin: 11px 0 0; color: #d5ddd6; font-size: 14px; }

.next-match {
  position: relative;
  z-index: 1;
  margin: 16px;
  padding: 23px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
}
.next-match__label {
  color: var(--gold);
  font: 700 13px/1.2 Inter, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.next-match__opponent {
  margin: 8px 0 3px;
  font: 700 29px/1 "Barlow Condensed", sans-serif;
  text-transform: uppercase;
}
.next-match__meta { color: #e1e7e2; font-size: 14px; }
.next-match__record {
  margin-top: 11px;
  color: #d8e1da;
  font-size: 14px;
}
.next-match__record strong {
  color: var(--white);
  font-size: 16px;
}

.section { padding-top: 34px; }
.section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.eyebrow--dark { color: #9a6800; }

.view-filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}
.filter-button {
  min-height: 36px;
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.filter-button.is-active { color: var(--green-deep); background: var(--gold-soft); }

.match-list { display: grid; gap: 10px; }
.match {
  display: grid;
  grid-template-columns: 74px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
}
.match__date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}
.match__opponent { margin: 0; font-weight: 700; }
.match__meta { margin-top: 3px; color: var(--muted); font-size: 13px; }
.match__meta strong { color: var(--green-deep); }
.match__result { text-align: right; }
.result-line { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.result-badge {
  min-width: 29px;
  padding: 4px 8px;
  border-radius: 7px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}
.result-badge.win { color: var(--win); background: var(--win-bg); }
.result-badge.loss { color: var(--loss); background: var(--loss-bg); }
.match-score { font: 800 25px/1 "Barlow Condensed", sans-serif; }
.set-scores { margin-top: 5px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.upcoming-label { color: var(--green); font-weight: 700; }
.match--next { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(241,183,53,.12); }
.next-pill {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #795000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.empty-state {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  text-align: center;
}

.sources {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.sources p { margin: 0 0 10px; }
.source-links { display: flex; gap: 16px; margin-bottom: 12px; }
.source-links a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }
.disclaimer { max-width: 650px; }
.feedback-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 16px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 60, 43, .16);
}
.feedback-button:hover { background: var(--green-deep); }
.feedback-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.feedback-button svg { width: 18px; height: 18px; fill: currentColor; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .masthead__inner, main { width: min(100% - 24px, 920px); }
  .masthead__inner { min-height: 102px; }
  .brand__logo { width: 58px; height: 58px; }
  .share-button span { display: none; }
  .share-button { width: 44px; justify-content: center; padding: 0; }
  .scoreboard { grid-template-columns: 1fr; }
  .scoreboard__record { padding: 25px 24px 13px; }
  .record { font-size: 58px; }
  .next-match { margin: 12px; min-height: 125px; }
  .section__heading { display: block; }
  .view-filter { margin-top: 15px; width: 100%; }
  .filter-button { flex: 1; }
  .match { grid-template-columns: 62px minmax(0,1fr) auto; gap: 10px; padding: 15px 13px; }
  .match-score { font-size: 22px; }
  .set-scores { white-space: normal; max-width: 112px; line-height: 1.25; }
}

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