/* The Match Programme: typographic, monochrome, precise. */
:root {
  --programme-rule: #414141;
  --programme-paper: #ece8df;
  --programme-ink: #191919;
}
:root[data-theme="light"] {
  --programme-rule: #d1c9b9;
  --programme-paper: #eee7d8;
  --programme-ink: #191919;
}
.header {
  border-bottom: 1px solid var(--programme-rule);
  box-shadow: none;
}
.header .main-nav > a {
  font-family: Matchday, "Arial Narrow", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.015em;
}
.header .main-nav > a.active:after {
  width: 100%;
  height: 2px;
  border-radius: 0;
  left: 0;
  transform: none;
}
.header .global-search-field {
  border: 1px solid var(--border);
  background: transparent;
}
.layout {
  max-width: 1480px;
  gap: 28px;
}
.sidebar {
  padding-top: 18px;
}
.sidebar > .eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
}
.sidebar .league-button {
  border-radius: 6px;
  min-height: 44px;
  font-size: 12px;
  gap: 11px;
}
.sidebar .league-button.active {
  box-shadow: none;
  background: var(--surface);
  border-left: 2px solid var(--text);
}
.sidebar .league-logo {
  width: 23px;
  height: 23px;
}
.sidebar-note {
  border-top: 1px solid var(--programme-rule);
  padding-top: 16px;
  font-size: 10px;
  line-height: 1.7;
}
.matchday-ribbon {
  background: var(--bg);
  border-bottom: 1px solid var(--programme-rule);
}
.ribbon-label {
  border-right: 1px solid var(--programme-rule);
  min-width: 96px;
}
.ribbon-label > span {
  font:
    10px/1.2 Matchday,
    sans-serif;
  letter-spacing: 0.14em;
}
.ribbon-label > strong {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
}
.score-ticket {
  border-right: 1px solid var(--programme-rule);
  border-radius: 0;
  min-width: 156px;
  padding: 10px 17px;
  gap: 14px;
  background: transparent;
}
.ticket-team > b {
  font-family: Matchday, sans-serif;
  font-size: 18px;
}
.ticket-status {
  font-size: 10px;
}
.programme-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 0 0 20px;
  margin: 0 0 18px;
  border-bottom: 2px solid var(--text);
  grid-column: 1/-1;
  grid-row: 1;
}
.programme-kicker {
  font-size: 10px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--secondary);
}
.programme-heading h1 {
  font-family: Matchday, "Arial Narrow", sans-serif;
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 4px 0 0;
  font-weight: 600;
}
.programme-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.programme-tool {
  border: 1px solid var(--programme-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  padding: 9px 12px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.programme-tool .ui-icon {
  width: 15px;
  height: 15px;
}
.programme-tool:hover {
  background: var(--surface-hover);
}
.spoiler-indicator {
  width: 7px;
  height: 7px;
  border: 1px solid var(--secondary);
  border-radius: 50%;
}
.programme-tool[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.programme-tool[aria-pressed="true"] .spoiler-indicator {
  background: currentColor;
  border-color: currentColor;
}
#matches > .section-title {
  display: none;
}
#matches > .panel {
  border: 0;
  border-radius: 0;
  grid-row: 2;
}
#intelligenceRail {
  grid-row: 2 !important;
}
#matches .match-toolbar {
  border-radius: 8px 8px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-bottom: 0;
}
#matches .date-row {
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 8px 14px;
  min-height: 52px;
  margin-bottom: 22px;
}
#matches .segmented button {
  border-radius: 999px;
  font-size: 12px;
  padding: 9px 13px;
}
#matches .segmented button.selected {
  background: var(--text);
  color: var(--bg);
}
#matchGrid {
  counter-reset: competition;
}
#matchGrid .match-group {
  counter-increment: competition;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 24px;
}
#matchGrid .league-heading {
  background: var(--bg);
  border-top: 1px solid var(--programme-rule);
  border-bottom: 1px solid var(--programme-rule);
  min-height: 49px;
  padding: 9px 12px;
  gap: 10px;
}
#matchGrid .league-heading:before {
  content: counter(competition, decimal-leading-zero);
  font:
    12px Matchday,
    sans-serif;
  color: var(--secondary);
  width: 16px;
  flex: none;
}
#matchGrid .league-heading .competition-link {
  font-family: Matchday, sans-serif;
  font-size: 19px;
  letter-spacing: 0.01em;
  font-weight: 600;
}
#matchGrid .league-heading .league-logo {
  width: 24px;
  height: 24px;
}
#matchGrid .match-row {
  min-height: 66px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
