/* SSBHL theme — drawn from the club crest: harbour navy, ribbon red,
   engraved-sea slate. Display voice is Barlow Condensed (scoreboard caps);
   prose is Barlow. Self-hosted fonts live in static/fonts. */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-400-latin.b9b596c7d618.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-600-latin.862116afc1c2.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-condensed-600-latin.965395aad327.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-700-latin.db3da8cffd10.woff2") format("woff2");
}

:root {
  /* Crest palette */
  --navy-900: #101a2e;
  --navy-800: #1a2440;
  --navy-700: #2a3757;
  --red-600: #c8232f;
  --red-700: #9f1c26;
  --sea-700: #44566b;
  --sea-600: #5b7086;
  --sea-300: #b9c8d4;
  --sea-200: #d8e0e8;
  --sea-100: #eef2f6;

  /* Roles (legacy names kept so nothing breaks) */
  --ink: #1d2636;
  --muted: var(--sea-600);
  --line: var(--sea-200);
  --bg: #f4f6f8;
  --panel: #ffffff;
  --brand: var(--red-600);
  --brand-dark: var(--red-700);
  --ok-bg: #e3f2e8;
  --ok-ink: #1d6b34;
  --err-bg: #fbeaeb;
  --err-ink: #a12026;
  --warn-bg: #fdf3dd;
  --warn-ink: #7a5c14;

  --font-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Segoe UI", Roboto,
    sans-serif;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 26, 46, 0.06), 0 1px 6px rgba(16, 26, 46, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--navy-700); }
a:hover { color: var(--red-600); }

:focus-visible {
  outline: 2px solid var(--red-600);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background: #fff;
  color: var(--navy-800);
  font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }

/* Header — crest field with a red keel line, echoing the ribbon */
.site-header {
  background: var(--navy-800);
  color: #fff;
  border-bottom: 3px solid var(--red-600);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}
.brand-crest {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: block;
  /* White chip behind the transparent crest so it reads against the navy bar */
  background: #fff;
  padding: 3px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.07em;
}
.brand-full {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sea-300);
}
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
}
.nav-toggle { display: none; }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 0.25rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--red-600);
}

.inline-form { display: inline; }
.link-button {
  background: none;
  border: none;
  padding: 0.25rem 0.1rem;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.link-button:hover { color: #fff; }

/* Sub nav (staff) */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 1rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}
.sub-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sea-700);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
}
.sub-nav a:hover { background: var(--sea-100); color: var(--navy-800); }

main.container { padding-top: 1.4rem; padding-bottom: 3rem; min-height: 70vh; }

/* Headings — condensed caps; h1 carries the pennant rule */
h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--navy-800);
}
h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 0.5rem 0 1.1rem;
}
h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 0.45rem;
  background: var(--red-600);
  transform: skewX(-18deg);
}
h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 1.8rem 0 0.6rem;
}
/* Stage subheadings inside a section (Regular Season / Playoffs tables) */
.stage-heading {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--navy-800);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 1.2rem 0 0.5rem;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.narrow { max-width: 480px; }

/* Home hero - the transparent crest sits directly on the white panel */
.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.6rem 2rem;
  margin: 0.4rem 0 1.6rem;
}
.hero-crest { width: 190px; height: 190px; flex-shrink: 0; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin: 0;
  line-height: 1.05;
}
.hero h1 .hero-red { color: var(--red-600); display: block; }
.hero-season {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}
.hero-season strong { color: var(--ink); }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 560px) {
  .hero { padding: 1.3rem 1.2rem; justify-content: center; text-align: center; }
  .hero-crest { width: 130px; height: 130px; }
  .hero h1::after { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

/* Messages */
.messages { list-style: none; padding: 0; margin: 1rem 0; }
.message { padding: 0.6rem 0.9rem; border-radius: 8px; margin-bottom: 0.5rem; }
.message.success { background: var(--ok-bg); color: var(--ok-ink); }
.message.error { background: var(--err-bg); color: var(--err-ink); }
.message.info, .message.warning { background: var(--warn-bg); color: var(--warn-ink); }

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* separate border model: collapsed borders do not travel with sticky cells */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--sea-100);
  white-space: nowrap;
}
td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background-color: #f6f9fb; }
th {
  font-family: var(--font-display);
  font-weight: 600;
  background-color: var(--sea-100);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sea-700);
}

/* Scroll-affordance shell — tables.js wraps each .table-wrap in a
   .table-shell and keeps these classes in sync with the scroll position */
