* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #111;
  color: #eee;
  font-family: "Source Sans 3", sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d4a800;
  outline-offset: 4px;
}
button[hidden],
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: #ffe000;
  color: #111;
  padding: 16px;
}
.skip-link:focus {
  top: 16px;
}
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
:root {
  --bg: #0a0a0a;
  --surface: #131313;
  --surface-2: #232323;
  --text: #f6f6f2;
  --muted: #b0b0aa;
  --border: #333;
  --accent: #ffe000;
  --on-accent: #111;
  --red: #ee4b42;
  --red-text: #ff817a;
  --metadata: #f2f2ea;
  --on-metadata: #171717;
  --radius: 32px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f6f6f2;
  --surface: #fff;
  --surface-2: #ebebe5;
  --text: #171717;
  --muted: #595953;
  --border: #d1d1c9;
  --accent: #ffe000;
  --red: #b32620;
  --red-text: #b32620;
  --metadata: #202020;
  --on-metadata: #f6f6f2;
}
.app-shell {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  min-height: 850px;
}
.app-rail {
  padding: 24px 10px;
  background: var(--bg);
  border-right: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 36px;
}
.club-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  width: 52px;
  height: 52px;
  overflow: hidden;
}
.club-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.app-rail nav {
  display: grid;
  gap: 14px;
  width: 100%;
}
.app-rail nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 58px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 10px;
  border-radius: 999px;
}
.app-rail nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.app-rail nav a[aria-current] {
  background: var(--accent);
  color: var(--on-accent);
}
.rail-season {
  margin-top: auto;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.app-main {
  min-width: 0;
}
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px 28px;
  border-bottom: 0;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.wordmark img {
  display: none;
  object-fit: contain;
}
.wordmark b {
  font-weight: 300;
}
.wordmark small {
  font-size: 9px;
  letter-spacing: 2.5px;
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.season-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 2px;
}
.icon-button {
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
}
.page-content {
  padding: 24px 28px;
  max-width: 1320px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 6px;
}
.page-head h1 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: clamp(40px, 4.5cqw, 60px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
}
.lede {
  color: var(--muted);
  line-height: 1.55;
  max-width: 580px;
  font-size: 16px;
  margin-bottom: 0;
}
.actions,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.action-row {
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1.2;
  max-width: 100%;
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost {
  background: none;
  color: var(--text);
  border-color: var(--border);
}
.btn-danger {
  color: var(--red-text);
  border-color: var(--red);
  background: none;
}
.btn:hover {
  filter: brightness(0.94);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}
.badge.live,
.badge.red,
.badge.danger {
  color: var(--red-text);
  border-color: var(--red);
}
.badge.live i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.badge.yellow,
.badge.warning,
.badge.active {
  background: var(--accent);
  color: #171717;
  border-color: var(--accent);
}
.badge.success {
  color: var(--text);
}
.panel {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  min-width: 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
  font-weight: 600;
}
.section-head > a {
  font-size: 13px;
  color: var(--muted);
}
.section-head .btn {
  font-size: 12px;
  padding: 10px 15px;
  min-height: 42px;
}
.grid-2,
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.grid-3,
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.split-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.stack {
  display: grid;
  gap: 20px;
}
.stack > .panel {
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px;
  min-width: 0;
}
.stat > span {
  font-size: 12px;
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat > strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 48px;
  line-height: 1;
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat > small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}
.stat.yellow {
  border-top: 3px solid var(--accent);
}
.stat.red {
  border-top: 3px solid var(--red);
}
.team-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
  font-size: 16px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.2px;
}
.crest-plate {
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px #0002;
  flex: none;
}
.crest-plate img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.team-identity.small {
  flex-direction: row;
  text-align: left;
  font-family: "Source Sans 3", sans-serif;
  text-transform: none;
  font-size: 14px;
  gap: 10px;
}
.small .crest-plate {
  width: 38px;
  height: 38px;
}
.small .crest-plate img {
  width: 30px;
  height: 30px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 11px 17px;
  border-radius: 999px;
  min-height: 44px;
}
.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tabs a {
  font-size: 14px;
  min-height: 44px;
  padding: 12px 18px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
}
.tabs a[aria-current] {
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
}
.form-grid .field {
  margin-bottom: 0;
}
.field > span {
  font-size: 14px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
  min-height: 48px;
  font-size: 16px;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
.field small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.check-row {
  display: flex;
  align-items: start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.check-row input {
  width: 20px;
  height: 20px;
  accent-color: #d6b700;
  flex: none;
  margin: 3px 0;
}
.check-row strong {
  font-weight: 600;
  font-size: 15px;
}
.check-row small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 3px;
}
.check-row:last-child {
  border-bottom: 0;
}
.notice {
  display: flex;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}
.notice > .icon {
  color: var(--muted);
  width: 20px;
  height: 20px;
}
.notice strong {
  font-size: 14px;
  font-weight: 600;
}
.notice p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}
.notice.warning,
.notice.yellow {
  border-left: 3px solid var(--accent);
}
.notice.error,
.notice.red {
  border-left: 3px solid var(--red);
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  padding: 14px 12px;
  background: var(--surface-2);
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 600;
}
td .btn {
  min-height: 38px;
  font-size: 12px;
  padding: 8px 12px;
}
td .badge {
  font-size: 10px;
}
.person-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.person-row:last-child {
  border-bottom: 0;
}
.player-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
  font-weight: 600;
  flex: none;
}
.person-row > div {
  flex: 1;
  min-width: 0;
}
.person-row strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.person-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.person-row > .btn {
  padding: 10px 14px;
  min-height: 40px;
  font-size: 12px;
}
.bar-chart > div {
  display: grid;
  grid-template-columns: 120px 1fr 42px;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  font-size: 13px;
}
.bar-chart > div > span {
  color: var(--muted);
}
.bar-chart > div > strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bar-track {
  height: 9px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}
