/* CAMSL branding — navy / red / silver, per example_ad.jpeg */

:root {
  /* Broadcast-dark palette — the Ligue 1 / MLS feel, applied app-wide. */
  --navy-900: #0a1630;
  --navy-800: #102447;
  --navy-700: #18315a;
  --red: #d22730;
  --red-dark: #a81e26;
  --silver: #e8ecf3;
  --silver-dim: #9aa3b2;
  --ink: #e8ecf3;
  --muted: #8f98a8;
  --line: rgba(255, 255, 255, 0.1);
  --card: #102447;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--silver);
  background-color: var(--navy-900);
  background-image: radial-gradient(1200px 600px at 70% -10%, var(--navy-700), var(--navy-900) 60%);
  background-attachment: fixed;
  line-height: 1.55;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Links on the dark theme: light, with a white hover (reference-site feel). */
a {
  color: #c9d6ea;
}

a:hover {
  color: #fff;
}

/* Header */

/* Top bar — MLS-style: black, sticky, bold white links, red hover accent. */
.site-header {
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  min-height: 64px;
  /* The nav bar is wider than the reading column, like the reference sites. */
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand-shield {
  width: 40px;
  height: auto;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 20px 0;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.site-nav-utility {
  margin-left: auto;
  gap: 14px;
}

.site-nav-utility a {
  color: var(--silver-dim);
  font-weight: 600;
}

.site-nav-utility a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 8px 16px;
  }
  .site-nav {
    gap: 14px;
  }
  .site-nav a {
    padding: 8px 0;
    font-size: 0.88rem;
  }
  .site-nav-utility {
    margin-left: 0;
  }
}

/* Layout */

main.container {
  padding: 32px 20px 48px;
}

.card-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(233, 237, 245, 0.15);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.center {
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 800;
}

h2 {
  font-size: 1.05rem;
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.lede {
  color: var(--muted);
  margin: 0 0 20px;
}

/* Form */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.req {
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  border-color: var(--red);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

/* Compact variant for textareas sitting inside table rows / inline forms
   (appeal reasons, decision notes) — still multi-line, just shorter. */
textarea.textarea-compact {
  min-height: 56px;
}

/* -------------------------------------------------------------------------
   SCOREBOARD — MLS-style score strip and Ligue 1-style standings table.
   Dark modules on the light page, like a broadcast scoreboard.
   ------------------------------------------------------------------------- */

/* Team badge: deterministic colour + initials, standing in for a crest. */
.team-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: hsl(var(--h, 210), 45%, 38%);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --- MLS-style scores strip ------------------------------------------------ */
.scores-strip {
  background: var(--navy-800);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}
.scores-strip h2 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  margin: 0 0 12px;
}
.scores-group {
  margin-bottom: 14px;
}
.scores-group:last-child {
  margin-bottom: 0;
}
.scores-date {
  color: #8f98a8;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
}
.scores-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.score-card {
  min-width: 178px;
  background: var(--navy-700);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
}
.score-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.score-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #8f98a8;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.score-meta .score-status {
  color: #fff;
}
.score-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.score-team .team-dot {
  width: 22px;
  height: 22px;
  font-size: 0.54rem;
}
.score-abbr {
  flex: 1;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-num {
  font-weight: 800;
  font-size: 1.02rem;
  min-width: 14px;
  text-align: right;
}
.score-team.loser .score-abbr,
.score-team.loser .score-num {
  color: #9aa3b2;
}

/* --- Ligue 1-style standings table ---------------------------------------- */
.standings-card {
  background: var(--navy-800);
  color: #e8ecf3;
  border-top-color: var(--red);
}

/* /standings: edge-to-edge table card with compact heading */
.standings-card.standings-division-card {
  padding: 0;
  overflow: hidden;
}

.standings-card.standings-division-card h2 {
  margin: 0;
  padding: 14px 16px 10px;
}

.standings-card h2 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.standings-card .fineprint,
.standings-card .muted {
  color: #8f98a8;
}
.standings-table {
  color: #e8ecf3;
  font-size: 0.92rem;
}
.standings-table th {
  background: transparent;
  color: #8f98a8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 8px 10px;
}
.standings-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 11px 10px;
  vertical-align: middle;
}

/* Compact divisional standings: keep every row on one line. */
.standings-table-tight th,
.standings-table-tight td {
  white-space: nowrap;
}

.standings-table-tight th,
.standings-table-tight td {
  padding: 7px 8px;
}

.standings-table-tight .club {
  gap: 8px;
}

.standings-table-tight .club-name {
  display: inline-block;
  max-width: 21ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.standings-table-tight .pos {
  width: 30px;
}

.standings-table-tight .pts,
.standings-table-tight .num {
  text-align: center;
}

.standings-table-tight th:nth-child(3),
.standings-table-tight th:nth-child(4),
.standings-table-tight th:nth-child(5),
.standings-table-tight th:nth-child(6),
.standings-table-tight td:nth-child(3),
.standings-table-tight td:nth-child(4),
.standings-table-tight td:nth-child(5),
.standings-table-tight td:nth-child(6) {
  width: 1%;
}
.standings-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}
.standings-table .pos {
  color: #8f98a8;
  font-weight: 700;
  width: 36px;
  text-align: center;
}
.standings-table .club {
  display: flex;
  align-items: center;
  gap: 10px;
}
.standings-table .club-name {
  color: #fff;
  font-weight: 700;
}
.standings-table a.club {
  color: inherit;
  text-decoration: none;
}
.standings-table a.club:hover .club-name {
  color: var(--red);
}
.standings-table .pts {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.standings-table .num {
  color: #c7ceda;
  font-variant-numeric: tabular-nums;
}
/* Podium accents on the left edge, like the league's qualification bars. */
.standings-table tr.zone-1 td:first-child {
  box-shadow: inset 3px 0 0 #d4af37;
}
.standings-table tr.zone-2 td:first-child {
  box-shadow: inset 3px 0 0 #c0c7d1;
}
.standings-table tr.zone-3 td:first-child {
  box-shadow: inset 3px 0 0 #b87333;
}

/* Game sheet: the quick event table. One row per checked-in player; the three
   event buttons carry live counts, and the editor row expands beneath. */
.event-btns {
  white-space: nowrap;
}
.event-btn {
  display: inline-block;
  min-width: 46px;
  margin-right: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
}
.event-btn:hover {
  border-color: var(--red);
}
.event-btn.event-has {
  border-color: var(--red);
  background: #fdf1ef;
}
tr[data-editor-row] > td {
  background: #fbf7f2;
}
.event-editor {
  align-items: center;
}
.event-editor-label {
  font-weight: 600;
}
.event-editor input[type="radio"] {
  width: auto;
  margin: 0 4px 0 0;
}
.count-pick {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  white-space: nowrap;
}
.event-editor .minute-box {
  width: 74px;
  flex: 0 0 74px;
  text-align: center;
  font-weight: 700;
}
own-goal-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 10px;
}

.button {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: var(--red);
  color: #fff;
}

.button-primary:hover {
  background: var(--red-dark);
}

.fineprint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

.fineprint a {
  color: var(--red-dark);
}

/* Alerts */

.alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.alert-error {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #7d1a14;
}

.alert-warn {
  background: #fff7e0;
  border: 1px solid #f0dc9a;
  color: #6b5300;
}

/* Success page */

.success-crest {
  width: 64px;
  height: auto;
  margin-bottom: 8px;
}

.next-steps {
  text-align: left;
  display: inline-block;
  margin: 0 auto 20px;
}

.next-steps li {
  margin-bottom: 6px;
}

/* Admin table */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #eef1f6;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e8ecf4;
  color: var(--navy-800);
}