.table-shell { position: relative; }
.table-shell::before, .table-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.table-shell::before {
  left: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(to right, rgba(16, 26, 46, 0.16), rgba(16, 26, 46, 0));
}
.table-shell::after {
  right: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(to left, rgba(16, 26, 46, 0.16), rgba(16, 26, 46, 0));
}
.table-shell.scrollable:not(.at-start)::before { opacity: 1; }
.table-shell.scrollable:not(.at-end)::after { opacity: 1; }
/* stats tables pin their first column, so the left fade would just
   shade the pinned cells — drop it there */
.table-shell:has(.stats-table)::before { content: none; }
.actions { text-align: right; }
.actions a { margin-left: 0.7rem; }
.actions .inline-form { margin-left: 0.7rem; }
.table-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--navy-700);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}
.table-link-button:hover { color: var(--red-600); }
.actions-col { width: 1%; }
.totals-row td, .totals-row th {
  border-top: 2px solid var(--line);
  border-bottom: none;
  font-weight: 600;
  background: var(--sea-100);
}
.totals-row th {
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
  font-size: inherit;
  font-family: var(--font-body);
}

/* Scoreboard treatment for public stats tables */
.stats-table thead th {
  background-color: var(--navy-800);
  color: #fff;
  border-bottom: 2px solid var(--red-600);
}
.stats-table th a { color: var(--sea-300); text-decoration: none; }
.stats-table th a:hover { color: #fff; }
.stats-table tbody tr:nth-child(even) td { background-color: #f7f9fb; }
.stats-table tbody tr:hover td { background-color: var(--sea-100); }

/* First column stays put while the rest scrolls (team/player context) */
.stats-table th:first-child, .stats-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: var(--panel);
}
.stats-table thead th:first-child { z-index: 2; background-color: var(--navy-800); }
.stats-mobile-team { display: none; }

.team-cell .logo-thumb { margin-right: 0.45rem; }

/* Columns that phones can live without */
@media (max-width: 600px) {
  .col-secondary { display: none; }
  .full-stats-table .stats-team-col { display: none; }
  .full-stats-table th:first-child,
  .full-stats-table td:first-child {
    min-width: 8.5rem;
    max-width: 9.5rem;
    white-space: normal;
  }
  .stats-mobile-team {
    display: block;
    margin-top: 0.08rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.25;
  }
}

/* Forms */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input[type="text"],
.field input[type="search"],
.field input[type="number"],
.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="time"],
.field input[type="password"],
.field input[type="email"],
.field input[type="url"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--panel);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(26, 36, 64, 0.12);
}
.field ul { list-style: none; padding: 0; margin: 0; }
.field ul li { margin-bottom: 0.2rem; }
.field ul li label { font-weight: 400; display: inline; }
.help { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 0; }
.error { color: var(--err-ink); font-size: 0.9rem; margin: 0.2rem 0 0; }
.errorlist { background: var(--err-bg); color: var(--err-ink); border-radius: 8px; padding: 0.6rem 1.4rem; }
.has-error input, .has-error select { border-color: var(--err-ink); }

.form-actions { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.search-form { display: flex; gap: 0.5rem; margin: 0.8rem 0; max-width: 380px; }
.search-form input { flex: 1; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* Buttons */
.button {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--sea-200);
  border-radius: 8px;
  background: var(--panel);
  color: var(--navy-800);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--sea-100); color: var(--navy-800); }
.button.primary { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.button.primary:hover { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.button.danger { background: var(--err-ink); border-color: var(--err-ink); color: #fff; }
.button.danger:hover { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.button.compact { padding: 0.2rem 0.55rem; font-size: 0.8rem; }

/* Cards (staff dashboard) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}
.card:hover { border-color: var(--red-600); color: var(--ink); }
.card h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.card p { margin: 0.2rem 0 0; color: var(--muted); }

.link-list { padding-left: 1.2rem; }
.link-list li { margin-bottom: 0.3rem; }

/* Logos */
.logo-thumb { width: 36px; height: 36px; object-fit: contain; vertical-align: middle; display: inline-block; }
.logo-thumb.placeholder,
.team-crest.placeholder {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--sea-300);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-700), var(--navy-800));
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Team page header - the crest at display size beside the name */
.team-head {
  display: flex;
  align-items: center;
  gap: 1rem 1.75rem;
  margin: 0.6rem 0 1.6rem;
}
.team-crest {
  width: clamp(96px, 20vw, 150px);
  height: clamp(96px, 20vw, 150px);
  object-fit: contain;
  flex-shrink: 0;
}
.team-crest.placeholder { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.team-head h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
}
.team-head .help { margin: 0.4rem 0 0; }
.team-leadership { margin: 0.5rem 0 0; }

/* Badges */
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--sea-100);
  color: var(--sea-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge.playoff { background: var(--warn-bg); color: var(--warn-ink); }
.badge.next { background: var(--ok-bg); color: var(--ok-ink); }

/* Game results entry */
.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}
.attendance-grid fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.6rem 0.9rem;
}
.attendance-grid legend { font-weight: 600; padding: 0 0.3rem; }
.attendance-actions { display: flex; gap: 0.35rem; margin-bottom: 0.35rem; }
.attend-option { display: block; padding: 0.15rem 0; }
.attend-option input { margin-right: 0.4rem; }
.jersey-input { width: 5rem; margin-left: 0.5rem; padding: 0.2rem 0.4rem;
  border: 1px solid var(--line); border-radius: 6px; font: inherit; }

