:root {
  color-scheme: dark;
  --muted: #adbed1;
}

body { line-height: 1.5; }
#homeIntro:not(.compact) {
  padding-block: clamp(22px, 4vw, 48px);
  background: linear-gradient(105deg, #12393d, #102438 60%, #132f3b);
}
#homeIntro h1 { font-size: clamp(28px, 4vw, 48px); }
#homeDate { color: #c1dbdf; }
.home-links { gap: 10px; }
.home-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  font-weight: 650;
}
.home-links a:hover { border-color: var(--green); }
#matches .home-tabs { background: #0c1522; }
#matches .home-tabs button { min-height: 44px; }
.match-controls { display: flex; flex-direction: column-reverse; }
#matches .scoreboard-tools { background: #142234; }
#matches :is(input, select, .scoreboard-tools button) { min-height: 44px; }
#matchSearch { padding-inline: 13px; }
#matches .match-filters { margin-top: 0; }
#matchList .fixture-group { background: #1a2d42; color: #d7e6f7; }
#matchList .match-row { grid-template-columns: 44px minmax(0, 1fr); }
#matchList .match-entry { padding-inline: 0 12px; }
#matchList .match { padding: 12px 4px; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); }
#matchList .score { min-width: 0; font-variant-numeric: tabular-nums; }
#matchList .status { color: #bdcce0; line-height: 1.25; display: inline-block; }
#matchList .favorite-toggle { min-height: 44px; min-width: 44px; }
#homeSidebar .fc-feature { padding: 0 0 14px; gap: 8px; }
#homeSidebar .fc-feature img { display: block; width: 100%; height: auto; max-height: 205px; object-fit: contain; background: #08121d; }
#homeSidebar .fc-feature :is(span, strong) { margin-inline: 14px; }
.fc-footer-links { gap: 16px; margin-top: 8px; }
.fc-footer-links a { color: var(--text); text-underline-offset: 3px; }

@media (max-width: 600px) {
  .head > nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
  .head > nav button { flex: none; min-height: 44px; }
  #matches .home-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #matches .home-tabs button { padding-inline: 2px; }
  #matchList .match { grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr); gap: 4px; }
  #matchList .team-with-logo { flex-direction: column; align-items: flex-start; gap: 3px; }
  #matchList .team-with-logo.right { flex-direction: column-reverse; align-items: flex-end; }
  #matchList .team-logo { width: 22px; height: 22px; }
  #matchList .team { font-size: 13px; line-height: 1.25; }
  #matches input, #matches select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card { transition: none; }
  .news-card:hover { transform: none; }
}

.fixture-page-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 8px 8px;
  color: var(--green);
  font-weight: 650;
  text-underline-offset: 3px;
}

.match-controls { flex-direction: column; }
#matches .match-primary { display: grid; grid-template-columns: minmax(0,1fr) auto; }
#matchSearch { min-width: 0; width: 100%; }
.match-refine { margin: 0 0 8px; border-bottom: 1px solid var(--line); }
.match-refine summary { cursor: pointer; min-height: 44px; padding: 10px 4px; font-weight: 650; }
.match-refine[open] { padding-bottom: 6px; }
@media (max-width: 600px) {
  #home { display: none; }
  #homeIntro:not(.compact) { padding-block: 12px; }
  #homeIntro h1 { font-size: clamp(23px, 6vw, 30px); }
  .layout { padding-top: 4px; }
  #matches.section { margin-top: 10px; }
}

#matchList .fixture-group {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.fixture-group small { display: block; color: var(--muted); font-weight: 500; }
.fixture-group a { color: var(--green); font-size: .8rem; white-space: nowrap; }
#matchList .match-link { color: inherit; text-decoration: none; min-height: 56px; }
#matchList .match-link:hover { background: #172b40; }
#matchList .match span.score, #matchList .match .meta { display: block; }
.match-quick {
  grid-column: 2; justify-self: end; min-height: 36px; margin: 0 .65rem .15rem 0;
  border: 0; background: transparent; color: var(--green); font: inherit; font-size: .75rem;
}
#matchList .match { border-bottom: 0; }

#matches .match-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}
#matches .match-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--text);
  font-size: .875rem;
}
#matches .match-filters select { width: 100%; }
@media (max-width: 600px) {
  #matches .match-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #matches .match-filters > #continent { grid-column: 1 / -1; grid-row: 2; }
}
