/* Who's the GOAT? - in the MDT look: gold on near-black, serif italic accents, gold pill buttons.
   Messi is Argentina's sky blue, Ronaldo Portugal's red (both checked for colour-blind contrast). */
:root {
  --bg: #0b0a09; --surface: #151411; --surface2: #1b1a16; --line: rgba(255,236,190,.09); --line2: rgba(255,236,190,.16);
  --ink: #f5f0e6; --ink2: #bdb5a5; --ink3: #80796c;
  --gold: #dba63c; --gold2: #f8e3a8; --gold-deep: #9a6f22;
  --gold-grad: linear-gradient(120deg, #f8e3a8 0%, #dba63c 45%, #9a6f22 100%);
  --messi: #4f97d6; --messi-d: #24496d; --messi-t: #9cc8f0;
  --ronaldo: #d62b40; --ronaldo-d: #74202a; --ronaldo-t: #ff9aa6;
  --win: #dba63c;
  --r: 20px;
  --page: 1480px;   /* wide enough to fill a laptop or Mac screen */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); overflow-x: hidden;
  background-image: radial-gradient(1200px 600px at 78% -10%, rgba(219,166,60,.13), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(154,111,34,.08), transparent 60%); background-attachment: fixed; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--gold2); }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; }
.boot { text-align: center; color: var(--ink3); padding: 80px 16px; }
#buildTag { position: fixed; right: 6px; bottom: 4px; font-size: 10px; color: #ffffff40; pointer-events: none; z-index: 5; }

/* hero */
.hero { text-align: center; padding: 26px 16px 10px; }
.duo { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 28px); max-width: 820px; margin: 0 auto; }
.kick { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.kick::before, .kick::after { content: ''; width: 22px; height: 1px; background: var(--gold); opacity: .7; }
.ttl h1 { font: 800 clamp(34px, 9vw, 66px)/1 var(--sans); letter-spacing: -.035em; margin: 0; }
.ttl h1 em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.01em; padding-right: .06em; }
.vs { margin: 12px 0 0; font-size: clamp(15px, 3.8vw, 19px); font-weight: 700; }
.vs i { font-family: var(--serif); color: var(--ink3); font-weight: 500; margin: 0 6px; }
.nm.messi { color: var(--messi-t); } .nm.ronaldo { color: var(--ronaldo-t); }
.shirt { width: clamp(62px, 17vw, 124px); height: auto; flex: none; filter: drop-shadow(0 14px 22px rgba(0,0,0,.7)); }
.shirt text { font: 800 40px var(--sans); letter-spacing: -.04em; paint-order: stroke; }
.asof { color: var(--ink3); font-size: 12.5px; margin: 14px auto 4px; max-width: 640px; }