.bar-track i {
  display: block;
  background: var(--accent);
  height: 100%;
  border-radius: 99px;
}
.empty-state {
  text-align: center;
  padding: 42px 24px;
}
.empty-state > .icon {
  width: 44px;
  height: 44px;
  color: var(--muted);
  margin-bottom: 20px;
}
.empty-state h2 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 36px;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 440px;
  margin: 0 auto 24px;
}
.detail-list,
.fact-list {
  margin: 0;
}
.detail-list > div,
.fact-list > div {
  display: flex;
  align-items: baseline;
  gap: 20px;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  font-size: 14px;
}
.detail-list dt,
.fact-list dt {
  color: var(--muted);
}
.detail-list dd,
.fact-list dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}
.reading-panel,
.editorial-copy {
  font-size: 16px;
  line-height: 1.7;
}
.reading-panel h2,
.editorial-copy h2 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.2;
  margin-top: 28px;
}
.reading-panel p,
.editorial-copy p {
  color: var(--muted);
}
.reading-panel li,
.editorial-copy li {
  margin-bottom: 10px;
}
.photo-panel {
  background:
    linear-gradient(90deg, #050505d9, #0a0a0a30),
    url("sports/pitch-evening.webp") center/cover;
  border-radius: var(--radius);
  border: 1px solid #444;
  overflow: hidden;
  color: #fff;
  min-height: 330px;
  padding: 34px;
  margin-bottom: 28px;
  position: relative;
  isolation: isolate;
}
.match-stage::before,
.story-visual::before,
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #080808d9, #08080866);
  z-index: -1;
}
.photo-panel h2 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: clamp(56px, 7cqw, 90px);
  line-height: 0.92;
  max-width: 550px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.photo-panel > .eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #eee;
  text-transform: uppercase;
}
.story-card {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.story-visual {
  position: relative;
  isolation: isolate;
  min-height: 170px;
  background: url("sports/pitch-daylight.webp") center/cover;
  display: flex;
  align-items: end;
  padding: 20px;
  color: #fff;
}
.story-body {
  padding: 22px;
}
.story-body h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 26px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.story-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.story-body > a {
  font-size: 13px;
  font-weight: 600;
}
.match-stage {
  position: relative;
  isolation: isolate;
  min-height: 340px;
  padding: 30px;
  border-radius: var(--radius);
  background: url("sports/pitch-evening.webp") center/cover;
  color: #fff;
  margin-bottom: 24px;
  border: 1px solid #444;
}
.stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #ddd;
  margin-bottom: 26px;
}
.stage-meta .badge {
  color: #fff;
}
.stage-meta .badge.live {
  color: #ff9089;
}
.stage-teams {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr;
  gap: 20px;
  align-items: center;
  max-width: 720px;
  margin: 25px auto;
  text-align: center;
}
.stage-teams .crest-plate {
  width: 92px;
  height: 92px;
}
.stage-teams .crest-plate img {
  width: 75px;
  height: 75px;
}
.stage-teams .team-identity {
  font-size: 25px;
}
.stage-score {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 100px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stage-score small {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: #ddd;
  display: block;
  margin-top: 14px;
  font-weight: 400;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline-item {
  display: flex;
  align-items: start;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.timeline-item > span:first-child {
  min-width: 36px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--muted);
}
.timeline-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.timeline-item:last-child {
  border-bottom: 0;
}
.compact-list {
  display: grid;
}
.compact-row {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.compact-row:last-child {
  border-bottom: 0;
}
.compact-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.score-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 18px 0 0;
  border: 0;
}
.score-strip > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  line-height: 1.5;
}
.score-strip > strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 32px;
  white-space: nowrap;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.auth-card {
  padding: 36px;
  background: var(--surface);
}
.auth-card h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 44px;
  line-height: 1;
  text-transform: uppercase;
}
.auth-card > p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.auth-art {
  position: relative;
  isolation: isolate;
  min-height: 420px;
  background: url("sports/pitch-evening.webp") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 36px;
  color: #fff;
}
.auth-art h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 64px;
  line-height: 0.95;
  text-transform: uppercase;
}
.auth-art p {
  color: #ddd;
  line-height: 1.5;
  font-size: 14px;
}
.video-visual {
  background:
    linear-gradient(#0002, #0008),
    url("sports/pitch-daylight.webp") center/cover;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.video-visual button,
.video-visual a {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
}
.video-visual .icon {
  width: 26px;
  height: 26px;
}
.video-card h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 26px;
  text-transform: uppercase;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 24px 28px;
  border-top: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}
.app-footer a {
  font-size: 12px;
  letter-spacing: 0;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1000px) {
  .page-content {
    padding: 28px;
  }
  .app-topbar {
    padding: 20px 28px;
  }
  .content-grid,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 16px;
  }
  .stat > strong {
    font-size: 40px;
  }
  .page-head .actions {
    max-width: 210px;
  }
  .team-identity {
    font-size: 15px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
    min-height: 800px;
    position: relative;
    padding-bottom: 75px;
  }
  .app-rail {
    display: none;
  }
  .app-topbar {
    padding: 16px 20px;
    min-height: 76px;
  }
  .wordmark {
    font-size: 16px;
    gap: 10px;
  }
  .wordmark img {
    display: block;
    border-radius: 50%;
  }
  .wordmark small {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .app-topbar-right {
    gap: 10px;
  }
  .app-topbar-right > .badge {
    display: none;
  }
  .season-tag {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .icon-button {
    height: 40px;
    min-width: 40px;
  }
  .page-content {
    padding: 20px 16px;
  }
  .page-head {
    align-items: start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }
  .page-head h1 {
    font-size: 40px;
  }
  .page-head .actions {
    max-width: none;
  }
  .lede {
    font-size: 16px;
  }
  .grid-2,
  .grid-3,
  .split-grid,
  .content-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .stack {
    gap: 18px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    border-radius: var(--radius);
    padding: 16px;
  }
  .stat > strong {
    font-size: 42px;
  }
  .panel {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
  }
  .section-head h2 {
    font-size: 25px;
  }
  .section-head {
    gap: 10px;
  }
  .section-head .btn {
    padding: 8px 12px;
    min-height: 38px;
  }
  .photo-panel {
    padding: 28px 24px;
    min-height: 290px;
  }
  .photo-panel h2 {
    font-size: 56px;
  }
  .team-identity {
    font-size: 17px;
  }
  .crest-plate {
    width: 62px;
    height: 62px;
  }
  .crest-plate img {
    width: 51px;
    height: 51px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .field {
    margin-bottom: 20px;
  }
  .tabs {
    gap: 8px;
  }
  .tabs a {
    font-size: 13px;
  }
  .bar-chart > div {
    grid-template-columns: 90px 1fr 35px;
    gap: 8px;
    font-size: 12px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 26px;
  }
  .auth-art {
    min-height: 260px;
    padding: 26px;
  }
  .auth-art h2 {
    font-size: 54px;
  }
  .match-stage {
    padding: 22px 16px;
    min-height: 300px;
  }
  .stage-meta {
    font-size: 11px;
    align-items: start;
  }
  .stage-teams {
    gap: 9px;
    margin: 34px auto;
  }
  .stage-teams .crest-plate {
    width: 72px;
    height: 72px;
  }
  .stage-teams .crest-plate img {
    width: 60px;
    height: 60px;
  }
  .stage-teams .team-identity {
    font-size: 20px;
  }
  .stage-score {
    font-size: 70px;
  }
  .stage-score small {
    font-size: 11px;
  }
  .content-grid > .story-card,
  .grid-3 > .story-card {
    margin-bottom: 20px;
  }
  .app-footer {
    padding: 22px 20px;
    font-size: 8px;
    letter-spacing: 0.7px;
  }
  .mobile-nav {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    width: max-content;
    max-width: calc(100% - 24px);
    gap: 6px;
    background: #080808;
    border: 1px solid #ffffff24;
    border-radius: 999px;
    padding: 5px;
    box-shadow: 0 8px 28px #0006;
    z-index: 3;
  }
  .mobile-nav > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 48px;
    width: 48px;
    min-width: 44px;
    height: 48px;
    background: #272727;
    color: #bdbdbd;
    border-radius: 50%;
    padding: 0;
  }
  .mobile-nav > a > span {
    display: none;
  }
  .mobile-nav > a[aria-current] {
    flex-basis: 88px;
    width: 88px;
    border-radius: 999px;
    background: var(--accent);
    color: #111;
  }
  .mobile-nav .icon {
    width: 20px;
    height: 20px;
  }
  .detail-list > div,
  .fact-list > div {
    gap: 12px;
    font-size: 13px;
  }
  .person-row {
    gap: 12px;
  }
  .person-row > .btn {
    font-size: 11px;
    padding: 10px;
  }
  .reading-panel,
  .editorial-copy {
    font-size: 16px;
  }
  .stage-meta > .btn {
    font-size: 11px;
    padding: 9px 13px;
    min-height: 40px;
  }
  .actions > .btn {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.btn-text,
.btn-quiet {
  color: var(--text);
  background: none;
}
.btn-text {
  padding: 10px 0;
  min-height: 44px;
}
.btn-quiet {
  padding: 10px 12px;
}
.stats:has(.stat:last-child:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stats:has(.stat:last-child:nth-child(2)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats:has(.stat:only-child) {
  grid-template-columns: 1fr;
}
.action-row > .field {
  margin-bottom: 0;
  min-width: 180px;
  flex: 1;
  max-width: 280px;
}
.detail-list,
.fact-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 18px;
}
.detail-list > div,
.fact-list > div {
  grid-column: 1/-1;
}
.detail-list > dt,
.fact-list > dt,
.detail-list > dd,
.fact-list > dd {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.4;
}
.detail-list > dd,
.fact-list > dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}
.detail-list > dt,
.fact-list > dt {
  color: var(--muted);
}
.timeline > li:not(.timeline-item) {
  display: flex;
  align-items: start;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}
.timeline > li:not(.timeline-item) > span {
  min-width: 44px;
  color: var(--muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
}
.timeline > li p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 5px 0 0;
}
.timeline > li:has(> strong) {
  display: block;
}
.availability-player {
  border-bottom: 1px solid var(--border);
  padding: 12px 0 22px;
}
.availability-player:last-child {
  border-bottom: 0;
}
.response-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.response-choice {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 10px;
  min-height: 48px;
  font-size: 13px;
  background: var(--bg);
  cursor: pointer;
}
.response-choice:has(input:checked) {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 600;
}
.response-choice input {
  width: 16px;
  height: 16px;
  accent-color: #171717;
  margin: 0;
}
.video-tile {
  padding: 0;
  overflow: hidden;
}
.video-tile > .stack {
  padding: 0 20px 20px;
  gap: 4px;
}
.video-tile h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.video-tile p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 0;
}
.video-preview {
  border: 0;
  border-radius: 0;
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.video-preview .badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #111;
  color: #fff;
  border-color: #444;
}
.video-preview .btn {
  background: #ffe000;
  color: #111;
  border: 0;
}
.content-grid > .video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.content-grid > .video-card .video-visual {
  border-radius: 0;
  margin-bottom: 0;
}
.video-visual {
  position: relative;
}
.video-visual > .badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: #111;
  color: #fff;
}
.panel > p {
  line-height: 1.55;
  color: var(--muted);
}
.panel h3 {
  font-size: 20px;
  line-height: 1.3;
}
.panel > ol {
  padding-left: 0;
}
.grid-2 > .panel {
  height: fit-content;
}
.content-grid > .story-card {
  display: block;
}
.timeline > li:last-child {
  border-bottom: 0;
}
@media (max-width: 760px) {
  .stats:has(.stat:last-child:nth-child(3)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .response-options {
    gap: 6px;
  }
  .response-choice {
    padding: 12px 8px;
    font-size: 12px;
  }
  .video-preview {
    min-height: 180px;
  }
  .timeline > li:not(.timeline-item) {
    gap: 12px;
  }
  .panel .grid-2 {
    gap: 16px;
  }
  .detail-list > dd,
  .fact-list > dd {
    font-size: 13px;
  }
  .stats .stat:has(> strong) {
    overflow-wrap: anywhere;
  }
  .stat > strong {
    font-size: 40px;
  }
}
/* Keep iPhone date/time controls inside their labelled field. Native pickers remain available. */
input:is([type="date"], [type="time"], [type="datetime-local"]) {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
}
input::-webkit-date-and-time-value {
  min-height: 1.5em;
  text-align: left;
}
html {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}
.form-grid {
  margin-bottom: 22px;
}
.form-grid:last-child {
  margin-bottom: 0;
}
.match-stage {
  overflow: hidden;
}
.match-stage::before {
  border-radius: inherit;
}
.story-visual .badge {
  background: #111;
  color: #f6f6f2;
  border-color: #777;
}
.table-scroll:has(th:nth-child(5)) table {
  min-width: 620px;
}
.table-scroll-hint {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 12px;
}
.selection-list {
  display: grid;
  gap: 0;
}
.selection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.selection-row:last-child {
  border-bottom: 0;
}
.selection-row .person-row {
  border: 0;
  padding: 0;
}
.selection-row .field {
  margin-bottom: 0;
}
.selection-row .field > span {
  font-size: 12px;
}
.selection-row select {
  font-size: 16px;
}
.final-review-actions {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}
@media (max-width: 760px) {
  .selection-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }
  .selection-row .field > span {
    font-size: 13px;
  }
  .selection-row select {
    width: 100%;
    min-width: 0;
  }
}

/* Shared styling follows the supplied compact sports-app reference. */
.panel:has(> .stats),
.panel:has(> .stack > .match-ticket),
.panel:has(> .content-grid > .match-ticket),
.panel:has(> .grid-2 > .story-card) {
  background: none;
  border: 0;
  padding: 0;
}
.panel .panel {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.app-rail nav {
  background: var(--surface);
  border-radius: 999px;
  padding: 6px;
  gap: 10px;
}
.app-rail nav a {
  font-size: 10px;
  min-height: 58px;
}
html[data-theme="light"] .app-rail nav {
  background: #191919;
}
html[data-theme="light"] .app-rail nav a {
  color: #bdbdbd;
}
html[data-theme="light"] .app-rail nav a[aria-current] {
  color: #111;
}
@media (max-width: 760px) {
  .app-shell {
    padding-bottom: 92px;
  }
  .page-head {
    gap: 12px;
    margin-bottom: 20px;
  }
  .section-head {
    margin-bottom: 16px;
  }

  .app-topbar {
    padding: 14px 16px;
    min-height: 68px;
  }
  .app-footer {
    padding: 20px 16px;
  }
}

/* Reference-led sports home; scoped to the standalone home concept. */
.home-sports {
  display: grid;
  gap: 30px;
}
.home-pitch {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  padding: 26px;
  background-size: cover;
  background-position: center 68%;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
}
.home-pitch:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #08080890 0%,
    #08080812 38%,
    #0808088c 100%
  );
}
.home-club-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.home-club-heading p {
  font-size: 12px;
  line-height: 1.3;
  margin: 0 0 6px;
  color: #eee;
}
.home-club-heading h1 {
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
  margin: 0;
}
.home-club-heading .badge {
  background: #111b;
  color: #fff;
  border-color: #ffffff50;
  font-size: 11px;
}
.home-next {
  width: min(100%, 510px);
  align-self: flex-end;
}
.home-next .match-ticket {
  margin: 0;
  box-shadow: 0 16px 40px #0005;
}
.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.home-section-heading h2 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
}
.home-section-heading .btn {
  min-height: 40px;
  font-size: 12px;
}
.home-games-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.home-games-nav .tabs {
  margin: 0;
  border: 0;
}
.home-games-nav .tabs a {
  padding: 10px 0;
}
.home-games-nav .pills {
  margin: 0;
}
.home-match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.home-match-grid .match-ticket {
  margin: 0;
}
.home-lower {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
.home-news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.home-news-item:last-child {
  border-bottom: 0;
}
.home-news-item > img {
  width: 100px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}
.home-news-item > div {
  flex: 1;
  min-width: 0;
}
.home-news-item span {
  font-size: 11px;
  color: var(--muted);
}
.home-news-item h3 {
  font-size: 19px;
  line-height: 1.2;
  margin: 6px 0;
}
.home-news-item p {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}
.home-season-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px 0;
  gap: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
}
.home-season-strip > div {
  border-right: 1px solid var(--border);
}
.home-season-strip > div:last-child {
  border: 0;
}
.home-season-strip dt {
  font-size: 12px;
  color: var(--muted);
}
.home-season-strip dd {
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  margin: 8px 0 0;
}
.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}
@media (max-width: 760px) {
  .home-sports {
    gap: 24px;
  }
  .home-pitch {
    min-height: 340px;
    padding: 18px 14px;
    border-radius: var(--radius);
    background-position: 60% center;
  }
  .home-club-heading {
    align-items: flex-start;
  }
  .home-club-heading h1 {
    font-size: 27px;
  }
  .home-club-heading p {
    font-size: 10px;
  }
  .home-club-heading .badge {
    font-size: 9px;
    padding: 6px 9px;
    max-width: 100px;
    text-align: center;
  }
  .home-next {
    width: 100%;
    align-self: stretch;
  }
  .home-section-heading h2 {
    font-size: 24px;
  }
  .home-games-nav {
    gap: 10px;
    margin-bottom: 14px;
  }
  .home-games-nav .tabs {
    gap: 22px;
  }
  .home-games-nav .pills {
    gap: 6px;
  }
  .home-games-nav .pill {
    min-height: 32px;
    padding: 7px 13px;
    font-size: 11px;
  }
  .home-match-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .home-lower {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .home-news-item {
    gap: 12px;
    padding: 14px 0;
  }
  .home-news-item > img {
    width: 80px;
    height: 70px;
  }
  .home-news-item h3 {
    font-size: 17px;
  }
  .home-news-item p {
    font-size: 11px;
  }
  .home-news-item > .icon {
    width: 16px;
    height: 16px;
  }
  .home-season-strip {
    padding: 18px 0;
    gap: 14px;
  }
  .home-season-strip dd {
    font-size: 32px;
  }
}

/* Matching contours overlap by 27/560 of their width; the vector inset keeps the gap even through each bend. */
.match-ticket.reference-ticket {
  --ticket-paper: #fffceb;
  --ticket-paper-end: #f5f0d9;
  --ticket-ink: #111;
  --ticket-divider: #1115;
  width: 100%;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: 57% 43%;
  aspect-ratio: 560/352;
  padding: 0;
  margin-bottom: 16px;
  background: none;
  color: #111;
  border: 0;
  border-radius: 0;
  mask: none;
  overflow: visible;
  container-type: inline-size;
  container-name: ticket;
}

.reference-ticket::before,
.reference-ticket::after {
  content: none;
}
.reference-ticket .ticket-face {
  position: relative;
  background: none;
  mask: none;
  min-height: 0;
}
.reference-ticket .ticket-top {
  position: absolute;
  top: 5.2cqw;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.reference-ticket .ticket-top .badge {
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 10px;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-size: clamp(12px, 3.5cqw, 18px);
  padding: 5px 14px;
}
.reference-ticket .ticket-top .badge.live {
  background: var(--ticket-ink);
  color: var(--ticket-paper);
}
.reference-ticket .ticket-teams {
  display: grid;
  height: 100%;
  grid-template-columns: 45.357143% 9.285714% 45.357143%;
  gap: 0;
  padding: 20px 0 10px;
  align-items: center;
}
.reference-ticket .team-identity,
.reference-ticket.featured .team-identity {
  color: #111;
  font-size: clamp(16px, 4.8cqw, 26px);
  gap: 7px;
}
.reference-ticket .team-identity > strong {
  transform: translateY(-4px);
}
.reference-ticket .crest-plate {
  width: clamp(50px, 14cqw, 80px);
  height: clamp(50px, 14cqw, 80px);
  background: none;
  box-shadow: none;
}
.reference-ticket .crest-plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.reference-ticket .ticket-versus {
  display: grid;
  place-items: center;
  width: clamp(42px, 12cqw, 64px);
  height: clamp(42px, 12cqw, 64px);
  margin: 0;
  justify-self: center;
  background: #080808;
  color: #fff;
  border-radius: 50%;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(19px, 5cqw, 28px);
  font-weight: 600;
}
.reference-ticket .ticket-score-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-self: center;
  width: clamp(90px, 28cqw, 150px);
  gap: 4px;
  background: none;
  padding: 8px 0;
  font-size: clamp(34px, 9cqw, 52px);
}
.reference-ticket .ticket-score-pill b {
  font-weight: inherit;
  min-width: 0;
}
.reference-ticket .ticket-score-pill b:first-child {
  text-align: right;
}
.reference-ticket .ticket-score-pill b:last-child {
  text-align: left;
}
.reference-ticket .ticket-score-pill i {
  text-align: center;
}
/* Date-led match details, shared by fixtures, results and home cards. */
.reference-ticket .ticket-bottom {
  display: grid;
  grid-template-columns: 28% 42% minmax(0, 1fr);
  gap: 0;
  padding: 10px 16px 26px;
  align-items: center;
  min-height: 0;
  background: none;
  border: 0;
  color: var(--ticket-ink);
}
.reference-ticket .ticket-bottom > span {
  min-width: 0;
  font-size: clamp(11px, 3.1cqw, 16px);
  line-height: 1.25;
}
.reference-ticket .ticket-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 8px;
  align-items: center;
  text-align: center;
}
.reference-ticket .ticket-meta strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.reference-ticket .ticket-kickoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  border-inline: 1px solid var(--ticket-divider);
  padding: 0 5px;
}
.reference-ticket .ticket-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.reference-ticket .ticket-day {
  font-size: clamp(48px, 16cqw, 90px);
  letter-spacing: -2px;
}
.reference-ticket .ticket-date-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.reference-ticket .ticket-month {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 6px;
  padding: 5px 6px;
  font-size: clamp(21px, 6cqw, 34px);
}
.reference-ticket .ticket-weekday {
  font-size: clamp(12px, 3.4cqw, 18px);
  font-weight: 600;
}
.reference-ticket .ticket-phase {
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(12px, 3.5cqw, 19px);
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
}
.reference-ticket .ticket-venue {
  position: relative;
  padding: 0 10px;
  font-family: "Barlow Condensed", sans-serif;
}
.reference-ticket .ticket-venue:has(.ticket-arrow) {
  padding-inline: clamp(26px, 8cqw, 44px);
}
.reference-ticket .ticket-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: clamp(22px, 7cqw, 38px);
  height: clamp(22px, 7cqw, 38px);
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.reference-ticket .ticket-arrow .icon {
  width: 65%;
  height: 65%;
}
.reference-ticket :is(.ticket-face, .ticket-bottom) {
  transition: filter 0.15s ease;
}
.reference-ticket :is(.ticket-face, .ticket-bottom):active {
  filter: brightness(0.85);
}