.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.checkbox-field label { font-weight: 600; }

.event-table th { white-space: nowrap; }
.event-table td { vertical-align: top; }
.event-table select, .event-table input[type="text"], .event-table input[type="number"] {
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  max-width: 220px;
}
.event-table input[type="number"] { width: 5.5rem; }
.event-table .flex-name { display: block; margin-top: 0.25rem; }
.checkbox-cell, .delete-cell { text-align: center; }
.remove-label { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.row-deleted { opacity: 0.35; text-decoration: line-through; }
.goalie-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.goalie-sections > section { min-width: 0; }
.goalie-sections th, .goalie-sections td { padding: 0.5rem 0.55rem; }
/* Twelve compact goalie columns sit side-by-side on desktop. Tightening just
   these cells avoids a tiny horizontal overflow that falsely shows the table
   scroll fade at the right edge of otherwise fully visible panels. */
.goalie-sections .box-goalie-table th,
.goalie-sections .box-goalie-table td { padding-inline: 0.4rem; }
.results-help { max-width: 52rem; }

@media (max-width: 600px) {
  .goalie-sections { grid-template-columns: minmax(0, 1fr); }
}

/* News */
.news-post {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
}
.news-post h3 { margin: 0 0 0.2rem; color: var(--navy-800); }
.news-post .meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}
.news-post .body { white-space: pre-wrap; margin: 0; }

/* Commissioner news and the shared formatting preview. */
.news-content { line-height: 1.6; overflow-wrap: anywhere; }
.news-content > :first-child { margin-top: 0; }
.news-content > :last-child { margin-bottom: 0; }
.news-content p { margin: 0 0 1em; }
.news-content ul, .news-content ol { padding-left: 1.6em; }
[data-news-post].is-collapsed .news-content { max-height: 19.2em; overflow: hidden; }
.news-toggle { margin-top: .75rem; font-weight: 600; }
.news-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.news-toolbar[hidden] { display: none; }
[data-preview-panel] { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .5rem; }
[data-preview-panel] h2 { margin-top: 0; }

.news-toggle[hidden], [data-news-preview][hidden] { display: none; }


/* Filters and stats tables */
.filter-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.filter-control {
  display: grid;
  gap: 0.12rem;
  color: var(--sea-700);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.filter-form select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--panel);
}

@media (max-width: 600px) {
  .page-head .filter-form { width: 100%; }
  .page-head .filter-control { flex: 1 1 8rem; }
  .page-head .filter-control select { width: 100%; min-width: 0; }
}

/* Schedule cards retain the semantic table on larger screens, then reflow
   each row into a scan-friendly card when horizontal columns stop helping. */
.schedule-mobile-label { display: none; }
.schedule-matchup a { font-weight: 600; }
.schedule-table .is-next-game td:first-child { box-shadow: inset 4px 0 var(--red-600); }

