/* The public profile (/u/:player) in the site restyle's scorebug look (spec §10, mockup profile-8.html): the header
   is the team-colour strip with Anton numbers, tables are box-score tables (small grey capital heads, a bold Total
   row with a thin line above, never a shaded row), W / L / Split badges. Everything is scoped to body.page-profile so
   live.css (loaded first, for the shared footer and fonts) never leaks in. One column under 1024 px; the career tables span both columns above it. */
@font-face { font-family: Inter; src: url("/live-assets/InterVariable.woff2?v=693b77d4f32e") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #0b0c0e; --pg: #0e0f11; --panel: #141518; --line: #1d1e22; --line-head: #26272b; --line-tot: #34353a; --line-soft: rgba(255,255,255,.06);
  --fg: #ffffff; --muted: #c9ccd2; --faint: #7d818a; --quiet: #9a9ea7;
  --red: #e0272e; --red-ink: #ff6b61; --green: #4ade80; --online: #30d158;
  --r: 8px; --r-lg: 12px;
}
body.page-profile {
  max-width: 1104px; margin: 0 auto; padding: 24px 22px;
  background: var(--bg); color: var(--fg);
  font: 500 13px/1.45 "Inter NSR", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.page-profile * { min-width: 0; }
.page-profile .num, .page-profile .ptable td { font-variant-numeric: tabular-nums; }
.page-profile a { color: inherit; }
.page-profile :focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; }
.page-profile .loading, .page-profile .none { color: var(--quiet); margin: 0; padding: 12px; }
.page-profile .none.big { padding: 28px 26px; font-size: 15px; font-weight: 600; color: var(--fg); background: var(--pg); border-radius: 0 0 14px 14px; }
.page-profile .none.big:first-child { border-radius: 14px; }   /* an error state drawn alone, with no strip above it */
.page-profile .err { color: var(--red-ink); margin: 0 0 8px; font-size: 12px; }
.page-profile .err:empty { display: none; }
.page-profile .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-profile .lbl { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.page-profile .glass { background: var(--panel); border-radius: var(--r-lg); overflow: hidden; }
.page-profile .glass.pad { padding: 10px 12px; }

/* ---- Header: the team-colour strip (the game page's), avatar, name, meta, Anton numbers on the right. */
.page-profile .pstrip {
  display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #3a3c42) 60%, transparent), color-mix(in srgb, var(--tc, #3a3c42) 10%, transparent) 45%, var(--panel) 70%), var(--panel);
}
.page-profile .pav {
  width: 78px; height: 78px; border-radius: 50%; flex: none; object-fit: cover; background: #2a2c31; box-shadow: 0 0 0 3px rgba(255,255,255,.12);
  display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: var(--fg);
}
.page-profile .pid { flex: 1 1 auto; }
.page-profile .pn { margin: 0; font: 800 28px/1 "Inter NSR", Inter, system-ui, sans-serif; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The Discord name under a nickname (backend src/nickname.js). */
.page-profile .pdiscord { margin: 4px 0 0; font-size: 13px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-profile .ph { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.page-profile .ph .pline { display: inline-flex; align-items: center; gap: 4px; }
.page-profile .ph .online { color: var(--online); }
.page-profile .ph .online::before { content: "● "; }
.page-profile .tm { display: inline-flex; align-items: center; gap: 4px; }
.page-profile .tm .tlogo { width: 18px; height: 18px; }
.page-profile .tm .tm-l { color: var(--muted); }
.page-profile .btn.share { margin-top: 5px; padding: 3px 10px; border: 0; border-radius: 999px; font: 700 12px "Inter NSR", Inter, system-ui, sans-serif; color: var(--fg); background: rgba(255,255,255,.14); cursor: pointer; }
.page-profile .btn.share:hover { background: rgba(255,255,255,.2); }
.page-profile .copied { color: var(--online); font-size: 12px; overflow-wrap: anywhere; }
.page-profile .pcounts { display: flex; gap: 26px; margin: 0 0 0 auto; text-align: center; }
.page-profile .pcounts div { display: flex; flex-direction: column; align-items: center; }
.page-profile .pcounts dd { margin: 0; font: 400 40px/1 "Anton NSR", Impact, sans-serif; font-synthesis: none; white-space: nowrap; }
.page-profile .pcounts dt { margin-top: 4px; font: 600 10.5px "Inter NSR", Inter, system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.page-profile .pcounts .psub { font-size: 11px; color: var(--quiet); }

/* ---- Body: two columns on the page panel, sections 1-5 left, 6-12 right. */
.page-profile .two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; padding: 18px 22px; background: var(--pg); border-radius: 0 0 14px 14px; }
.page-profile .col, .page-profile .career { display: grid; gap: 14px; }
.page-profile .stack { display: grid; gap: 8px; }
.page-profile .sec { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.page-profile .sec h2 { margin: 0; font: 700 13px "Inter NSR", Inter, system-ui, sans-serif; }
.page-profile .all { background: none; border: 0; padding: 2px 4px; border-radius: 6px; cursor: pointer; font: 600 12px "Inter NSR", Inter, system-ui, sans-serif; color: var(--quiet); white-space: nowrap; }
.page-profile .all:hover { color: var(--fg); text-decoration: underline; }
.page-profile .all:disabled { color: var(--faint); cursor: progress; }

/* ---- Elo over time. */
.page-profile .chart { display: block; width: 100%; height: 110px; }
.page-profile .chart .gridl line { stroke: rgba(255,255,255,.06); }
.page-profile .chart .trend { fill: none; stroke: var(--red); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.page-profile .chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--faint); font-size: 11px; margin-top: 4px; }

/* ---- Recent matches: date, matchup with tags, score, W / L / Split badge, Elo. */
.page-profile .row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 70px 38px 88px; align-items: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 10px; border: 0; border-top: 1px solid var(--line); background: none;
  color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.page-profile .match:first-child > .row { border-top: 0; }
.page-profile .row:hover { background: rgba(255,255,255,.03); }
.page-profile .row.game { padding-left: 22px; }
.page-profile .when { color: var(--faint); font-size: 11.5px; line-height: 1.15; }
.page-profile .when b { display: block; color: var(--fg); font-weight: 600; font-size: 12.5px; }
.page-profile .mu { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.page-profile .mu .tlogo { width: 22px; height: 22px; }
.page-profile .vs { color: var(--faint); font-size: 11.5px; font-weight: 500; }
.page-profile .opp { display: flex; align-items: center; gap: 6px; min-width: 0; }
.page-profile .oname, .page-profile .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-profile .sc { font-size: 13px; font-weight: 600; text-align: right; }
.page-profile button.row .sc::after { content: " ▾"; color: var(--faint); font-size: 12px; }
.page-profile button.row[aria-expanded="true"] .sc::after { content: " ▴"; }
.page-profile .res { justify-self: center; display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 4px; border-radius: 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.page-profile .res.W { background: rgba(48,209,88,.18); color: var(--green); }
.page-profile .res.L { background: rgba(255,69,58,.18); color: var(--red-ink); }
.page-profile .res.Split { font-size: 10px; min-width: 38px; background: rgba(255,255,255,.1); color: var(--muted); }
.page-profile .tag { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); text-align: right; white-space: nowrap; }
.page-profile .tag.up { color: var(--green); }
.page-profile .tag.down { color: var(--red-ink); }
.page-profile .mgames[hidden] { display: none; }

/* ---- Logos, avatars, faces. */
.page-profile .tlogo { width: 18px; height: 18px; object-fit: contain; flex: none; }
.page-profile .nologo {
  display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 22px; padding: 0 3px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 18px; height: 18px;
}
.page-profile .mu .nologo { height: 22px; line-height: 22px; }
.page-profile .av { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; background: #3a3f48; }
.page-profile .av.blank { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--fg); }

/* ---- Best players: rows of 38 px faces. */
.page-profile .pgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--panel); border-radius: var(--r-lg); overflow: hidden; }
.page-profile .lead { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none; border-radius: 0; }
.page-profile .lead + .lead { border-top: 1px solid var(--line); }
.page-profile .face { position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none; background: radial-gradient(circle at 50% 40%, #6e1322, #380a13 72%); }
.page-profile .face .portrait { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.page-profile .face .fi { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-weight: 600; }
.page-profile .face .badge-logo { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; object-fit: contain; }
.page-profile .face .badge-logo.nologo { min-width: 18px; height: 14px; line-height: 14px; font-size: 7px; padding: 0 2px; }
.page-profile .lt { display: flex; flex-direction: column; min-width: 0; }
.page-profile .lead .n { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-profile .lead .s { color: var(--quiet); font-size: 12px; font-weight: 500; }

/* ---- Stat grids (Per game, Laterals & pitches). */
.page-profile .gs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-profile .gs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-profile .gs div { padding: 8px 12px; border-left: 1px solid var(--line); }
.page-profile .gs div:nth-child(4n+1) { border-left: 0; }
.page-profile .gs.three div { border-left: 1px solid var(--line); }
.page-profile .gs.three div:nth-child(3n+1) { border-left: 0; }
.page-profile .gs b { display: block; font-size: 17px; font-weight: 700; }

/* ---- Tables: the box score's (small grey capital heads, hairlines, a bold Total row with a thin line above). */
.page-profile .tbwrap { overflow-x: auto; }
.page-profile .ptable { width: 100%; border-collapse: collapse; }
.page-profile .ptable th, .page-profile .ptable td { height: 34px; padding: 0 7px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 12.5px; }
.page-profile .ptable tbody tr:last-child > * { border-bottom: 0; }
.page-profile .ptable thead th { height: 30px; padding-block: 4px; line-height: 1.2; white-space: normal; border-bottom: 1px solid var(--line-head); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.page-profile .ptable tbody th { font-weight: 600; }
.page-profile .ptable .who { text-align: left; }
.page-profile .ptable tbody th.who { max-width: 220px; }
/* Head to head has seven columns in the narrower right column: points for / against read PF / PA, cells are tighter and a
   long opponent name ellipsizes, so the table fits its panel at 1024 px and up. */
.page-profile #h2h .ptable th, .page-profile #h2h .ptable td { padding: 0 5px; }
.page-profile #h2h .ptable tbody th.who { max-width: 100px; }
.page-profile #h2h .nm { max-width: 74px; }   /* a table cell ignores max-width; the name span carries the cap */
.page-profile .ptable tr[hidden] { display: none; }
.page-profile .ptable tr.tot > * { font-weight: 700; color: var(--fg); border-top: 1px solid var(--line-tot); }
.page-profile .sort { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.page-profile th[aria-sort] .sort { color: var(--fg); }
.page-profile th[aria-sort="descending"] .sort::after { content: " ▾"; }
.page-profile th[aria-sort="ascending"] .sort::after { content: " ▴"; }
.page-profile .pl { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
.page-profile .who-link { text-decoration: none; }
.page-profile .who-link:hover .nm { text-decoration: underline; }
.page-profile .foot { color: var(--faint); font-size: 12px; padding: 8px 12px; margin: 0; border-top: 1px solid var(--line); }

/* ---- Records: label · who · value · date, each a link to its game. */
.page-profile .rrow {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 56px 52px; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px; border-top: 1px solid var(--line); text-decoration: none;
}
.page-profile .rows > .rrow:first-child { border-top: 0; }
.page-profile .rrow[hidden] { display: none; }
.page-profile .rrow:hover { background: rgba(255,255,255,.03); }
.page-profile .rrow b { font-weight: 700; text-align: right; }
.page-profile .rrow .num:last-child { text-align: right; }
.page-profile .mut { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-profile footer { margin-top: 24px; }

/* ---- 1024 px and up: two columns, and the career tables (Passing has eleven columns) a full-width row below. */
@media (min-width: 1024px) {
  .page-profile .two > .side { grid-column: 2; grid-row: 1; }
  .page-profile .two > .career { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- Under 1024 px the left column is too narrow for a match row (date, two logos, opponent, tags, score,
   badge, Elo), so the body is one column (spec §10 "about 900 px"), in DOM order: 1-5, career, 6-12. */
@media (max-width: 1023px) {
  .page-profile .two { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Under 900 px: the counts under the name. */
@media (max-width: 899px) {
  .page-profile .pstrip { flex-wrap: wrap; }
  .page-profile .pid { flex: 1 1 0; }   /* the avatar keeps the name beside it; the counts take the next line */
  .page-profile .pcounts { width: 100%; margin: 4px 0 0; justify-content: space-between; }
}

/* ---- Phone: 16 px gutters, no horizontal page scroll. */
@media (max-width: 720px) {
  body.page-profile { padding: 16px; }
  .page-profile .pstrip { padding: 18px 16px; gap: 14px; }
  .page-profile .two { padding: 14px 12px; }
  .page-profile .pav { width: 60px; height: 60px; font-size: 22px; }
  .page-profile .pn { font-size: 22px; }
  .page-profile .pcounts { gap: 10px; }
  .page-profile .pcounts dd { font-size: 30px; }
  .page-profile .row { grid-template-columns: 50px minmax(0, 1fr) 46px 34px 58px; gap: 6px; padding: 0 8px; }
  .page-profile .row.game { padding-left: 14px; }
  .page-profile .mu { gap: 5px; flex-wrap: wrap; row-gap: 2px; }
  .page-profile .mu .tag { flex: none; }   /* forfeit / unofficial drop to a second line, whole; the name keeps its room */
  .page-profile .mu .tlogo { width: 18px; height: 18px; }
  .page-profile .mu .nologo { height: 18px; line-height: 18px; min-width: 18px; }
  .page-profile .gs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-profile .gs div:nth-child(4n+1) { border-left: 1px solid var(--line); }
  .page-profile .gs div:nth-child(2n+1) { border-left: 0; }
  .page-profile .rrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px 44px; }
}
@media (max-width: 400px) {
  .page-profile .row .vs { display: none; }
}
