/* BarcaFeed Insights: the approved mobile Figma design (Insights, Matches, Match result, Players, Player), dark first, light from the same semantic tokens.
   Tokens come from bf-tokens.css (the Figma neutrals); nothing here introduces a colour of its own. Sofia Sans only. */
:root {
  --green: var(--text-green);
  --red: var(--comp-laliga);
  --blue: var(--social-blue);
  --pink: var(--bf-garnet);
  --yellow: var(--bf-gold);
  --gradient-highlight: #04060d; /* Figma gradient-highlight: the base of Barcelona's lineup circles */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--surface-page); color: var(--text); font: 400 .875rem/1.25rem 'Sofia Sans', ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
b, strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 60; padding: 10px 14px; border-radius: 8px; background: var(--surface-raised); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--bf-gold-ink); outline-offset: 2px; }
#view { flex: 1 0 auto; outline: none; }
.noscript { padding: 16px; color: var(--text-muted); }

/* ---------- page + section titles ---------- */
.pg { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 640px; min-width: 0; margin: 0 auto; padding: 16px 16px 32px; }
.view-enter { animation: enter .35s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.st { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.st-gap { padding-top: 4px; }
.st .bf-ico, .st img.cb { flex: none; width: 20px; height: 20px; }
.st h2, .st h1 { font-size: .875rem; line-height: 1.25rem; font-weight: 700; white-space: nowrap; }
.st .ln { flex: 1 1 0; min-width: 8px; height: 1px; background: var(--divider); }
.st em { font-style: normal; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.st a.lk { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }

.cards { display: flex; flex-direction: column; gap: 12px; }
.blk, .mn, .sd { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.grid2, .two { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.dx-only, .tb .dx, .tr.wide-only { display: none; }

/* ---------- cards ---------- */
.card { position: relative; min-width: 0; overflow: clip; border: 1px solid var(--divider); border-radius: 8px; background: radial-gradient(ellipse 83.3% 100% at 0 0, color-mix(in srgb, var(--text-muted) 8%, transparent), transparent), var(--surface-base); }
a.card { color: inherit; }
/* Fixture row: ONE grid for results, upcoming and live. Columns are fixed (competition | divider | date and time | divider | teams | score), so dates, separators, badges and
   scores line up from card to card whatever the weekday, month or team name. The score column stays reserved on upcoming rows. */
.fx { --dw: 72px; display: grid; grid-template-columns: 20px 1px var(--dw) 1px minmax(0, 1fr) 24px; align-items: center; column-gap: 10px; padding: 10px 12px; border-left: 2px solid var(--divider); }
/* Figma Matches: a Champions League fixture carries the blue wash of the competition from its left edge */
.fx.ucl { background: radial-gradient(ellipse 70% 120% at 0 50%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%), var(--surface-base); }
.fx.w { border-left-color: var(--green); }
.fx.d { border-left-color: var(--text); }
.fx.l { border-left-color: var(--red); }
.fx.lv { border-left-color: var(--bf-gold); }
.fx.lv .fx-d b { color: var(--bf-gold-ink); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.grid2 > .blk-live { grid-column: 1 / -1; }
.fx .ic { display: inline-flex; flex: none; width: 20px; height: 20px; align-items: center; justify-content: center; }
img.cb, .bf-ico.cb { display: block; flex: none; width: 20px; height: 20px; }
/* Copa del Rey and Supercopa keep their reds; the light theme draws their white parts in the dark ink. */
.bf-ico.cup-copa, .hm-c.cup-copa { background: url(/assets/icons/copa-del-rey.svg) center / contain no-repeat; -webkit-mask: none; mask: none; }
.bf-ico.cup-supercopa, .hm-c.cup-supercopa { background: url(/assets/icons/spanish-super-cup.svg) center / contain no-repeat; -webkit-mask: none; mask: none; }
html.light .bf-ico.cup-copa, html.light .hm-c.cup-copa { background-image: url(/assets/icons/copa-del-rey-light.svg); }
html.light .bf-ico.cup-supercopa, html.light .hm-c.cup-supercopa { background-image: url(/assets/icons/spanish-super-cup-light.svg); }
.vl { flex: none; width: 1px; height: 36px; background: var(--divider); }
.fx-d { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-d small { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.fx-d b { font-size: .875rem; line-height: 1.25rem; }
.fx-t { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; gap: 4px; }
.tm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tm b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-s { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.fx-s b { display: block; }
.muted { color: var(--text-muted); }

/* football media: crests, badges and portraits */
.crest { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--cs, 20px); height: var(--cs, 20px); }
.crest img { display: block; width: 100%; height: 100%; object-fit: contain; }
html.light .crest-dark { display: none; }
html:not(.light) .crest-light { display: none; }
.crest-fallback { border-radius: 50%; background: var(--surface-raised); color: var(--text-muted); font-size: calc(var(--cs, 20px) * .36); font-weight: 700; }
.av { display: inline-flex; flex: none; width: var(--as, 32px); height: var(--as, 32px); border-radius: var(--ar, 50%); overflow: hidden; background: var(--surface-raised); align-items: center; justify-content: center; color: var(--text-muted); font-weight: 700; font-size: calc(var(--as, 32px) * .32); }
.av img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* ---------- standings / leaders tables (Figma "Table") ---------- */
.tb { padding: 4px 12px; }
.tr { display: flex; align-items: center; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--divider); }
.tr:last-child { border-bottom: 0; }
.tb.sm .tr { padding-block: 8px; }
.tr.th { padding-block: 8px; border-bottom: 0; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.tr.me { background: var(--surface-raised); border-left: 2px solid var(--blue); border-bottom: 0; border-radius: 8px; }
/* A row has no bottom border when it is the last visible row or touches the highlighted row; nbn = in the narrow layout, nbw = where the wide-only rows are shown too. */
.tr.nbn { border-bottom: 0; }
@media (min-width: 1000px) { .tr.nbn:not(.nbw) { border-bottom: 1px solid var(--divider); } .tr.nbw { border-bottom: 0; } }
.tr .n { flex: none; min-width: 24px; text-align: center; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.tr .cl { display: flex; flex: 1 1 0; min-width: 0; align-items: center; gap: 8px; }
.tr .cl b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .sx { display: flex; flex: none; align-items: center; justify-content: center; gap: 4px; text-align: center; white-space: nowrap; }
.tr .sx span { min-width: 28px; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.tr .sx span.pt { min-width: 28px; }
.tr .sx span.v { color: var(--text); }
.tr .sx span.b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; color: var(--text); }
a.tr { color: inherit; }
/* Team Leaders (Figma 935:26200): goals + assists in gold and the season rating in its legend colour, both under white headings. */
.tb.ld .sx span { min-width: 32px; }
.tb.ld .sx span.wt { display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.tb.ld .sx span.gold { color: var(--bf-gold-ink); }
.tb.ld .sx span.rv-superb { color: #fdc700; } .tb.ld .sx span.rv-good { color: #05df72; } .tb.ld .sx span.rv-avg { color: #ff8904; } .tb.ld .sx span.rv-poor { color: #ff6467; }
html.light .tb.ld .sx span.rv-superb { color: #a65f00; } html.light .tb.ld .sx span.rv-good { color: #008236; } html.light .tb.ld .sx span.rv-avg { color: #ca3500; } html.light .tb.ld .sx span.rv-poor { color: #c10007; }
@media (min-width: 1000px) { .tb.ld .tr.nar { display: none; } .tb.ld .tr.nar-edge { border-bottom: 0; } }

/* ---------- form chart ---------- */
.fm { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.fm-cols { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; }
.fm-col { border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-width: 20px; color: inherit; }
.fm-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; }
.fm-bar small { font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
.fm-bar i { display: block; width: 20px; border-radius: 4px; background: var(--green); }
.fm-col.d .fm-bar i { background: var(--text); }
.fm-col.l .fm-bar i { background: var(--red); }
.fm hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--divider); }
.lg { display: flex; flex-wrap: wrap; gap: 12px; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.lg span { display: inline-flex; align-items: center; gap: 4px; }
.lg i { display: block; width: 8px; height: 8px; border-radius: 2px; }
.empty { padding: 16px 12px; color: var(--text-muted); font-weight: 600; }

/* ---------- match result ---------- */
/* Match header (Figma "Header" 949:7775): 12px padding and gap, score row (badge 48, name 14/700, coach 12 muted; score 24/900 with the muted dash), divider, venue, 16:9 video. */
.hero { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
/* both team columns start at the top and are equal: a badge never moves with the height of its club's name; the score or kick-off time is centred on the badges' row */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, max-content) minmax(0, 1fr); align-items: start; }
.hero-t { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.hero-t > b { max-width: 100%; font-size: .875rem; line-height: 1.25rem; overflow-wrap: break-word; }
.hero-t small { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.hero-t .crest { margin-bottom: 0; }
.hero-t > :first-child { flex: none; width: 48px; height: 48px; }
.hero-s { align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 48px; text-align: center; }
.hero-s .hs { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 1.5rem; line-height: 1.75rem; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hero-s .hs b { font-weight: 900; }
.hero-s .hs i { font-style: normal; color: var(--text-muted); }
.ap { font-size: .75em; font-weight: 700; letter-spacing: 0; }
.hero-s .hs-t { font-size: 1.5rem; line-height: 1.75rem; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; }
.hero-s small { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.hero-s small.hs-min { color: var(--bf-gold-ink); }
.hero hr { height: 1px; margin: 0; border: 0; background: var(--divider); }
.hero p { text-align: center; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); margin: 0; }
/* Highlight video: poster with a centred Play button, the iframe replaces it on press; always 16:9 (Figma 326 x 183 on a 384px frame). */
.vid { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; }
.vid-p { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.vid-p img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-b { position: absolute; left: 50%; top: 50%; display: flex; width: 46px; height: 32px; transform: translate(-50%, -50%); transition: transform .15s ease; }
.vid-b svg { display: block; width: 100%; height: 100%; }
.vid-p:hover .vid-b { transform: translate(-50%, -50%) scale(1.08); }
.vid-p:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-x { display: block; color: #fff; text-decoration: none; }
.vid-x img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); }
.vid-y { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 8px 14px; transform: translate(-50%, -50%); border-radius: 9999px; background: #ff0033; color: #fff; font-size: .875rem; line-height: 1.25rem; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgb(0 0 0 / .35); }
.vid-x:hover .vid-y { filter: brightness(1.08); }
.vid-x:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.vid-l a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .vid-b { transition: none; } }
/* Summary timeline: a fixed seven-column grid, symmetric around the score (minute | home text | home icon | score | away icon | away text | spacer the width of the minute),
   so the score sits on the card's own centre axis in every row (goals, cards, HT, FT) whatever the names, assists or icons are. */
.ev .er { --mn: 32px; --ic: 16px; --sc: 36px; display: grid; grid-template-columns: var(--mn) minmax(0, 1fr) var(--ic) var(--sc) var(--ic) minmax(0, 1fr) var(--mn); align-items: center; column-gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--divider); font-size: .75rem; line-height: 1rem; }
.ev .er:last-child { border-bottom: 0; }
.ev .er.na { display: block; margin: 0; padding: 10px 16px; text-align: center; color: var(--text-muted); font-size: .8125rem; line-height: 1.125rem; }
.ev .er > * { grid-row: 1; min-width: 0; }
.ev .er > .m { grid-column: 1; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ev .er > .h { grid-column: 2; text-align: right; }
.ev .er > .hi { grid-column: 3; }
.ev .er > .sc { grid-column: 4; text-align: center; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev .er > .ai { grid-column: 5; }
.ev .er > .a { grid-column: 6 / 8; text-align: left; }
.ev .er > .h b, .ev .er > .a b, .ev .er > .h small, .ev .er > .a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .er > .hi, .ev .er > .ai { display: flex; align-items: center; justify-content: center; }
.ev .er b { font-weight: 600; }
.ev .er small { display: block; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
/* HT and FT: full-width rectangular rows of the Summary card (the card alone owns the outer border and radius). Separators are the rows' own single bottom border; the disclosure footer adds none. */
.ev .er.pd { border-radius: 0; background: color-mix(in srgb, var(--surface-raised) 60%, transparent); }
.ev .er.pd > .sc { font-weight: 600; }
/* penalty and own-goal marks (Figma 1011:31528): a 10px badge on the goal icon's top-right corner, and the muted (PEN) / (OG) after the name */
.ev-g { position: relative; display: inline-flex; width: 16px; height: 16px; }
.ev-b { position: absolute; top: -4px; right: -4px; display: flex; align-items: center; justify-content: center; width: 10px; height: 10px; border-radius: 9999px; overflow: hidden; }
.ev-b img { width: 8px; height: 8px; }
.ev-b-ok { background: var(--green); } .ev-b-no { background: var(--soc-pink); }
.ev .er .ev-sx { color: var(--text-muted); font-weight: 600; }
@media (max-width: 359px) { .ev .er { --mn: 26px; --ic: 16px; --sc: 36px; column-gap: 4px; padding-inline: 8px; } }

/* ---------- lineup (Figma "BF / Lineup / Pitch": 352 x 460 field, 64 x 66 tokens) ---------- */
.sg { display: flex; border: 1px solid var(--divider); border-radius: 9999px; background: var(--surface-base); }
.sg button { display: flex; flex: 1 1 0; min-width: 0; height: 32px; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 9999px; color: var(--text); font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.sg button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg button[aria-pressed="true"] { background: var(--text); color: var(--text-invert); }
.lu { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bn { min-width: 0; }
.bn-h { margin: 0; padding: 12px; border-bottom: 1px solid var(--divider); color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.bn ul { margin: 0; padding: 0; list-style: none; }
.bn li + li { border-top: 1px solid var(--divider); }
.bn-r { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; color: var(--text); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.bn-r .no { flex: none; min-width: 24px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bn-r b { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.bn-r:hover { background: var(--surface-raised); }
/* Lineup pitch (Figma "Lineup" 1092:26567): the updated stadium.svg (352 x 460) is the one and only field artwork. Every size is expressed in units of the 352px
   design (--u), so the whole pitch (circles, names, marks, label) scales together when the column is narrower than 352px. Players are 40px circles in a 44px grid slot, name tags below. */
.pit { --u: calc(100cqw / 352); position: relative; width: 100%; max-width: 352px; aspect-ratio: 352 / 460; container-type: inline-size; border-radius: 8px; background: url('/assets/graphics/stadium.svg') center / 100% 100% no-repeat; color: #fff; }
.pit > * { --u: calc(100cqw / 352); }
.pit-fm { position: absolute; left: calc(18 * var(--u)); top: calc(18 * var(--u)); z-index: 2; padding: 0 calc(4 * var(--u)); border-radius: calc(6 * var(--u)); background: var(--surface-page); color: var(--text); font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); font-weight: 600; white-space: nowrap; }
.pk { position: absolute; left: calc(var(--x) * 100% / 352); top: calc(var(--y) * 100% / 460); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: calc(2 * var(--u)); width: calc(44 * var(--u)); color: inherit; }
.pt-c { position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: calc(40 * var(--u)); height: calc(40 * var(--u)); margin-top: calc(2 * var(--u)); border: 1px solid var(--divider); border-radius: 50%; font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); font-weight: 600; z-index: 2; }
.pit.own .pt-c { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 20%, transparent), color-mix(in srgb, var(--pink) 20%, transparent)), #04060d; color: #fff; }
.pit.opp .pt-c { background: radial-gradient(ellipse 100% 100% at 0 0, rgb(161 161 161 / .08), transparent), var(--surface-base); color: var(--text); }
.pt-nm { z-index: 1; max-width: calc(var(--nw, 96) * var(--u)); padding: 0 calc(4 * var(--u)); overflow: hidden; border-radius: calc(6 * var(--u)); background: var(--surface-page); color: var(--text); text-overflow: ellipsis; white-space: nowrap; font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); font-weight: 600; }
/* Event marks, Figma "Lineup Player" positions, measured from inside the circle's 1px border. */
.mk { position: absolute; display: block; width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.mk-y { left: calc(-4.5 * var(--u)); top: calc(-5 * var(--u)); }
.mk-r { left: calc(-.5 * var(--u)); top: calc(-5 * var(--u)); }
.mk-g { right: calc(-5 * var(--u)); top: calc(-5 * var(--u)); }
.mk-a { right: calc(-5.5 * var(--u)); top: calc(-5 * var(--u)); }
.mk-ga { left: calc(27.5 * var(--u)); top: calc(-5 * var(--u)); display: flex; gap: var(--u); width: calc(33 * var(--u)); }
.mk-e { position: relative; display: block; flex: none; width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.mk-i { display: block; width: 100%; height: 100%; }
.mk-e b { position: absolute; right: calc(-4 * var(--u)); top: calc(-4 * var(--u)); display: flex; align-items: center; justify-content: center; width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: 9999px; background: var(--pink); color: #fff; font-size: calc(10 * var(--u)); line-height: calc(10 * var(--u)); font-weight: 700; }
.mk-ga .mk-e:first-child b { right: calc(-3 * var(--u)); }
.mk-o { right: calc(-1.5 * var(--u)); bottom: calc(-1 * var(--u)); width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
/* Rating pill (Figma "Match / Icons", Type=Rating): the same four colours in both themes. */
.rt { display: flex; flex: none; align-items: center; justify-content: center; min-width: 24px; height: 14px; padding: 0 2px; border-radius: 9999px; color: #0a0a0a; font-size: .75rem; line-height: 1rem; font-weight: 700; letter-spacing: -0.04rem; }
.rt-superb { background: #fdc700; } .rt-good { background: #05df72; } .rt-avg { background: #ff8904; } .rt-poor { background: #ff6467; }
.mk-rt { position: absolute; right: calc(26.5 * var(--u)); bottom: calc(-1 * var(--u)); min-width: calc(24 * var(--u)); height: calc(14 * var(--u)); padding: 0 calc(2 * var(--u)); font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); }
/* Substitutions (Figma "card / subs" 1092:31095): one row per change, the minute, then the player coming on and the player going off side by side. The minute column is shared by all rows. */
.sb { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; min-width: 0; }
.sb .sr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; column-gap: 12px; padding: 12px; border-bottom: 1px solid var(--divider); }
.sb .sr:last-child { border-bottom: 0; }
.sb .sr > .m { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.sb .pp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 6px; min-width: 0; } /* the incoming half also holds the rating, so it is a little wider; the going-off column stays aligned */
.sb .p { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sb .p b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; line-height: 1rem; font-weight: 600; }
.sb .p .no { flex: none; min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.sb .p .dir { flex: none; }
.sb .p .rt { min-width: 26px; }
@media (max-width: 359px) { .sb .pp, .sb .p { gap: 4px; } } /* the number slot stays 24px: a two-digit number is wider than 20px and would push its name out of the column */
.dir { display: block; flex: none; width: 16px; height: 16px; }
.ev-i { display: block; width: 16px; height: 16px; }
.xi-g { padding: 10px 12px 0; color: var(--text-muted); font-size: .6875rem; line-height: 1rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.xi-fm { padding: 12px 12px 0; color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.xi-fm b { color: var(--text-primary, inherit); }
.li-m { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.li-m b { font-size: .75rem; }
.xi li + li { border-top: 1px solid var(--divider); }
.xi .row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.note { padding: 12px; color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }

/* ---------- players ---------- */
.pc { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 72px; }
.pc .who { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; }
.pc .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; line-height: 1.25rem; }
.pc .nm span { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.pc .nm b { font-weight: 700; }
.pc .meta { overflow: hidden; color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
/* "#10 · Right Winger · Spain": every item and separator is 4px apart; the last item gives way first. */
.meta-l { display: flex; min-width: 0; gap: 4px; }
.meta-l > * { flex: none; font-style: normal; }
.meta-l > span:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Squad card figures (Figma "card / insight" 935:28149): goal involvements and the average rating, stacked on phones, on one line on desktop (968:14016). */
.pc-st { display: flex; flex: none; align-items: stretch; gap: 8px; }
.pc-s { display: flex; min-width: 44px; flex-direction: column; align-items: center; justify-content: center; padding: 4px 8px; border: 1px solid var(--divider); border-radius: 8px; }
.pc-s small { font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pc-s b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.pc-s .bf-ico { width: 16px; height: 16px; }
.pc-s b.gold { color: var(--bf-gold-ink); }
/* A rating figure takes its legend colour (Superb, Good, Average, Poor); on the light theme the darker shade of the same hue keeps it readable. */
.pc-s b.rv-superb, .stat.rv-superb b { color: #fdc700; } .pc-s b.rv-good, .stat.rv-good b { color: #05df72; } .pc-s b.rv-avg, .stat.rv-avg b { color: #ff8904; } .pc-s b.rv-poor, .stat.rv-poor b { color: #ff6467; }
html.light .pc-s b.rv-superb, html.light .stat.rv-superb b { color: #a65f00; } html.light .pc-s b.rv-good, html.light .stat.rv-good b { color: #008236; } html.light .pc-s b.rv-avg, html.light .stat.rv-avg b { color: #ca3500; } html.light .pc-s b.rv-poor, html.light .stat.rv-poor b { color: #c10007; }
.stat { display: flex; flex: none; min-width: 56px; flex-direction: column; align-items: center; padding: 4px 8px; border: 1px solid var(--divider); border-radius: 8px; text-align: center; }
.stat b { font-size: 1rem; line-height: 1.375rem; }
.stat small { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.stat.gold b { color: var(--bf-gold-ink); }
.prof { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.prof-id { display: flex; align-items: center; gap: 16px; }
.prof-id h1 { font-size: 1.25rem; line-height: 1.5rem; font-weight: 900; letter-spacing: -.02em; }
.prof-id h1 span { font-weight: 600; color: var(--text-muted); }
.prof-id p { margin-top: 4px; font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
/* Icon tiles (profile header and Form, Figma 955:8648 / 1096:11934). */
.tiles .stat.ist { justify-content: center; gap: 2px; padding: 6px 4px 4px; }
.stat.ist b { font-size: .875rem; line-height: 1.25rem; }
.stat.ist small { font-size: .75rem; line-height: 1rem; font-weight: 600; color: var(--text); }
.stat.ist .ui-ico, .stat.ist .pf-i { width: 16px; height: 16px; }
.stat.ist .of { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tiles .stat { min-width: 0; padding: 8px 4px; }
/* The profile card's tiles share its whole width however many there are (a goalkeeper has four). */
.prof .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
/* Competitions table: one column geometry for header and body (fixed layout + colgroup). The competition column is flexible and left-aligned; the four statistic
   columns have the same fixed width and every value is centred under its heading. A long competition name is cut with an ellipsis and can never move a statistic column. */
.ct { width: 100%; table-layout: fixed; border-collapse: collapse; }
.ct col.nc { width: 44px; }
.ct th, .ct td { padding: 12px 0; text-align: center; vertical-align: middle; font-weight: 600; }
.ct thead th { padding-block: 8px; font-size: .75rem; color: var(--text-muted); }
.ct th:first-child, .ct td:first-child { text-align: left; }
.ct tbody tr + tr { border-top: 1px solid var(--divider); }
.ct td { color: var(--text-muted); }
.ct td.b { color: var(--text); font-weight: 700; }
.ct td:first-child { overflow: hidden; color: var(--text); font-weight: 700; }
.ct td:first-child span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ct td:first-child span b { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- footer (Figma footer + copyright) ---------- */
.site-footer { flex: none; margin-top: 8px; }
.sf-in { display: flex; width: 100%; max-width: 640px; flex-direction: column; align-items: center; gap: 12px; margin: 0 auto; padding: 0 16px; }
.sf-brand { padding: 20px 0; background: var(--surface-base); }
.sf-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; line-height: 1.375rem; font-weight: 600; }
.sf-logo img { width: 22px; height: 22px; }
html.light .sf-logo img { filter: invert(1); }
.sf-brand p, .sf-legal p { color: var(--text-muted); text-align: center; }
.sf-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.sf-social a { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; }
.sf-social img { width: 28px; height: 28px; max-width: none; }
.sf-social img.yt { width: 36px; height: 36px; } /* its artwork carries its own margin inside a 36px canvas */
html.light .tt-dark, html:not(.light) .tt-light { display: none; }
.sf-legal { padding: 16px 0 calc(32px + 72px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--divider); background: var(--surface-base); }
.sf-legal nav { display: flex; gap: 20px; font-weight: 600; color: var(--text-muted); }
.sf-m { display: inline; }

/* ---------- states and skeleton ---------- */
.skeleton { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 640px; margin: 0 auto; padding: 16px; }
/* Feed pattern: a heading bar, then cards (surface-base, three raised lines of 11/12, 4/5 and 2/5), pulsing like the Feed's and still when motion is reduced. The modifiers follow the page's own blocks. */
.skeleton > .sk-h { display: block; width: 144px; height: 20px; border-radius: 4px; background: var(--surface-raised); animation: sk-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
.skeleton i { display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 16px; border-radius: 8px; background: var(--surface-base); border: 1px solid var(--divider); animation: sk-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
.skeleton i.r { min-height: 76px; }
.skeleton i.t { min-height: 168px; }
.skeleton i.x { min-height: 280px; }
.skeleton b { display: block; height: 16px; border-radius: 4px; background: var(--surface-raised); }
.skeleton b:nth-child(1) { width: 91.666%; }
.skeleton b:nth-child(2) { width: 80%; }
.skeleton b:nth-child(3) { width: 40%; }
.sk-grid2, .sk-two > div { display: flex; flex-direction: column; gap: 12px; }
.sk-two { display: flex; flex-direction: column; gap: 12px; }
@keyframes sk-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton i, .skeleton > .sk-h { animation: none; } }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
.state h2 { font-size: 1rem; }
.state p { color: var(--text-muted); }
.btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 9999px; background: var(--btn-bg); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .view-enter { animation: none; } }

/* Tablet: the same components in the existing 960px container. */
@media (min-width: 768px) {
  .pg, .sf-in, .skeleton { max-width: 960px; }
  .pg, .skeleton { padding: 20px 20px 32px; }
  .sf-in { padding-inline: 20px; }
  .sf-m { display: none; }
  .fx { padding-block: 12px; }
  .sf-brand .sf-in { flex-direction: row; justify-content: flex-start; gap: 32px; height: 76px; padding-block: 0; }
  .sf-brand .sf-social { margin-left: auto; gap: 16px; }
  .sf-brand { padding: 0; }
  .sf-legal { padding: 0; }
  .sf-legal .sf-in { flex-direction: row; justify-content: space-between; height: 72px; padding-block: 0; }
  .sf-legal p { text-align: right; }
}

/* Desktop (Figma desktop frames, 1280px viewport): 960px container with 20px padding; two-column blocks, a 568px + 320px main and sidebar, wide standings tables. */
@media (min-width: 1000px) {
  .grid2, .sk-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  /* Form and Team Leaders: one grid row, so both blocks (heading and card) share top and bottom edges; the card fills the block and its content distributes inside. */
  .grid2.eq { align-items: stretch; }
  .grid2.eq > .blk > .card { flex: 1 1 auto; }
  .grid2.eq > .blk > .fm { justify-content: space-between; }
  .grid2.eq > .blk > .tb.sm { display: flex; flex-direction: column; }
  .grid2.eq > .blk > .tb.sm > .tr:not(.th) { flex: 1 1 0; }
  .two, .sk-two { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 32px; align-items: start; }
  .dx-only { display: flex; }
  .mb-only { display: none; }
  /* One sticky sidebar for every Insights page: it follows the reader 16px below the bottom of the header (the header is 60px tall), stays inside its layout
     container so it stops at the end of the main column, above the footer, and never grows taller than the space below the header. */
  .sd { position: sticky; top: calc(var(--bf-hdr-h, 60px) + 16px); align-self: start; max-height: calc(100vh - var(--bf-hdr-h, 60px) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .tr.wide-only { display: flex; }
  .tb.wide .dx { display: block; }
  .tb.wide .sx { gap: 8px; }
  .tb.wide .sx span.pt { min-width: 32px; }
  .fm-bar i { width: 32px; }
  .fm-col { min-width: 32px; }
  .lu { grid-template-columns: 352px minmax(0, 1fr); }
  .lu { align-items: start; }
  .lu:has(.pit) :is(.sb, .bn) { min-height: 460px; }
  .sb .pp { grid-template-columns: minmax(0, 1fr); } /* beside the pitch the column is narrow: the player coming on sits above the player going off (Figma desktop 1092:31407) */
  .sb .p .rt { order: 1; }
  .sb .p .rt-gap { display: none; }
  .pc-s { flex-direction: row; gap: 4px; }
  .cards.sq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .tiles .stat { padding: 8px 4px; }
}


/* Player Form without ratings: one line per recent match (opponent, result, role and verified events). */
.pf { list-style: none; margin: 0; padding: 0; }
.pf li + li { border-top: 1px solid var(--divider); }
.pf a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: inherit; text-decoration: none; font-size: 14px; }
.pf a > span { min-width: 0; }
.pf .pf-r { color: var(--text-2, inherit); opacity: .8; text-align: right; }
.pf + .note { margin: 0; padding: 8px 14px 12px; }

/* Match detail: the provider's written report/preview, the highlight link and the team statistics. */
.ctx { padding: 14px 16px; }
.ctx p { margin: 0 0 8px; font-size: .8125rem; line-height: 1.25rem; font-weight: 500; }
.ctx small { display: block; margin-top: 4px; font-size: .6875rem; line-height: 1rem; color: var(--text-muted); }
.sts { padding: 4px 0 8px; }
.sts-h { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 20px; align-items: center; column-gap: 8px; padding: 10px 12px; font-size: .75rem; font-weight: 600; border-bottom: 1px solid var(--divider); }
.sts-h > span:nth-child(3) { text-align: right; }
.sts h3 { margin: 0; padding: 12px 12px 2px; font-size: .6875rem; line-height: 1rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.sts-r { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; column-gap: 8px; padding: 6px 12px; font-size: .75rem; line-height: 1rem; }
.sts-r > b { font-weight: 600; }
.sts-r > b:last-child { text-align: right; }
.sts-l { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text-muted); }
.sts-l i { font-style: normal; opacity: .7; }
.sts-b { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--bf-garnet, #a50044); opacity: .55; overflow: hidden; }
.sts-b i { display: block; height: 100%; background: var(--blue, #004d98); opacity: 1; }

/* Player Form rows and the player dossier (career, honours, milestones). */
.pf li > a, .pf li > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.2fr); align-items: center; column-gap: 10px; padding: 10px 14px; color: inherit; text-decoration: none; font-size: .8125rem; }
.pf li > div { grid-template-columns: auto minmax(0, 1fr) auto; }
.pf li > div:not(:has(.crest)) { grid-template-columns: minmax(0, 1fr) auto; }
.pf .pf-m { display: flex; flex-direction: column; min-width: 0; }
.pf .pf-m small, .pf .pf-r small, .pf .pf-r em { font-size: .6875rem; line-height: 1rem; font-style: normal; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.pf .pf-s { font-weight: 600; white-space: nowrap; }
.pf .pf-s i { display: inline-block; min-width: 18px; height: 18px; margin-right: 4px; border-radius: 9px; text-align: center; font: 600 .6875rem/18px inherit; font-style: normal; color: #fff; }
.pf .pf-w { background: var(--green, #2e7d32); }
.pf .pf-d { background: var(--text-muted, #777); }
.pf .pf-l { background: var(--red, #b3261e); }
.pf .pf-r { text-align: right; min-width: 0; }
.pf .pf-r em { justify-content: flex-end; }
.pf-sum { padding: 12px 14px; }
.dx-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.dx-facts span { display: flex; flex-direction: column; }
.dx-facts small { color: var(--text-muted); font-size: .6875rem; }
@media (max-width: 480px) { .pf li > a { grid-template-columns: auto minmax(0, 1fr) auto; } .pf li > a .pf-r { grid-column: 1 / -1; text-align: left; } .pf li > a .pf-r em { justify-content: flex-start; } }

/* Match detail hierarchy: scorers in the header, a one-sentence lede, emphasised goals, key statistics first. */
.ctx.lede { padding: 10px 14px; }
.lede summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-size: .8125rem; line-height: 1.25rem; font-weight: 500; }
.lede summary::-webkit-details-marker { display: none; }
.lede summary span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lede[open] summary span, .lede details[open] summary span { display: block; -webkit-line-clamp: unset; }
.lede summary em { flex: none; font-style: normal; font-size: .6875rem; font-weight: 600; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.lede details[open] summary em { display: none; }
.lede details p { margin: 6px 0 0; font-size: .8125rem; line-height: 1.25rem; color: var(--text-muted); }
.sts-m { border-top: 1px solid var(--divider); margin-top: 6px; }
.sts-m summary { padding: 10px 12px; list-style: none; cursor: pointer; font-size: .75rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.sts-m summary::-webkit-details-marker { display: none; }
.sts-m[open] summary { display: none; }

/* Insights xG: two compact lines (scored / conceded, goals against xG). */
.xgc { padding: 4px 14px; }
.xgc-r { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; align-items: center; padding: 10px 0; font-size: .875rem; }
.xgc-r + .xgc-r { border-top: 1px solid var(--divider); }
.xgc-r b { font-weight: 600; text-align: right; }
.xgc-h { font-size: .6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.xgc-h span:not(:first-child) { text-align: right; }

/* Player Form v2: one compact line per match; the dossier is secondary and folds. */
.pf-top { padding: 12px 14px 4px; display: grid; gap: 10px; }
.pf-top .tiles { padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-dots { display: flex; gap: 6px; justify-content: center; }
.pf-d { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--text-muted); background: transparent; }
.pf-d.st { background: var(--text-muted); }
.pf-d.pf-w { border-color: var(--green, #2e7d32); } .pf-d.pf-w.st { background: var(--green, #2e7d32); }
.pf-d.pf-l { border-color: var(--red, #b3261e); } .pf-d.pf-l.st { background: var(--red, #b3261e); }
.pf li > a { grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 8px; padding: 8px 14px; }
.pf-ev { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.pf-g { display: inline-flex; align-items: center; gap: 2px; font-size: .75rem; font-weight: 600; }
.pf-i { display: block; width: 16px; height: 16px; }
.pf-cs { padding: 0 5px; border-radius: 6px; border: 1px solid var(--divider); font-size: .625rem; line-height: 1rem; font-weight: 600; color: var(--text-muted); }
.pf li > a .pf-s { min-width: 54px; text-align: right; }
.dx-more { border-top: 1px solid var(--divider); }
.dx-more summary, .dx-bio summary { list-style: none; cursor: pointer; }
.dx-more summary::-webkit-details-marker, .dx-bio summary::-webkit-details-marker { display: none; }
.dx-more summary { padding: 10px 14px; text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.dx-more[open] summary { display: none; }
.dx-bio summary { display: block; font-size: .8125rem; line-height: 1.25rem; }
.dx-bio summary span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dx-bio summary em { display: inline-block; margin-top: 4px; font-style: normal; font-size: .6875rem; font-weight: 600; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.dx-bio[open] summary span { display: block; -webkit-line-clamp: unset; }
.dx-bio[open] summary em { display: none; }
@media (max-width: 480px) { .pf li > a { grid-template-columns: auto minmax(0, 1fr) auto auto; } .pf li > a .pf-r { grid-column: auto; } }

/* Table: recent form (wide tables) and the shared-rank mark for clubs level on every tie-break the data can settle. */
@media (min-width: 1000px) {
  .tb.wide .sx .fr { display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; min-width: 124px; }
  .tb.wide .sx .fr i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--divider); color: var(--text-muted); font-style: normal; font-size: .625rem; line-height: 1; font-weight: 700; }
  .tb.wide .sx .fr i { flex: none; }
  .tb.wide .sx .fr i.fw { background: var(--green); color: #04130a; }
  .tb.wide .sx .fr i.fd, .tb.wide .sx .fr i.fx0 { background: var(--surface-raised); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--divider); }
  .tb.wide .sx .fr i.fl { background: var(--red); color: #1a0505; }
}
.tr .n sup { margin-left: 1px; font-size: .625rem; line-height: 0; }
@media (max-width: 359px) { .fx { --dw: 64px; grid-template-columns: 20px 1px var(--dw) 1px minmax(0, 1fr) 20px; column-gap: 8px; padding-inline: 10px; } }

/* Head-to-head */
.h2h { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.h2h-f { align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.h2h-f button { flex: none; white-space: nowrap; }
.h2h-s { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h2h-t { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--divider); border-radius: 8px; background: var(--surface-base); }
.h2h-t b { font-size: 1.5rem; line-height: 1.75rem; font-weight: 700; }
.h2h-t small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; text-align: center; }
.h2h-t.h2h-w b { color: var(--green); } .h2h-t.h2h-l b { color: var(--red); }
.h2h-b { display: flex; gap: 2px; height: 6px; overflow: hidden; border-radius: 3px; }
.h2h-b i { display: block; min-width: 0; } .h2h-b .h2h-w { background: var(--green); } .h2h-b .h2h-dr { background: var(--text-muted); } .h2h-b .h2h-l { background: var(--red); }
.h2h-n { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.h2h-list { display: flex; flex-direction: column; }
.h2h-r { display: grid; grid-template-columns: 60px minmax(0, 1fr) 20px; align-items: center; gap: 8px; padding: 8px 0; }
.h2h-r + .h2h-r { border-top: 1px solid var(--divider); }
.h2h-dt { display: flex; flex-direction: column; font-size: .75rem; line-height: 1rem; font-weight: 600; }
.h2h-dt small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-m { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.h2h-m span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .h2h-m span:first-child { text-align: right; }
.h2h-c { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: .6875rem; font-weight: 700; color: #0a0a0a; }
.h2h-res-w { background: var(--green); } .h2h-res-d { background: var(--text-muted); } .h2h-res-l { background: var(--red); }
@media (max-width: 359px) { .h2h-r { grid-template-columns: 56px minmax(0, 1fr) 20px; gap: 6px; } }

/* Form summary */
.fm-s { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fm-c { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.fm-c b { font-size: 1.125rem; line-height: 1.5rem; font-weight: 700; }
.fm-c small { color: var(--text-muted); font-size: .6875rem; line-height: .875rem; font-weight: 600; }
.fm-t { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.fm .fm-n { padding: 0; }

/* Match preview */
.pvf { display: flex; flex-direction: column; gap: 0; padding: 4px 12px; }
.pvf-r { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; }
.pvf-r + .pvf-r { border-top: 1px solid var(--divider); }
.pvf-n { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.pvf-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.pvf-n small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pvf-c { display: inline-flex; gap: 4px; }
.pvf .note { padding: 4px 0 10px; }
.pv-n { padding: 8px 2px 0; }
.h2h-none { gap: 4px; }
.h2h-none p:first-child { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.h2h-none .note { padding: 0; }
.live-n { padding: 8px 2px 0; }
@media (max-width: 359px) { .pvf-r { gap: 8px; } .pvf-c { gap: 3px; } }

.pv-f { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.pv-f p { display: flex; gap: 6px; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.pv-f p::before { content: ''; flex: none; width: 3px; margin: 3px 0; border-radius: 2px; background: var(--blue); }
.tb + .pv-f, .card > .pv-f { margin-top: 8px; }
.card > .pv-f { padding: 0; }
.kp { display: flex; flex-direction: column; gap: 0; padding: 4px 12px; }
.kp-r { display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; align-items: center; gap: 10px; padding: 10px 0; color: inherit; text-decoration: none; }
.kp-r + .kp-r { border-top: 1px solid var(--divider); }
.kp-no { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--divider); border-radius: 50%; font-size: .75rem; font-weight: 700; background: var(--surface-base); }
.kp-n { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.kp-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.kp-n small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.kp .pv-f { padding: 8px 0 4px; }
.kp .note { padding: 4px 0 10px; }

/* Lineup list fallback: one compact row per line, players as chips from screen left to right */
.xl { display: flex; flex-direction: column; }
.xl-r { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px 12px; }
.xl-r + .xl-r { border-top: 1px solid var(--divider); }
.xl-k { color: var(--text-muted); font-size: .6875rem; line-height: 28px; font-weight: 700; letter-spacing: .04em; }
.xl-ps { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.xl-p { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px 0 4px; border: 1px solid var(--divider); border-radius: 9999px; background: var(--surface-base); color: inherit; font-size: .8125rem; line-height: 1rem; font-weight: 600; text-decoration: none; }
a.xl-p:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.xl-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-n { display: grid; place-items: center; flex: none; min-width: 20px; height: 20px; padding: 0 3px; border-radius: 9999px; font-size: .6875rem; font-weight: 700; background: var(--surface-raised); }
.xi.own .xl-n { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 35%, #04060d), color-mix(in srgb, var(--pink) 35%, #04060d)); color: #fff; }
.xl-p .li-m { margin-left: 0; gap: 3px; }
.xl-p .li-m img { width: 14px; height: 14px; }
.xi .xl + .note { padding-top: 2px; }

/* Card footers and coverage disclosure */
.tb-f { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 10px 2px 2px; border-top: 1px solid var(--divider); }
.tb-f .pv-f { padding: 0; margin: 0; }
.tb-n { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.h2h-none p:first-child { margin: 0; }

/* Player: match-by-match behind a disclosure */
.pf-more { border-top: 1px solid var(--divider); }
.pf-more summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none; font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.pf-more summary::-webkit-details-marker { display: none; }
.pf-more summary::after { content: '+'; font-weight: 700; }
.pf-more[open] summary::after { content: '–'; }
.pf-more summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pf-more .pf { border-top: 1px solid var(--divider); }
.pf .pf-m small { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ================================================================================================================================================================
   Matches V4: the approved Figma Match Result / Match Preview (mobile 384, desktop 1280). Real data overrides every Figma sample value.
   ================================================================================================================================================================ */
/* competition identity: ONE mechanism, the canonical competition class (cmp-ucl / cmp-laliga / cmp-neutral) on the header and the Match Intelligence card. */
:root { --cmp-ucl-a: rgb(30 104 255 / .2); --cmp-ucl-b: rgb(143 180 255 / .1); --cmp-laliga-a: rgb(194 122 255 / .08); --soc-pink: #ff2d72; }
html.light { --cmp-ucl-a: rgb(30 104 255 / .14); --cmp-ucl-b: rgb(143 180 255 / .08); --cmp-laliga-a: rgb(152 16 250 / .07); }
.hero, .intel { background: radial-gradient(ellipse 83.3% 100% at 0 0, color-mix(in srgb, var(--text-muted) 8%, transparent), transparent), var(--surface-base); }
.hero.cmp-ucl, .intel.cmp-ucl { background: radial-gradient(ellipse 83.3% 100% at 0 0, var(--cmp-ucl-a), var(--cmp-ucl-b) 50%, transparent), var(--surface-base); }
.hero.cmp-laliga, .intel.cmp-laliga { background: radial-gradient(ellipse 83.3% 100% at 0 0, var(--cmp-laliga-a), transparent), var(--surface-base); }

/* shared: Untitled UI icons as masks (colour from the text), disclosure rows */
.ui-ico { display: inline-block; flex: none; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.dc { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 12px; border: 0; border-top: 1px solid var(--divider); background: none; color: var(--text-muted); font: inherit; font-size: .75rem; line-height: 1rem; font-weight: 600; text-align: left; cursor: pointer; }
.dc:hover { color: var(--text); }
.dc:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.dc .dc-i { width: 16px; height: 16px; transition: transform .15s ease; }
.dc[aria-expanded="true"] .dc-i { transform: rotate(180deg); }
.dc-more { display: none; }
[data-dc-card].open > .dc-more { display: block; }
@media (prefers-reduced-motion: reduce) { .dc .dc-i { transition: none; } }
.tr.tl { border-bottom: 0; }

/* Match Intelligence and Players to watch rows */
.intel, .kpc { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.ir { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
a.ir { margin: -4px; padding: 4px; border-radius: 8px; }
.ir + .ir { padding-top: 12px; border-top: 1px solid var(--divider); }
a.ir:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.ir-f { flex: none; display: inline-flex; }
.ir-i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9999px; background: var(--surface-raised); color: var(--text-muted); }
.ir-green { background: rgb(5 223 114 / .08); color: var(--text-green); }
.ir-cyan { background: rgb(0 188 255 / .08); color: var(--text-blue, #00bcff); }
.ir-purple { background: rgb(194 122 255 / .08); color: var(--text-violet, #c27aff); }
.ir-red { background: rgb(255 100 103 / .08); color: var(--text-red, #ff6467); }
html.light .ir-green { background: rgb(0 166 62 / .1); } html.light .ir-cyan { background: rgb(0 132 209 / .1); } html.light .ir-purple { background: rgb(152 16 250 / .08); } html.light .ir-red { background: rgb(231 0 11 / .08); }
.ir-green-fg { color: var(--text-green); }
.ir-b { display: flex; flex: 1 1 0; flex-direction: column; justify-content: center; min-width: 0; }
.ir-b b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.ir-b small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.ir-b small i { font-style: normal; }
.ir-t { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.ir-t .ui-ico { width: 20px; height: 20px; }
.ir-ti { display: block; width: 16px; height: 16px; }
.ir-c { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 10px; height: 10px; padding: 0 2px; border-radius: 9999px; background: var(--soc-pink); color: #fff; font-size: 10px; line-height: 10px; font-weight: 700; }
.ir.kp2 .ir-f { --as: 40px; }

/* Summary: key events by default, every card when open */
.ev:not(.open) .er.minor { display: none; }
/* the footer adds no border of its own: FT's bottom border is the one separator above it */
.ev .dc { border-top: 0; }

/* Match statistics: value | label | value over a 6px bar; Barcelona's share is the blue part, the rest the neutral track */
.sts2 { padding: 0; }
.sg2 { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.sg2 h3 { margin: 0; color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; letter-spacing: .02em; }
.dc-more .sg2 { border-top: 1px solid var(--divider); }
.sr2 { display: flex; flex-direction: column; gap: 4px; }
.sr2-v { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; }
.sr2-v b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.sr2-v b:last-child { text-align: right; }
.sr2-v span { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; text-align: center; }
.sr2-v span i { font-style: normal; opacity: .7; }
.sr2-b { display: flex; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-raised); }
.sr2-b i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.sr2-b.away { justify-content: flex-end; }

/* Lineup & substitutions: two equal columns of 32px pills, home left, away right */
.lu2 { padding: 0; }
.lcs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 12px; }
.lc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lc-n { padding: 4px 8px; color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.lp { display: flex; align-items: center; gap: 2px; min-width: 0; height: 32px; padding: 3px 8px 3px 3px; border: 1px solid var(--divider); border-radius: 9999px; background: var(--surface-base); color: inherit; text-decoration: none; }
a.lp:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lp-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--divider); border-radius: 22px; font-size: .75rem; line-height: 1rem; font-weight: 600; background: radial-gradient(ellipse 100% 100% at 0 0, rgb(161 161 161 / .08), transparent), var(--surface-base); color: var(--text); }
.lp.own .lp-n { background: linear-gradient(90deg, rgb(30 104 255 / .2), rgb(255 45 114 / .2)), var(--gradient-highlight); color: #fff; }
.lp-t { flex: 1 1 0; min-width: 0; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.lp-m { flex: none; display: inline-flex; align-items: center; gap: 2px; }
.lp-i { display: block; width: 14px; height: 14px; }
.lp-g { display: inline-flex; align-items: center; gap: 1px; }
.lp-g b { font-size: .625rem; line-height: .75rem; font-weight: 700; }
.subs .sbr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 62px; padding: 12px; border-top: 1px solid var(--divider); }
.sc2 { display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: center; gap: 12px; }
.sc2 .m { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.sp-w { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sp { display: grid; grid-template-columns: 16px 30px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; min-width: 0; font-size: .75rem; line-height: 1rem; font-weight: 600; }
.sp .dir { width: 16px; height: 16px; }
.sp .no { color: var(--text-muted); white-space: nowrap; } /* the number column is always reserved, so both names start at the same x */
.sp b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } /* one line, never broken mid-word */
@media (max-width: 480px) { .sc2 { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; } .sp { grid-template-columns: 16px 26px minmax(0, 1fr) auto; column-gap: 6px; } }
.sp .lp-m { margin-left: 2px; }

/* Highlights: a compact link card */
.hl { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 13px; color: inherit; text-decoration: none; }
a.hl:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.hl-img { flex: none; display: block; width: 100px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--surface-raised); }
.hl-t { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; }
.hl-t b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.hl-t small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.hl-x { color: var(--text-muted); }

/* Match Preview: recent form, head-to-head */
.pf2 { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.pf2 hr, .h2h2 hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--divider); }
.pf2-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf2-n { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; }
.pf2-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.pf2-n small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pf2-c { display: inline-flex; flex: none; gap: 4px; }
.pf2-l { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pf2-l i, .hn i { margin: 0 2px; font-style: normal; }
.pf2-s { padding: 0; }
.ht-w { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ht-w > .ht { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 8px; border: 1px solid var(--divider); border-radius: 8px; background: var(--surface-base); font-size: .875rem; line-height: 1.25rem; font-weight: 600; color: var(--text-muted); }
.ht-w > .ht b { font-weight: 700; }
.ht-w > .ht.w b { color: var(--green); } .ht-w > .ht.l b { color: var(--red); } .ht-w > .ht.d b { color: var(--text-muted); }
/* the outcome bar: wins, draws, losses join without gaps; only the outer ends are round */
.hb { display: flex; gap: 0; height: 6px; }
.hb i { display: block; min-width: 0; } .hb i.w { background: var(--green); border-radius: 9999px 0 0 9999px; } .hb i.d { background: var(--divider); } .hb i.l { background: var(--red); border-radius: 0 9999px 9999px 0; }
.hn { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.hms { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
/* Head-to-head (Figma 1001:23086 / 1001:24801): the card has no padding of its own, the summary block has 12px, every row is full width (12px padding, 12px gaps, a 1px divider above it) */
.h2h2 { display: flex; flex-direction: column; gap: 0; padding: 0; }
.h2h2-top { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
[data-h2h-wrap] { display: contents; } /* its heading and card are siblings in the page flow, so they get the same 12px gap as every other section */
.hm { display: grid; grid-template-columns: 20px minmax(0, 80px) minmax(0, 1fr) 20px; align-items: center; column-gap: 12px; padding: 12px; border-top: 1px solid var(--divider); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.h2h2:not(.open) .hm-x { display: none; }
.hm-c { display: grid; place-items: center; width: 20px; height: 20px; }
.hm-ucl { background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.hm-tx { border-radius: 50%; background: var(--surface-raised); color: var(--text-muted); font-size: .5625rem; font-weight: 700; }
.hm-d { display: flex; gap: 4px; min-width: 0; color: var(--text-muted); white-space: nowrap; }
.hm-d > * { overflow: hidden; text-overflow: ellipsis; }
.hm-y { color: var(--text); }
.hm-s { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.hm-s b { font-size: .875rem; line-height: 1.25rem; font-weight: 700; white-space: nowrap; }
.hm-n { display: none; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.hm-n:first-child { text-align: right; }
.pf2 .dc { margin: 0 -12px; width: calc(100% + 24px); }
.h2h2.none { gap: 4px; padding: 12px; }
.h2h2.none p:first-child { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.h2h2.none .note { padding: 0; }
@media (min-width: 1000px) { .hm-n { display: block; } }

/* Player Detail (Figma "Player"): result badges, Form card, Competitions, Honours, Career, About. */
.rb { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--divider); color: var(--text-muted); font-style: normal; font-size: .625rem; line-height: 1; font-weight: 700; }
.rb.w { background: var(--green); color: #04130a; }
.rb.l { background: var(--red); color: #1a0505; }
.rb.d { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--divider); }
.pl-form { display: flex; flex-direction: column; padding: 0; }
.pl-strip { display: flex; justify-content: flex-start; gap: 12px; padding: 12px; }
.pl-strip.full { justify-content: space-between; gap: 4px; }
.rb-l { display: flex; }
.pl-form > hr { width: auto; height: 1px; margin: 0 12px; border: 0; background: var(--divider); }
.pl-top { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.pl-top > hr { width: 100%; height: 1px; margin: 0; border: 0; background: var(--divider); }
.pl-top > .pl-strip { padding: 0; }
/* Form rating bars (Figma 1092:32032): ten equal columns, the bar 10px per rating point; fewer appearances keep the same column width. */
.pf-cols { display: flex; justify-content: flex-start; align-items: flex-end; gap: 12px; }
.pf-col { display: flex; flex: 0 1 calc((100% - 108px) / 10); min-width: 0; flex-direction: column; align-items: center; gap: 8px; color: inherit; text-decoration: none; border-radius: 6px; }
.pf-col:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pf-bar { display: flex; width: 100%; min-height: 120px; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.pf-bar small { font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
.pf-bar i { display: block; width: 100%; border-radius: 4px; }
.pf-lg { flex-wrap: wrap; column-gap: 12px; row-gap: 4px; }
@media (max-width: 359px) { .pf-cols { gap: 4px; } .pf-col { flex-basis: calc((100% - 36px) / 10); } }
.pl-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--divider); }
.pl-list li + li { border-top: 1px solid var(--divider); }
.pl-r { display: grid; grid-template-columns: 20px 1px minmax(0, 1fr) auto 1px 20px; align-items: center; gap: 12px; min-height: 45px; padding: 12px; color: inherit; }
.pl-c { display: flex; width: 20px; height: 20px; }
.pl-v { width: 1px; height: 20px; background: var(--divider); }
.pl-m { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pl-o { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pl-vs { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pl-sc { order: 1; } /* phones read vs, crest, score; with the opponent's name (wider screens) the score leads */
.pl-on { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.pl-sc { display: inline-flex; align-items: baseline; font-size: .875rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap; }
.pl-sc b { min-width: 5ch; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-e { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.pl-g { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; line-height: 1rem; font-weight: 600; white-space: nowrap; }
.pl-g .pl-n { position: absolute; top: -4px; right: -5px; display: flex; min-width: 10px; height: 10px; align-items: center; justify-content: center; border-radius: 9999px; background: var(--pink); color: #fff; font-size: .5625rem; line-height: 10px; font-weight: 700; }
@media (min-width: 640px) { .pl-on { display: block; } .pl-sc { order: 0; } }
/* Competitions (Figma 955:8824 / 1001:30683): a 44px column, then 28px goal, assist and G/A columns, 4px apart, 8px at the right edge. */
.ct5 col.nc { width: 44px; }
.ct5 col.nc.ev { width: 32px; }
.ct5 col.nc.ga { width: 40px; }
.ct5 th:not(:first-child), .ct5 td:not(:first-child) { white-space: nowrap; }
.ct5 th:nth-last-child(-n+3):not(:first-child), .ct5 td:nth-last-child(-n+3):not(:first-child) { padding-left: 4px; }
.ct5 th:last-child, .ct5 td:last-child { padding-right: 8px; }
.ct5 th { line-height: 1rem; }
.ct5 th .ui-ico, .ct5 th .pf-i { width: 16px; height: 16px; margin-inline: auto; vertical-align: middle; color: var(--text); }
.ct5 th .ui-ico, .ct5 th .pf-i { display: block; }
.ct5 td { color: var(--text); font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.ct5 td .of { color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.ct5 td:first-child { font-size: .75rem; line-height: 1rem; }
.ct5 td:first-child span b { font-weight: 600; }
.ct td.gold { color: var(--bf-gold-ink); }
/* Goalkeepers (Figma 1100:12762): goals conceded in red; the CS and G/A headings are white like the icons beside them. */
.ct5 thead th.wt { color: var(--text); }
.ct5 td.red, .stat.ist.red b { color: #ff6467; }
html.light .ct5 td.red, html.light .stat.ist.red b { color: #c10007; }
.pl-card { padding: 0; }
.pl-lines { margin: 0; padding: 0; list-style: none; }
.pl-lines > li + li, .dc-more > .pl-lines { border-top: 1px solid var(--divider); }
.dc-more > .pl-lines > li:first-child { border-top: 0; }
.pl-h, .pl-k { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; }
.pl-h > div { gap: 2px; }
.pl-h > div, .pl-k > div { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.pl-h b, .pl-k b { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.pl-h small, .pl-k small { color: var(--text-muted); font-size: .75rem; line-height: 1rem; font-weight: 400; }
.pl-x { flex: none; align-self: center; color: var(--text); font-size: .875rem; line-height: 1.25rem; font-weight: 700; }
.pl-k-n { flex: none; width: 28px; height: 28px; }
.pl-kd { display: flex; flex: none; flex-direction: column; align-items: flex-end; font-size: .75rem; line-height: 1rem; font-weight: 600; }
.pl-card > .dc:first-child, .pl-card > .pl-lines + .dc { border-top: 1px solid var(--divider); }
/* The assist boot is drawn white for dark surfaces: invert it on light ones so it stays visible. */
html.light img[src$="/assist.svg"] { filter: invert(1); }
/* The pitch stays dark in light mode, so the boot keeps its white there. */
html.light .pit img[src$="/assist.svg"] { filter: none; }
@media (max-width: 359px) { .ct5 td:first-child span b { white-space: normal; overflow-wrap: anywhere; } }

/* Upcoming fixture: trailing chevron; manager card */
.fx-go { display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.fx-go .bf-ico { width: 20px; height: 20px; }
.mgr .av { display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); background: var(--surface-raised); }
.mgr .av .bf-ico { width: 24px; height: 24px; }

/* Hover: the Feed's own language (--surface-raised, as on its publisher cards), for interactive elements only and only for a real pointer, so touch screens never keep a hover.
   Nothing changes size, padding or position; competition gradients and the Barcelona accent stay. Keyboard focus keeps its outline. */
@media (hover: hover) and (pointer: fine) {
  a.card, a.tr, a.lp, a.xl-p, .pl-r, .fm-col, a.ir, .dc { transition: background-color .15s ease, color .15s ease; }
  a.card:hover, a.tr:hover, a.lp:hover, a.xl-p:hover, a.hl:hover, .pl-r:hover, .fm-col:hover, .dc:hover { background: var(--surface-raised); }
  a.fx.ucl:hover { background: radial-gradient(ellipse 70% 120% at 0 50%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%), var(--surface-raised); }
  a.tr:hover { border-radius: 8px; border-bottom-color: transparent; } /* a rounded highlight, like the Form columns; the divider keeps its space */
  a.tr.me:hover { background: color-mix(in srgb, var(--text) 8%, var(--surface-raised)); }
  a.ir:hover { background: color-mix(in srgb, var(--surface-raised) 70%, transparent); }
  .rb-l:hover .rb { filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) { a.card, a.tr, a.lp, a.xl-p, .pl-r, .fm-col, a.ir, .dc { transition: none; } }

/* Server-rendered first response (public/insights/render.php): a real heading, description and links that the app replaces once it has drawn the page. */
.seo-ssr { padding: 16px 0; }
.seo-ssr h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -.01em; }
.seo-ssr p { margin: 0 0 16px; color: var(--text-muted); }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.seo-links a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.seo-links span { color: var(--text-muted); font-size: .875rem; }
/* While the page is still the server-drawn text or the loading skeleton, the footer would sit inside the first screen and then be pushed far below it when the app draws the page (a layout shift of about 0.13 on every match page). Holding the content area at one screen height keeps the footer below the fold the whole time. */
#view:has(> .seo-ssr), #view:has(> .skeleton) { min-height: 100svh; }
/* First paint: with scripting on, the server text is visually hidden (still in the document for crawlers and screen readers) and the skeleton the app draws next shows instead, so the text never flashes. Without scripting, or in a browser without this media query, the text is the page, exactly as before. */
.seo-ssr + .skeleton { display: none; }
/* Only when the skeleton is really there (a stored page from before it existed keeps its text) and the browser can tell (:has). */
@supports selector(:has(+ *)) {
  @media (scripting: enabled) {
    .seo-ssr[data-ssr]:has(+ .skeleton) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .seo-ssr + .skeleton { display: flex; }
  }
}


/* Light theme: the W / D / L letter inside every circular result badge is white (backgrounds, sizes and the dark theme are unchanged): H2H meetings and chips, Recent form, the Player profile strip, the standings FORM column. */
html.light .h2h-c, html.light .rb.w, html.light .rb.d, html.light .rb.l { color: #fff; }
@media (min-width: 1000px) { html.light .tb.wide .sx .fr i.fw, html.light .tb.wide .sx .fr i.fd, html.light .tb.wide .sx .fr i.fl { color: #fff; } }

/* Light theme: the draw (D) badge background in the standings FORM column and the Player profile strip is a darker neutral so the white D reads clearly (contrast above 4.5:1); W / L, sizes and the dark theme are unchanged. */
html.light .rb.d { background: #666666; box-shadow: none; }
@media (min-width: 1000px) { html.light .tb.wide .sx .fr i.fd { background: #666666; box-shadow: none; } }

/* Analytics preference box (markup from /analytics.js). The Feed styles it through its Tailwind build, which Insights does not load: same values here. */
#analyticsConsentOverlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 16px; box-sizing: border-box; background: rgb(0 0 0 / .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#analyticsConsent { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 480px; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 16px; box-sizing: border-box; border: 1px solid var(--divider); border-radius: 8px; background: var(--surface-raised); color: var(--text); font-size: .875rem; line-height: 1.25rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); }
#analyticsConsent:focus { outline: none; }
#analyticsConsentDescription { min-width: 0; margin: 0; }
#analyticsConsentDescription a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
#analyticsConsentActions { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }
#analyticsConsentActions button { padding: 8px 16px; border: 0; border-radius: 9999px; background: var(--btn-bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
#analyticsConsentActions #analyticsConsentAllow { background: var(--social-blue); color: #ffffff; }
#analyticsConsent :is(a, button):focus-visible { outline: 2px solid var(--bf-gold-ink); outline-offset: 2px; }
