:root {
  color-scheme: light;
  --paper: #f5f3ef;
  --white: #fff;
  --ink: #171619;
  --night: #151518;
  --line: #dfdbd4;
  --muted: #57545b;
  --red: #b9182e;
  --red-light: #ff4155;
  --red-dark: #951124;
  --body: Inter, system-ui, sans-serif;
  --display: "Roboto Condensed", "Arial Narrow", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.6 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
button, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #386ce0; outline-offset: 4px; }
.top :focus-visible, .hero :focus-visible, .foot :focus-visible, .overview :focus-visible { outline-color: #ffdf78; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.04; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 850; letter-spacing: -.025em; }
.wrap { width: min(100% - 3rem, 1200px); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 5; padding: .6rem 1rem; transform: translateY(-160%); background: var(--white); }
.skip:focus { transform: none; }

.top { background: var(--night); color: var(--white); border-bottom: 1px solid #373339; }
.top-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; color: var(--white); text-decoration: none; }
.brand img { object-fit: contain; }
.brand b { display: block; font: 900 1.65rem/.98 var(--display); letter-spacing: .035em; }
.brand small { display: block; margin-top: .25rem; color: #cfcbcf; font-size: .65rem; font-weight: 700; letter-spacing: .095em; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: clamp(.5rem, 1.8vw, 1.9rem); }
.top nav a { display: grid; align-items: center; min-height: 76px; padding-inline: .35rem; border-bottom: 3px solid transparent; color: #e6e1e5; font-size: .93rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { border-color: var(--red-light); color: #fff; }

.hero { isolation: isolate; position: relative; overflow: hidden; color: var(--white); background: #301017; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; inset: 0; }
.hero::before {
  background: url("/assets/old-trafford.webp") center 55% / cover no-repeat;
  filter: grayscale(38%) saturate(.83);
}
.hero::after {
  background: linear-gradient(90deg, #18090d 0%, #260b13ed 26%, #390d196c 60%, #230a1230 100%),
              linear-gradient(0deg, #170a10c9, transparent 53%);
}
.hero-inner { min-height: clamp(490px, 39vw, 620px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 3rem 5.2rem; }
.eyebrow { display: flex; align-items: center; gap: .6rem; color: #f3dce1; font-size: .79rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow i { display: block; width: 1.6rem; height: .23rem; background: var(--red-light); }
.hero h1 { margin-top: 1.1rem; font-size: clamp(3.9rem, 9.1vw, 8.65rem); letter-spacing: -.045em; font-weight: 900; line-height: .83; }
.hero h1 span { display: block; color: var(--red-light); }
.hero-copy { max-width: 41ch; margin-top: 1.4rem; color: #f2e8ea; font-size: clamp(1rem, 1.6vw, 1.16rem); }
.hero .button { margin-top: 1.55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; width: max-content; min-height: 47px; padding: .65rem 1.02rem; font-size: .93rem; font-weight: 750; text-decoration: none; }
.button-red { background: var(--red); color: var(--white); }
.button-red:hover { background: var(--red-dark); }
.button-dark { background: var(--night); color: var(--white); }
.button-dark:hover { background: var(--red); }
.hero-credit { position: absolute; inset: auto 0 .9rem; text-align: right; color: #fff0f2; font-size: .8rem; pointer-events: none; }
.hero-credit a { pointer-events: auto; padding: .2rem .4rem; background: #170a10a6; }

.overview { color: var(--white); background: #211d23; }
.overview-inner { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(235px, 1fr); }
.next, .position { padding-block: 1.6rem; }
.next { padding-right: clamp(1rem, 3vw, 2.8rem); }
.position { position: relative; isolation: isolate; padding-inline: clamp(1.4rem, 3.4vw, 2.8rem); background: #a21329; overflow: hidden; }
.position::after { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-linear-gradient(132deg, transparent 0 20px, #ffffff09 20px 21px, transparent 21px 38px); }
.overview h2 { font-size: .85rem; font-family: var(--body); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: #ffced5; }
.next-match { margin-top: 1.05rem; }
.next-details { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(.45rem, 1.4vw, 1.25rem); }
.next .team { font: 800 clamp(1rem, 2.2vw, 1.5rem)/1.08 var(--display); }
.next .team:first-child { justify-content: flex-end; text-align: right; }
.next .team:first-child img { order: 1; }
.next .kickoff { text-align: center; }
.next .kickoff b { display: block; color: #fff; font: 850 clamp(1.25rem, 2.7vw, 1.8rem)/1 var(--display); white-space: nowrap; }
.next .kickoff span { color: #e1d9df; font-size: .79rem; white-space: nowrap; }
.next-notes { margin-top: .85rem; color: #e0d9df; text-align: center; font-size: .81rem; }
.rank { display: flex; align-items: center; gap: .7rem; margin-block: .4rem .6rem; }
.rank strong { font: 900 clamp(2.55rem, 5vw, 3.8rem)/1 var(--display); }
.rank span { font-size: .86rem; line-height: 1.28; }
.rank span b { display: block; font-weight: 750; }
.position-link { color: #fff; font-size: .85rem; font-weight: 700; }

.section { padding-block: 2.65rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; }
.text-link, .story-link, .club-links a { color: var(--red-dark); font-weight: 750; text-decoration-thickness: .1em; }
.text-link:hover, .story-link:hover, .club-links a:hover { color: var(--ink); }
.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.story { display: flex; min-width: 0; flex-direction: column; padding: clamp(1rem, 2vw, 1.55rem); border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--white); }
.story-meta { display: flex; flex-wrap: wrap; gap: .25rem .65rem; color: var(--muted); font-size: .79rem; }
.story-meta span { color: var(--red-dark); font-weight: 750; }
.story h3 { margin-top: .7rem; font-size: 1.65rem; font-weight: 850; }
.story h3 a { text-decoration: none; }
.story h3 a:hover { text-decoration: underline; }
.story > p:not(.story-meta) { margin-top: .65rem; color: var(--muted); font-size: .95rem; }
.story-link { margin-top: auto; padding-top: .8rem; align-self: start; font-size: .89rem; }
.news-edition { padding-top: 0; }
.feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.feed .story { border-top: 1px solid var(--line); border-left: 3px solid var(--red); }
.article { max-width: 780px; width: calc(100% - 3rem); margin-inline: auto; padding-block: clamp(2rem, 7vw, 5rem); }
.article h1 { margin-block: .75rem 1.4rem; font-size: clamp(2.5rem, 6.5vw, 5rem); }
.article .story-meta { margin-top: 1.5rem; }
.lead { font-size: 1.15rem; font-weight: 650; }
.article p + p { margin-top: 1rem; }
.article .button { margin-top: 1.5rem; }

.page-head { background: linear-gradient(115deg, #231519, #4a101e); color: #fff; padding-block: clamp(2.4rem, 5vw, 4.2rem); }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 900; letter-spacing: -.035em; }
.page-head p { margin-top: .6rem; color: #f4dbe0; }
.source { margin-bottom: .85rem; color: var(--muted); font-size: .85rem; }
.stale { color: var(--red-dark); font-weight: 700; }
.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.switch { display: inline-flex; gap: .2rem; padding: .25rem; background: #e5dfda; }
.switch button { border: 0; padding: .55rem .95rem; color: var(--ink); background: transparent; font-weight: 700; }
.switch button[aria-pressed="true"] { background: #241c22; color: #fff; }
.select-label { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 650; }
select { max-width: min(240px, 66vw); appearance: none; color: var(--ink); background: #fff; border: 1px solid #9a9198; padding: .55rem 1.8rem .55rem .7rem; background-image: linear-gradient(45deg, transparent 50%, #4b4149 50%), linear-gradient(135deg, #4b4149 50%, transparent 50%); background-position: right 12px center, right 8px center; background-size: 4px 4px; background-repeat: no-repeat; }
.month + .month { margin-top: 1.6rem; }
.month h3 { text-transform: capitalize; font-size: 1.45rem; margin-bottom: .55rem; }
.match-row { display: grid; align-items: center; min-width: 0; grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr) auto; gap: .9rem; background: #fff; padding: .8rem 1rem; border: 1px solid var(--line); }
.match-row + .match-row { border-top: 0; }
.match-date { font-size: .89rem; font-weight: 750; }
.match-meta { display: block; color: var(--muted); font-size: .79rem; }
.match-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .65rem; align-items: center; }
.match-teams > .team:first-child { justify-content: flex-end; text-align: right; }
.match-teams > .team:first-child img { order: 1; }
.match-score { color: var(--red-dark); font: 850 1.17rem/1.1 var(--display); white-space: nowrap; text-align: center; }
.match-metric { color: var(--muted); font-size: .76rem; }
.team { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .93rem; font-weight: 650; }
.team img { flex: none; width: 1.75rem; height: 1.75rem; object-fit: contain; }
.next .team img { width: clamp(1.9rem, 4vw, 3.1rem); height: clamp(1.9rem, 4vw, 3.1rem); }
.match-link { font-size: .82rem; font-weight: 700; }
.notice { background: #fff; padding: 1rem; border-inline-start: 3px solid var(--red); }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: white; white-space: nowrap; }
th, td { padding: .6rem .55rem; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
thead th { background: #241c22; color: #fff; font-size: .85rem; }
table tr :is(th, td):first-child { padding-inline-start: 1rem; }
table tr :is(th, td):last-child { font-weight: 800; padding-inline-end: 1rem; }
table tr :nth-child(2) { text-align: left; }
td { font-size: .93rem; }
tr.highlight { background: #fdedf0; color: #951124; }
tr.highlight th:first-child { box-shadow: inset 4px 0 var(--red); }
.table-key { color: var(--muted); font-size: .85rem; margin-top: .8rem; }
.club { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1rem, 5vw, 4rem); }
.club h2 { margin-bottom: 1rem; }
.club p + p { margin-top: .8rem; }
.club figure { margin: 0; }
.club figure img { width: 100%; height: clamp(270px, 36vw, 460px); object-fit: cover; object-position: center 56%; }
.club figcaption { color: var(--muted); margin-top: .45rem; font-size: .85rem; }
.trophies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-block: 1.4rem; }
.trophies div { border-top: 3px solid var(--red); padding: .65rem; background: #fff; font-size: .84rem; font-weight: 650; }
.trophies b { display: block; color: var(--red-dark); font: 900 2.7rem/1 var(--display); }
.club-links { display: flex; flex-wrap: wrap; gap: .6rem 1.05rem; }
.photo-credits { margin-bottom: 2rem; color: var(--muted); }
.photo-credits h2 { color: var(--ink); font-size: 1.6rem; }
.photo-credits ul { padding-left: 1.2rem; margin-bottom: 0; }
.foot { background: var(--night); color: #dad5db; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding-block: 1.6rem; }
.foot p { margin-top: .55rem; font-size: .84rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .45rem 1rem; font-size: .86rem; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .top-inner { flex-direction: column; align-items: flex-start; gap: 0; padding-top: .7rem; }
  .top nav { width: 100%; justify-content: space-between; gap: .2rem; }
  .top nav a { min-height: 45px; padding-inline: .12rem; font-size: clamp(.76rem, 2.5vw, .93rem); }
  .hero-inner { min-height: 450px; }
  .hero::before { background-position: 62% center; }
  .hero::after { background: linear-gradient(90deg, #1c090fe8, #350e1975), linear-gradient(0deg, #160a10b0, transparent 80%); }
  .overview-inner { width: 100%; grid-template-columns: 1fr; }
  .next, .position { padding: 1.2rem 1rem; }
  .position { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3rem .8rem; }
  .position h2 { grid-column: 1 / -1; }
  .rank { margin: .1rem 0; }
  .stories, .club { grid-template-columns: 1fr; }
  .foot-inner { align-items: flex-start; flex-direction: column; }
  .match-row { grid-template-columns: 1fr auto; gap: .55rem .7rem; }
  .match-teams { grid-row: 2; grid-column: 1 / -1; }
  .match-link { justify-self: end; }
  .match-row .team { font-size: .83rem; }
}

@media (max-width: 450px) {
  .hero h1 { font-size: clamp(2.7rem, 12vw, 3.9rem); }
  .hero-inner { min-height: 396px; padding-bottom: 4rem; }
  .eyebrow { letter-spacing: .1em; }
  .section-head { flex-wrap: wrap; gap: .45rem; }
  .feed { grid-template-columns: 1fr; }
  .match-row { padding-inline: .55rem; }
  .match-row img { width: 1.3rem; height: 1.3rem; }
  .match-score, .next .kickoff b { max-width: 10ch; white-space: normal; overflow-wrap: anywhere; }
  .next .team span { overflow-wrap: anywhere; }
  .trophies div { padding: .45rem; overflow-wrap: anywhere; }
}