/* tabs */
.tabs { position: sticky; top: var(--mdts-h, 0); z-index: 20; background: rgba(11,10,9,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabrow { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 0 12px; max-width: var(--page); margin: 0 auto; }
.tabrow::-webkit-scrollbar { display: none; }
.tabrow button { flex: none; background: none; border: 0; padding: 13px 10px 11px; font-weight: 700; font-size: 14.5px; color: var(--ink2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabrow button.on { color: var(--gold2); border-bottom-color: var(--gold); }
.tabrow button:hover { color: var(--ink); }

/* filter bar */
.fbar { max-width: var(--page); margin: 0 auto; padding: 12px 16px 0; }
.presets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.presets::-webkit-scrollbar { display: none; }
.chip, .fbtn, .pill { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--gold-grad); border-color: transparent; color: #1a1206; box-shadow: 0 8px 20px -10px rgba(219,166,60,.7); }
.fbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); border-color: var(--line2); }
.fbtn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.fbtn b { background: var(--gold-grad); color: #1a1206; border-radius: 99px; font-size: 11px; padding: 1px 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 0; }
.pill { font-size: 12.5px; padding: 5px 10px; color: var(--ink); background: var(--surface2); }
.pill span { color: var(--ink3); margin-left: 2px; }
.pill.clear { background: none; color: var(--gold); border-color: transparent; }

/* layout */
.view { max-width: var(--page); margin: 0 auto; padding: 14px 16px 28px; display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; box-shadow: 0 1px 0 #ffffff08 inset, 0 8px 24px #0004; }
.card h2 { font: 800 21px/1.15 var(--sans); letter-spacing: -.02em; margin: 0; }
.card h2 em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--gold2); }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.sub { color: var(--ink3); font-size: 13px; margin: 4px 0 12px; }
.sub.center { text-align: center; }
.head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.head.sm { justify-content: flex-start; margin: 8px 0 12px; }
.empty { color: var(--ink3); text-align: center; padding: 16px; }
.link { background: none; border: 0; padding: 0; color: inherit; text-align: left; font: inherit; }
.dim { color: var(--ink3); }
.star { width: 13px; height: 13px; fill: var(--gold); vertical-align: -1px; margin: 0 4px; flex: none; }

/* segmented controls & buttons */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; color: var(--ink2); padding: 6px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--surface2); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,236,190,.2); }
.btn { background: var(--gold-grad); color: #1a1206; box-shadow: 0 12px 30px -12px rgba(219,166,60,.6); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 800; }
.ghost { background: none; border: 1px solid rgba(255,236,190,.2); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; }
.more { display: block; margin: 0 auto; }
.more { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 10px 20px; font-weight: 700; }

/* the scoreboard */
.score { text-align: center; }
.score h2 { font-size: clamp(22px, 5vw, 28px); }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.who { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; padding: 7px; border-radius: 8px; background: var(--surface2); }
.who.messi { box-shadow: inset 0 -3px 0 var(--messi); }
.who.ronaldo { box-shadow: inset 0 -3px 0 var(--ronaldo); }
h3.who { display: block; text-align: left; letter-spacing: .04em; text-transform: none; font-size: 15px; padding: 8px 10px; }
.tiles { display: grid; grid-template-columns: .85fr 1fr 1.15fr; gap: 3px; margin-top: 4px; }
.side:last-child .tiles { grid-template-columns: 1.15fr 1fr .85fr; }
.tile { border-radius: 8px; padding: 12px 2px 8px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.tile b { font: 800 clamp(19px, 5.4vw, 38px)/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tile.big b { font-size: clamp(30px, 8.4vw, 60px); }
.tile span { font-size: clamp(9px, 2.3vw, 12px); letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-top: 3px; }
.tile.messi { background: var(--messi-d); } .tile.messi.big { background: var(--messi); }
.tile.ronaldo { background: var(--ronaldo-d); } .tile.ronaldo.big { background: var(--ronaldo); }
.rrow { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; background: var(--surface2); border-radius: 8px; padding: 9px 12px; margin-top: 6px; font-size: 14px; }
.rl { color: var(--ink2); }
.rv { font-weight: 800; font-size: 18px; display: flex; align-items: center; }
.rv.messi { justify-content: flex-start; } .rv.ronaldo { justify-content: flex-end; }

/* comparison tables */
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp thead th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); padding: 6px; }
.cmp thead th.messi { text-align: left; box-shadow: inset 0 -2px 0 var(--messi); }
.cmp thead th.ronaldo { text-align: right; box-shadow: inset 0 -2px 0 var(--ronaldo); }
.cmp tbody th { font-weight: 500; color: var(--ink2); text-align: center; padding: 9px 6px; }
.cmp td.n { width: 28%; font-weight: 700; font-variant-numeric: tabular-nums; padding: 9px 6px; white-space: nowrap; }
.cmp td.n.messi { text-align: left; } .cmp td.n.ronaldo { text-align: right; }
.cmp td.win { color: var(--ink); } .cmp td.n:not(.win) { color: var(--ink2); }
.cmp tbody tr { border-top: 1px solid var(--line); }
.cmp tbody tr:not(.grp):hover { background: #ffffff05; }
.cmp tr.grp th { text-align: left; color: var(--gold); font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .22em; padding: 18px 6px 6px; }
.cmp tr.grp th small { display: block; font: 12px var(--sans); text-transform: none; color: var(--ink3); letter-spacing: 0; margin-top: 2px; }
.cov { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; }
.cmp tr.off th, .cmp tr.off td { opacity: .4; }

/* share bars */
.shares { display: grid; gap: 12px; }
.share { display: grid; grid-template-columns: 112px 1fr; gap: 3px 10px; align-items: center; }
.sl { grid-row: span 2; color: var(--ink2); font-size: 13.5px; }
.sb { position: relative; height: 20px; display: flex; align-items: center; }
.sb i { height: 14px; border-radius: 0 4px 4px 0; min-width: 2px; }
.sb span { font-size: 12px; color: var(--ink2); margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
i.messi { background: var(--messi); } i.ronaldo { background: var(--ronaldo); }
.legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 12.5px; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* matches */
.mfilters { display: grid; gap: 10px; }
.mrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.search svg { width: 17px; height: 17px; stroke: var(--ink3); stroke-width: 2; fill: none; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 16px; padding: 9px 0; }
.sel { display: inline-flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; }
select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 14px; }
.msums { display: grid; gap: 8px; }
.msum { display: grid; grid-template-columns: 76px 1fr 1fr 1fr 1.25fr; align-items: center; gap: 4px; background: var(--surface2); border-radius: 12px; padding: 10px 12px; box-shadow: inset 3px 0 0 var(--messi); }
.msum.ronaldo { box-shadow: inset 3px 0 0 var(--ronaldo); }
.mname { font-weight: 800; font-size: 14px; }
.mst { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.mst b { font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.mst small { font-size: 10.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.wdl b { display: flex; gap: 2px; font-size: 14px; }
.wdl i + i::before { content: '-'; color: var(--ink3); margin-right: 2px; }
.wdl i { font-style: normal; }
i.rW { color: #7fdc9f; } i.rD { color: var(--ink2); } i.rL { color: #ff9aa5; }
.msels { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }
.msels .sel { min-width: 0; }
.msels select { width: 100%; min-width: 0; font-size: 13.5px; padding: 8px 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.csv { display: inline-flex; align-items: center; gap: 6px; justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--ink3); font-size: 13px; font-weight: 600; }
.csv:hover { color: var(--gold); }
.csv svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* match history */
.mlist { display: grid; gap: 8px; }
.mmon { position: sticky; top: calc(var(--mdts-h, 0px) + var(--tabs-h, 46px)); z-index: 5; margin: 10px -16px 0; padding: 8px 16px 6px; background: linear-gradient(var(--bg) 70%, transparent);  color: var(--ink2); }
.mmon:first-child { margin-top: 0; }
.mlist { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: clip; }
.mmon { position: static; margin: 0; padding: 14px 12px 6px; background: var(--surface2); border-top: 1px solid var(--line); font: italic 500 17px var(--serif); color: var(--gold2); letter-spacing: 0; }
.mmon:first-child, .mhead + .mmon { border-top: 0; }
/* the columns: day | comp | team | H/A | opponent | score | result | minutes | G/A (team only on wider screens) */
.mgrid { display: grid; grid-template-columns: 20px 66px minmax(0, 1fr) 34px 20px 50px; column-gap: 6px; align-items: center; padding: 0 8px 0 10px; min-height: 42px; font-size: 13.5px; }
.mgrid > span { min-width: 0; white-space: nowrap; }
.mgrid > .c-opp { white-space: normal; line-height: 1.2; padding: 4px 0; overflow-wrap: break-word; hyphens: auto; }   /* a long name takes two lines rather than being cut */
.mgrid > .c-x { display: none; text-align: center; color: var(--ink2); font-variant-numeric: tabular-nums; }
.c-comp .cs.fin { box-shadow: 0 0 0 1.5px var(--gold); }
.mhead { font-size: 10px !important; position: sticky; top: calc(var(--mdts-h, 0px) + var(--tabs-h, 46px)); z-index: 6; min-height: 30px; background: #121110; border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; }
.c-day { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.mhead .c-day, .mhead span:first-child { text-align: right; }
.c-comp > span { display: inline-block; vertical-align: middle; white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  color: color-mix(in srgb, var(--cc) 45%, #fff); background: color-mix(in srgb, var(--cc) 24%, transparent); border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); }
.mhead .c-comp > span { all: unset; }
.c-comp .cf { display: none; }
.c-opp { font-weight: 600; }
.c-sc { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.c-res, .c-min { text-align: center; }
.c-res i { display: inline-block; width: 19px; height: 19px; line-height: 19px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 800; text-align: center; }
.c-res i.rW { background: #1c4a30; color: #9be7b4; } .c-res i.rD { background: #303643; color: #d5dae2; } .c-res i.rL { background: #50222a; color: #ffb3ba; }
.c-min { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.mhead .c-min { font-size: 10px; color: var(--ink3); }
.mhead > span { text-overflow: clip; }
.c-ga { text-align: left; }
.mgrid sup { font-size: 9px; color: var(--ink3); margin-left: 1px; font-weight: 700; }
.match { position: relative; cursor: pointer; border-top: 1px solid var(--line); }
.match::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--messi); }
.match.ronaldo::before { background: var(--ronaldo); }
.mmon + .match, .mhead + .match { border-top: 0; }
.match { --cc: #80796c; background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 20%, transparent) 0%, color-mix(in srgb, var(--cc) 7%, transparent) 45%, transparent 85%); }
.match:hover { background-color: #ffffff0a; }
.match:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.match.open { background-color: #ffffff0a; }
.ga.many { font-size: 10px; } .ga.lots { font-size: 8px; }
.ga { font-size: 13px; line-height: 1; letter-spacing: 0; white-space: nowrap; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
@media (min-width: 700px) {
  .mgrid { grid-template-columns: 30px minmax(150px, 260px) minmax(0, 1fr) 64px 44px minmax(96px, 140px); column-gap: 14px; padding: 0 20px 0 20px; min-height: 48px; font-size: 14.5px; }
  .mgrid > .c-opp { white-space: nowrap; overflow-wrap: normal; }
  .c-comp > span { font-size: 12px; padding: 3px 10px; }
  .ga.many { font-size: 13px; } .ga.lots { font-size: 11px; }
  .c-comp .cs { display: none; } .c-comp .cf { display: inline-block; white-space: normal; border-radius: 12px; }   /* a long name and round wraps inside its pill */
  .ga { font-size: 15px; }
}
@media (max-width: 400px) { .msum { grid-template-columns: 62px 1fr 1fr 1fr 1.3fr; padding: 9px 8px; } .mname { font-size: 13px; } .mst b { font-size: 15px; } .wdl b { font-size: 12.5px; } .mst small { font-size: 9.5px; } }

/* charts */
.chart { position: relative; width: 100%; margin-top: 4px; touch-action: pan-y; }
.chart svg { display: block; overflow: visible; }
.gl { stroke: #ffffff12; stroke-width: 1; }
.ax { fill: var(--ink3); font-size: 11px; font-family: var(--sans); }
.ln { fill: none; stroke-width: 2; stroke-linejoin: round; }
.ln.messi { stroke: var(--messi); } .ln.ronaldo { stroke: var(--ronaldo); }
.dot { stroke: var(--surface); stroke-width: 2; }
.dot.messi, .hm.messi { fill: var(--messi); } .dot.ronaldo, .hm.ronaldo { fill: var(--ronaldo); }
.hm { stroke: var(--surface); stroke-width: 2; }
.el { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: var(--sans); }
.el tspan { fill: var(--ink2); font-weight: 500; }
.xh { stroke: #ffffff55; stroke-width: 1; stroke-dasharray: 3 3; }
.hit { fill: transparent; cursor: crosshair; }
svg [hidden] { display: none; }
#tip { position: absolute; z-index: 1500; background: rgba(11,10,9,.96); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; font-size: 13px; pointer-events: none; min-width: 190px; max-width: 260px; box-shadow: 0 10px 30px #000a; }
#tip .tr { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
#tip .tr b { margin-left: auto; }
#tip .tr i { width: 10px; height: 10px; border-radius: 3px; }
#tip small { display: block; color: var(--ink3); font-size: 11.5px; margin-left: 16px; }

/* season bars */
.pbars { display: grid; gap: 5px; }
.prow { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; }
.pl { font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.pbs { display: grid; gap: 2px; }
.pb { display: flex; align-items: center; height: 13px; }
.pb i { height: 11px; border-radius: 0 4px 4px 0; min-width: 0; }
.pb span { font-size: 11px; color: var(--ink2); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* plain grids */
.tscroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 7px 6px; text-align: center; border-top: 1px solid var(--line); white-space: nowrap; }
.grid thead th { color: var(--ink2); font-size: 12px; border-top: 0; }
.grid thead th.messi { box-shadow: inset 0 -2px 0 var(--messi); }
.grid thead th.ronaldo { box-shadow: inset 0 -2px 0 var(--ronaldo); }
.grid tbody th { text-align: left; font-weight: 600; color: var(--ink); }
.grid td.win b { color: var(--ink); }
.grid td:not(.win) b { color: var(--ink2); }
.grid td { color: var(--ink2); }
.comps tr.cat th { font-weight: 700; }
.comps tr.cat { cursor: pointer; }
.comps tr.subc th { font-weight: 400; color: var(--ink2); padding-left: 20px; }
.chev { color: var(--ink3); font-size: 11px; }
.opps tbody th { white-space: normal; min-width: 120px; }

/* teams */
.tcols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tcol { min-width: 0; }
.team { background: var(--surface2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.tn { display: flex; justify-content: space-between; gap: 8px; }
.tn span { color: var(--ink3); font-size: 12.5px; }
.tbar { height: 6px; background: var(--bg); border-radius: 4px; margin: 8px 0; overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 4px; }
.tstats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink3); }
.tstats b { color: var(--ink); font-size: 15px; margin-right: 4px; }
.victims { margin: 0; padding: 0; list-style: none; counter-reset: v; }
.victims li { display: grid; grid-template-columns: 22px 1fr auto; gap: 0 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); counter-increment: v; }
.victims li::before { content: counter(v); color: var(--ink3); font-size: 12px; }
.victims b { font-size: 18px; }
.victims small { grid-column: 2 / 4; color: var(--ink3); font-size: 11.5px; }
.finals { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.finals li { display: grid; grid-template-columns: 42px 1fr auto; gap: 0 8px; padding: 7px 4px 7px 10px; border-top: 1px solid var(--line); font-size: 13px; border-left: 3px solid #5a2329; }
.finals li.w { border-left-color: #2f7a4d; }
.fy { color: var(--ink3); } .fc { font-weight: 600; } .fg { grid-row: span 2; align-self: center; font-size: 15px; letter-spacing: 1px; white-space: nowrap; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.fs { grid-column: 2; color: var(--ink2); font-size: 12px; }
.tog { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); padding: 6px 0; }
.tog input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }

/* honours */
.cabinet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cab { background: var(--surface2); border-radius: 10px; padding: 12px; text-align: center; }
.cl { font-size: 12px; color: var(--ink2); text-transform: uppercase; letter-spacing: .08em; }
.cn { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.cn b { font: 800 34px/1 var(--sans); letter-spacing: -.04em; color: var(--ink2); }
.cn b.win { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cn b.win { color: var(--gold); }
.cn i { color: var(--ink3); font-style: normal; font-size: 13px; }
.cw { display: flex; justify-content: center; gap: 30px; font-size: 11px; color: var(--ink3); }
.hhead { display: flex; width: 100%; justify-content: space-between; align-items: center; background: none; border: 0; padding: 0; text-align: left; }
.hhead span { color: var(--ink3); font-size: 13px; }
.hon { margin-top: 10px; }
.hon tbody th .link { color: var(--ink); text-align: center; }
.yrs { text-align: left; font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.yrs p { margin: 4px 0; display: flex; gap: 8px; }
.yrs i { width: 8px; height: 8px; border-radius: 2px; margin-top: 6px; flex: none; }

/* verdict */
.verdict { text-align: center; }
.vbig { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; text-align: left; }
.vbig .shirt { width: 84px; }
.vk { display: block; font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.vbig b { font: italic 500 clamp(30px, 7.5vw, 46px)/1.05 var(--serif); }
.vbar { display: flex; gap: 2px; height: 16px; border-radius: 8px; overflow: hidden; max-width: 560px; margin: 0 auto; }
.vbar i { display: block; height: 100%; transition: width .35s; }
.vpts { display: flex; justify-content: space-between; max-width: 560px; margin: 6px auto 0; font-size: 14px; color: var(--ink2); }
.vpts b { color: var(--ink); font-size: 20px; }
.vbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wseg { display: inline-flex; gap: 2px; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.wseg button { border: 0; background: none; color: var(--ink3); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.wseg button.on { background: var(--surface2); color: var(--gold); }
.vt tbody tr:not(.grp) th { display: flex; flex-direction: column; align-items: center; }

/* filters sheet */
.sheet-bg { position: fixed; inset: 0; background: #000a; z-index: 1100; }
.sheet { position: fixed; z-index: 1101; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: calc(100% - var(--mdts-h, 0px) - 16px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -20px 50px #000c; }
.sh-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; }
.sh-head h2 { font: 800 22px var(--sans); letter-spacing: -.02em; margin: 0; }
.x { background: var(--surface2); border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; }
.sh-body { overflow-y: auto; padding: 0 16px 12px; }
.sh-body h3 { font-size: 12px; color: var(--ink3); text-transform: uppercase; letter-spacing: .1em; margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.range { display: flex; align-items: center; gap: 8px; }
.range select { flex: 1; }
.range span { color: var(--ink3); }
.hint { font-size: 12.5px; color: var(--ink3); margin: 8px 0; }
.sh-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sh-foot .btn { flex: 1; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--surface2); border: 1px solid rgba(255,236,190,.2); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 1600; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.foot { max-width: var(--page); margin: 0 auto; padding: 8px 16px 40px; color: var(--ink3); font-size: 12.5px; text-align: center; }

@media (min-width: 900px) {
  .v-h2h { grid-template-columns: 1fr 1fr; align-items: start; }
  .v-h2h .score { grid-column: 1 / -1; }
  .v-h2h .card:nth-child(2) { grid-row: span 2; }
  .v-seasons .card:first-child { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .mgrid { grid-template-columns: 30px minmax(180px, 280px) minmax(0, 1fr) 64px 44px 130px 60px 60px 64px; }
  .mgrid > .c-x { display: block; }
  .v-seasons { grid-template-columns: 1fr 1fr; align-items: start; }
  .v-opps { grid-template-columns: 1fr 2fr; align-items: start; }
  .v-honours { grid-template-columns: 1fr 1fr; align-items: start; }
  .v-honours > .card:first-child, .v-honours > p { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tcols { grid-template-columns: 1fr; }
  .share { grid-template-columns: 84px 1fr; }
  .card { padding: 14px 12px; }
  .tscroll { margin: 0 -12px; padding: 0 12px; }
  .rrow { grid-template-columns: 56px 1fr 56px; padding: 9px 8px; font-size: 13px; }
  .cmp td.n { width: 30%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the match filters never push the page sideways on a small phone */
.mfilters, .mfilters > *, .msums, .msum > * { min-width: 0; }
.msum { grid-template-columns: 76px repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); }
@media (max-width: 360px) { .msum { grid-template-columns: 54px repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); } .mst small { font-size: 8.5px; letter-spacing: .02em; } .mst b { font-size: 13.5px; } .wdl b { font-size: 11px; } .msels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mrow > .search { min-width: 0; max-width: 100%; }
@media (max-width: 400px) {
  /* small phones: the table runs edge to edge and every column tightens, so the opponent keeps its room */
  .v-matches .mlist { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .mgrid { grid-template-columns: 19px 63px minmax(0, 1fr) 30px 19px 50px; column-gap: 4px; padding: 0 6px 0 9px; font-size: 13px; }
  .c-comp > span { font-size: 9.5px; padding: 2px 5px; }
  .c-res i { width: 18px; height: 18px; line-height: 18px; font-size: 10px; }
  .c-min { font-size: 11px; }
  .ga { font-size: 12px; } .ga.many { font-size: 9.5px; } .ga.lots { font-size: 7.5px; }
}
.ga.six { font-size: 6px; letter-spacing: -.05em; }
.c-sc.big { font-size: 11.5px; letter-spacing: -.03em; }
@media (min-width: 700px) { .ga.six { font-size: 10px; } .c-sc.big { font-size: inherit; letter-spacing: 0; } }
@media (max-width: 699px) { .mhead { letter-spacing: 0; } .mhead .c-res { font-size: 9px; } }

/* ---------- the match card (tap a match) ---------- */
.mcard { --pc: var(--messi); position: relative; margin: 2px 10px 14px 12px; border-radius: 18px; overflow: hidden; cursor: default;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--cc) 42%, transparent), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--pc) 22%, transparent), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px),
    #100f0d;
  border: 1px solid color-mix(in srgb, var(--cc) 45%, rgba(255,236,190,.12));
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06); }
.mcard.ronaldo { --pc: var(--ronaldo); }
.mcard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-grad); opacity: .85; }
.mc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 0; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mc-comp { color: color-mix(in srgb, var(--cc) 40%, #fff); }
.mc-date { color: var(--ink3); letter-spacing: .08em; text-align: right; }
.mc-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 18px 14px 10px; }
.mc-side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.mc-side b { font-size: 14px; font-weight: 700; color: var(--ink2); line-height: 1.2; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.mc-side.mine b { color: var(--ink); font-weight: 800; }
.crest { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--sans); letter-spacing: -.02em; color: var(--ink2);
  background: radial-gradient(circle at 35% 30%, #2a2823, #141310); border: 2px solid color-mix(in srgb, var(--cc) 50%, rgba(255,236,190,.15)); box-shadow: 0 10px 20px -10px #000; }
.crest.messi { color: #fff; background: radial-gradient(circle at 35% 30%, #6fb0e8, #24496d); border-color: var(--gold); }
.crest.ronaldo { color: #fff; background: radial-gradient(circle at 35% 30%, #e85366, #74202a); border-color: var(--gold); }
.mc-score { text-align: center; }
.mc-score div { display: flex; align-items: center; gap: 10px; font: 800 clamp(40px, 11vw, 64px)/1 var(--sans); letter-spacing: -.05em; color: #fff; text-shadow: 0 6px 24px rgba(0,0,0,.6); }
.mc-score i { width: 14px; height: 4px; border-radius: 2px; background: var(--gold); }
.mc-score small { display: block; margin-top: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; }
.mcard.won .mc-score small { color: #9be7b4; } .mcard.lost .mc-score small { color: #ffb3ba; }
.mc-events { display: block; margin: 0 14px; padding: 12px 4px 14px; border-top: 1px solid rgba(255,236,190,.1); }
.mc-events ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mc-events ul.home { align-items: flex-start; } .mc-events ul.away { align-items: flex-end; }
.mc-events li { display: flex; align-items: baseline; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.mc-events ul.away li { justify-content: flex-end; }
.ev-name { font-weight: 700; color: var(--ink); }
.ev-type { font-size: 12.5px; color: var(--ink2); }
.mcard.messi .ev-name { color: var(--messi-t); } .mcard.ronaldo .ev-name { color: var(--ronaldo-t); }
.mc-events li b { font-variant-numeric: tabular-nums; }
.ev-ico { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 15px; }
.ev-who { font-size: 11px !important; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold2); }
.ev-none { color: var(--ink3); font-size: 13px !important; }
.mc-events i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; }
.t-pen { background: rgba(255,255,255,.1); color: var(--ink2); }
.t-win { background: var(--gold-grad); color: #1a1206; }
.t-eq { background: rgba(79,151,214,.25); color: #cfe6fb; }
.mc-player { display: flex; align-items: center; gap: 12px; margin: 0 14px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,236,190,.08); }
.mc-player .shirt { width: 46px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.mc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mc-who b { font: italic 500 20px/1.1 var(--serif); color: var(--ink); }
.mc-who span { font-size: 12.5px; color: var(--ink2); }
.mc-who .mc-motm { align-self: flex-start; margin-top: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1a1206; background: var(--gold-grad); padding: 3px 8px; border-radius: 999px; }
.mc-rating { flex: none; width: 58px; height: 58px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #08130c; }
.mc-rating b { font: 800 22px/1 var(--sans); letter-spacing: -.03em; }
.mc-rating small { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-top: 3px; }
.mc-rating.r-top { background: linear-gradient(140deg, #4fd1ff, #2a7bd8); color: #031220; }
.mc-rating.r-good { background: linear-gradient(140deg, #6fe08f, #23a554); }
.mc-rating.r-ok { background: linear-gradient(140deg, #f6d365, #e0a52c); }
.mc-rating.r-low { background: linear-gradient(140deg, #ff9a6b, #e0552c); }
.mc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 12px 14px 0; }
.mc-stats div { background: rgba(255,255,255,.04); border: 1px solid rgba(255,236,190,.07); border-radius: 12px; padding: 9px 10px; }
.mc-stats b { display: block; font: 800 20px/1.1 var(--sans); letter-spacing: -.03em; color: var(--ink); }
.mc-stats b small { font-size: 11px; font-weight: 600; color: var(--ink3); letter-spacing: 0; }
.mc-stats span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.mc-foot { margin: 12px 16px 0; padding-bottom: 16px; font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.mc-foot i { font-style: normal; color: var(--gold); margin: 0 7px; }
@media (max-width: 400px) {
  .mcard { margin: 0 6px 12px 9px; }
  .mc-board { padding: 16px 8px 8px; gap: 6px; }
  .crest { width: 46px; height: 46px; font-size: 14px; }
  .mc-side b { font-size: 12px; hyphens: auto; }
  .mc-score div { font-size: 36px; gap: 7px; }
  .mc-score small { white-space: normal; max-width: 110px; margin-left: auto; margin-right: auto; }
  .mc-board { grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); }
  .mc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .mcard { margin: 4px 20px 18px 20px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "top top" "board player" "events stats" "foot foot"; column-gap: 8px; }
  .mc-top { grid-area: top; } .mc-board { grid-area: board; } .mc-events { grid-area: events; } .mc-player { grid-area: player; align-self: center; margin: 0 16px 0 0; }
  .mc-stats { grid-area: stats; margin: 0 16px 0 0; align-self: start; } .mc-foot { grid-area: foot; }
}
.mc-side .nm-short { display: none; }
@media (max-width: 400px) { .mc-side .nm-full { display: none; } .mc-side .nm-short { display: inline; } }
.mc-stats span em { display: block; font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink2); margin-top: 1px; }

/* the match timeline (v2.0): home goals left, away goals right, the score after each in the middle */
.mc-events.tl ul { gap: 0; }
.tl-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(255,236,190,.07); font-size: 13.5px !important; }
.tl-row:last-child { border-bottom: 0; }
.tl-l { text-align: right; } .tl-r { text-align: left; }
.tl-l, .tl-r { line-height: 1.45; overflow-wrap: break-word; min-width: 0; }
.tl-sc { justify-self: center; font: 800 12px/1 var(--sans); font-variant-numeric: tabular-nums; padding: 4px 7px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--ink2); white-space: nowrap; }
.tl-sc.none { background: none; }
.tl-row.his .tl-sc { background: var(--gold-grad); color: #1a1206; }
.tl-row.his { background: linear-gradient(90deg, transparent, rgba(219,166,60,.08), transparent); }
.tl-who { color: var(--ink2); font-weight: 600; }
.tl-min { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-me { font-weight: 800; }
.mcard.messi .tl-me { color: var(--messi-t); } .mcard.ronaldo .tl-me { color: var(--ronaldo-t); }
.tl-ast { white-space: nowrap; }
.tl .t-win, .tl .t-eq { margin-left: 4px; vertical-align: 1px; }
.tl-gap { margin: 8px 0 0; font-size: 11.5px; color: var(--ink3); text-align: center; }
@media (max-width: 400px) { .tl-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 5px; font-size: 12.5px !important; } .tl .ev-type { font-size: 11px; } }