@media (max-width: 600px) {
  .table-shell:has(.schedule-table)::before,
  .table-shell:has(.schedule-table)::after { content: none; }
  .schedule-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .schedule-table, .schedule-table tbody { display: block; }
  .schedule-table thead { display: none; }
  .schedule-table tbody { display: grid; gap: 0.7rem; }
  .schedule-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "day time"
      "date time"
      "matchup matchup"
      "score details"
      "rink details";
    gap: 0.08rem 0.8rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
  }
  .schedule-table tr.is-next-game { border-left: 4px solid var(--red-600); }
  .schedule-table td,
  .schedule-table th:first-child,
  .schedule-table td:first-child {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    white-space: normal;
  }
  .schedule-table tbody tr:nth-child(even) td,
  .schedule-table tbody tr:hover td { background: transparent; }
  .schedule-day {
    grid-area: day;
    color: var(--sea-700);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  .schedule-date { grid-area: date; color: var(--muted); font-size: 0.9rem; }
  .schedule-time {
    grid-area: time;
    align-self: center;
    color: var(--navy-800);
    font-weight: 600;
  }
  .schedule-matchup {
    grid-area: matchup;
    padding-top: 0.45rem !important;
    font-size: 1.05rem;
  }
  .schedule-score { grid-area: score; padding-top: 0.35rem !important; }
  .schedule-score strong { color: var(--red-700); }
  .schedule-rink { grid-area: rink; color: var(--muted); font-size: 0.88rem; }
  .schedule-mobile-label {
    display: inline;
    margin-right: 0.35rem;
    color: var(--sea-700);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .schedule-details { grid-area: details; align-self: end; }
  .schedule-details a { font-weight: 600; }
}

/* Public game detail — a compact arena-style scoreboard establishes the
   result before the denser event and box-score tables. */
.game-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 4px solid var(--red-600);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-700));
  box-shadow: 0 4px 14px rgba(16, 26, 46, 0.16);
  color: #fff;
}
.scoreboard-team {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-width: 0;
  text-align: center;
}
.scoreboard-team strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.1;
  text-transform: uppercase;
}
.scoreboard-team > span {
  color: var(--sea-300);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scoreboard-logo {
  width: 66px;
  height: 66px;
  padding: 0.3rem;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}
.scoreboard-team > .scoreboard-logo-placeholder {
  display: grid;
  place-items: center;
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.scoreboard-result { min-width: 8rem; text-align: center; }
.scoreboard-status {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--red-600);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scoreboard-score {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  color: #fff;
  font-size: clamp(2.7rem, 7vw, 4.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.scoreboard-score::after { content: none; }
.game-meta { margin: 0.75rem 0; text-align: center; }
.game-facts {
  display: flex;
  justify-content: center;
  gap: 0.55rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.game-facts p { margin: 0; }
.game-facts p > span:first-child {
  margin-right: 0.45rem;
  color: var(--sea-700);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.game-video { text-align: center; }
.imported-note { margin: 1.25rem 0; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 600px) {
  .game-scoreboard { gap: 0.45rem; padding: 1rem 0.65rem; }
  .scoreboard-logo { width: 48px; height: 48px; border-radius: 9px; }
  .scoreboard-team strong { font-size: 0.9rem; }
  .scoreboard-result { min-width: 6.3rem; }
  .scoreboard-score { gap: 0.25rem; font-size: 2.55rem; }
  .game-facts { justify-content: flex-start; }
}

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Pagination */
.pagination { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }

/* Footer — harbour bar bookending the header */
.site-footer {
  background: var(--navy-800);
  color: var(--sea-300);
  font-size: 0.85rem;
  padding: 1.4rem 0;
  margin-top: 2rem;
}
.site-footer a { color: var(--sea-300); }
.site-footer a:hover { color: #fff; }
.footer-inner { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.footer-crest {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

/* Error pages */
.error-page { text-align: center; padding: 3rem 1rem 2rem; }
.error-code {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--sea-300);
  margin: 0;
}
.error-page h1::after { margin-left: auto; margin-right: auto; }
.error-page .hero-actions { justify-content: center; }

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

/* Compact, non-sticky header on phones — screen space beats pinned nav */
@media (max-width: 700px) {
  .site-header { position: static; }
  .brand-full { display: none; }
  .brand-crest { width: 36px; height: 36px; }
  .brand-name { font-size: 1.3rem; }
  .header-inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .site-nav { gap: 0.15rem 0.85rem; }
  .site-nav a, .link-button { font-size: 0.95rem; }
}

@media (max-width: 560px) {
  .nav-enhanced .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.38rem 0.6rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before, .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-icon::before { top: -5px; }
  .nav-toggle-icon::after { top: 5px; }
  .nav-enhanced .site-nav {
    display: none;
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding-top: 0.25rem;
  }
  .nav-enhanced .site-nav.is-open { display: grid; }
  .nav-enhanced .site-nav a,
  .nav-enhanced .site-nav .link-button {
    display: block;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
  }
  .nav-enhanced .site-nav a[aria-current="page"] {
    border-color: var(--red-600);
    background: rgba(200, 35, 47, 0.18);
  }
  .nav-enhanced .site-nav .inline-form { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .button, .card, a { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
  .table-shell::before, .table-shell::after { transition: opacity 0.18s ease; }
}

/* Team sections are real links, so filters, bookmarks and Back work without JS. */
.team-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 1.5rem 0;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.team-tabs a {
  padding: .65rem .9rem;
  border-radius: .35rem;
  font-weight: 600;
  text-decoration: none;
}
.team-tabs a[aria-current="page"] {
  background: var(--navy-800);
  color: #fff;
}
.team-tabs a:hover { text-decoration: underline; }