.home-club-heading h1,
.home-section-heading h2,
.home-news-item h3,
.home-season-strip dd {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
}
.home-club-heading h1 {
  font-size: 46px;
}
.home-games-nav .tabs a {
  padding: 11px 18px;
}
.home-news-item p {
  font-size: 14px;
}
@media (max-width: 760px) {
  .home-club-heading h1 {
    font-size: 36px;
  }
  .home-news-item p {
    font-size: 14px;
  }
  .home-news-item span {
    font-size: 12px;
  }
  .home-games-nav .tabs {
    gap: 8px;
  }
  .home-games-nav .pill {
    min-height: 44px;
    font-size: 13px;
    padding: 10px 14px;
  }
}

.match-filters {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.match-filters summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  min-height: 56px;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}
.match-filters summary::-webkit-details-marker {
  display: none;
}
.match-filters summary > span {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.match-filters summary > .icon {
  width: 18px;
  height: 18px;
}
.match-filters[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.match-filters > .form-grid {
  padding: 0 18px 18px;
}
@media (max-width: 760px) {
  .grid-2,
  .grid-3,
  .split-grid,
  .content-grid {
    row-gap: 16px;
  }
  .match-filters summary {
    padding: 14px 16px;
  }
  .match-filters summary > span {
    font-size: 11px;
    max-width: 185px;
    text-align: right;
  }
  .match-filters > .form-grid {
    padding: 0 16px 16px;
  }
  .panel .grid-2 {
    gap: 16px;
  }
}

.reference-ticket .match-score {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stack:has(> .reference-ticket),
.content-grid:has(> .reference-ticket),
.home-match-grid {
  gap: 8px;
}
.stack > .reference-ticket,
.content-grid > .reference-ticket {
  margin-bottom: 0;
}

.stack:has(> .reference-ticket) {
  gap: 0;
}
.stack > .reference-ticket + .reference-ticket {
  margin-top: -4.821428571%;
}
@media (max-width: 760px) {
  .content-grid:has(> .reference-ticket),
  .home-match-grid {
    row-gap: 0;
  }
  .content-grid > .reference-ticket + .reference-ticket,
  .home-match-grid > .reference-ticket + .reference-ticket {
    margin-top: -4.821428571%;
  }
}

/* Detail panels use the same gap before their next content block. */
.panel > :is(.fact-list, .detail-list, .compact-list):not(:last-child) {
  margin-bottom: 20px;
}
.panel > :is(.fact-list, .detail-list, .compact-list) > div:first-child {
  padding-top: 0;
}
.panel > :is(.fact-list, .detail-list, .compact-list) > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.panel > :is(.fact-list, .detail-list) > :is(dt, dd):nth-child(-n + 2) {
  padding-top: 0;
}
.panel > :is(.fact-list, .detail-list) > dt:last-of-type,
.panel > :is(.fact-list, .detail-list) > dd:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}
.panel > .notice:last-child {
  margin-bottom: 0;
}
.panel > .actions {
  gap: 12px;
}

.panel > .actions > .btn {
  padding-inline: 16px;
}

/* Working-site shell and native controls use the reviewed component system. */
body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: break-word;
}
/* Fine charcoal grain and faint fibres keep the dark canvas tactile. */
html:not([data-theme="light"]) body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.07' filter='url(%23grain)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"),
    repeating-linear-gradient(135deg, #ffffff03 0 1px, transparent 1px 5px);
  background-size:
    180px 180px,
    auto;
}
.record-row > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  flex: 1;
  min-width: 0;
}
.record-row > span > small {
  color: var(--muted);
}
h1,
h2,
h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
}
h2 {
  font-size: 28px;
  text-transform: uppercase;
  line-height: 1.15;
}
h3 {
  font-size: 23px;
}
p {
  line-height: 1.55;
}
button {
  color: inherit;
}
img {
  max-width: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.muted {
  color: var(--muted);
}
.app-shell {
  min-height: 100dvh;
}
.app-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
}
.app-topbar {
  max-width: 1320px;
  margin: auto;
}
.page-content {
  width: 100%;
  padding-bottom: 28px;
}
.app-footer {
  max-width: 1320px;
  margin: auto;
  flex-wrap: wrap;
}
.app-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.app-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.app-rail em {
  font-size: 9px;
  font-style: normal;
}
.staging-banner,
.impersonation-banner {
  padding: 12px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.team-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
}
.team-mark img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.team-mark b {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
}
.btn,
.button {
  font-family: "Source Sans 3", sans-serif;
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 16px;
  min-height: 48px;
  padding: 12px 18px;
  max-width: 100%;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #d6b700;
  flex: none;
}
.field input,
.field select,
.field textarea {
  border-radius: var(--radius);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
legend {
  font-weight: 600;
  margin-bottom: 14px;
}
label {
  cursor: pointer;
}
.field-group {
  display: grid;
  gap: 12px;
}
.check-row,
.compact-check {
  min-height: 48px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.panel,
.stat,
.notice,
.story-card,
.match-stage,
.photo-panel,
.auth-layout,
.home-pitch,
dialog {
  border-radius: var(--radius);
}
.panel:has(.panel) {
  background: var(--surface);
}
.panel .panel {
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.filter-form {
  padding: 0 18px 18px;
}
.browse-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.browse-heading .tabs {
  margin: 0;
}
.season-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.season-picker select {
  max-width: 180px;
}
.month-navigation {
  justify-content: space-between;
  margin-bottom: 24px;
}
.match-month {
  margin-bottom: 32px;
}
.match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.game-card-group {
  min-width: 0;
}
.game-card-group > .reference-ticket {
  margin-bottom: 0;
}
.card-caption {
  font-size: 14px;
  padding: 0 12px;
  margin: 12px 0;
  line-height: 1.45;
}
.card-management {
  margin: 12px 0;
}
.home-news-item .crest-plate {
  width: 58px;
  height: 58px;
}
.ticket-versus:has(b) {
  width: auto;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 28px;
}
.ticket-versus i,
.ticket-score-pill i,
.stage-score i {
  font-style: normal;
}
.reference-ticket [data-live-score] {
  white-space: nowrap;
}
.is-erskine > td,
.is-erskine > th {
  background: #ffe00013;
  color: var(--text);
}
.is-erskine .team-identity {
  font-weight: 700;
}
tbody th {
  background: none;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}
.table-scroll table {
  min-width: 100%;
}
.table-scroll th:nth-child(2) {
  min-width: 160px;
}
.table-scroll .team-identity.small {
  white-space: normal;
}
.panel .table-scroll + p {
  margin: 18px 0 0;
}
.metrics,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.metric {
  padding: 18px;
  background: var(--surface-2);
  border-radius: var(--radius);
  min-width: 0;
}
.metric > span,
.metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.metric strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 44px;
  line-height: 1.15;
}
.record-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.record-row,
.record-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.record-details {
  color: var(--muted);
  font-size: 14px;
}
.record-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.record-row:last-child {
  border: 0;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
}
.tool-card > div {
  flex: 1;
}
.tool-card strong {
  display: block;
}
.tool-card small {
  display: block;
  color: var(--muted);
}
.player-card {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
}
.choice-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 48px;
}
.choice-list label:has(:checked) {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
.workflow-steps {
  display: flex;
  list-style: none;
  gap: 12px;
  padding: 0;
  flex-wrap: wrap;
}
.workflow-steps li {
  flex: 1;
  min-width: 140px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.workflow-steps li.complete {
  box-shadow: inset 0 3px var(--accent);
}
.attendance-trend {
  display: grid;
  gap: 12px;
}
.attendance-session {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  align-items: center;
  gap: 14px;
}
.attendance-session meter {
  width: 100%;
  height: 18px;
  accent-color: #d6b700;
}
.email-preview-frame {
  width: 100%;
  height: 500px;
  background: #fff;
  border: 0;
  border-radius: var(--radius);
}
.attendance-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 48px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius);
}
.attendance-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #111;
}
.match-context {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 24px;
}
dialog {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
}
dialog::backdrop {
  background: #000b;
}
.pwa-revalidating .app-shell {
  visibility: hidden;
}
.pwa-status,
.live-update-status {
  font-size: 13px;
  color: var(--muted);
}
.live-update-status:empty {
  display: none;
}
.password-field {
  position: relative;
}
.password-toggle {
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
}
.live-form-feedback {
  font-size: 14px;
  line-height: 1.5;
}
.live-form-feedback:empty {
  display: none;
}
.match-jump-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.match-jump-links a {
  min-height: 44px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-radius: 999px;
}
.live-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.live-editor details {
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-top: 16px;
}
.live-editor summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.live-editor details[open] summary {
  margin-bottom: 16px;
}
.live-event-removed strong {
  text-decoration: line-through;
}
.published-team-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.published-team-columns ul,
.published-team-columns ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.team-player-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.live-card-badge {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 18px;
  border: 1px solid #ad9500;
  border-radius: 2px;
  background: var(--accent);
  padding: 0;
}
.live-card-red,
.live-card-second_yellow {
  background: var(--red);
  border-color: var(--red);
}
.scorer-details-trigger {
  border: 0;
  background: none;
  text-align: left;
  color: var(--text);
  min-height: 44px;
  padding: 4px;
}
.scorer-details-trigger strong {
  display: block;
}
.scorer-details-trigger span {
  color: var(--muted);
  font-size: 12px;
}
.match-stage .stage-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-score > [data-live-score] {
  display: flex;
  gap: 8px;
  align-items: center;
}
.stage-score b {
  font-weight: 600;
}
.score-strip {
  font-size: 16px;
}
.app-shell > .mobile-nav {
  z-index: 30;
}
@media (max-width: 1100px) {
  .match-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .app-shell {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }
  .app-shell > .mobile-nav {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 30;
  }
  .app-rail {
    display: none;
  }
  .page-content {
    padding: 20px 16px;
  }
  .app-topbar-right {
    gap: 8px;
  }
  .season-tag {
    display: none;
  }
  .icon-button {
    min-width: 44px;
    height: 44px;
  }
  .panel,
  .notice,
  .stat {
    border-radius: var(--radius);
  }
  .match-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .game-card-group + .game-card-group {
    margin-top: -4.821428571%;
  }
  .game-card-group:has(.card-caption, .card-management, .live-update-status)
    + .game-card-group {
    margin-top: 12px;
  }
  .live-entry-grid,
  .published-team-columns {
    grid-template-columns: 1fr;
  }
  .score-strip {
    font-size: 15px;
    gap: 18px;
  }
  .stage-score {
    font-size: 64px;
  }
  .stage-teams .team-identity {
    font-size: 19px;
  }
  .attendance-session {
    grid-template-columns: 75px 1fr 44px;
  }
  .app-footer {
    padding-bottom: 16px;
  }
  .app-footer nav {
    gap: 12px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .app-topbar {
    padding: 14px 16px;
  }
  .home-club-heading h1 {
    font-size: 34px;
  }
  .home-pitch {
    min-height: 350px;
  }
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --bg: #f6f6f2;
    --surface: #fff;
    --surface-2: #ebebe5;
    --text: #171717;
    --muted: #595953;
    --border: #d1d1c9;
    --red: #b32620;
    --red-text: #b32620;
    color-scheme: light;
  }
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 0;
}
.btn:not([class*="btn-"]) {
  background: var(--accent);
  color: #111;
}
.content-grid:has(> :last-child:nth-child(2)) {
  grid-template-columns: 1.4fr 1fr;
}
.metric button {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  text-align: left;
  min-height: 44px;
}
.footage-screen video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70dvh;
  display: block;
  background: #080808;
  border-radius: var(--radius);
}
.recording-grid {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.recording-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.recording-card.is-selected {
  border-color: var(--accent);
}
.recording-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background:
    linear-gradient(#0004, #0008),
    url("sports/pitch-daylight.webp") center/cover;
  display: grid;
  place-items: center;
}
.recording-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recording-play {
  position: absolute;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #111;
  border-radius: 50%;
  width: 48px;
  height: 48px;
}
.recording-copy {
  padding: 16px;
}
.recording-copy strong,
.recording-copy small {
  display: block;
}
.recording-copy small {
  color: var(--muted);
}
.scorer-row-button {
  border: 0;
  background: none;
  color: inherit;
  width: 100%;
  text-align: left;
}
.discipline-record,
.feedback-note {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.discipline-record:last-child,
.feedback-note:last-child {
  border: 0;
}
.legal-copy {
  max-width: 860px;
  line-height: 1.7;
}
.legal-copy h2 {
  margin-top: 24px;
}
.setup-progress {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
.setup-progress span {
  height: 8px;
  background: linear-gradient(
    to right,
    var(--accent) var(--setup-progress),
    var(--surface-2) var(--setup-progress)
  );
  border-radius: 999px;
}
.score-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.score-inputs > span {
  text-align: center;
  font-size: 30px;
}
.score-inputs .field {
  margin: 0;
}
.score-inputs input {
  width: 100%;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 44px;
}
.selection-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: start;
}
.selection-row > :first-child {
  grid-column: 1;
}
.selection-row .choice-list {
  min-width: 0;
  grid-column: 2;
}
.selection-row > .stack {
  min-width: 0;
  grid-column: 2;
}
.selection-row > .choice-list,
.selection-row > .actions {
  grid-column: 2;
}
.goal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.goal-row > .field {
  flex: 1;
  min-width: 170px;
}
.sports-form summary,
.panel summary {
  cursor: pointer;
  min-height: 44px;
}
.sports-form summary small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.sports-form details[open] > summary {
  margin-bottom: 20px;
}
.team-combobox {
  position: relative;
}
.team-combobox-list {
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  z-index: 8;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  max-height: 340px;
  overflow: auto;
}
.team-combobox-option {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 8px;
  border-radius: 16px;
}
.team-combobox-option[aria-selected="true"] {
  background: var(--accent);
  color: #111;
}
.team-combobox-option strong,
.team-combobox-option small {
  display: block;
}
.team-combobox-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.team-combobox-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-combobox-empty {
  padding: 12px;
  display: block;
}
.notice:not(:has(> div)) {
  flex-wrap: wrap;
}
.notice > span {
  line-height: 1.5;
  color: var(--muted);
}
.notice > a {
  min-height: 44px;
}
.record-card .record-row img {
  max-width: 60px;
}
.setup-step-state {
  font-size: 13px;
  color: var(--muted);
}
.pwa-feedback,
.pwa-form-notice {
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.pwa-feedback button,
.pwa-form-notice button {
  min-height: 44px;
}
.pwa-status button {
  min-height: 44px;
}
.password-control {
  display: flex;
  gap: 8px;
  align-items: center;
}
.password-control input {
  min-width: 0;
  flex: 1;
}
.password-control button {
  flex: none;
}
@media (max-width: 760px) {
  .content-grid:has(> :last-child:nth-child(2)) {
    grid-template-columns: 1fr;
  }
  .selection-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .selection-row > * {
    width: 100%;
    min-width: 0;
  }
  .choice-list label {
    flex: 1;
  }
  .recording-grid {
    grid-template-columns: 1fr;
  }
  .score-inputs {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  }
  .score-inputs .metric {
    padding: 14px;
  }
  .live-editor .actions .btn {
    flex: 1;
  }
  .stage-teams .crest-plate {
    width: 64px;
    height: 64px;
  }
  .stage-teams .crest-plate img {
    width: 56px;
    height: 56px;
  }
}
/* Account revalidation conceals every identity-bearing body surface. */
.pwa-revalidating body > :not(.pwa-revalidation-screen) {
  visibility: hidden !important;
}
.pwa-revalidation-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
}
.pwa-revalidation-screen h1 {
  font-size: 36px;
}
.pwa-revalidation-screen p {
  max-width: 460px;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
}
.button.primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
.goal-card {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  color: var(--text);
  min-height: 64px;
}
.goal-card strong,
.goal-card span {
  display: block;
}
.goal-card span {
  font-size: 13px;
  color: var(--muted);
}
.status-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
.status-pill.yes,
.status-badge.yes {
  background: var(--accent);
  color: #111;
}
.status-pill.no,
.status-badge.no {
  color: var(--red-text);
}
.training-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
}
.attendance-toggle[aria-pressed="true"] .training-switch-thumb {
  background: #111;
}
.wizard-active [data-wizard-panel][hidden] {
  display: none !important;
}
details.record-details {
  display: block;
}
.record-details > .fact-list {
  width: 100%;
  margin: 16px 0;
}
.fact-list dt,
.fact-list dd,
.detail-list dt,
.detail-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}
.fact-list > div > dd,
.detail-list > div > dd {
  max-width: 62%;
}
.section-head {
  flex-wrap: wrap;
}
.selection-row .badge {
  justify-self: start;
  width: max-content;
}
.goal-card-name,
.goal-card-meta {
  display: block;
}
.button-icon {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 50%;
}
.destructive {
  min-height: 44px;
  background: none;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--red-text);
}