#matchGrid .match-row:last-child {
  border-bottom: 0;
}
#matchGrid .match-row:hover {
  background: var(--surface-hover);
}
#matchGrid .match-scores {
  border: 1px solid var(--programme-rule);
  border-radius: 6px;
  min-width: 64px;
  padding: 6px 8px;
  background: var(--bg);
}
#matchGrid .match-scores b {
  font:
    600 23px/1 Matchday,
    sans-serif;
}
#matchGrid .match-team {
  font-size: 13px;
  font-weight: 500;
}
#matchGrid .match-time {
  font: 11px/1.3 sans-serif;
  color: var(--secondary);
}
#matchGrid .match-time.live {
  color: var(--live);
}
#matchGrid .round-label {
  font-size: 10px;
  letter-spacing: 0.04em;
}
:where(.workspace-card, .match-card, .rail-section) {
  border-radius: 8px;
  box-shadow: none;
}
.workspace-card > h3,
.match-card > h3,
.rail-section h3 {
  font-family: Matchday, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.competition-hero {
  border-top: 2px solid var(--text);
  border-radius: 0 0 8px 8px;
}
.competition-identity h1,
.competition-identity h2,
#competitionHeading {
  font-family: Matchday, sans-serif;
  letter-spacing: -0.015em;
}
.table-scroll {
  border-radius: 6px;
}
.table-scroll th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.table-scroll td {
  font-variant-numeric: tabular-nums;
}
.section-title h1 {
  font-family: Matchday, sans-serif;
  font-size: 42px;
  letter-spacing: -0.02em;
}
#news > .section-title,
#transfers > .section-title {
  padding-bottom: 18px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 24px;
}
#news > .section-title:before {
  content: "02";
  font:
    20px Matchday,
    sans-serif;
  color: var(--secondary);
}
#transfers > .section-title:before {
  content: "03";
  font:
    20px Matchday,
    sans-serif;
  color: var(--secondary);
}
.news-grid .story {
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--programme-rule);
}
.news-grid .story-media {
  border-radius: 4px;
  overflow: hidden;
}
.news-grid .story h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.16;
}
.news-grid .story:first-child h3 {
  font-size: clamp(27px, 3vw, 42px);
}
.story .tag {
  font-family: Matchday, sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.story .story-body {
  padding: 18px 0;
}
body.match-page .match-hero {
  border-top: 2px solid var(--text);
  border-radius: 0 0 8px 8px;
}
body.match-page .fixture-score > b {
  font-family: Matchday, sans-serif;
  letter-spacing: 0;
}
body.match-page .fixture-tabs {
  border-radius: 0;
  border-bottom: 1px solid var(--programme-rule);
}
body.match-page .fixture-tabs button {
  font-family: Matchday, sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.match-notebook {
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--programme-rule);
  margin: 24px 0 12px;
  background: var(--surface);
}
.match-notebook summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
  font-family: Matchday, sans-serif;
  font-size: 24px;
}
.match-notebook summary::-webkit-details-marker {
  display: none;
}
.match-notebook summary > span:nth-child(2) {
  flex: 1;
}
.match-notebook summary small {
  display: block;
  font: 12px/1.5 sans-serif;
  color: var(--secondary);
  margin-top: 4px;
}
.notebook-number {
  font:
    italic 36px Georgia,
    serif;
  color: var(--secondary);
}
.notebook-body {
  padding: 0 20px 20px;
}
.notebook-body label {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
.notebook-body textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--programme-rule);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  font:
    14px/1.7 Georgia,
    serif;
  resize: vertical;
  min-height: 120px;
}
.notebook-body footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--secondary);
  margin-top: 9px;
}
.kickoff-map-dialog {
  width: min(660px, calc(100vw - 24px));
  max-height: 85dvh;
  padding: 0;
  border: 1px solid var(--programme-rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 90px #0008;
}
.kickoff-map-dialog::backdrop {
  background: #000a;
}
.kickoff-map-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 14px;
  border-top: 3px solid var(--text);
}
.kickoff-map-dialog h2 {
  font:
    600 40px/1 Matchday,
    sans-serif;
  letter-spacing: -0.02em;
  margin: 5px 0;
}
.map-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--programme-rule);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.map-description {
  margin: 0;
  padding: 0 24px 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--secondary);
}
.kickoff-map-body {
  border-top: 1px solid var(--programme-rule);
  padding: 12px 24px 24px;
}
.kickoff-slot {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
}
.kickoff-slot h3 {
  font:
    600 18px/1.3 Matchday,
    sans-serif;
  margin: 0;
  padding-top: 18px;
}
.kickoff-slot > div {
  border-left: 1px solid var(--programme-rule);
  padding-left: 18px;
}
.map-fixture {
  display: block;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.map-fixture:hover .map-teams > span {
  text-decoration: underline;
}
.map-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.map-teams .crest {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}
.map-teams small {
  font:
    italic 12px Georgia,
    serif;
  color: var(--secondary);
  padding: 0 3px;
}
.map-meta {
  display: block;
  font-size: 10px;
  color: var(--secondary);
  margin-top: 7px;
  line-height: 1.5;
}
.spoiler-free #matchGrid .score-updated {
  animation: none !important;
}
@media (min-width: 1180px) {
  #matches:not([hidden]):has(#intelligenceRail:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 24px;
    row-gap: 0;
  }
}
@media (max-width: 759px) {
  .layout {
    padding: 16px 12px 88px;
  }
  .programme-heading {
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    gap: 10px;
  }
  .programme-heading h1 {
    font-size: 29px;
    white-space: nowrap;
  }
  .programme-kicker {
    font-size: 8px;
    letter-spacing: 0.09em;
  }
  .programme-tools {
    gap: 5px;
    flex-direction: column;
    align-items: stretch;
  }
  .programme-tool {
    font-size: 9px;
    padding: 5px 9px;
    min-height: 30px;
    justify-content: center;
  }
  .programme-tool .ui-icon {
    width: 12px;
    height: 12px;
  }
  .ribbon-label {
    min-width: 80px;
  }
  .score-ticket {
    min-width: 134px;
    padding: 9px 12px;
  }
  .ticket-team > b {
    font-size: 16px;
  }
  #matches .match-toolbar {
    padding: 8px;
    gap: 6px;
  }
  #matches .segmented button {
    font-size: 11px;
    padding: 8px 10px;
  }
  #matches .date-row {
    margin-bottom: 18px;
    min-height: 46px;
    padding: 5px 10px;
  }
  #matchGrid .match-group {
    margin-bottom: 20px;
  }
  #matchGrid .league-heading {
    min-height: 44px;
    padding: 8px;
    gap: 7px;
  }
  #matchGrid .league-heading .competition-link {
    font-size: 17px;
  }
  #matchGrid .league-heading .league-logo {
    width: 21px;
    height: 21px;
  }
  #matchGrid .match-row {
    min-height: 80px;
  }
  #matchGrid .match-team {
    font-size: 12px;
  }
  #matchGrid .match-scores {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    min-width: 24px;
  }
  #matchGrid .match-scores b {
    font-size: 19px;
  }
  #matchGrid .round-label {
    font-size: 9px;
  }
  #news > .section-title,
  #transfers > .section-title {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .section-title h1 {
    font-size: 32px;
  }
  .news-grid .story:first-child h3 {
    font-size: 29px;
  }
  .news-grid .story:nth-child(n + 2) h3 {
    font-size: 18px;
  }
  .news-grid .story:nth-child(n + 2) {
    padding: 14px 0;
  }
  body.match-page .fixture-tabs button {
    font-size: 16px;
  }
  body.match-page .fixture-score > b {
    font-size: 32px;
  }
  .match-notebook summary {
    padding: 16px;
    font-size: 22px;
  }
  .match-notebook summary small {
    font-size: 11px;
  }
  .kickoff-map-dialog > header {
    padding: 20px 16px 12px;
  }
  .map-description {
    padding: 0 16px 16px;
  }
  .kickoff-map-body {
    padding: 8px 16px 20px;
  }
  .kickoff-slot {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }
  .kickoff-slot > div {
    padding-left: 12px;
  }
  .map-teams {
    font-size: 12px;
    gap: 6px;
  }
  .map-teams .crest {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
#matchGrid .league-heading .league-identity {
  font: inherit;
  gap: 10px;
}
#matchGrid .league-heading .league-identity > span {
  font: inherit;
}
#matchdayIntro {
  border: 0;
  border-left: 2px solid var(--secondary);
  border-radius: 0;
  background: transparent;
  padding: 8px 12px;
  margin-bottom: 16px;
}
#matchdayIntro p {
  font-size: 11px;
}
.spoiler-note {
  grid-column: 1/-1;
  margin: -4px 0 14px;
  font-size: 11px;
  color: var(--secondary);
}
.spoiler-note[hidden] {
  display: none;
}
.notebook-shortcut {
  border: 1px solid var(--programme-rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 7px 12px;
  font-size: 11px;
  cursor: pointer;
}
.mobile-match-identity .notebook-shortcut {
  margin-left: auto;
  flex: none;
}
@media (max-width: 759px) {
  #matchdayIntro {
    display: none;
  }
  #matches .match-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
  }
  #matches .match-toolbar > .segmented {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
    width: auto;
    gap: 3px;
    grid-column: 1;
    grid-row: 1;
    scrollbar-width: none;
  }
  #matches .match-toolbar > .segmented button {
    flex: none;
    font-size: 10px;
    padding: 8px 9px;
    white-space: nowrap;
  }
  #matches .match-toolbar #filtersButton {
    grid-column: 2;
    grid-row: 1;
    width: 34px;
    height: 34px;
    min-width: 0;
    margin: 0;
    padding: 8px;
  }
  #matches .match-toolbar > .league-picker:not([hidden]) {
    grid-column: 1/-1;
    grid-row: 2;
  }
  #matchGrid .league-heading .league-identity {
    font-size: 17px;
  }
  .mobile-match-identity {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 11px;
  }
  .bottom-nav a.active,
  .mobile-nav a.active {
    color: var(--text);
  }
}
/* Keep navigational accents neutral; colour carries match meaning. */
:root:not([data-theme="light"]) {
  --brand: #ededed;
  --accent: #ededed;
  --accent-fill: #e3e3e3;
  --accent-soft: #333;
  --masthead-text: #f4f4f4;
}
:root[data-theme="light"] {
  --bg: #fff;
  --surface: #f3eddf;
  --surface-raised: #eae2d2;
  --surface-hover: #e8e0d0;
  --text: #202020;
  --secondary: #635f56;
  --muted: #706b62;
  --accent: #27241f;
  --accent-fill: #27241f;
  --accent-soft: #e7dfcf;
  --brand: #27241f;
  --masthead: #eee7d8;
  --masthead-text: #202020;
}
#news > .section-title,
#transfers > .section-title {
  justify-content: flex-start;
  gap: 18px;
}
#news > .section-title > input,
#news > .section-title > label,
#transfers > .section-title > input {
  margin-left: auto;
}
.mobile-bottom-nav a.active {
  color: var(--text);
}
@media (max-width: 759px) {
  #news > .section-title,
  #transfers > .section-title {
    gap: 12px;
  }
}
.notebook-body footer{padding:10px 0 0;margin-top:0;border:0;min-height:0;background:transparent}
.match-notebook[open] summary>.ui-icon{transform:rotate(90deg)}