.badge-team {
  background: #fff3d6;
  color: #8a6100;
}

.muted {
  color: var(--muted);
}

/* Footer */

.site-footer {
  margin-top: 32px;
  background: linear-gradient(180deg, #0f2a54 0%, var(--navy-800) 100%);
  border-top: 3px solid var(--red);
  padding: 24px 0;
  font-size: 0.9rem;
  color: var(--silver);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-copy {
  margin: 0;
  color: var(--silver-dim);
  line-height: 1.5;
}

.footer-meta {
  margin: 10px 0 0;
  color: var(--silver);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links-col .footer-copy {
  margin-bottom: 10px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.footer-nav a,
.footer-copy a {
  color: var(--silver);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-copy a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }
}

/* Legacy footer classes used by prebuilt docs pages */
.footer-line {
  margin: 0;
}

.footer-line + .footer-line {
  margin-top: 6px;
}

.footer-line.footer-muted {
  color: var(--silver-dim);
}

.footer-line a {
  color: var(--silver);
}

/* Honeypot: visually hidden but present in the DOM for bots to fill */
.hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
}

/* Payments & dashboards */

.button-secondary {
  background: transparent;
  color: var(--navy-800);
  border: 2px solid var(--navy-800);
  padding: 10px 20px;
}

.button-secondary:hover {
  background: var(--navy-800);
  color: #fff;
}

.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert-ok {
  background: #e6f4ea;
  border: 1px solid #b7dfc2;
  color: #1e5c2e;
}

.pay-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.fee-line {
  font-size: 1.05rem;
}

.reference-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--navy-800);
  color: var(--silver);
  padding: 10px 18px;
  border-radius: 8px;
  display: inline-block;
  margin: 8px 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.stat {
  background: #f2f5fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy-800);
}

.team-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

/* team-card used directly on the dark page background (game sheets) */
main > .team-card,
.team-card.standalone {
  border-top: 4px solid var(--red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.team-card h3 {
  margin: 0 0 4px;
}

.team-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.team-card h3 a:hover {
  color: var(--red-dark);
}

.club-link {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.club-link a {
  color: var(--red-dark);
  font-weight: 600;
}

.team-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.inline-form .field {
  margin-bottom: 0;
  flex: 1 1 140px;
}

.inline-form .button {
  flex: 0 0 auto;
}

.section-gap {
  margin-top: 32px;
}

.badge-paid {
  background: #e6f4ea;
  color: #1e5c2e;
}

.badge-champ {
  background: #fdf0c8;
  color: #8a6d00;
  border: 1px solid #e8cf7a;
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.season-tab {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0f0f3;
  color: #333;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.season-tab:hover {
  background: #e4e4ea;
}

.season-tab-active {
  background: var(--brand, #1e5c2e);
  color: #fff;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lead-grid .card {
  margin: 0;
}

@media (max-width: 760px) {
  .lead-grid {
    grid-template-columns: 1fr;
  }
}

.lead-hl {
  background: #fdf0c8;
}

.award-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.award {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fdf0c8;
  border: 1px solid #e8cf7a;
  border-radius: 8px;
  padding: 12px;
}

.award-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.award-title {
  font-weight: 700;
  color: #8a6d00;
}

.award .fineprint {
  margin-top: 2px;
}

/* Verbatim document rendering (PDF -> HTML) */
.doc-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 90px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.doc-toc h2 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-toc ol {
  margin: 0;
  padding-left: 18px;
}

.doc-toc li {
  margin: 4px 0;
}

.doc-toc a {
  color: var(--ink);
  text-decoration: none;
}

.doc-toc a:hover {
  text-decoration: underline;
}

.doc-toc-l3 {
  margin-left: 10px;
  font-size: 0.92em;
}

.doc-readable {
  min-width: 0;
}

.doc-readable a[id^="rule-"] {
  scroll-margin-top: 86px;
}

.doc-h2,
.doc-h3 {
  scroll-margin-top: 86px;
}

.doc-h2 {
  margin: 16px 0 8px;
  font-size: 1.06rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-h3 {
  margin: 14px 0 8px;
  font-size: 0.98rem;
}

.doc-p,
.doc-clause {
  margin: 0 0 9px;
  line-height: 1.58;
}

.doc-clause {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}

.doc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  white-space: nowrap;
}

.doc-list {
  margin: 0 0 10px 20px;
  padding: 0;
}

.doc-list li {
  margin-bottom: 5px;
  line-height: 1.55;
}

/* Rule index */
.rule {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}

.rule-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--red-dark);
}

.rule-quote {
  white-space: pre-wrap;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.88rem;
  color: var(--ink);
}

.rule-source {
  font-size: 0.8rem;
  color: var(--muted);
}

.rule-ref {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red-dark);
  background: #fdecea;
  border: 1px solid #f5c6c0;
  border-radius: 999px;
  padding: 1px 8px;
  text-decoration: none;
  white-space: nowrap;
}

.rule-ref:hover {
  background: var(--red);
  color: #fff;
}

.reason {
  font-size: 0.88rem;
  margin: 2px 0;
}

.search-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.search-results .card {
  margin: 0;
}

@media (max-width: 760px) {
  .search-results {
    grid-template-columns: 1fr;
  }
}

.pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.pager .muted {
  font-size: 0.9rem;
}

.badge-unpaid {
  background: #fdecea;
  color: #7d1a14;
}

.badge-watch {
  background: #fff3d6;
  color: #8a6100;
}

.badge-warning {
  background: #fdecea;
  color: #a81e26;
}

.warning-card {
  border: 1px solid #f0dc9a;
  border-left: 4px solid #d9a400;
  background: #fffbea;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.warning-card.warning-high {
  border-color: #f5c6c0;
  border-left-color: var(--red);
  background: #fdf1f0;
}

.warning-head {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.pregame-card {
  border-left: 4px solid #d9a400;
}

/* Game day hub & league pages */

.hub-match {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.hub-vs {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.hub-meta {
  color: var(--muted);
  margin-bottom: 12px;
}

.score {
  color: var(--red-dark);
  padding: 0 8px;
}

.profile-initial {
  font-size: 3rem;
  font-weight: 800;
}

/* Record keeping */

.badge-watch {
  background: #fff3d6;
  color: #8a6100;
}

code {
  background: #f2f5fa;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Unified login */

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 720px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

/* Digital game sheet */

.button-small {
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.photo-cell {
  position: relative;
  width: 56px;
}

.sheet-photo {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--navy-800);
}

.sheet-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  font-weight: 800;
}

.check-dot {
  position: absolute;
  top: -4px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e7b34;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.row-checked td {
  background: #f2faf4;
}

.account-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 560px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.account-photo {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--navy-800);
}

.account-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  font-weight: 700;
}

/* --- In-app glossary (role-scoped help) --- */
.glossary-item {
  border: 1px solid rgba(233, 237, 245, 0.15);
  border-radius: 8px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.glossary-item summary {
  cursor: pointer;
  padding: 12px 16px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.glossary-item summary::-webkit-details-marker {
  display: none;
}

.glossary-item summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.glossary-item[open] summary::before {
  transform: rotate(90deg);
}

.glossary-item summary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.glossary-body {
  padding: 4px 16px 14px 30px;
  border-top: 1px solid rgba(233, 237, 245, 0.1);
}

.glossary-body p {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.glossary-body strong {
  color: var(--red-dark);
}

/* =========================================================================
   DARK THEME OVERRIDES — the whole app in the broadcast look of the
   reference league sites: dark surfaces, light type, red accents.
   ========================================================================= */

input,
select,
textarea {
  background: var(--navy-700);
  color: var(--ink);
  border-color: var(--line);
}

input::placeholder,
textarea::placeholder {
  color: #6b7484;
}

th {
  background: var(--navy-700);
  color: var(--muted);
}

.badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--silver);
}

.badge-team {
  background: rgba(212, 175, 55, 0.16);
  color: #e8c96a;
}

.badge-paid {
  background: rgba(46, 160, 67, 0.18);
  color: #7ee2a0;
}

.badge-unpaid {
  background: rgba(210, 39, 48, 0.18);
  color: #ff9a9a;
}

.badge-watch {
  background: rgba(217, 164, 0, 0.18);
  color: #f0c75e;
}

.badge-warning {
  background: rgba(210, 39, 48, 0.2);
  color: #ff9a9a;
}

.badge-champ {
  background: rgba(212, 175, 55, 0.18);
  color: #e8c96a;
  border-color: rgba(212, 175, 55, 0.35);
}

.alert-error {
  background: rgba(210, 39, 48, 0.14);
  border: 1px solid rgba(210, 39, 48, 0.4);
  color: #ffb3b3;
}

.alert-warn {
  background: rgba(217, 164, 0, 0.14);
  border: 1px solid rgba(217, 164, 0, 0.4);
  color: #f0c75e;
}

.alert-ok {
  background: rgba(46, 160, 67, 0.14);
  border: 1px solid rgba(46, 160, 67, 0.4);
  color: #8fe3a8;
}

.button-secondary {
  color: var(--silver);
  border-color: rgba(255, 255, 255, 0.28);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.stat {
  background: var(--navy-700);
}

.stat-value {
  color: #fff;
}

.season-tab {
  background: var(--navy-700);
  color: var(--silver-dim);
  border-color: rgba(255, 255, 255, 0.08);
}

.season-tab:hover {
  background: var(--navy-800);
}

.season-tab-active {
  background: var(--red);
  color: #fff;
}

.stats-sort-btn {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.stats-sort-btn:hover {
  color: #fff;
}

.stats-table th.stats-col-active {
  color: #fff;
}

.stats-table.sort-goals td:nth-child(4),
.stats-table.sort-assists td:nth-child(5),
.stats-table.sort-yc td:nth-child(6),
.stats-table.sort-rc td:nth-child(7) {
  background: rgba(210, 39, 48, 0.14);
}

.stats-table.sort-goals th:nth-child(4),
.stats-table.sort-assists th:nth-child(5),
.stats-table.sort-yc th:nth-child(6),
.stats-table.sort-rc th:nth-child(7) {
  background: rgba(210, 39, 48, 0.2);
}

/* Goalies table: same red column highlight for the sorted column (GP/GA/CS). */
.stats-table.sort-gp td:nth-child(3),
.stats-table.sort-ga td:nth-child(4),
.stats-table.sort-cs td:nth-child(5) {
  background: rgba(210, 39, 48, 0.14);
}

.stats-table.sort-gp th:nth-child(3),
.stats-table.sort-ga th:nth-child(4),
.stats-table.sort-cs th:nth-child(5) {
  background: rgba(210, 39, 48, 0.2);
}

.stats-mode-toggle {
  display: none;
  gap: 8px;
  margin: 0 0 10px;
}

.stats-mode-toggle .button {
  padding: 6px 10px;
}

/* Players / Goalies switch — always visible, unlike the mobile-only column
   toggle above. */
.stats-kind-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.stats-kind-toggle .button {
  padding: 6px 12px;
}

.stats-player-link {
  gap: 8px;
}

/* Goalies: first name over last name, so the row stays compact and short
   words (club abbreviations) never wrap. */
.goalie-name {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.stats-player-photo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 26px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.stats-player-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
}

.stats-legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.stats-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-abbr-text {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--silver);
}

.doc-text,
.rule-quote {
  background: var(--navy-700);
  color: var(--ink);
}

.rule-ref {
  background: rgba(210, 39, 48, 0.16);
  border-color: rgba(210, 39, 48, 0.4);
  color: #ff9a9a;
}

.rule-id {
  color: #ff9a9a;
}

.warning-card {
  background: rgba(217, 164, 0, 0.1);
  border-color: rgba(217, 164, 0, 0.35);
  border-left-color: #d9a400;
}

.warning-card.warning-high {
  background: rgba(210, 39, 48, 0.12);
  border-color: rgba(210, 39, 48, 0.35);
}

.award,
.lead-hl {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

.award-title {
  color: #e8c96a;
}

code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--silver);
}

.event-btn {
  background: var(--navy-700);
  color: var(--ink);
}

.event-btn.event-has {
  background: rgba(210, 39, 48, 0.16);
}

tr[data-editor-row] > td {
  background: var(--navy-700);
}

.row-checked td {
  background: rgba(46, 160, 67, 0.1);
}

.fineprint a,
.club-link a {
  color: #ff9a9a;
}

.team-card h3 a {
  color: #fff;
}

.score {
  color: #ff9a9a;
}

.sheet-photo {
  background: var(--navy-700);
}

/* Clickable score cards */
a.score-card {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.score-card:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}

/* Public match page */
.match-hero {
  background: var(--navy-800);
  border-radius: 12px;
  padding: 28px;
  color: #fff;
}

.match-hero .match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: center;
}

.match-hero .match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.match-hero .match-team .team-dot {
  width: 56px;
  height: 56px;
  font-size: 1rem;
}

.match-hero .match-team-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.match-hero .match-team-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.match-hero .match-team-link:hover .match-team-name {
  color: var(--red);
}

.match-hero .match-score {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.match-hero .match-meta {
  text-align: center;
  color: #8f98a8;
  font-size: 0.85rem;
  margin-top: 16px;
}

.match-hero .match-status-row {
  text-align: center;
}

.match-hero .match-status {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.timeline .minute {
  min-width: 42px;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 760px) {
  .lineup-grid {
    grid-template-columns: 1fr;
  }
}

.lineup-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lineup-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.lineup-list .jersey {
  min-width: 34px;
  color: var(--muted);
  font-weight: 700;
}

/* =========================================================================
   MATCH PAGE — MLS-style layout: main column + sidebar, two-column event
   timeline, Match Facts table, other-games list.
   ========================================================================= */

.match-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .match-layout {
    grid-template-columns: 1fr;
  }
}

/* Live team page layout */
.team-page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-page-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-page-club-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--navy-700);
  border: 1px solid var(--line);
}

.team-page-team-dot {
  width: 42px;
  height: 42px;
  font-size: 0.86rem;
}

.team-page-brand h1 {
  margin: 0 0 4px;
}

.team-page-club-link {
  margin: 0;
}

/* Next game — the team's next fixture, above the results strips. */
.team-next-game {
  background: var(--navy-800);
}

.team-next-when {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.team-next-vs {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.team-next-game .fineprint {
  margin: 0;
}

/* The team page's results and fixtures are one horizontal row of cards each
   (the date rides on the card), so the strips run the full width rather than
   stacking a column of one-card date groups. */
.team-page-strips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.team-page-strips .scores-row {
  justify-content: flex-start;
}

.team-page-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.team-page-widgets > .card {
  margin-top: 0;
}

/* Club sponsors — logo cards that link out to the sponsor's site. */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

a.sponsor-card:hover {
  border-color: var(--red);
}

.sponsor-logo {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
}

.sponsor-name {
  font-weight: 700;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .team-page-widgets {
    grid-template-columns: 1fr;
  }
}

.match-main > .card:first-child,
.match-side > .card:first-child {
  margin-top: 0;
}

/* Match events summary + feed table. */
.events-head {
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.events-head.events-head-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.events-head a {
  color: inherit;
  text-decoration: none;
}

.events-head a:hover {
  color: #fff;
}

.events-head-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.events-head-team a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.events-head-team .team-dot {
  width: 22px;
  height: 22px;
  font-size: 0.54rem;
}

.events-head-team a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.events-head-score {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.events-table th,
.events-table td {
  vertical-align: middle;
}

.events-table .ev-score {
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.events-table .ev-minute {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.events-table .ev-icon {
  width: 30px;
  text-align: center;
}

.events-table .ev-player a {
  color: #fff;
  text-decoration: none;
}

.events-table .ev-player strong {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.events-table .ev-player-fn,
.events-table .ev-player-ln {
  display: block;
}

.events-table .ev-player a:hover {
  color: var(--red);
}

.events-table .ev-team {
  width: 42px;
}

.events-table .ev-team .team-dot {
  width: 22px;
  height: 22px;
  font-size: 0.54rem;
}

.ev-card {
  display: inline-block;
  width: 11px;
  height: 15px;
  border-radius: 2px;
}

.ev-yellow {
  background: #f2c94c;
}

.ev-red {
  background: #d22730;
}

/* Match Facts */
.facts-table th {
  width: 130px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.facts-table td {
  border-bottom: 1px solid var(--line);
}

.facts-table tr:last-child th,
.facts-table tr:last-child td {
  border-bottom: 0;
}

.facts-table a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.facts-table a:hover {
  color: var(--red);
}

/* Sidebar: other league games */
.side-day {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0 6px;
}

.side-day:first-of-type {
  margin-top: 0;
}

.side-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--silver);
  border: 1px solid transparent;
}

.side-game:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: #fff;
}

.side-teams {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.side-teams a {
  color: inherit;
  text-decoration: none;
}

.side-teams a:hover {
  color: #fff;
}

.side-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.side-score a {
  color: inherit;
  text-decoration: none;
}

.side-score a:hover {
  color: #fff;
}

/* Match page lineups: selfie thumbnails + linked names. */
.lineup-photo {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-700);
}

.lineup-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--silver);
  border: 1px solid var(--line);
}

.lineup-list a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.lineup-list a:hover {
  color: var(--red);
}

.motm-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.motm-photo {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--navy-700);
  flex: none;
}

.motm-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--silver);
  border: 1px solid var(--line);
}

.motm-meta p {
  margin: 0;
}

.motm-team-line {
  margin-top: 8px;
}

.motm-note {
  margin-top: 8px;
}

.ev-who a {
  color: #fff;
  text-decoration: none;
}

.ev-who a:hover {
  color: var(--red);
}

/* Mobile tightening for match + data tables so content doesn't clip/cut off. */
@media (max-width: 760px) {
  main.container {
    padding: 20px 14px 36px;
  }

  /* Headings and body copy read oversized on a phone. */
  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1rem;
    margin: 18px 0 8px;
  }

  .lede {
    font-size: 0.95rem;
    margin-bottom: 14px;
  }

  /* Long inline strings (CSV headers, URLs, tokens) must wrap rather than
     push the page sideways. */
  code {
    overflow-wrap: anywhere;
  }

  /* Grid and flex children must be allowed to shrink below their content
     width — otherwise a wide table inside a card pushes the whole page
     sideways and every page gains a horizontal scrollbar. */
  .team-page-widgets > *,
  .team-page-strips > *,
  .match-layout > *,
  .doc-layout > *,
  .lead-grid > *,
  .search-results > *,
  .account-grid > *,
  .auth-grid > *,
  .grid-2 > *,
  .footer-grid > *,
  .lineup-grid > *,
  .stat-grid > * {
    min-width: 0;
  }

  .card {
    padding: 18px 14px;
  }

  .standings-card.standings-division-card {
    padding: 0;
  }

  .standings-card.standings-division-card h2 {
    padding: 12px 12px 8px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .stats-mode-toggle {
    display: flex;
    flex-wrap: wrap;
  }

  .stats-table.stats-mode-performance th:nth-child(6),
  .stats-table.stats-mode-performance th:nth-child(7),
  .stats-table.stats-mode-performance td:nth-child(6),
  .stats-table.stats-mode-performance td:nth-child(7) {
    display: none;
  }

  .stats-table.stats-mode-discipline th:nth-child(4),
  .stats-table.stats-mode-discipline th:nth-child(5),
  .stats-table.stats-mode-discipline td:nth-child(4),
  .stats-table.stats-mode-discipline td:nth-child(5) {
    display: none;
  }

  table {
    width: 100%;
    min-width: 0;
  }

  /* Wide tables (a club's 10-column team table, the admin ledgers) keep their
     natural width and scroll inside .table-wrap instead of being squashed into
     unreadable wrapped columns. The compact standings table is excluded — it's
     tightened below so it fits a phone outright. */
  .table-wrap table:not(.standings-table-tight) {
    min-width: max-content;
  }

  /* Standings: shrink the club column and the numeric padding so the whole
     table fits a phone instead of scrolling sideways. */
  .standings-table {
    font-size: 0.8rem;
  }

  .standings-table .pos {
    width: 22px;
  }

  .standings-table-tight .club-name {
    max-width: 11ch;
  }

  .standings-table-tight th,
  .standings-table-tight td {
    padding: 7px 5px;
  }

  th,
  td {
    padding: 8px 6px;
    font-size: 0.82rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .match-hero {
    padding: 18px 14px;
  }

  .match-hero .match-teams {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .match-hero .match-team {
    min-width: 0;
  }

  .match-hero .match-team-link {
    gap: 4px;
  }

  .match-hero .match-team .team-dot {
    width: 44px;
    height: 44px;
    font-size: 0.84rem;
  }

  .match-hero .match-team-name {
    font-size: 1rem;
  }

  .match-hero .match-score {
    font-size: 2rem;
    line-height: 1.1;
    margin: 2px 0;
  }

  .match-hero .match-meta {
    margin-top: 12px;
    line-height: 1.45;
  }

  .events-head {
    gap: 6px;
    padding: 0 0 8px;
  }

  .events-head-team {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .events-table th,
  .events-table td {
    font-size: 0.8rem;
    padding: 7px 6px;
  }

  .events-table .ev-label {
    white-space: normal;
  }

  .facts-table {
    table-layout: fixed;
  }

  .facts-table th {
    width: 86px;
  }

  .side-game {
    flex-wrap: wrap;
  }

  .side-teams {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .side-score {
    margin-left: auto;
  }

  .lineup-list li {
    align-items: flex-start;
  }

  .lineup-list a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .motm-card {
    align-items: flex-start;
  }

  .motm-photo {
    width: 78px;
    height: 78px;
  }

  .doc-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .doc-toc {
    position: static;
    top: auto;
    max-height: 38vh;
    overflow: auto;
  }

  .doc-clause {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .doc-num {
    font-size: 0.78rem;
  }

  /* Team page: the hero, the next-game card and the score strips all read too
     large on a phone — tighten them so a club's page fits a screen. */
  .team-page-brand {
    gap: 10px;
  }

  .team-page-club-logo {
    width: 44px;
    height: 44px;
  }

  .team-page-team-dot {
    width: 34px;
    height: 34px;
    font-size: 0.76rem;
  }

  .team-next-when {
    font-size: 1rem;
  }

  .team-next-vs {
    font-size: 0.95rem;
  }

  .scores-strip {
    padding: 12px;
  }

  .scores-strip h2 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .scores-group {
    margin-bottom: 10px;
  }

  .score-card {
    min-width: 150px;
    padding: 8px 10px;
  }

  .score-team .team-dot {
    width: 20px;
    height: 20px;
    font-size: 0.5rem;
  }

  .score-abbr {
    font-size: 0.8rem;
  }

  .score-num {
    font-size: 0.95rem;
  }
}