.stage-score > [data-live-score].kickoff-tbc {
  font-size: clamp(22px, 4vw, 36px);
  display: block;
  white-space: normal;
  line-height: 1.1;
}

/* Match-ticket tabs stay fixed in height when family details expand. */
.player-card {
  --player-top: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20560%2056%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20d%3D%27M0%2056V32Q0%200%2056%200H166C188%200%20187%2018%20213%2018H347C372%2018%20371%200%20394%200H504Q560%200%20560%2032V56Z%27%2F%3E%3C%2Fsvg%3E");
  --player-bottom: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20560%2056%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20d%3D%27M0%200H560V6Q560%2038%20504%2038H394C371%2038%20372%2056%20347%2056H213C188%2056%20189%2038%20166%2038H56Q0%2038%200%206Z%27%2F%3E%3C%2Fsvg%3E");
  border-radius: 0;
  padding: 28px 24px 32px;
  gap: 12px;
  margin: 0;
  mask:
    var(--player-top) center top/100% 56px no-repeat,
    linear-gradient(#000 0 0) center/100% calc(100% - 110px) no-repeat,
    var(--player-bottom) center bottom/100% 56px no-repeat;
}

#players > .content-grid {
  gap: 16px;
}
.player-card > .person-row {
  padding: 0 0 12px;
}
.player-card > .person-row h2 {
  margin: 0 0 6px;
}
.player-card > .fact-list:not(:last-child) {
  margin: 0;
}
.player-card > .fact-list > div {
  padding: 4px 0;
  border: 0;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.match-management-nav {
  margin-bottom: 24px;
}
.live-editor {
  display: grid;
  gap: 20px;
}
.live-editor > * {
  margin: 0;
}
.live-editor form {
  display: grid;
  gap: 18px;
}
.live-editor .field {
  margin: 0;
}
.live-editor .section-head {
  margin: 0;
}
.live-editor .live-entry-grid > details {
  margin-top: 0;
}
.live-editor form > .actions {
  align-items: stretch;
  gap: 12px;
  margin-top: 4px;
}
.live-editor .btn {
  min-height: 48px;
}
.live-editor select {
  appearance: none;
  height: 48px;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 21px,
    calc(100% - 17px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.live-match-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}
.live-match-summary > div {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.live-match-summary > div > strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 36px;
  line-height: 1.1;
}
.live-match-summary .team-identity:last-child {
  justify-content: flex-end;
}
.live-match-summary b,
.live-match-summary i {
  font-weight: 600;
  font-style: normal;
}
.live-workspace > .live-update-status {
  margin: 0 0 24px;
}
@media (max-width: 760px) {
  .live-match-summary {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  }
  .live-match-summary .team-identity.small {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .live-match-summary > div > strong {
    font-size: 28px;
  }
  .live-editor form > .actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.live-match-summary .badge {
  white-space: normal;
  text-align: center;
  max-width: 100%;
  line-height: 1.25;
}

/* Equal visible crest sizes, including assets with transparent padding. */
.crest-plate {
  overflow: hidden;
}
.crest-plate img {
  width: 75%;
  height: 75%;
  max-width: none;
  object-fit: contain;
}
.reference-ticket .team-identity {
  background: none;
  border-radius: 0;
  padding: 0;
  align-self: stretch;
  justify-content: center;
}
.reference-ticket .crest-plate {
  background: none;
  border-radius: 0;
}
.reference-ticket .crest-plate img {
  width: 75%;
  height: 75%;
}
.team-mark img[src$="/ardgowan-thistle.webp"] {
  transform: scale(1.21905) translate(0.19531%, 0%);
}
.team-mark img[src$="/carolside-united.webp"] {
  transform: scale(1.68421) translate(0.19531%, 0%);
}
.team-mark img[src$="/carolside-warriors.webp"] {
  transform: scale(1.68421) translate(0.19531%, 0%);
}
.team-mark img[src$="/dumbarton-united.webp"] {
  transform: scale(1.21905) translate(0.19531%, 0%);
}
.team-mark img[src$="/erskine-yfc.webp"] {
  transform: scale(1.21905) translate(0%, 0%);
}
.team-mark img[src*="/evro.webp"] {
  transform: scale(2.30631) translate(0.19531%, 0.19531%);
}
.team-mark img[src$="/giffnock-yellow.webp"] {
  transform: scale(1.21905) translate(0%, 0%);
}
.team-mark img[src$="/hillwood-fc.webp"] {
  transform: scale(1.21905) translate(0%, 0.19531%);
}
.team-mark img[src$="/houston-united.webp"] {
  transform: scale(1.21905) translate(0%, 0%);
}
.team-mark img[src$="/johnstone-burgh.webp"] {
  transform: scale(1.69536) translate(0.19531%, 0.19531%);
}
.team-mark img[src$="/jscc.webp"] {
  transform: scale(2.39252) translate(0.19531%, 0.19531%);
}
.team-mark img[src$="/ola.webp"] {
  transform: scale(1.21905) translate(0.19531%, 0%);
}
.team-mark img[src$="/olm.webp"] {
  transform: scale(2.26549) translate(0.19531%, 0.19531%);
}
.team-mark img[src$="/stamperland.webp"] {
  transform: scale(1.21905) translate(0.19531%, 0%);
}
.team-mark img[src$="/united-fa.webp"] {
  transform: scale(2.37037) translate(0%, 0%);
}
.team-mark img[src$="/whitacre-wolves.webp"] {
  transform: scale(1.21905) translate(0%, 0%);
}

/* Inline SVG keeps the contours sharp; shared strokes create the inset rim. */
.reference-ticket .ticket-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.reference-ticket .ticket-gradient-start {
  stop-color: var(--ticket-paper);
}
.reference-ticket .ticket-gradient-end {
  stop-color: var(--ticket-paper-end);
}
.reference-ticket .ticket-rim {
  stroke: var(--accent);
}
.reference-ticket .ticket-watermark {
  opacity: 0.12;
  pointer-events: none;
}
.reference-ticket .ticket-face,
.reference-ticket .ticket-bottom {
  position: relative;
}

.team-name-primary,
.team-name-secondary {
  display: block;
}
.team-name-secondary {
  color: var(--muted);
}
.reference-ticket .team-name-secondary {
  color: #555;
}

#match-information > .reference-ticket {
  max-width: 760px;
  margin-inline: auto;
}

/* ==========================================================================
   Refinement layer — spacing rhythm, surfaces, type scale and match cards.
   Keep this block last: it deliberately overrides the earlier layers.
   ========================================================================== */
:root {
  --surface: #121212;
  --surface-2: #1b1b1b;
  --border: #2b2b2b;
  --hairline: #ffffff17;
  --card-shadow: drop-shadow(0 14px 22px #00000066) drop-shadow(0 2px 3px #00000066);
  --r-panel: 24px;
  --r-tile: 20px;
  --gutter: 40px;
  --section-gap: 56px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
}
html[data-theme="light"] {
  --surface: #fff;
  --surface-2: #efefe9;
  --border: #d9d9d0;
  --hairline: #00000017;
  --card-shadow: drop-shadow(0 12px 18px #1a1a0f26) drop-shadow(0 1px 2px #1a1a0f26);
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --surface: #fff;
    --surface-2: #efefe9;
    --border: #d9d9d0;
    --hairline: #00000017;
    --card-shadow: drop-shadow(0 12px 18px #1a1a0f26) drop-shadow(0 1px 2px #1a1a0f26);
  }
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 420px at 78% -80px, #ffe0000f, transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- Shell ------------------------------------------------------------ */
.app-shell {
  grid-template-columns: 88px minmax(0, 1fr);
}
.app-rail {
  padding: 22px 12px;
  gap: 32px;
  border-right: 1px solid var(--hairline);
}
.app-rail nav {
  gap: 6px;
}
.app-rail nav a {
  min-height: 62px;
  gap: 6px;
  border-radius: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.app-rail nav a[aria-current] {
  box-shadow: 0 6px 18px #ffe00026;
}
.rail-season {
  font-size: 10px;
  letter-spacing: 0.22em;
  opacity: 0.7;
}
.app-topbar {
  padding: 22px var(--gutter);
  min-height: 84px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.wordmark b {
  font-weight: 400;
  color: var(--muted);
}
.wordmark small {
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
}
.season-tag {
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  letter-spacing: 0.18em;
}
.icon-button {
  border-color: var(--hairline);
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}
.icon-button:hover {
  border-color: var(--accent);
}
.page-content {
  padding: 8px var(--gutter) 48px;
}
.app-footer {
  padding: 28px var(--gutter);
  margin-top: 24px;
  background: linear-gradient(var(--hairline), var(--hairline)) center top / calc(100% - var(--gutter) * 2) 1px no-repeat;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.app-footer a {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.app-footer a:hover {
  color: var(--text);
}

/* ---- Headings --------------------------------------------------------- */
.page-head {
  margin-bottom: 32px;
  padding-top: 8px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.page-head h1 {
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin-bottom: 16px;
}
.lede {
  font-size: 18px;
  max-width: 560px;
}
.section-head,
.home-section-heading {
  margin-bottom: 24px;
}
.section-head h2,
.home-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.section-head h2::before,
.home-section-heading h2::before {
  content: "";
  flex: none;
  width: 6px;
  height: 26px;
  border-radius: 3px;
  background: var(--accent);
}
.btn-text {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}
.btn-text .icon {
  transition: transform 0.16s ease;
}
.btn-text:hover {
  filter: none;
  color: var(--accent);
}
.btn-text:hover .icon {
  transform: translateX(3px);
}
html[data-theme="light"] .btn-text:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}

/* ---- Controls --------------------------------------------------------- */
.btn {
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    border-color 0.16s ease;
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--hairline);
}
.btn-secondary:hover {
  filter: none;
  border-color: var(--accent);
}
.tabs {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs a,
.home-games-nav .tabs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 20px;
  font-weight: 600;
  background: none;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.tabs a:hover:not([aria-current]) {
  color: var(--text);
  background: var(--surface-2);
}
.tabs a[aria-current] {
  background: var(--accent);
}
.browse-heading,
.home-games-nav {
  align-items: center;
  margin-bottom: 28px;
}
.season-picker select,
.browse-heading select {
  min-height: 48px;
  padding-inline: 20px 12px;
  border-color: var(--hairline);
  background-color: var(--surface);
  font-weight: 600;
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border-color: var(--hairline);
  background-color: var(--surface);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px #ffe00033;
}
.field > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

/* ---- Surfaces --------------------------------------------------------- */
.panel {
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
}
.panel .panel {
  padding: 20px;
  border-radius: var(--r-tile);
  border: 0;
}
.stats {
  gap: 16px;
  margin-block: 28px;
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  background: var(--surface);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.tabs + .stats,
.tabs + .panel {
  margin-top: 0;
}
a.stat:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.stat > span {
  order: 0;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stat > strong {
  order: 1;
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 700;
}
.stat > small {
  order: 2;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
}
.stat.yellow,
.stat.red {
  border-top: 1px solid transparent;
}
.stat.yellow {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.stat.yellow > span,
.stat.yellow > small {
  color: #111c;
}
.stat.red {
  border-color: var(--red);
}
.fact-list > div {
  padding: 16px 0;
}
.fact-list dd {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.compact-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 6px;
  text-align: left;
  transition: background 0.16s ease;
}
.compact-row:hover {
  background: var(--surface-2);
}
.compact-row > span:nth-child(2) {
  display: grid;
  gap: 2px;
  text-align: left;
}
.compact-row > span:nth-child(2) strong {
  font-size: 16px;
}
.compact-row > strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.compact-row .badge {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}
form.stats-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 16px 20px;
  padding: 24px 28px;
}
form.stats-filter > .form-grid {
  display: contents;
}
form.stats-filter > .actions {
  flex-wrap: nowrap;
}

/* ---- Tables ----------------------------------------------------------- */
.standings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.standings-table th,
.standings-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  background: none;
  text-align: center;
  font-size: 15px;
}
.standings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.standings-table thead th:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}
.standings-table thead th:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}
.standings-table th:nth-child(1),
.standings-table td:nth-child(1) {
  width: 64px;
  color: var(--muted);
  font-weight: 700;
}
.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  text-align: left;
  min-width: 220px;
}
.standings-table td:last-child {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.standings-table .team-identity {
  flex-direction: row;
  gap: 14px;
  text-align: left;
  font-size: 17px;
  text-transform: none;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
}
.standings-table .team-identity strong {
  display: block;
}
.standings-table .team-name-secondary {
  display: inline;
  color: var(--muted);
  font-weight: 400;
}
.standings-table .crest-plate {
  width: 40px;
  height: 40px;
  box-shadow: none;
}
.standings-table .crest-plate img {
  width: 32px;
  height: 32px;
}
.standings-table tr.is-erskine > * {
  background: #ffe00018;
  border-bottom-color: #ffe00040;
}
.standings-table tr.is-erskine > :first-child {
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--text);
}
.standings-table tr.is-erskine .team-name-secondary {
  color: var(--text);
}
.standings-table tbody tr:last-child > * {
  border-bottom: 0;
}
html[data-theme="light"] .standings-table tr.is-erskine > * {
  background: #ffe00044;
}

.th-short {
  display: none;
}
.panel .table-scroll .standings-table {
  min-width: 0;
}

/* ---- Match cards ------------------------------------------------------ */
.reference-ticket .ticket-art {
  filter: var(--card-shadow);
}
.home-next .match-ticket {
  box-shadow: none;
}
/* Flat bottom by default; the notch returns where something connects below. */
.reference-ticket .art-flat {
  display: none;
}
.reference-ticket.is-flat .art-notched {
  display: none;
}
.reference-ticket.is-flat .art-flat {
  display: inline;
}
.reference-ticket.is-flat {
  aspect-ratio: 560 / 335;
  grid-template-rows: 58.5% 41.5%;
}
.reference-ticket.is-flat .ticket-bottom {
  padding-bottom: 14px;
}
@media (max-width: 760px) {
  /* Stacked cards interlock: every card except the last keeps its lower tab. */
  :is(
      .game-card-group:has(+ .game-card-group) > .reference-ticket.is-flat,
      .home-match-grid > .reference-ticket.is-flat:has(+ .reference-ticket),
      .content-grid > .reference-ticket.is-flat:has(+ .reference-ticket)
    ) {
    aspect-ratio: 560 / 352;
    grid-template-rows: 57% 43%;
  }
  :is(
      .game-card-group:has(+ .game-card-group) > .reference-ticket.is-flat,
      .home-match-grid > .reference-ticket.is-flat:has(+ .reference-ticket),
      .content-grid > .reference-ticket.is-flat:has(+ .reference-ticket)
    ) {
    & .art-notched {
      display: inline;
    }
    & .art-flat {
      display: none;
    }
    & .ticket-bottom {
      padding-bottom: 26px;
    }
  }
}
.reference-ticket {
  margin-bottom: 0;
  transition: transform 0.2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .reference-ticket:hover {
    transform: translateY(-4px);
  }
}
.reference-ticket .ticket-watermark {
  opacity: 0.07;
}
.reference-ticket .ticket-top .badge {
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px #0003;
}
.reference-ticket .team-identity > strong {
  transform: none;
  line-height: 1.12;
}
.reference-ticket .team-identity {
  min-width: 0;
  max-width: 100%;
  padding-inline: 4px;
}
.reference-ticket .team-identity > strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.reference-ticket .team-name-secondary {
  display: block;
  font-size: 0.84em;
  font-weight: 500;
  opacity: 0.6;
}
.reference-ticket .crest-plate:not(.has-logo) {
  border-radius: 50%;
  border: 2px solid #111;
  background: #1111;
}
.reference-ticket .crest-plate:not(.has-logo) b {
  color: #111;
  font-size: clamp(16px, 5cqw, 24px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.reference-ticket .ticket-versus {
  box-shadow: 0 0 0 4px #fffceb;
}
.reference-ticket .ticket-month {
  border-radius: 8px;
}
.match-grid {
  gap: 24px;
}
.home-match-grid {
  gap: 24px;
}
.game-card-group > .card-caption,
.game-card-group > .card-management {
  margin-inline: 14px;
}
.match-month {
  margin-bottom: var(--section-gap);
}
.month-navigation {
  gap: 8px;
  margin-bottom: 32px;
}
.month-navigation strong {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 14px;
}
.month-navigation .btn {
  min-height: 44px;
}
.match-filters {
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  background: var(--surface);
  margin-bottom: 28px;
}
.match-filters summary {
  padding: 16px 22px;
  font-weight: 600;
}
.match-filters[open] summary {
  border-bottom: 1px solid var(--hairline);
}

/* ---- Home ------------------------------------------------------------- */
.home-sports {
  gap: var(--section-gap);
}
.home-pitch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  align-items: center;
  gap: 48px;
  min-height: 540px;
  padding: 56px;
  border-radius: 32px;
  border: 1px solid var(--hairline);
  background-position: center 62%;
}
.home-pitch::before {
  background:
    linear-gradient(90deg, #080808d9 0%, #08080880 48%, #08080833 100%),
    linear-gradient(180deg, #08080840 0%, transparent 40%, #08080899 100%);
}
.home-club-heading {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}
.home-club-heading p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
}
.home-club-heading p::before {
  content: "";
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.home-club-heading h1 {
  font-size: clamp(56px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.home-club-heading .badge {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}
.home-next {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  align-self: center;
}
.home-lower {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.home-news-item {
  gap: 18px;
  padding: 18px 12px;
  margin-inline: -12px;
  border-radius: 16px;
  border-bottom: 0;
  position: relative;
  transition: background 0.16s ease;
}
.home-news-item + .home-news-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--hairline);
}
.home-news-item:hover {
  background: var(--surface);
}
.home-news-item span {
  font-size: 12px;
  letter-spacing: 0.02em;
}
.home-news-item h3 {
  font-size: 22px;
  letter-spacing: 0.01em;
}
.home-news-item p {
  font-size: 14px;
}
.home-news-item > .icon {
  color: var(--muted);
  transition:
    transform 0.16s ease,
    color 0.16s ease;
}
.home-news-item:hover > .icon {
  color: var(--accent);
  transform: translateX(3px);
}
.crest-plate b,
.team-mark b {
  color: #111;
}
.home-season-strip {
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.home-season-strip > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  background: var(--surface);
}
.home-season-strip > div:last-child {
  border: 1px solid var(--hairline);
}
.home-season-strip dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.home-season-strip dd {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 700;
  margin-top: 10px;
}
.home-quick-links {
  gap: 10px;
}

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .home-pitch {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px;
    gap: 36px;
  }
  .home-next {
    justify-self: center;
  }
  form.stats-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  form.stats-filter > .actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  :root {
    --gutter: 20px;
    --section-gap: 40px;
  }
  .app-topbar {
    padding: 16px var(--gutter);
    min-height: 72px;
  }
  .wordmark {
    font-size: 20px;
  }
  .page-content {
    padding: 4px var(--gutter) 32px;
  }
  .page-head h1 {
    font-size: clamp(44px, 13vw, 56px);
  }
  .lede {
    font-size: 16px;
  }
  .panel {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .stat > strong {
    font-size: 48px;
  }
  .home-pitch {
    min-height: 0;
    padding: 28px 20px 24px;
    gap: 28px;
    border-radius: 24px;
  }
  .home-club-heading {
    gap: 16px;
  }
  .home-club-heading h1 {
    font-size: clamp(52px, 17vw, 72px);
  }
  .home-next {
    justify-self: stretch;
    max-width: none;
  }
  .home-games-nav {
    gap: 12px;
  }
  .home-lower {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--section-gap);
  }
  .home-season-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .home-season-strip > div {
    padding: 14px;
  }
  .home-season-strip dd {
    font-size: 36px;
  }
  .home-season-strip dt {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .home-news-item h3 {
    font-size: 19px;
  }
  .section-head h2,
  .home-section-heading h2 {
    font-size: clamp(24px, 7vw, 28px);
  }
  .btn-text {
    white-space: nowrap;
  }
  /* Single-column cards nest into each other, so no row gap here. */
  .match-grid {
    gap: 0;
  }
  .home-match-grid {
    row-gap: 0;
  }
  form.stats-filter {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 18px;
  }
  .compact-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .panel:has(.standings-table) {
    padding-inline: 12px;
  }
  .standings-table th,
  .standings-table td {
    padding: 11px 4px;
    font-size: 14px;
  }
  .standings-table th:nth-child(1),
  .standings-table td:nth-child(1) {
    width: 34px;
  }
  .standings-table th:nth-child(2),
  .standings-table td:nth-child(2) {
    min-width: 0;
    padding-left: 6px;
  }
  .standings-table thead th:nth-child(n + 3) {
    width: 34px;
    letter-spacing: 0.04em;
  }
  .standings-table td:last-child {
    font-size: 20px;
  }
  .th-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .th-short {
    display: inline;
  }
  .standings-table .crest-plate {
    display: none;
  }
  .standings-table .team-identity {
    font-size: 15px;
    gap: 10px;
  }
  .app-footer {
    padding: 24px var(--gutter);
    font-size: 10px;
    letter-spacing: 0.1em;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reference-ticket,
  .stat,
  .btn,
  .home-news-item > .icon {
    transition: none;
  }
}

/* ---- Staff and account screens ---------------------------------------- */
.player-card {
  mask: none;
  padding: 24px;
  gap: 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  transition:
    border-color 0.16s ease,
    transform 0.18s ease;
}
.player-card:hover {
  border-color: #ffe00066;
}
#players > .content-grid {
  gap: 20px;
}
.stack > .btn:not(.btn-text) {
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 16px;
  text-align: left;
}
.stack > .btn-secondary:hover {
  border-color: var(--accent);
}
.tool-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  transition:
    border-color 0.16s ease,
    transform 0.18s ease;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tool-card > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.tool-card strong {
  font-size: 16px;
}
.tool-card small {
  color: var(--muted);
  font-size: 13px;
}
.tool-card > .icon:last-child {
  color: var(--muted);
}
.tool-card:hover > .icon:last-child {
  color: var(--accent);
}
@media (max-width: 760px) {
  .player-card {
    padding: 20px 18px;
    border-radius: 20px;
  }
  .tool-card {
    padding: 16px 18px;
    gap: 14px;
  }
}
:where(.content-grid, .grid-2, .grid-3) > .tool-card {
  margin: 0;
}
:is(.section-head, .panel) h2 + p {
  margin-top: 10px;
}

/* ==========================================================================
   Second pass: feed, matchday, sign-in, hero actions, legibility.
   ========================================================================== */

/* Hero actions and a lighter overlay so the pitch reads. */
.home-hero-actions {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-hero-actions .btn-ghost {
  color: #fff;
  border-color: #ffffff59;
  background: #0000004d;
  backdrop-filter: blur(8px);
}
.home-hero-actions .btn-ghost:hover {
  border-color: var(--accent);
  filter: none;
}
.home-pitch::before {
  background:
    linear-gradient(90deg, #080808c7 0%, #08080866 50%, #08080814 100%),
    linear-gradient(180deg, #08080833 0%, transparent 40%, #08080880 100%);
}
.home-pitch {
  background-position: center 58%;
}

/* Card legibility: darker secondary names, mono watermark. */
.reference-ticket .team-name-secondary {
  opacity: 0.76;
  font-weight: 600;
}
.reference-ticket .ticket-watermark {
  opacity: 1;
}

/* Minimum text size. */
.stat > small,
.home-news-item span,
.compact-row small,
.field small,
.card-caption,
.person-row small,
.tool-card small,
.app-footer a {
  font-size: max(13px, 0.8125rem);
}
.app-rail nav a {
  font-size: 12px;
}
.badge {
  font-size: 12px;
}
.rail-season {
  font-size: 11px;
}
.th-short,
.standings-table thead th {
  font-size: 12px;
}

/* Light mode: a cooler page so cream cards keep their edge. */
html[data-theme="light"] {
  --bg: #e8e8e1;
  --surface-2: #f2f2ec;
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --bg: #e8e8e1;
    --surface-2: #f2f2ec;
  }
}

/* Mobile nav: soft fade so content never collides with the pill. */
@media (max-width: 760px) {
  .app-shell::after {
    content: "";
    position: fixed;
    inset: auto 0 0;
    height: 132px;
    background: linear-gradient(to top, var(--bg) 38%, transparent);
    pointer-events: none;
    z-index: 20;
  }
}

/* A lone in-page jump link is just noise. */
.tabs:has(> a:only-child) {
  display: none;
}

/* ---- Club feed -------------------------------------------------------- */
.feed-stream {
  gap: 44px;
}
.feed-item {
  display: grid;
  gap: 16px;
}
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.feed-head h2::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.feed-item > .reference-ticket {
  margin: 0;
}
.feed-extra {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
@media (min-width: 1001px) {
  .feed-layout > aside {
    position: sticky;
    top: 24px;
  }
}
.story-card {
  border: 1px solid var(--hairline);
  overflow: hidden;
}

/* ---- Matchday workspace ----------------------------------------------- */
.metrics[aria-label="Availability totals"] {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.metrics[aria-label="Availability totals"] > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}
.metrics[aria-label="Availability totals"] > span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.metrics[aria-label="Availability totals"] .yes::before {
  background: var(--accent);
}
.metrics[aria-label="Availability totals"] .maybe::before {
  background: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.metrics[aria-label="Availability totals"] .no::before {
  background: var(--red);
}
.metrics[aria-label="Availability totals"] b {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}
.tabs[data-matchday-tabs] {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 16px;
  padding: 0;
  margin-bottom: 24px;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.tabs[data-matchday-tabs] > .notice {
  display: grid;
  align-content: center;
  gap: 4px;
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--r-tile);
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.tabs[data-matchday-tabs] > .notice strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  counter-reset: step;
}
.workflow-steps li {
  min-width: 0;
  padding: 0;
  background: none;
}
.workflow-steps a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas: "n t" "n s";
  column-gap: 14px;
  align-items: center;
  height: 100%;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}
.workflow-steps a::before {
  counter-increment: step;
  content: counter(step);
  grid-area: n;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.workflow-steps a > span {
  grid-area: t;
  font-weight: 700;
}
.workflow-steps a > small {
  grid-area: s;
  font-size: 13px;
  color: var(--muted);
}
.workflow-steps a:hover {
  border-color: var(--accent);
}
.workflow-steps a.active,
.workflow-steps a[aria-current] {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.workflow-steps a.active::before,
.workflow-steps a[aria-current]::before {
  background: #111;
  color: var(--accent);
}
.workflow-steps a.active > small,
.workflow-steps a[aria-current] > small {
  color: #111c;
}
.workflow-steps li.complete a {
  box-shadow: none;
  border-color: #ffe0007a;
}
details.panel {
  margin: 0;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
details.panel > summary {
  padding: 14px 18px;
  font-weight: 600;
  cursor: pointer;
}
details.panel > :not(summary) {
  margin-inline: 18px;
  padding-bottom: 18px;
}
.selection-list {
  gap: 10px;
}
.selection-row {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  padding: 14px 18px;
  gap: 12px 20px;
  align-items: center;
}
.selection-row:has(> [data-availability-pill]) {
  grid-template-columns: minmax(200px, 1.1fr) 96px minmax(0, 2.4fr);
  align-items: start;
}
.selection-row:not(:has(> [data-availability-pill])) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.selection-row:has(> [data-availability-pill]) > [data-availability-pill] {
  grid-column: 2;
}
.selection-row:has(> [data-availability-pill]) > .stack,
.selection-row:has(> [data-availability-pill]) > .choice-list {
  grid-column: 3;
}
.selection-row.unavailable {
  opacity: 0.7;
}
.selection-row.published-conflict {
  border-color: var(--red);
}
.selection-row .team-player-ident {
  padding: 0;
  align-items: center;
}
.selection-row .team-player-ident a {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}
.selection-row .team-player-ident a:hover {
  color: var(--accent);
}
.selection-row [data-availability-pill] {
  justify-content: center;
  align-self: center;
  min-width: 0;
  text-transform: capitalize;
}
.selection-row [data-availability-pill].yes {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.selection-row [data-availability-pill].no {
  border-color: var(--red);
  color: var(--red-text);
}
.selection-row > .stack[data-matchday-panel] {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
}
.selection-row > .stack[data-matchday-panel][hidden] {
  display: none;
}
.selection-row > .stack > .actions {
  grid-column: 1 / -1;
  gap: 12px;
}
.selection-row > .stack > .actions .btn {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}
.selection-row > .stack > .actions > span {
  font-size: 13px;
  color: var(--muted);
}
.selection-row .field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.selection-row .field select {
  min-height: 44px;
}
.selection-row details.panel summary {
  padding: 11px 16px;
  font-size: 14px;
}
.selection-row .choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  align-self: center;
}
.selection-row .choice-list .check-row {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
}
.selection-row .choice-list .check-row:has(input:checked) {
  border-color: var(--accent);
  background: #ffe00026;
}
@media (max-width: 1000px) {
  .tabs[data-matchday-tabs] {
    grid-template-columns: minmax(0, 1fr);
  }
  .selection-row:has(> [data-availability-pill]) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .selection-row:has(> [data-availability-pill]) > [data-availability-pill] {
    grid-column: 2;
  }
  .selection-row:has(> [data-availability-pill]) > .stack,
  .selection-row:has(> [data-availability-pill]) > .choice-list {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .workflow-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .selection-row,
  .selection-row:has(> [data-availability-pill]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
  }
  .selection-row > .choice-list,
  .selection-row > .stack {
    grid-column: 1 / -1;
  }
  .selection-row > .stack[data-matchday-panel] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Sign in ----------------------------------------------------------- */
.auth-layout {
  gap: 20px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}
.auth-card {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 36px;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 28px;
}
.auth-card .tabs {
  justify-self: start;
  margin: 0;
}
.auth-card form.stack {
  gap: 20px;
}
.auth-card .field {
  display: grid;
  gap: 8px;
}
.auth-card .field > span {
  margin: 0;
}
.password-control {
  position: relative;
  display: block;
}
.password-control input {
  width: 100%;
  padding-right: 92px;
}
.password-control .password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.password-control .password-toggle:hover {
  background: var(--accent);
  color: #111;
}
.auth-art {
  border: 1px solid var(--hairline);
  border-radius: 28px;
  overflow: hidden;
}
.auth-art .btn {
  align-self: flex-start;
  width: auto;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.auth-art .btn:hover {
  filter: none;
  color: var(--accent);
}
@media (max-width: 760px) {
  .auth-card {
    padding: 24px 20px;
    border-radius: 24px;
  }
  .auth-art {
    border-radius: 24px;
  }
}

/* Empty per-player forms exist only to be referenced by id; keep them out of the flow. */
form[data-availability-form] {
  display: none;
}
.panel details.panel,
.selection-row details.panel {
  padding: 0;
  margin: 0;
  background: var(--surface-2);
}
.selection-row details.panel > summary {
  padding: 11px 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.selection-row details.panel[open] > :not(summary) {
  display: grid;
  gap: 12px;
}
.stack > .btn-text {
  justify-self: start;
}
.selection-row [data-availability-pill] {
  align-self: start;
  margin-top: 8px;
}
.selection-row details.panel > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}
.selection-row details.panel[open] > summary::after {
  content: "–";
}
html[data-theme="light"] .selection-row details.panel > summary::after {
  color: var(--text);
}

/* ==========================================================================
   Third pass: accounts, updates, live editor, shared selects.
   ========================================================================== */

/* Buttons inside section heads keep their own colours. */
.section-head > .btn-primary {
  color: var(--on-accent);
}
.section-head > .btn-secondary {
  color: var(--text);
}

/* One select style everywhere. */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0b0aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}
html[data-theme="light"] select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23595953' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23595953' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* Plain metric strips become tiles. */
.metric,
.metrics:not([aria-label="Availability totals"]) > div {
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
}
.metrics:not([aria-label="Availability totals"]) {
  gap: 16px;
  margin-block: 8px 28px;
}
.metrics:not([aria-label="Availability totals"]) > div > strong,
.metric strong {
  order: 2;
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metrics:not([aria-label="Availability totals"]) > div > :is(a, span, small),
.metric > span,
.metric small {
  order: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.metrics > div > a:hover {
  color: var(--accent);
}

/* Account cards. */
.record-card.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "person badge" "actions actions";
  align-items: start;
  gap: 18px 16px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  transition: border-color 0.16s ease;
}
.record-card.panel:hover {
  border-color: #ffe00066;
}
.record-card > .person-row {
  grid-area: person;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.record-card > .person-row h3 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.record-card > .person-row p {
  margin: 0 0 2px;
  overflow-wrap: anywhere;
}
.record-card > .person-row .muted {
  font-size: 14px;
}
.record-card > .badge {
  grid-area: badge;
}
.record-card > .badge.approved {
  background: #ffe00026;
  border-color: #ffe00080;
  color: var(--text);
}
.record-card > .actions {
  grid-area: actions;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.record-card > .actions > details {
  flex: 1 1 220px;
  min-width: 0;
}
.record-card > .actions > details > summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  cursor: pointer;
  font-weight: 600;
}
.record-card > .actions > details[open] {
  flex-basis: 100%;
  order: 3;
}
.player-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

/* Collapsible sections that sit directly on a page. */
.page-content > details {
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
}
.page-content > details > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
}
.page-content > details > summary > .muted {
  font-size: 14px;
  font-weight: 400;
}
.page-content > details > :not(summary) {
  margin-inline: 22px;
  padding-bottom: 22px;
}

/* Live editor scoreboard. */
.live-match-summary {
  gap: 24px;
  padding: 32px;
}
.live-match-summary .team-identity.small {
  flex-direction: row;
  gap: 18px;
  text-align: left;
  font-size: clamp(20px, 2.4vw, 30px);
}
.live-match-summary .team-identity.small:last-child {
  flex-direction: row-reverse;
  text-align: right;
  justify-self: end;
}
.live-match-summary .crest-plate {
  width: 64px;
  height: 64px;
}
.live-match-summary .crest-plate img {
  width: 52px;
  height: 52px;
}
.live-match-summary > div > strong {
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.live-update-status {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .record-card.panel {
    padding: 20px 18px;
    border-radius: 20px;
  }
  .metrics:not([aria-label="Availability totals"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .live-match-summary {
    padding: 20px 14px;
  }
  .live-match-summary .team-identity.small,
  .live-match-summary .team-identity.small:last-child {
    flex-direction: column;
    text-align: center;
    justify-self: stretch;
    font-size: 16px;
  }
  .live-match-summary .crest-plate {
    width: 52px;
    height: 52px;
  }
  .live-match-summary .crest-plate img {
    width: 42px;
    height: 42px;
  }
  .page-content > details > summary {
    flex-direction: column;
    gap: 2px;
  }
}
.record-card > .person-row {
  padding: 0;
  border: 0;
  margin: 0;
}

/* ==========================================================================
   Fourth pass: forms, toggles, profile tiles.
   ========================================================================== */

/* Clickable metric tiles (e.g. Player of the Match) match the others. */
.metrics:not([aria-label="Availability totals"]) > :is(button, a) {
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: var(--r-tile);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    transform 0.18s ease;
}
.metrics:not([aria-label="Availability totals"]) > :is(button, a):hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.metrics:not([aria-label="Availability totals"]) > :is(button, a) > span {
  order: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.metrics:not([aria-label="Availability totals"]) > :is(button, a) > strong {
  order: 2;
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1;
  font-weight: 700;
}
.metrics:not([aria-label="Availability totals"]) > :is(button, a) > small {
  order: 3;
  font-size: 13px;
  color: var(--muted);
}

/* Radios as dots, checkboxes as switches. */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: none;
  transition: border-color 0.16s ease;
}
input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.16s ease;
}
input[type="radio"]:checked {
  border-color: var(--accent);
}
input[type="radio"]:checked::before {
  transform: scale(1);
}
html[data-theme="light"] input[type="radio"]:checked {
  border-color: #111;
}
html[data-theme="light"] input[type="radio"]::before {
  background: #111;
}
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}
input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #111;
}
input[type="checkbox"]:disabled {
  opacity: 0.45;
}
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.check-row:has(> input[type="checkbox"]) {
  flex-direction: row-reverse;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}
.choice-list .check-row {
  gap: 10px;
}
.choice-list .check-row:has(input:checked) {
  background: #ffe00026;
  border-color: var(--accent);
  color: var(--text);
}
.choice-list .check-row:has(input[type="radio"]) {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-2);
}
.choice-list .check-row:has(input[type="radio"]:checked) {
  background: #ffe00026;
  border-color: var(--accent);
}

/* Form footers and filter buttons. */
.page-content > form:has(> .actions:last-child) {
  margin-bottom: 28px;
}
.form-grid > .btn {
  justify-self: start;
  width: auto;
}
.match-management-nav > .eyebrow {
  margin: 0 14px 0 12px;
  white-space: nowrap;
}
.tabs + .btn-text {
  display: inline-flex;
  margin: -12px 0 20px;
}
.match-editor-layout {
  margin-bottom: 28px;
}
.match-editor-layout > form > .actions {
  padding-top: 8px;
}
.tabs,
.match-management-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar,
.match-management-nav::-webkit-scrollbar {
  display: none;
}
.match-management-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.match-management-nav > a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.match-management-nav > a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.match-management-nav > .eyebrow {
  flex: none;
}

/* ==========================================================================
   Review fixes: task tiles and light-mode focus visibility.
   ========================================================================== */

/* Task tiles: description stays sentence case; arrow sits top-right. */
.metric.task-card {
  position: relative;
  color: var(--text);
  transition:
    border-color 0.16s ease,
    transform 0.18s ease;
}
.metric.task-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.metric small {
  order: 3;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
}
.metric.task-card > svg {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.metric.task-card:hover > svg {
  color: var(--accent);
}
html[data-theme="light"] .metric.task-card:hover > svg {
  color: var(--text);
}
.stack > section:has(> .section-head),
.stack > .actions + section {
  margin-top: 8px;
}
.home-hero-actions + *,
.actions + .stack {
  margin-top: 24px;
}

/* Focus rings need 3:1 against the page in both themes. */
html[data-theme="light"] :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
html[data-theme="light"] input[type="checkbox"]:focus-visible,
html[data-theme="light"] input[type="radio"]:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}
html[data-theme="light"] .app-rail :focus-visible,
html[data-theme="light"] .mobile-nav :focus-visible,
html[data-theme="light"] .home-pitch :focus-visible,
html[data-theme="light"] .auth-art :focus-visible {
  outline-color: var(--accent);
}
html[data-theme="light"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px #11111133;
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
  }
  html[data-theme="system"] .app-rail :focus-visible,
  html[data-theme="system"] .mobile-nav :focus-visible,
  html[data-theme="system"] .home-pitch :focus-visible,
  html[data-theme="system"] .auth-art :focus-visible {
    outline-color: var(--accent);
  }
}
/* Dark mode: one consistent ring colour. */
html:not([data-theme="light"]) :is(a, button, summary):focus-visible {
  outline-color: var(--accent);
}

/* ==========================================================================
   Polish layer.
   ========================================================================== */

/* Staff overview rhythm. */
.reference-ticket ~ .actions {
  margin-top: 20px;
}
[aria-labelledby="today-work-heading"] {
  margin-top: var(--section-gap);
}
.metrics:has(> :nth-child(6):last-child):not([aria-label]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .metrics:has(> :nth-child(6):last-child):not([aria-label]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.panel.stack[aria-label="Matchday fixture"] {
  gap: 12px;
}
.panel.stack[aria-label="Matchday fixture"] > .section-head {
  margin: 8px 0 0;
}

/* Empty states. */
.empty-state:not(.panel) {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 24px;
  border: 1px dashed var(--hairline);
  border-radius: var(--r-tile);
  text-align: center;
  color: var(--muted);
}
.empty-state h2,
.empty-state h3 {
  margin: 0;
  color: var(--text);
}

/* Club-coloured details. */
::selection {
  background: var(--accent);
  color: #111;
}
* {
  scrollbar-color: #77777788 transparent;
  scrollbar-width: thin;
}
html {
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  .page-content > :nth-child(-n + 6) {
    animation: rise-in 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .page-content > :nth-child(2) {
    animation-delay: 0.04s;
  }
  .page-content > :nth-child(3) {
    animation-delay: 0.08s;
  }
  .page-content > :nth-child(4) {
    animation-delay: 0.12s;
  }
  .page-content > :nth-child(5) {
    animation-delay: 0.16s;
  }
  .page-content > :nth-child(6) {
    animation-delay: 0.2s;
  }
}
.metrics[aria-label="Outstanding work"]:has(> :nth-child(6)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metrics[aria-label="Outstanding work"]:has(> :nth-child(5):last-child) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .metrics[aria-label="Outstanding work"],
  .metrics[aria-label="Outstanding work"]:has(> :nth-child(5):last-child),
  .metrics[aria-label="Outstanding work"]:has(> :nth-child(6)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Match card: broadcast face (dark, floodlit) over a cream detail strip.
   ========================================================================== */
.reference-ticket .ticket-face-start {
  stop-color: #232323;
}
.reference-ticket .ticket-face-end {
  stop-color: #0e0e0e;
}
.reference-ticket .ticket-teams {
  grid-template-columns: 42% 16% 42%;
  padding: 22px 0 12px;
}
.reference-ticket .team-identity,
.reference-ticket.featured .team-identity {
  color: #fff;
  gap: 10px;
}
.reference-ticket .team-identity > strong {
  color: #fff;
  text-shadow: 0 2px 14px #000c;
  font-weight: 700;
}
.reference-ticket .team-name-secondary {
  color: var(--accent);
  opacity: 1;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.reference-ticket .team-identity > strong:not(:has(.team-name-secondary))::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--accent);
}
.reference-ticket .crest-plate {
  width: clamp(50px, 15.5cqw, 94px);
  height: clamp(50px, 15.5cqw, 94px);
  border-radius: 50%;
  background: #101010;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--accent),
    0 12px 26px #000c;
}
.reference-ticket .crest-plate img {
  border-radius: 50%;
}
.reference-ticket .crest-plate:not(.has-logo) {
  border: 0;
  background: radial-gradient(circle at 30% 25%, #333, #121212);
}
.reference-ticket .crest-plate:not(.has-logo) b {
  color: #fff;
  font-size: clamp(16px, 5.4cqw, 28px);
}
.reference-ticket .ticket-versus {
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  border-radius: 0;
  color: #fff;
  font-style: italic;
  font-size: clamp(28px, 9.5cqw, 54px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 18px #000;
  transform: skewX(-8deg);
}
.reference-ticket .ticket-score-pill,
.reference-ticket .ticket-score-pill b,
.reference-ticket .ticket-score-pill i {
  color: #fff;
  text-shadow: 0 4px 18px #000;
}
.reference-ticket .ticket-score-pill i {
  color: var(--accent);
}
.reference-ticket .ticket-top .badge {
  box-shadow: 0 4px 14px #000a;
}

/* Detail strip: icon, label, big date, venue. */
.reference-ticket .ticket-competition,
.reference-ticket .ticket-venue {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
}
.reference-ticket .ticket-competition > .icon,
.reference-ticket .ticket-venue > .icon {
  width: clamp(18px, 5.4cqw, 30px);
  height: clamp(18px, 5.4cqw, 30px);
  margin-bottom: 4px;
  color: #111;
}
.reference-ticket .ticket-competition > strong {
  font-family: var(--font-display);
  font-size: clamp(13px, 4.2cqw, 22px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.reference-ticket .ticket-competition > span {
  color: #6a6a62;
  font-size: clamp(11px, 3.1cqw, 16px);
}
.reference-ticket .ticket-venue {
  padding-right: clamp(34px, 9cqw, 52px);
}
.reference-ticket .ticket-venue > strong {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
@media (max-width: 760px) {
  .reference-ticket .ticket-teams {
    padding-top: 18px;
  }
}
.reference-ticket .ticket-competition > strong {
  font-size: clamp(11px, 3.5cqw, 19px);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.reference-ticket .crest-plate {
  width: clamp(52px, 16.5cqw, 100px);
  height: clamp(52px, 16.5cqw, 100px);
}
.reference-ticket .ticket-bottom {
  grid-template-columns: 29% 41% minmax(0, 1fr);
}
.reference-ticket .team-name-secondary {
  max-width: 100%;
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
@container ticket (max-width: 440px) {
  .reference-ticket .team-name-secondary {
    font-size: 0.7em;
    letter-spacing: 0.02em;
  }
  .reference-ticket .team-identity > strong {
    letter-spacing: 0;
  }
}
@container ticket (max-width: 440px) {
  .reference-ticket .ticket-teams {
    padding: 14px 0 2px;
  }
  .reference-ticket .team-identity {
    gap: 5px;
    font-size: clamp(13px, 4.2cqw, 18px);
  }
  .reference-ticket .crest-plate {
    width: clamp(38px, 12cqw, 56px);
    height: clamp(38px, 12cqw, 56px);
    box-shadow:
      0 0 0 1.5px #fff,
      0 0 0 3px var(--accent),
      0 6px 14px #000c;
  }
  .reference-ticket .team-identity > strong:not(:has(.team-name-secondary))::after {
    margin-top: 4px;
    height: 2px;
    width: 30px;
  }
  .reference-ticket .ticket-venue {
    padding-right: 32px;
  }
  .reference-ticket .ticket-venue > strong {
    overflow-wrap: normal;
    word-break: normal;
    font-size: clamp(10px, 3cqw, 13px);
  }
}

/* ==========================================================================
   Accordion panels (closed by default).
   ========================================================================== */
.panel.accordion {
  padding: 0;
  overflow: hidden;
}
.accordion > details {
  margin: 0;
}
.accordion > details > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  cursor: pointer;
  list-style: none;
  transition: background 0.16s ease;
}
.accordion > details > summary::-webkit-details-marker {
  display: none;
}
.accordion > details > summary:hover {
  background: var(--surface-2);
}
.accordion > details > summary > .section-head {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.accordion > details > summary .section-head p.muted {
  margin: 6px 0 0;
}
.accordion-meta {
  flex: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-color: var(--hairline);
  background: var(--surface-2);
}
.accordion > details > summary::after {
  content: "";
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6f6f2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition:
    transform 0.2s ease,
    border-color 0.16s ease;
}
html[data-theme="light"] .accordion > details > summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] .accordion > details > summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}
.accordion > details > summary:hover::after {
  border-color: var(--accent);
}
.accordion > details[open] > summary::after {
  transform: rotate(180deg);
  border-color: var(--accent);
}
.accordion > details[open] > summary {
  border-bottom: 1px solid var(--hairline);
}
.accordion-body {
  padding: 24px 28px 28px;
}
@media (max-width: 760px) {
  .accordion > details > summary {
    flex-wrap: wrap;
    padding: 20px 18px;
    gap: 12px;
  }
  .accordion > details > summary > .section-head {
    flex-basis: calc(100% - 60px);
  }
  .accordion-meta {
    order: 3;
  }
  .accordion-body {
    padding: 20px 18px 22px;
  }
}

/* Match page goal scorers: rows are "name + optional badge", not the
   "badge + text + score" layout .compact-row is built for, so the name must
   not land in the 40-44px badge column. */
#match-scorers .compact-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
#match-scorers .compact-row > strong {
  font-family: inherit;
  font-size: 16px;
  overflow-wrap: anywhere;
}
#match-scorers .compact-row .badge {
  width: auto;
  height: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
}
