:root {
  --pink: #ff3f68;
  --pink-dark: #d9204a;
  --pink-soft: #fff0f4;
  --ink: #111111;
  --muted: #65656e;
  --line: #dedee4;
  --soft: #f5f5f7;
  --white: #ffffff;
  --shadow: 0 12px 36px rgba(17, 17, 17, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

button, input, select { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
}

.skip-link:focus { top: 12px; }

.site-header {
  color: var(--white);
  background: var(--ink);
}

.header-inner,
.announcement-inner,
.nav-inner,
.content-wrap,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 172px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  background: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.venue-link {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 290px;
  padding: 14px 16px;
  color: var(--white);
  border: 1px solid #414149;
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.venue-link:hover { border-color: var(--pink); transform: translateY(-2px); }
.venue-link strong, .venue-link span span { display: block; }
.venue-link strong { margin-bottom: 2px; font-size: 0.8rem; color: var(--pink); text-transform: uppercase; letter-spacing: 0.08em; }
.venue-icon { font-size: 1.7rem; color: var(--pink); }

.announcement-bar {
  color: var(--ink);
  background: var(--pink);
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 7px 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.announcement-message { display: flex; align-items: center; gap: 12px; }
.announcement-label {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid rgba(17, 17, 17, 0.35);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.announcement-message > span { min-width: 0; }
.announcement-message a { color: var(--ink); font-weight: 800; overflow-wrap: anywhere; text-underline-offset: 2px; }
.weather-pill { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 5px 11px 5px 6px; color: var(--white); background: var(--ink); border-radius: 999px; }
.weather-icon { display: grid; width: 32px; height: 32px; place-items: center; background: var(--white); border-radius: 50%; font-size: 1.15rem; line-height: 1; }
.weather-copy, .weather-copy > span { display: block; }
.weather-copy strong { display: block; color: var(--white); font-size: 0.72rem; line-height: 1.1; }
.weather-copy > span { margin-top: 2px; color: #d5d5da; font-size: 0.72rem; white-space: nowrap; }
.weather-copy b { color: var(--white); }

.primary-nav {
  border-top: 1px solid #313138;
  background: #18181b;
}

.nav-inner { display: flex; gap: 4px; }

.nav-tab {
  position: relative;
  min-width: 112px;
  padding: 16px 18px 17px;
  color: #bcbcc4;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.nav-tab::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 4px;
  background: transparent;
  border-radius: 4px 4px 0 0;
}

.nav-tab:hover, .nav-tab:focus-visible, .nav-tab.is-active { color: var(--white); }
.nav-tab.is-active::after { background: var(--pink); }

.page-panel { min-height: 62vh; }
.content-wrap { padding: 54px 0 72px; }
.narrow-wrap { max-width: 900px; }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

h2 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.heading-copy { margin: 10px 0 0; color: var(--muted); }

.next-match {
  min-width: 255px;
  padding: 16px 20px;
  color: var(--white);
  background: var(--pink);
  border-radius: 14px;
  box-shadow: 8px 8px 0 var(--ink);
}

.next-match span { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.next-match strong { display: block; margin-top: 2px; font-size: 1.15rem; }

.my-team-card {
  display: grid;
  grid-template-columns: auto minmax(240px, 420px) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 15px 18px;
  color: var(--white);
  background: var(--ink);
  border-left: 6px solid var(--pink);
  border-radius: 14px;
}

.my-team-heading span,
.my-team-heading strong { display: block; }
.my-team-heading span { color: var(--pink); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.my-team-heading strong { font-size: 1.15rem; }
.my-team-card label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
.my-team-card select { grid-column: 1 / 3; border-color: #4f4f58; }
.my-team-card small { grid-column: 1 / 3; color: #a9a9b2; font-size: 0.75rem; }
.my-team-card button { color: var(--white); background: transparent; border: 1px solid #666670; border-radius: 9px; padding: 9px 13px; cursor: pointer; font-weight: 750; }
.my-team-card button:hover { border-color: var(--pink); }

.filter-panel {
  display: grid;
  grid-template-columns: 1.25fr 1.15fr 1.4fr auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  background: var(--soft);
  border: 1px solid #e8e8ec;
  border-radius: 18px;
}

.filter-panel label, .table-selector { display: grid; gap: 7px; }
.filter-panel label span, .table-selector span { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.filter-panel .field-instruction { margin-left: 7px; color: var(--muted); font-size: 0.72rem; font-weight: 650; letter-spacing: 0; text-transform: none; }

select, input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #ccccd3;
  border-radius: 10px;
  outline: 0;
}

select:focus, input[type="search"]:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 63, 104, 0.16); }

.clear-button {
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #bfbfc7;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
}

.clear-button:hover { background: var(--white); border-color: var(--ink); }
.results-count { min-height: 48px; padding: 18px 2px 10px; color: var(--muted); font-weight: 650; }

.match-day {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.match-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  color: var(--white);
  background: var(--ink);
}

.match-day-header h3 { margin: 0; font-size: 1.3rem; }
.match-day-header span { color: #bebec7; font-size: 0.9rem; }
.match-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.fixture-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  min-height: 108px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.fixture-card:nth-child(odd) { border-right: 1px solid var(--line); }
.fixture-card:nth-last-child(-n+2) { border-bottom: 0; }
.fixture-card:last-child:nth-child(odd) { border-bottom: 0; }

.fixture-meta strong { display: block; font-size: 1.02rem; }
.fixture-meta span { display: inline-block; margin-top: 5px; padding: 3px 8px; color: var(--muted); background: var(--soft); border-radius: 6px; font-size: 0.78rem; font-weight: 700; }
.fixture-teams { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 6px; }
.fixture-teams strong { font-size: 0.98rem; line-height: 1.25; }
.fixture-teams strong:last-child { text-align: right; }
.fixture-v { color: var(--pink-dark); text-align: center; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; }
.division-pill { max-width: 122px; color: var(--muted); font-size: 0.76rem; font-weight: 750; text-align: right; line-height: 1.3; }
.fixture-result { display: block; margin-top: 5px; color: var(--pink-dark); font-size: 0.78rem; font-weight: 850; }
.final-card { background: var(--pink-soft); }
.final-card .fixture-teams strong { color: var(--pink-dark); }

.empty-state {
  padding: 46px 28px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.empty-state h3 { margin: 0; font-size: 1.45rem; }
.empty-state p { margin: 8px 0 0; color: var(--muted); }

.results-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid #e8e8ec;
  border-radius: 15px;
}
.results-toolbar label { display: grid; gap: 7px; width: min(100%, 360px); }
.results-toolbar label span { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.results-contact { margin: 30px 0 0; color: var(--muted); font-size: 0.88rem; text-align: center; }
.results-contact a { color: var(--ink); font-weight: 800; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.result-day { margin-top: 18px; }
.result-day h3 { margin: 0 0 12px; font-size: 1.25rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 24px rgba(17,17,17,0.06); }
.result-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.confirmed-pill { padding: 4px 8px; color: var(--pink-dark); background: var(--pink-soft); border-radius: 999px; }
.score-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.score-team { font-weight: 800; line-height: 1.25; }
.score-team:last-child { text-align: right; }
.score-box { display: flex; align-items: center; gap: 7px; font-size: 1.65rem; font-weight: 900; letter-spacing: -0.04em; }
.score-box span { color: var(--pink); }

.table-heading { align-items: center; }
.table-selector { min-width: 250px; }
.table-status { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 0.88rem; font-weight: 650; }
.table-status span { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }

.league-table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.league-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.league-table th { padding: 14px 12px; color: var(--white); background: var(--ink); font-size: 0.78rem; letter-spacing: 0.04em; text-align: center; }
.league-table th.team-column { text-align: left; }
.league-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.league-table tbody tr:last-child td { border-bottom: 0; }
.league-table tbody tr:nth-child(even) { background: var(--soft); }
.league-table td:nth-child(2) { text-align: left; font-weight: 750; }
.league-table td:not(:nth-child(2)) { color: #8c8c95; }
.league-table .my-team-row { background: var(--pink-soft); }
.my-team-tag { display: inline-block; margin-left: 7px; padding: 2px 6px; color: var(--pink-dark); background: #ffd6df; border-radius: 999px; font-size: 0.68rem; font-weight: 850; vertical-align: middle; }
.league-table abbr { text-decoration: none; cursor: help; }
.table-note { color: var(--muted); font-size: 0.9rem; }

.rules-wrap { max-width: 980px; }
.rules-reference { margin-bottom: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.rules-reference-heading { display: flex; align-items: baseline; gap: 12px; padding: 18px 20px; color: var(--white); background: var(--ink); }
.rules-reference-heading span { color: var(--pink); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.rules-reference-heading h3 { margin: 0; font-size: 1.25rem; }
.rules-table-shell { overflow-x: auto; }
.rules-table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 0.9rem; }
.rules-table th, .rules-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.rules-table th { color: var(--white); background: var(--pink-dark); font-size: 0.75rem; letter-spacing: 0.035em; text-transform: uppercase; }
.rules-table tr:last-child td { border-bottom: 0; }
.rules-table tbody tr:nth-child(even) { background: var(--soft); }
.compact-table { min-width: 560px; margin: 4px 0 18px; border: 1px solid var(--line); }
.rule-accordion { display: grid; gap: 10px; }
.rule-item { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: border-color 160ms ease, box-shadow 160ms ease; }
.rule-item[open] { border-color: #ffb1c1; box-shadow: 0 10px 28px rgba(17, 17, 17, 0.07); }
.rule-item summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 64px; padding: 10px 18px; cursor: pointer; font-size: 1.02rem; font-weight: 800; list-style: none; }
.rule-item summary::-webkit-details-marker { display: none; }
.rule-item summary:hover, .rule-item summary:focus-visible { background: var(--pink-soft); }
.rule-number { color: var(--pink-dark); font-size: 0.78rem; letter-spacing: 0.08em; }
.rule-chevron { position: relative; width: 18px; height: 18px; }
.rule-chevron::before, .rule-chevron::after { content: ""; position: absolute; top: 8px; left: 3px; width: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 160ms ease; }
.rule-chevron::after { transform: rotate(90deg); }
.rule-item[open] .rule-chevron::after { transform: rotate(0); }
.rule-content { padding: 2px 72px 24px; color: #35353b; }
.rule-content p { margin: 0 0 14px; }
.rule-content p:last-child { margin-bottom: 0; }
.rule-content h3 { margin: 22px 0 8px; color: var(--ink); font-size: 1rem; }
.rule-content ul { margin: 8px 0 16px; padding-left: 22px; }
.rule-content li { margin: 5px 0; }
.rule-callout { padding: 13px 15px; border-left: 4px solid var(--pink); background: var(--pink-soft); }
.rules-email { color: var(--pink-dark); font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }

footer { color: #bdbdc4; background: var(--ink); }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; padding: 24px 0 92px; font-size: 0.88rem; }
.footer-brand span { color: var(--pink); font-weight: 900; margin-right: 7px; }

@media (max-width: 860px) {
  .header-inner { min-height: 144px; }
  .brand-logo { width: 92px; height: 92px; }
  .venue-link { max-width: 250px; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .team-search { grid-column: 1 / 2; }
  .match-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .fixture-card, .fixture-card:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--line); }
  .fixture-card:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  body { padding-bottom: 66px; }
  .header-inner, .announcement-inner, .nav-inner, .content-wrap, .footer-inner { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: auto; align-items: flex-start; padding: 18px 0 22px; }
  .brand-lockup { gap: 13px; }
  .brand-logo { width: 70px; height: 70px; border-width: 3px; }
  .eyebrow { font-size: 0.67rem; }
  h1 { font-size: 1.68rem; }
  .desktop-break { display: none; }
  .venue-link { position: absolute; top: 103px; left: 14px; right: 14px; max-width: none; padding: 10px 13px; background: #1c1c20; font-size: 0.86rem; }
  .site-header { padding-bottom: 0; }
  .announcement-bar { margin-top: 71px; }
  .announcement-inner { display: grid; align-items: start; gap: 11px; min-height: 0; padding: 12px 0 15px; font-size: 0.82rem; }
  .announcement-message { align-items: flex-start; gap: 9px; }
  .announcement-label { padding-right: 9px; font-size: 0.68rem; }
  .weather-pill { width: fit-content; justify-self: center; margin: 3px 0 1px; padding: 8px 15px 8px 8px; }
  .primary-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; border-top: 1px solid #35353b; box-shadow: 0 -7px 24px rgba(0,0,0,0.18); }
  .nav-inner { width: 100%; gap: 0; }
  .nav-tab { flex: 1; min-width: 0; padding: 14px 8px 17px; font-size: 0.9rem; }
  .nav-tab::after { left: 20%; right: 20%; top: 0; bottom: auto; border-radius: 0 0 4px 4px; }
  .content-wrap { padding: 38px 0 52px; }
  .page-heading { display: grid; align-items: initial; margin-bottom: 24px; }
  h2 { font-size: 3rem; }
  .next-match { min-width: 0; width: calc(100% - 7px); box-shadow: 7px 7px 0 var(--ink); }
  .filter-panel { grid-template-columns: 1fr; padding: 14px; }
  .my-team-card { grid-template-columns: 1fr auto; gap: 12px; }
  .my-team-card label { grid-column: 1 / 3; }
  .team-search { grid-column: auto; }
  .clear-button { width: 100%; }
  .match-day { margin-top: 12px; border-radius: 15px; box-shadow: 0 8px 22px rgba(17,17,17,0.07); }
  .match-day-header { align-items: flex-start; padding: 17px 16px; }
  .match-day-header span { max-width: 95px; text-align: right; }
  .fixture-card { grid-template-columns: 64px minmax(0, 1fr); min-height: 112px; padding: 16px; gap: 12px; }
  .fixture-teams { grid-template-columns: 1fr 20px 1fr; }
  .fixture-teams strong { font-size: 0.9rem; }
  .division-pill { grid-column: 2; max-width: none; text-align: left; }
  .results-toolbar { display: grid; }
  .results-toolbar label { width: 100%; }
  .table-heading { align-items: initial; }
  .table-selector { min-width: 0; }
  .rules-reference-heading { display: grid; gap: 2px; padding: 15px 16px; }
  .rules-table { font-size: 0.82rem; }
  .rule-item summary { grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 8px; min-height: 60px; padding: 9px 14px; font-size: 0.94rem; }
  .rule-content { padding: 2px 16px 20px; font-size: 0.94rem; }
  .footer-inner { display: grid; padding-bottom: 28px; }
}

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