/* Club and match pages (site/clubs/, site/matches/, built by data/pages/build_club_match_pages.mjs), on top of legal.css.
   Club colours come from site/clubs/colours.css (.k-<UEFA id>). Plain CSS: these pages run no scripts. */
:root { --comp: var(--amber); --card: #121A2E; --card-hi: #18213A; }
.comp-UCL { --comp: #FFC24D; }
.comp-UEL { --comp: #3FD0C9; }
.comp-UECL { --comp: #A98BFF; }
main.wide { width: min(1080px, calc(100% - 32px)); padding-top: 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Club badge: the three-letter code in the club's colours with a kit stripe (never a crest) */
.kit { position: relative; display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; margin-right: 10px; border: 2px solid var(--ring, #3B4767); border-radius: 50%; background: var(--fill, #131D3B); color: var(--on, var(--white)); font: 700 12px/1 var(--display); letter-spacing: .02em; vertical-align: middle; overflow: hidden; }
.kit::after { content: none; }
.kit-xl { width: 88px; height: 88px; margin: 0; border-width: 3px; font-size: 28px; box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 6px rgba(255,255,255,.04); }


/* Header band: floodlight glow in the competition colour */
.hero { position: relative; margin: 0 0 28px; padding: 32px 28px 24px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: radial-gradient(60% 90% at 15% -10%, color-mix(in srgb, var(--comp) 26%, transparent), transparent 70%), radial-gradient(60% 90% at 85% -10%, color-mix(in srgb, var(--comp) 18%, transparent), transparent 70%), linear-gradient(180deg, #141C33, #0D1426); }
.hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--comp); opacity: .9; }
.hero .eyebrow { color: var(--comp); }
.hero h1 { margin-bottom: 10px; }
.hero .updated { margin-bottom: 0; }
.hero p:last-child { margin-bottom: 0; }
.hero.club { display: flex; align-items: center; gap: 24px; }
.hero.club::before { background: var(--stripe, var(--comp)); height: 6px; }
.hero.match { text-align: center; }
.hero.match .eyebrow { margin-bottom: 18px; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 18px; }
.side { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font: 700 22px/1.05 var(--display); }
.side:hover span { color: var(--amber); }
.vs { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.vs .score { color: var(--white); font: 700 56px/1 var(--display); }
.hero.match h1 { font-size: clamp(30px, 5vw, 44px); }

/* Date block */
.date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 58px; padding: 6px 0; border: 1px solid color-mix(in srgb, var(--comp) 55%, var(--line)); border-radius: 10px; background: #0B1122; line-height: 1; }
.date small { color: var(--comp); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.date b { margin: 3px 0 2px; color: var(--white); font: 700 26px/1 var(--display); }
.date span { color: var(--soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.vs .date { width: 76px; padding: 9px 0; }
.vs .date b { font-size: 34px; }

/* Fact tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin: 0 0 24px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.tile-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 10px; background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); }
.tile .label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.tile strong { font-size: 17px; line-height: 1.35; }
.tile .meta { font-size: 13px; line-height: 1.5; }
.tile-hotel { border-color: rgba(255,194,77,.45); background: linear-gradient(160deg, rgba(255,194,77,.12), var(--card) 60%); }
.tile .btn { display: inline-flex; align-items: center; justify-content: center; margin: 6px 0 4px; text-decoration: none; text-align: center; }
.final { font-size: 20px; text-align: center; }
.cta { margin: 28px 0 0; }
.cta .btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; font-size: 17px; text-decoration: none; box-shadow: 0 8px 28px rgba(255,194,77,.25); }

/* Seat plan (the app's drawing, app/ui.js stadiumPlan) */
.plan .fact { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; grid-template-rows: auto auto 1fr; gap: 6px 28px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); --chip: #1E2640; --line2: #34405F; }
.plan .label { grid-column: 2; color: var(--white); font: 700 20px/1.2 var(--display); }
.plan .seat-plan { grid-column: 1; grid-row: 1 / span 6; width: 100%; height: auto; }
.plan .seat-section, .plan .meta { grid-column: 2; margin: 0; }
.plan .check-chip { margin-left: 6px; font-family: var(--body); vertical-align: middle; }
.seat-plan { --sp-accent: var(--accent, #7FB2FF); border-radius: 12px; background: radial-gradient(120% 80% at 50% 45%, #1A2240 0%, #161D31 72%); padding: 6px; }
.seat-stand { fill: #1E2640; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.seat-rows rect { fill: none; stroke: rgba(10,15,30,.55); stroke-width: .45; }
.seat-sectors path { stroke: rgba(10,15,30,.5); stroke-width: .7; }
.seat-roof { fill: none; stroke: rgba(238,242,248,.26); stroke-width: 1.1; }
.seat-away { fill: var(--sp-accent); fill-opacity: .55; }
.seat-hatch-bg { fill: var(--sp-accent); fill-opacity: .2; }
.seat-hatch { fill: var(--sp-accent); fill-opacity: .55; }
.seat-away-edge { fill: none; stroke: var(--sp-accent); stroke-width: 1.1; stroke-dasharray: 3 2.2; }
.seat-apron { fill: #0E1427; stroke: rgba(138,147,168,.25); stroke-width: .5; }
.seat-pitch { fill: #1A2442; }
.seat-stripes path { fill: #1F2A4C; }
.seat-line { fill: none; stroke: rgba(238,242,248,.62); stroke-width: .55; }
.seat-spot circle { fill: rgba(238,242,248,.7); }
.seat-tag rect { fill: var(--sp-accent); }
.seat-tag text { fill: #0A0F1E; font: 700 7.5px var(--body); letter-spacing: .12em; }
.seat-north circle { fill: rgba(10,15,30,.7); stroke: #283150; stroke-width: .8; }
.seat-north path { fill: #C2C9D8; }
.seat-north-t { fill: #8A93A8; font: 700 6.5px var(--body); }

/* Match cards */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 0 0 22px; }
.cards li { margin: 0; }
.card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 8px 14px; align-items: center; height: 100%; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--comp); border-radius: 14px; background: var(--card); color: var(--white); text-decoration: none; transition: background .15s, transform .15s, border-color .15s; }
.card:hover { background: var(--card-hi); border-color: color-mix(in srgb, var(--comp) 60%, var(--line)); transform: translateY(-2px); }
.card .date { grid-row: 1 / span 2; }
.card .teams { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; line-height: 1.2; }
.card .teams > span { display: flex; align-items: center; }
.card .kit { width: 26px; height: 26px; font-size: 9px; border-width: 1.5px; }

.card .info { color: var(--muted); font-size: 13px; }
.card .chip { padding: 0 6px; font-size: 11px; }
.card.done { opacity: .72; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* Jump links */
.jump { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; margin: 0 -4px 8px; padding: 10px 4px; overflow-x: auto; background: linear-gradient(var(--night) 80%, transparent); scrollbar-width: none; }
.jump a { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--soft); font-size: 14px; font-weight: 700; text-decoration: none; }
.jump a::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--comp); }
.jump a:hover { border-color: var(--comp); color: var(--white); }
.comp { scroll-margin-top: 64px; }
.comp > h2 { display: flex; align-items: center; gap: 12px; }
.comp > h2::before { content: ''; width: 6px; height: 26px; border-radius: 3px; background: var(--comp); }
.comp .eyebrow { color: var(--comp); margin-top: 18px; }
.soon { --comp: var(--white); }

/* Club tiles */
.club-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 0 12px; }
.club-grid li { margin: 0; }
.club-tile { position: relative; display: flex; align-items: center; gap: 2px; height: 100%; padding: 14px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--white); text-decoration: none; overflow: hidden; transition: background .15s, border-color .15s; }
.club-tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stripe, var(--line)); }
.club-tile:hover { background: var(--card-hi); border-color: var(--ring, var(--amber)); }
.club-tile .kit { width: 40px; height: 40px; font-size: 13px; }
.club-tile span:last-child { display: flex; flex-direction: column; }
.club-tile b { font-size: 15px; line-height: 1.2; }
.club-tile small { color: var(--muted); font-size: 13px; }

/* Away-trip map */
.map { position: relative; margin: 0 0 28px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(80% 80% at 50% 40%, #0F1830, #0A0F1E); }
.map img, .map svg { display: block; width: 100%; height: auto; }
.map svg { position: absolute; inset: 14px; width: calc(100% - 28px); }
.map .trip { fill: none; stroke: var(--accent, var(--amber)); stroke-width: 2; stroke-dasharray: 5 4; opacity: .85; }
.map .trip.done { opacity: .3; }
.map .stop { fill: var(--amber); stroke: var(--night); stroke-width: 2; }
.map .stop.done { fill: var(--muted); }
.map .home { fill: var(--fill, var(--white)); stroke: var(--ring, var(--amber)); stroke-width: 3; }
.map text { fill: var(--white); font: 700 15px var(--body); paint-order: stroke; stroke: var(--night); stroke-width: 4px; }
.map .home-label { fill: var(--amber); font-size: 16px; }
.map figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .hero { padding: 24px 18px 20px; border-radius: 16px; }
  .hero.club { flex-direction: column; align-items: flex-start; gap: 16px; }
  .kit-xl { width: 64px; height: 64px; font-size: 20px; }
  .side { font-size: 17px; }
  .vs .score { font-size: 42px; }
  .plan .fact { grid-template-columns: 1fr; }
  .plan .label, .plan .seat-plan, .plan .seat-section, .plan .meta { grid-column: 1; grid-row: auto; }
  .plan .seat-plan { max-width: 320px; margin: 0 auto; }
  .cards { grid-template-columns: 1fr; }
  .map text { font-size: 20px; }
}

/* The hotel tile runs the full width, button on the right */
.tile-hotel { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 16px; }
.tile-hotel .tile-icon { grid-row: 1 / span 2; margin: 0; }
.tile-hotel .label { grid-column: 2; grid-row: 1; }
.tile-hotel .meta { grid-column: 2; grid-row: 2; }
.tile-hotel .btn { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 0 22px; }
@media (max-width: 640px) { .tile-hotel { grid-template-columns: auto 1fr; } .tile-hotel .btn { grid-column: 1 / -1; grid-row: 3; margin-top: 10px; } }
.hero .updated + p { margin-top: 14px; }

/* Away-ticket pages (site/tickets/): their round badges in the club's colours */
.badge[class*=" k-"] { border: 2px solid var(--ring, #3B4767); background: var(--fill, #131D3B); color: var(--on, var(--white)); }
.plan h3.label { margin: 0; }

/* Match pages: a menu under the key facts, so the long page is quick to get around */
.on-page { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.on-page a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--white); font-weight: 600; text-decoration: none; }
.on-page a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h2[id] { scroll-margin-top: 16px; }
/* Partner links side by side: icon, label and button stacked in each */
.tiles.trip { margin-bottom: 8px; }
.trip .tile-hotel { grid-column: auto; display: flex; flex-direction: column; align-items: flex-start; }
.trip .tile-hotel .btn { margin-top: 8px; padding: 0 18px; }
/* Phones: the short facts two to a row */
@media (max-width: 640px) { .tiles:not(.trip) { grid-template-columns: 1fr 1fr; gap: 10px; } .tiles:not(.trip) .tile { padding: 12px 14px; } .tiles:not(.trip) .tile strong { font-size: 15px; } .tiles:not(.trip) .tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* --- ticket stub: copied from app/styles.css, keep in step --- */
.tk-list { --bg: var(--night, #0A0F1E); --surface: #161D31; --on-fill: var(--on, #fff); --lamp: #FFC24D; --lamp-dim: rgba(255,194,77,.22); --text2: #C2C9D8; --muted: #8A93A8; --display: 'Barlow Condensed', 'Arial Narrow', sans-serif; --body: Barlow, system-ui, sans-serif; margin: 0 0 8px; }
.tk { --tear: 96px; position: relative; display: flex; min-height: 152px; color: inherit; text-decoration: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45));
  -webkit-mask: radial-gradient(circle 8px at calc(100% - var(--tear)) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 8px at calc(100% - var(--tear)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 8px at calc(100% - var(--tear)) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 8px at calc(100% - var(--tear)) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.tk:focus-visible { outline: none; }
.tk:focus-visible .tk-paper { box-shadow: inset 0 0 0 2px var(--accent); }
.tk-paper { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .05), transparent 55%), linear-gradient(180deg, #1A2238 0%, var(--surface) 100%); }
.tk-paper::after { content: ""; position: absolute; inset: 0; opacity: .07; background: repeating-radial-gradient(circle at 78% 120%, transparent 0 7px, var(--accent) 7px 7.6px); }
.tk-band { position: absolute; left: 0; right: 0; top: 0; height: 22px; display: flex; align-items: center; padding: 0 11px; border-radius: 12px 12px 0 0; background: var(--fill); }
.tk-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); opacity: .8; }
.tk-band b, .tk-band em { font: 700 10px var(--body); font-style: normal; letter-spacing: .15em; text-transform: uppercase; white-space: nowrap; }
.tk-band b { color: var(--on-fill); overflow: hidden; text-overflow: ellipsis; }
.tk-band em { color: var(--accent); margin-left: auto; margin-right: calc(var(--tear) - 2px); padding-left: 8px; }
.tk-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 31px 12px 10px 14px; }
.tk-teams { font: 700 18px/1.08 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.tk-teams i { font-style: normal; font-weight: 600; color: var(--muted); margin: 0 4px; }
.tk-where { margin-top: 2px; color: var(--text2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-fields { display: flex; margin-top: 8px; border-top: 1px solid rgba(138, 147, 168, .18); }
.tk-f { padding: 5px 12px 0 0; min-width: 0; }
.tk-f + .tk-f { padding-left: 10px; border-left: 1px solid rgba(138, 147, 168, .18); }
.tk-f small, .tk-tear small { display: block; font: 700 9px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-f b { display: block; font: 700 16px/1.15 var(--display); white-space: nowrap; }
.tk-status { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tk-status .chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; padding: 1px 7px; }
.tk-status .chip svg { width: 12px; height: 12px; }
.tk-perf { position: absolute; top: 30px; bottom: 10px; right: calc(var(--tear) - 2px); width: 4px; background: radial-gradient(circle, var(--bg) 1.5px, transparent 1.9px) center top / 4px 7px repeat-y; }
.tk-tear { position: relative; width: var(--tear); flex: none; display: flex; flex-direction: column; align-items: center; padding: 30px 6px 9px; text-align: center; }
.tk-time { margin-top: 3px; font: 700 28px/1 var(--display); color: var(--lamp); font-variant-numeric: tabular-nums; }
.tk-sub { margin-top: 2px; color: var(--text2); font-size: 11px; line-height: 1.25; }
.tk-days { margin-top: 6px; font: 700 11px var(--body); letter-spacing: .08em; text-transform: uppercase; }
.tk-lamps { display: grid; grid-template-columns: repeat(4, 4px); gap: 2px; margin-top: 6px; transform: rotate(-8deg); }
.tk-lamps i { width: 4px; height: 4px; border-radius: 50%; background: var(--lamp); }
.tk-lamps.dim i { background: var(--lamp-dim); }
.tk-code { margin-top: auto; padding-top: 6px; font: 600 9px/1 var(--display); letter-spacing: .2em; color: var(--muted); }
.tk.past .tk-paper { background: linear-gradient(180deg, #151C2E 0%, #121828 100%); }
.tk.past .tk-band { background: #2A2F42; }
.tk.past .tk-band::after { background: var(--muted); }
.tk.past .tk-teams, .tk.past .tk-f b { color: var(--text2); }
.tk.past .tk-time { color: var(--muted); }
.tk-stamp { position: absolute; right: calc(var(--tear) + 14px); bottom: 12px; transform: rotate(-11deg); padding: 3px 9px 2px; border: 2px solid var(--accent); border-radius: 6px; color: var(--accent); opacity: .9; font: 700 15px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.tk-stamp small { display: block; margin-top: 2px; font: 700 8px var(--body); letter-spacing: .18em; }
.tk-list { display: flex; flex-direction: column; gap: 14px; }
/* --- end ticket stub --- */

/* A club's games: away-day stubs and home-game cards together, in date order. */
.fx-mix { display: flex; flex-direction: column; gap: 14px; }
.fx-mix > .cards, .fx-mix > .tk-list { margin: 0; }
