/* SHLstats: blue-grey palette, dark first */
:root {
  color-scheme: dark;
  --bg: #1a2029;
  --bg-2: #151a22;
  --panel: #212934;
  --panel-2: #29323e;
  --line: #343f4c;
  --text: #eef2f6;
  --muted: #a4b0bd;
  --faint: #74818f;
  --accent: #8fb4dc;
  --accent-ink: #121820;
  --good: #4fb37f;
  --bad: #e0607a;
  --gold: #e3b75a;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 28px rgba(5,10,18,.28);
  --logo-filter: invert(1); /* a dark logo file turns light on the dark theme */
  --brand-ink: #fff;        /* logo and wordmark: black on light, white on dark */
  --display: "Archivo Narrow", "Arial Narrow", "Roboto Condensed", sans-serif;
  --radius: 18px;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #e6ebf0; --bg-2: #dbe2e9; --panel: #ffffff; --panel-2: #f1f4f7; --line: #d0d8e1;
    --text: #17202b; --muted: #56657a; --faint: #8592a3; --accent: #3f6c9c; --accent-ink: #ffffff;
    --good: #1e9a60; --bad: #c83a55; --gold: #a87a12;
    --shadow: 0 1px 2px rgba(23,32,43,.06), 0 8px 22px rgba(23,32,43,.07); --logo-filter: none; --brand-ink: #000;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e6ebf0; --bg-2: #dbe2e9; --panel: #ffffff; --panel-2: #f1f4f7; --line: #d0d8e1;
  --text: #17202b; --muted: #56657a; --faint: #8592a3; --accent: #3f6c9c; --accent-ink: #ffffff;
  --good: #1e9a60; --bad: #c83a55; --gold: #a87a12;
  --shadow: 0 1px 2px rgba(23,32,43,.06), 0 8px 22px rgba(23,32,43,.07); --logo-filter: none; --brand-ink: #000;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--body); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.up { text-transform: uppercase; letter-spacing: .06em; }

/* ---------- score strip: one card per game; cards fade out at the edges instead of being cut off ---------- */
.strip { background: var(--bg-2); display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.strip-ctrl { flex: none; display: flex; align-items: center; gap: 4px; background: var(--panel); border-radius: 999px; padding: 3px; }
.strip-btn { width: 30px; height: 30px; border-radius: 50%; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center; }
.strip-btn:hover { color: var(--text); background: var(--panel-2); }
.strip-track { flex: 1; min-width: 0; display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; cursor: grab; padding: 10px 24px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%); }
.strip-track::-webkit-scrollbar { display: none; }
.strip-track.dragging { cursor: grabbing; scroll-behavior: auto; }
.strip-track.dragging a { pointer-events: none; }
/* Every item in the bar has a fixed width and can never shrink, in any browser */
.strip-track > * { flex: 0 0 auto; }
.s-date { width: 50px; min-width: 50px; margin-left: 10px; display: grid; place-content: center; text-align: center; user-select: none; overflow: hidden; }
.s-date:first-child { margin-left: 0; }
.s-date b { font: 600 11px var(--display); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.s-date span { font: 700 24px/1.05 var(--display); }
.s-date.today b { color: var(--accent); }
.s-date.today span { color: var(--accent); }
.s-game { width: 158px; min-width: 158px; padding: 8px 10px; border-radius: 12px; background: var(--panel); display: grid; gap: 4px; color: var(--text);
  text-decoration: none !important; user-select: none; transition: background .15s; overflow: hidden; }
.s-game:hover { background: var(--panel-2); }
.s-status { display: flex; align-items: center; justify-content: space-between; font: 600 11px var(--display); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.s-status.live { color: var(--bad); }
.s-status.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pulse 1.4s ease-in-out infinite; margin-right: 6px; }
/* A panel holding only a tab row (Tabell page) */
.tabs-only .tabs { border-top: 0; }
.ltop-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ltop-name a { overflow: hidden; text-overflow: ellipsis; }
/* Your team's games: a border around the whole card */
.s-game.fav { box-shadow: inset 0 0 0 2px var(--accent); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.s-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.s-row .tb { width: 26px; height: 26px; }
.s-row .code { font: 700 15px var(--display); letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-row.loser .code, .s-row.loser .score { color: var(--faint); }
.score { font: 700 19px var(--display); min-width: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.wp { font: 600 12px var(--display); padding: 1px 6px; border-radius: 5px; min-width: 38px; text-align: center; }

/* ---------- team badge / logo ---------- */
.tb { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--tc); color: var(--tt, #fff);
  font: 700 9px/1 var(--display); letter-spacing: .02em; flex: none; vertical-align: middle; }
.tb.md { width: 32px; height: 32px; font-size: 11px; }
.tb.lg { width: 56px; height: 56px; font-size: 16px; border-radius: 12px; }
.tb.xl { width: 88px; height: 88px; font-size: 22px; border-radius: 16px; }
.tb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tb:has(img) { background: none; color: transparent; }
.teamlink { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.teamlink:hover { color: var(--accent); text-decoration: none; }

/* ---------- headshots ---------- */
/* Small avatar: team-tinted disc, photo cropped to the face, soft ring */
.av { position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tc, var(--accent)) 40%, var(--panel-2)), var(--panel-2) 75%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); display: grid; place-items: center;
  font: 700 11px var(--display); color: var(--faint); }
.av img { position: absolute; left: 50%; top: 4%; width: 130%; max-width: none; translate: -50% 0; object-fit: cover; opacity: 0; transition: opacity .25s; }
.av img.in { opacity: 1; }
.av.md { width: 44px; height: 44px; font-size: 14px; }
/* Large portrait: sits in a tinted frame and fades out at the bottom instead of ending on a hard edge */
.portrait { position: relative; flex: none; width: 150px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 20%, color-mix(in srgb, var(--tc, var(--accent)) 45%, transparent), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--bg-2));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent) inset; }
.portrait img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none; translate: -50% 0; object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); opacity: 0; transition: opacity .3s; }
.portrait img.in { opacity: 1; }
.portrait .ini { position: absolute; inset: 0; display: grid; place-items: center; font: 700 42px var(--display); color: var(--faint); }
.portrait img + .ini { display: none; }
.portrait.sm { width: 96px; }
.portrait.lg { width: 190px; }
@media (max-width: 560px) { .portrait { width: 110px; } .portrait.lg { width: 130px; } .portrait.sm { width: 80px; } }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand svg { width: 32px; height: 32px; }
.brand-word { font: 700 italic 25px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.brand-word em { color: var(--accent); font-style: inherit; }
nav.main { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; order: 3; flex-basis: 100%; }
@media (min-width: 980px) { nav.main { order: 0; flex-basis: auto; flex: 1; } }
nav.main a { color: var(--muted); text-decoration: none; font: 600 15px var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
nav.main a:hover { color: var(--text); background: var(--panel); }
nav.main a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.top-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.gsearch { position: relative; }
.gsearch input { width: 220px; max-width: 46vw; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 6px 30px; font-size: 14px; }
.gsearch svg { position: absolute; left: 9px; top: 50%; translate: 0 -50%; width: 14px; height: 14px; color: var(--muted); }
.results { position: absolute; right: 0; top: calc(100% + 6px); width: min(340px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 30; max-height: 360px; overflow-y: auto; padding: 4px; }
.results a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; color: var(--text); text-decoration: none; }
.results a:hover, .results a.on { background: var(--panel-2); }
.results small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.results .empty { padding: 8px; color: var(--muted); }
.theme-toggle { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.theme-toggle button { border: 0; background: none; width: 30px; height: 26px; border-radius: 999px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.theme-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ---------- layout ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 22px 16px 64px; display: grid; gap: 20px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; }
.panel.wide { grid-column: 1 / -1; }
.p-head { padding: 16px 20px 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; }
.p-head h2 { margin: 0; font: 700 23px/1.05 var(--display); letter-spacing: .01em; text-transform: uppercase; text-wrap: balance; }
.p-head .more-link { font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; }
.p-sub { margin: 0; color: var(--muted); font-size: 14px; flex-basis: 100%; }
.p-body { padding: 0 20px 18px; display: grid; gap: 14px; min-width: 0; }
.p-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 10px 20px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stamp { font-size: 12.5px; color: var(--faint); }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px; }
.page-head h1 { margin: 0; font: 700 38px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.crumbs { font: 600 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.note { font-size: 13px; color: var(--faint); }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--muted); font: 600 14px var(--display); letter-spacing: .05em; text-transform: uppercase; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.field { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field select, .field input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font: 500 14px var(--body); text-transform: none; letter-spacing: 0; color: var(--text); }
.field input[type=number] { width: 62px; }
.field input[type=search] { width: 170px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 11px; cursor: pointer; color: var(--muted); font: 600 13.5px var(--display); letter-spacing: .05em; text-transform: uppercase; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Masonry board: panels pack into the shortest column instead of leaving holes.
   Each item's row span is set from its measured height in app.js (layoutBoards). */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--col, 440px)), 1fr)); grid-auto-rows: 4px; column-gap: 20px; align-items: start; }
.board > * { margin-bottom: 20px; min-width: 0; }
.board > .wide { grid-column: 1 / -1; }
.board.narrow { --col: 280px; }

/* stat tiles: wrap and stretch so the last row never leaves a gap */
.tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.tile { flex: 1 1 128px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.tile .k { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .v { font: 700 28px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12.5px; color: var(--faint); }

/* ---------- tables ---------- */
/* Wide tables scroll inside their card instead of stretching it */
.p-body > * { min-width: 0; }
.tscroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; max-width: calc(100% + 40px); }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.t th { font: 600 12.5px/1.15 var(--display); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 7px 8px; vertical-align: bottom; white-space: nowrap; }
table.t th small { display: block; font-weight: 500; color: var(--faint); letter-spacing: .04em; }
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover { color: var(--text); }
table.t th.sorted { color: var(--accent); }
table.t th.sorted::after { content: " \25BE"; }
table.t th.sorted.asc::after { content: " \25B4"; }
table.t td { padding: 6px 8px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
table.t .l { text-align: left; }
table.t tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
table.t td.hl { font-weight: 700; }
.pcell { display: flex; align-items: center; gap: 9px; }
.pcell a { color: var(--text); font-weight: 600; }
.pcell a:hover { color: var(--accent); }
.pcell small { color: var(--faint); font-size: 12px; }
.teamcell { display: flex; align-items: center; gap: 10px; }
.teamcell .nm { display: grid; line-height: 1.1; }
.teamcell .nm b { font: 700 16px var(--display); letter-spacing: .02em; color: var(--text); }
.teamcell .nm span { font-size: 12.5px; color: var(--muted); }
/* Table zones are shown by the colour of the position number */
.rank { font: 700 15px var(--display); color: var(--zone, var(--muted)); width: 30px; text-align: left !important; }
.odds { font: 700 15px var(--display); }
.odds span { display: inline-block; min-width: 50px; padding: 3px 6px; border-radius: 5px; text-align: center; }
tr.cut td { border-top: 2px solid var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- leaders ---------- */
.lead-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
@media (max-width: 640px) { .lead-wrap { grid-template-columns: 1fr; } }
.leader { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg-2); display: grid; gap: 10px; align-content: start; overflow: hidden;
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--tc) 28%, transparent), transparent 62%); }
.leader .who { display: flex; gap: 10px; align-items: center; }
.leader .nm { font: 700 24px/1 var(--display); text-transform: uppercase; text-wrap: balance; color: var(--text); }
.leader .sub { color: var(--muted); font-size: 13.5px; }
.leader .bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.leader .val { font: 700 60px/0.9 var(--display); }
.leader .lbl { font: 600 13px var(--display); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
ol.lb { list-style: none; margin: 0; padding: 0; display: grid; }
ol.lb li { display: grid; grid-template-columns: 28px 24px 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 4px; border-top: 1px solid var(--line); }
ol.lb li:first-child { border-top: 0; }
ol.lb .r { font: 600 14px var(--display); color: var(--muted); }
ol.lb .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.lb .n a { color: var(--text); }
ol.lb .n a:hover { color: var(--accent); }
ol.lb .v { font: 700 17px var(--display); font-variant-numeric: tabular-nums; }
.more { justify-self: start; border: 0; background: none; color: var(--accent); cursor: pointer; font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 4px 0; }
.ltile { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.ltile h3 { margin: 0; font: 700 16px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ltop { display: flex; align-items: center; gap: 12px; }
.ltop .big { font: 700 40px/1 var(--display); margin-left: auto; font-variant-numeric: tabular-nums; }
.ltop a { color: var(--text); font: 700 18px/1.1 var(--display); text-transform: uppercase; }
.ltile ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 14px; }
.ltile ol li { display: grid; grid-template-columns: 18px 22px 1fr auto; gap: 8px; align-items: center; }
.ltile ol li a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltile ol li b { font-variant-numeric: tabular-nums; }

/* ---------- player card ---------- */
.search { position: relative; }
.search input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px 9px 36px; font-size: 15px; }
.search svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); }
.search .results { left: 0; right: 0; width: auto; }
.pcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.pc-top { display: flex; align-items: flex-end; gap: 16px; padding: 14px 18px 0; position: relative;
  background: linear-gradient(115deg, color-mix(in srgb, var(--tc) 32%, var(--bg-2)) 0%, var(--bg-2) 65%); }
.pc-top .portrait { border-radius: 12px 12px 0 0; }
.pc-info { flex: 1; min-width: 0; padding-bottom: 14px; }
.pc-name { font: 700 28px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: 0 0 8px; text-wrap: balance; }
.pc-name a { color: var(--text); }
.pc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.pc-meta b { color: var(--text); font-weight: 600; }
.pc-war { text-align: center; display: grid; justify-items: center; align-content: start; padding-bottom: 14px; align-self: start; padding-top: 4px; }
.pc-war .lbl { font: 600 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pc-war .big { font: 700 44px/1 var(--display); }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 22px; padding: 14px 18px; }
.metric { display: grid; grid-template-columns: 1fr 82px 42px; align-items: center; gap: 8px; font-size: 13.5px; }
.metric .bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.metric .bar i { display: block; height: 100%; border-radius: 4px; }
.metric .pct { font: 700 15px var(--display); text-align: right; }
.pc-foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.pc-foot .mark { font: 700 italic 14px var(--display); letter-spacing: .05em; color: var(--muted); }
.small-sample { color: var(--gold); }

/* ---------- games list ---------- */
.day { display: grid; gap: 6px; }
.day h3 { margin: 6px 0 0; font: 700 15px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Game rows adapt to the width of their container, not the window */
.day { container-type: inline-size; }
.grow { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr) minmax(96px, 150px); gap: 12px; align-items: center;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none !important; }
.grow.dated { grid-template-columns: 70px minmax(0, 1fr) 84px minmax(0, 1fr) minmax(96px, 150px); }
.grow .short { display: none; }
.grow .cta { font-size: 13px; color: var(--muted); display: flex; justify-content: flex-end; align-items: center; gap: 10px; white-space: nowrap; }
.grow .chev { font-size: 18px; line-height: 1; color: var(--faint); }
.grow:hover { border-color: var(--accent); }
.grow .time { font: 600 14px var(--display); color: var(--muted); letter-spacing: .04em; }
.grow .side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow .side.away { justify-content: flex-end; flex-direction: row-reverse; }
.grow .side b { font: 700 17px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .res { text-align: center; font: 700 22px var(--display); }
.grow .res small { display: block; font: 600 11px var(--display); color: var(--muted); letter-spacing: .08em; }
.grow .lose b { color: var(--muted); }
.oddsbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font: 700 12px/22px var(--display); }
.oddsbar span { text-align: center; min-width: 26px; color: var(--accent-ink); }
@container (max-width: 600px) {
  .grow .full, .grow .cta-txt { display: none; }
  .grow .short { display: inline; }
  .grow { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr) 100px; gap: 8px; }
  .grow.dated { grid-template-columns: 60px minmax(0, 1fr) 70px minmax(0, 1fr) 100px; }
}
@container (max-width: 400px) {
  .grow, .grow.dated { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); }
  .grow .time, .grow .oddsbar, .grow .cta { grid-column: 1 / -1; }
  .grow .cta { text-align: center; }
}

/* ---------- match page ---------- */
.mhead { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 22px 20px; }
.mteam { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text); }
.mteam b { font: 700 24px/1.05 var(--display); text-transform: uppercase; }
.mteam span { color: var(--muted); font-size: 13.5px; }
.mscore { text-align: center; display: grid; gap: 4px; }
.mscore .sc { font: 700 64px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mscore .st { font: 600 14px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mscore .st.live { color: var(--bad); }
.mmeta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; color: var(--muted); font-size: 13.5px; padding: 0 20px 16px; }
@media (max-width: 560px) { .mteam b { font-size: 17px; } .mscore .sc { font-size: 44px; } .mhead { gap: 8px; padding: 16px 10px; } }
.timeline { display: grid; gap: 4px; }
.timeline h4 { margin: 8px 0 2px; font: 700 14px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ev { display: grid; grid-template-columns: 50px 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ev .t { font: 600 14px var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.ev .who a { color: var(--text); font-weight: 600; }
.ev .who small { display: block; color: var(--muted); font-size: 12.5px; }
.ev .who small a { color: var(--muted); font-weight: 400; }
.ev .sc { font: 700 17px var(--display); font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font: 700 11px/1 var(--display); letter-spacing: .06em; padding: 3px 5px; border-radius: 4px; margin-left: 6px; vertical-align: 1px;
  background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.tag.bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; }
.cmp-row .v { font: 700 17px var(--display); font-variant-numeric: tabular-nums; }
.cmp-row .v:last-child { text-align: right; }
.cmp-row .mid { display: grid; gap: 4px; }
.cmp-row .lbl { text-align: center; font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cmp-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.cmp-bar i:first-child { background: var(--h-color, var(--accent)); }
.cmp-bar i:last-child { background: var(--a-color, var(--faint)); }
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 58px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.line.d { grid-template-columns: 58px repeat(2, minmax(0, 1fr)); }
.line .lab { font: 700 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: center; }
.lp { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); min-width: 0; color: var(--text); }
.lp:hover { border-color: var(--accent); text-decoration: none; }
.lp span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.lp small { color: var(--faint); font-size: 11.5px; display: block; }
@media (max-width: 560px) { .line, .line.d { grid-template-columns: 1fr; } .line .lab { margin-top: 4px; } }
.form { display: flex; gap: 4px; }
.form i { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font: 700 12px var(--display); font-style: normal; color: #fff; }
.form i.w { background: var(--good); }
.form i.o { background: color-mix(in srgb, var(--good) 55%, var(--faint)); }
.form i.ol { background: color-mix(in srgb, var(--bad) 55%, var(--faint)); }
.form i.l { background: var(--bad); }

/* ---------- charts ---------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--body); }

/* ---------- team / player headers ---------- */
.hero { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 20px 20px 0; border-radius: 14px 14px 0 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tc) 30%, var(--panel)) 0%, var(--panel) 60%); }
.hero .info { flex: 1; min-width: 220px; padding-bottom: 18px; display: grid; gap: 8px; }
.hero h1 { margin: 0; font: 700 40px/1 var(--display); text-transform: uppercase; text-wrap: balance; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; }
.hero .meta b { color: var(--text); font-weight: 600; }
.hero.team { align-items: center; padding-bottom: 18px; }
.hero.team .info { padding-bottom: 0; }

/* ---------- method ---------- */
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px 28px; }
.method h3 { margin: 0 0 6px; font: 700 18px var(--display); text-transform: uppercase; letter-spacing: .03em; }
.method p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; padding: 0 12px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 14px 11px; font: 600 15px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs a .count { font: 600 12px var(--body); color: var(--faint); margin-left: 4px; }

/* ---------- video ---------- */
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.clips.row { grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.clip { all: unset; cursor: pointer; display: grid; gap: 6px; align-content: start; border-radius: 10px; }
.clip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.clip .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.clip .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.clip:hover .thumb img { transform: scale(1.04); }
.clip .dur { position: absolute; right: 6px; bottom: 6px; font: 600 12px var(--display); background: rgba(10, 14, 20, .78); color: #fff; padding: 1px 6px; border-radius: 4px; }
.clip .ct { font: 700 15px/1.15 var(--display); color: var(--text); display: flex; gap: 7px; align-items: center; }
.clip .cs { font-size: 12.5px; color: var(--muted); }
.play-ic { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 44px; height: 44px; border-radius: 50%; background: rgba(10, 14, 20, .6);
  display: grid; place-items: center; backdrop-filter: blur(4px); transition: background .2s; }
.play-ic::before { content: ""; margin-left: 4px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.clip:hover .play-ic { background: var(--accent); }
.clip.big { max-width: 640px; width: 100%; }
.clip.big .ct { font-size: 19px; }
.playbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 999px; }
.playbtn::before { content: ""; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.playbtn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
dialog.video { width: min(960px, 94vw); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
dialog.video::backdrop { background: rgba(8, 12, 18, .72); backdrop-filter: blur(3px); }
.video-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; font: 700 17px var(--display); text-transform: uppercase; }
.video-close { border: 0; background: var(--panel-2); color: var(--text); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.video-close:hover { background: var(--line); }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-note { margin: 0; padding: 8px 16px 10px; font-size: 12px; color: var(--faint); }

/* ---------- favourite team ---------- */
tr.fav td { background: color-mix(in srgb, var(--accent) 11%, transparent); }
tr.fav td.rank { color: var(--accent); }
.favlink { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; text-decoration: none !important; }
.favlink:hover { border-color: var(--accent); }
.favbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); background: var(--panel-2); }
.favbtn:hover { border-color: var(--accent); }
.favbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pickteams { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.pickteams button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); font: 600 12px var(--display); letter-spacing: .05em; color: var(--muted); }
.pickteams button:hover { border-color: var(--accent); color: var(--text); }
.myteam { display: grid; gap: 12px; }
.myteam .row { display: flex; align-items: center; gap: 12px; }
.myteam h3 { margin: 0; font: 700 24px/1 var(--display); text-transform: uppercase; }
.myteam .row a { color: var(--text); }
.mini-lbl { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- match header, events, team grid ---------- */
.mpanel { background-image: linear-gradient(120deg, color-mix(in srgb, var(--tc) 16%, transparent), transparent 55%); }
.mscore { justify-items: center; }
.mscore .sc.sm { font-size: 44px; }
.ev { grid-template-columns: 50px 24px minmax(0, 1fr) auto; }
.ev-end { display: flex; align-items: center; gap: 10px; }
.cmp-head .v { display: flex; }
.cmp-head .v:last-child { justify-content: flex-end; }
.vid-dot { color: var(--accent); }
.vid-dot::before { content: ""; display: inline-block; margin-right: 5px; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.teamtile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none !important;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tc) 18%, var(--panel)), var(--panel) 70%); transition: border-color .15s, transform .15s; }
.teamtile:hover { border-color: var(--accent); transform: translateY(-1px); }
.teamtile.fav { border-color: var(--accent); }
.teamtile b { display: block; font: 700 18px/1.1 var(--display); text-transform: uppercase; }
.teamtile small { color: var(--muted); font-size: 12.5px; }
.panel { transition: border-color .15s; }
.pcell small { line-height: 1.2; }
@media (prefers-reduced-motion: reduce) { .teamtile, .clip .thumb img { transition: none; } }

/* ---------- misc ---------- */
.strip-today { height: 30px; border: 0; border-radius: 999px; background: none; color: var(--accent); cursor: pointer; font: 700 12.5px var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 0 10px; }
.strip-today:hover { background: var(--panel-2); }
.kbd { position: absolute; right: 8px; top: 50%; translate: 0 -50%; font: 600 11px var(--body); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.gsearch input:focus + .kbd, .gsearch input:not(:placeholder-shown) + .kbd { display: none; }
@media (max-width: 700px) { .kbd { display: none; } }
/* Phones: logo, search and theme share one row above the menu */
@media (max-width: 600px) {
  .top-in { gap: 8px 10px; padding-block: 8px; }
  .brand-word { font-size: 20px; }
  .top-tools { gap: 6px; flex: 1; justify-content: flex-end; }
  .gsearch { flex: 1; min-width: 0; max-width: 220px; }
  .gsearch input { width: 100%; max-width: none; }
  .theme-toggle button { width: 26px; height: 24px; }
  .favlink span { display: none; }
  .strip { padding-right: 8px; }
  .strip-track { padding: 8px 16px; gap: 10px; }
  .s-game { width: 138px; min-width: 138px; }
  .strip-btn { display: none; } /* swipe on phones; only "Idag" stays */
  .page-head h1 { font-size: 30px; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 420px) { .brand-word { font-size: 22px; } } /* the wordmark is the only brand in the header, so it always stays */
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark img { filter: var(--logo-filter, none); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin-right: 10px; vertical-align: -3px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details.explain { border-top: 1px solid var(--line); padding-top: 10px; }
details.explain summary { cursor: pointer; font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
details.explain .method { margin-top: 12px; }
table.t.stick th:first-child, table.t.stick td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.t.stick tr.fav td:first-child { background: color-mix(in srgb, var(--accent) 11%, var(--panel)); }
.section-title { margin: 10px 0 -8px; font: 700 15px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.empty-state { padding: 20px 0; color: var(--faint); text-align: center; }

footer { max-width: 1320px; margin: 0 auto; padding: 0 16px 40px; color: var(--faint); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .strip-track { scroll-behavior: auto; } .av img, .portrait img { transition: none; } }

/* =====================================================================
   Design refresh: soft flat cards, icons, matchday hero, team colour bands, motion
   ===================================================================== */
:root { --card-shadow: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --card-shadow: 0 1px 2px rgba(23,32,43,.05), 0 4px 14px rgba(23,32,43,.05); } }
:root[data-theme="light"] { --card-shadow: 0 1px 2px rgba(23,32,43,.05), 0 4px 14px rgba(23,32,43,.05); }

/* Soft, flat cards: no borders, a lighter surface and larger radius */
.panel { border: 0; border-radius: var(--radius); box-shadow: var(--card-shadow); }
.p-head { padding: 20px 22px 12px; }
.p-body { padding: 0 22px 20px; }
.p-foot { border-top: 0; background: color-mix(in srgb, var(--panel-2) 55%, transparent); border-radius: 0 0 var(--radius) var(--radius); padding: 11px 22px; }
.p-head h2 { font-size: 21px; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.tile, .ltile, .grow, .lp, .teamtile, .pcard, .leader, .pickteams button { border: 0; }
.tile { border-radius: 12px; }
.ltile { background: var(--panel); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 16px 18px; }
.grow { background: var(--panel-2); border-radius: 12px; transition: background .15s, box-shadow .15s; }
.grow:hover { border-color: transparent; background: color-mix(in srgb, var(--accent) 9%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.lp { background: var(--panel-2); border-radius: 10px; }
.lp:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.pickteams button { background: var(--panel-2); border-radius: 12px; }
.pickteams button:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.pcard { background: var(--panel-2); border-radius: 14px; }
.pc-foot { border-top: 0; }
.leader { background-color: var(--panel-2); }
.teamtile { border-radius: 14px; box-shadow: var(--card-shadow); }
.teamtile:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.teamtile.fav { box-shadow: inset 0 0 0 2px var(--accent); }
.seg { border: 0; }
.field select, .field input, .search input { border-color: transparent; }
table.t td { border-top-color: color-mix(in srgb, var(--line) 70%, transparent); }
tr.cut td { border-top: 2px solid color-mix(in srgb, var(--muted) 60%, transparent); }
header.top { border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
.tabs { border-top-color: color-mix(in srgb, var(--line) 70%, transparent); }

/* Icons: one line-icon set, drawn at the current text colour */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
nav.main a { display: inline-flex; align-items: center; gap: 7px; }
nav.main a .ic { width: 17px; height: 17px; opacity: .85; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; }
.tabs a .ic { width: 16px; height: 16px; }
.section-title .ic { width: 17px; height: 17px; color: var(--accent); }
.p-head h2 .ic { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 600px) { nav.main a .ic { display: none; } }

/* Matchday hero: the day's most interesting game, in both teams' colours */
.mday { overflow: hidden; }
.band { position: relative; color: #fff; isolation: isolate; }
/* Both team colours, darkened enough that white text reads well on every club's colour */
.mday .band, .mpanel .band {
  background: linear-gradient(105deg, color-mix(in srgb, var(--hc) 66%, #0b0f15) 0%, color-mix(in srgb, var(--hc) 34%, #0b0f15) 46%,
    color-mix(in srgb, var(--ac) 34%, #0b0f15) 54%, color-mix(in srgb, var(--ac) 66%, #0b0f15) 100%);
  border-radius: var(--radius) var(--radius) 0 0; }
.band .crumbs, .band .crumbs a { color: rgba(255, 255, 255, .78); }
.band .mteam b { text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90% 140% at 50% 120%, rgba(8, 11, 16, .55), transparent 60%); }
.mday-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 22px 0; }
.mday-top .kicker { font: 700 13px var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(8, 11, 16, .45); }
.mday-top .count { font: 600 14px var(--display); letter-spacing: .06em; text-transform: uppercase; opacity: .92; }
.band .mhead { padding: 18px 22px 24px; }
.band .mteam { color: #fff; }
.band .mteam span { color: inherit; opacity: .8; }
.band .tb.xl { width: 104px; height: 104px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); }
.band .mscore { background: rgba(8, 11, 16, .5); color: #fff; border-radius: 16px; padding: 12px 20px; backdrop-filter: blur(6px); min-width: 170px; }
.band .mscore .st { color: rgba(255, 255, 255, .78); }
.band .oddsbar { width: 100%; margin-top: 6px; }
.band .playbtn { color: #fff; border-color: rgba(255, 255, 255, .45); }
.mday-foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 22px 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font: 700 14px var(--display); letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); text-decoration: none !important; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--panel-2); color: var(--text); }
.btn .ic { width: 16px; height: 16px; }
@media (max-width: 560px) { .band .tb.xl { width: 64px; height: 64px; } .band .mscore { min-width: 0; padding: 10px 12px; } }

/* Team pages: a full band in the club's own colours */
.hero.team.band { background: linear-gradient(120deg, var(--tc) 0%, color-mix(in srgb, var(--tc) 72%, #0b0f15) 100%); color: var(--tt); border-radius: var(--radius) var(--radius) 0 0; padding: 26px 22px 24px; }
.hero.team.band h1 { color: inherit; }
.hero.team.band .meta, .hero.team.band .meta b, .hero.team.band .crumbs, .hero.team.band .crumbs a { color: inherit; }
.hero.team.band .meta { opacity: .88; }
.hero.team.band .crumbs { opacity: .75; }
.hero.team.band .tb.xl { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .3)); }
.band .favbtn { background: color-mix(in srgb, currentColor 14%, transparent); border-color: color-mix(in srgb, currentColor 35%, transparent); color: inherit; }
.band .favbtn[aria-pressed="true"] { background: currentColor; }
.band .favbtn[aria-pressed="true"] span { color: var(--tc); }
.band .form i { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35); }

/* Motion: cards rise in on page change, respecting reduced motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.board > *, .page-head, main > .panel, .teamgrid, .section-title { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* Loading skeletons */
.skel { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 40%, var(--panel) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-page { display: grid; gap: 20px; }
.skel-title { height: 40px; width: min(320px, 70%); border-radius: 10px; }
.skel-hero { height: 220px; }
.skel-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.skel-card { height: 280px; }

@media (prefers-reduced-motion: reduce) {
  .board > *, .page-head, main > .panel, .teamgrid, .section-title { animation: none; }
  .skel, .s-status.live::before { animation: none; }
  .s-game, .grow, .teamtile { transition: none; }
}

/* =====================================================================
   Overview layout: fixed rows where every card in a row has the same height
   ===================================================================== */
.panel .p-body { flex: 1; }
.ov-row { display: grid; gap: 20px; align-items: stretch; animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.ov-row > .panel { min-width: 0; }
.r-leaders { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
.r-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1180px) {
  .r-leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-leaders > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .r-leaders, .r-two { grid-template-columns: minmax(0, 1fr); }
}
/* Top-10 lists stretch their rows to match the height of the table next to them */
.fill { height: 100%; }
.fill ol.lb { height: 100%; grid-auto-rows: 1fr; }
ol.lb .n small { display: block; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
ol.lb .n a { font-weight: 600; }
table.t.compact td, table.t.compact th { padding-block: 7px; }
table.t.compact th:nth-child(2), table.t.compact td:nth-child(2) { padding-left: 4px; }
@media (max-width: 600px) { .hide-sm { display: none; } }
.clips.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1180px) { .clips.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .clips.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-foot { justify-content: space-between; align-items: center; }

/* Hero: the featured game on the left, your team on the right */
.mday-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.mday .band { border-radius: var(--radius) 0 0 var(--radius); display: flex; flex-direction: column; justify-content: space-between; }
.mday .mhead { padding: 10px 22px 8px; }
.mday-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 22px 20px; justify-content: center; }
.band .btn { background: #fff; color: #10151c; }
.band .btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; }
.band .btn.ghost:hover { background: rgba(255, 255, 255, .24); }
.mday-empty { color: rgba(255, 255, 255, .8); padding: 30px 22px; margin: 0; }
.mday-side { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.mday-teamname { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.mday-teamname b { display: block; font: 700 22px/1.05 var(--display); text-transform: uppercase; }
.mday-teamname small { color: var(--muted); font-size: 13px; }
.mday-teamname:hover b { color: var(--accent); }
.mday-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mday-stats div { background: var(--panel-2); border-radius: 10px; padding: 8px 10px; display: grid; }
.mday-stats b { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.mday-stats span { font: 600 11.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mday-last { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text); font-size: 14px; text-decoration: none !important; }
.mday-last .mini-lbl { flex-basis: 100%; }
.mday-last:hover b { color: var(--accent); }
.linkbtn { all: unset; cursor: pointer; font-size: 13px; color: var(--faint); align-self: flex-start; }
.linkbtn:hover { color: var(--text); text-decoration: underline; }
.pickteams.sm { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.pickteams.sm button { padding: 6px; }
@media (max-width: 900px) {
  .mday-grid { grid-template-columns: minmax(0, 1fr); }
  .mday .band { border-radius: var(--radius) var(--radius) 0 0; }
}
@media (prefers-reduced-motion: reduce) { .ov-row { animation: none; } }

/* =====================================================================
   Phones: bottom navigation, readable text, finger-sized targets, web app safe areas
   ===================================================================== */
.bottom-nav, .search-toggle, .search-cancel { display: none; }

/* In a saved web app the page runs under the status bar; keep that strip painted */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg-2); z-index: 60; }
body { padding-top: env(safe-area-inset-top, 0px); }
header.top { top: env(safe-area-inset-top, 0px); }

@media (max-width: 700px) {
  body { font-size: 16px; -webkit-text-size-adjust: 100%; padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-top: 70px; }
  main { padding: 16px 12px 28px; gap: 16px; }
  footer { padding: 0 16px 24px; font-size: 14px; }

  /* Header: logo, my team, search and theme on one slim row; the menu moves to the bottom bar */
  nav.main { display: none; }
  .top-in { padding: 8px 12px; flex-wrap: nowrap; }
  .brand-mark { width: 30px; height: 30px; }
  .top-tools { flex: 1; justify-content: flex-end; gap: 8px; }
  .gsearch { flex: none; max-width: none; }
  .gsearch input, .gsearch > svg { display: none; }
  .search-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--panel); color: var(--text); cursor: pointer; }
  .search-toggle .ic { width: 20px; height: 20px; }
  .theme-toggle button { width: 36px; height: 34px; }
  .favlink { padding: 4px; border-radius: 12px; }
  .favlink .tb { width: 32px; height: 32px; }

  /* Search opens as a full-screen sheet with large results */
  body.search-open { overflow: hidden; }
  /* The header's blur would trap the full-screen sheet inside the header, so drop it while searching */
  body.search-open header.top { backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.search-open .gsearch { position: fixed; inset: env(safe-area-inset-top, 0px) 0 auto 0; z-index: 70; display: flex; gap: 10px; align-items: center;
    padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
  body.search-open .gsearch input { display: block; flex: 1; width: auto; font-size: 17px; padding: 12px 14px 12px 40px; border-radius: 12px; }
  body.search-open .gsearch > svg { display: block; left: 26px; width: 18px; height: 18px; }
  body.search-open .search-toggle { display: none; }
  body.search-open .search-cancel { display: block; border: 0; background: none; color: var(--accent); font: 600 16px var(--body); padding: 10px 4px; cursor: pointer; }
  body.search-open .results { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 68px); left: 0; right: 0; bottom: 0; width: auto; max-height: none;
    border: 0; border-radius: 0; box-shadow: none; background: var(--bg); padding: 6px 8px calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 69; }
  body.search-open .results a { padding: 12px 10px; font-size: 16px; min-height: 56px; }
  body.search-open .results small { font-size: 14px; }

  /* Bottom navigation, within thumb reach */
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--bg-2) 94%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
  .bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; min-height: 54px; border-radius: 12px; color: var(--muted);
    font: 600 13px var(--body); text-decoration: none !important; -webkit-tap-highlight-color: transparent; }
  .bottom-nav a .ic { width: 24px; height: 24px; }
  .bottom-nav a.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

  /* Scores bar: a little tighter so more of the page is visible */
  .strip-track { padding: 8px 14px; }
  .s-game { width: 136px; min-width: 136px; padding: 7px 9px; }
  .s-status { font-size: 13px; }
  .s-row .code { font-size: 16px; }
  .wp { font-size: 13px; }
  .strip-today { height: 38px; padding: 0 14px; font-size: 14px; }

  /* Readable text: nothing below 13px */
  .p-head { padding: 16px 16px 10px; }
  .p-body { padding: 0 16px 16px; }
  .p-foot { padding: 12px 16px; font-size: 14px; }
  .p-head h2 { font-size: 21px; }
  .p-sub, .page-head p { font-size: 15px; }
  .section-title { font-size: 15px; margin-top: 6px; }
  .mini-lbl, .tile .k, .ltile h3, .leader .lbl, .cmp-row .lbl, .mday-stats span, .s-date b, .tabs a .count { font-size: 13px; }
  .tile .s, .stamp, .note, .legend, .pc-foot, .video-note, .clip .cs, .grow .res small, .grow .cta, .teamcell .nm span, .teamtile small { font-size: 13px; }
  .tile .v { font-size: 26px; }
  table.t td { font-size: 15px; padding: 9px 8px; }
  table.t th { font-size: 13px; padding: 8px; }
  table.t th small { font-size: 12.5px; }
  .pcell small, ol.lb .n small, .ev .who small, .lp small, .hero .meta, .mhead .mteam span, .mmeta { font-size: 14px; }
  ol.lb li { min-height: 52px; font-size: 16px; }
  ol.lb .v { font-size: 19px; }
  .ev { padding: 10px 0; font-size: 15px; }
  .tag { font-size: 12.5px; padding: 4px 6px; }
  .metric { font-size: 14.5px; grid-template-columns: 1fr 70px 44px; }
  .metric .pct { font-size: 16px; }
  .ltile ol { font-size: 15px; }
  .ltile ol li { min-height: 36px; }

  /* Finger-sized targets: 44px or more */
  .seg button { min-height: 40px; padding: 8px 12px; font-size: 14.5px; }
  .chip { min-height: 38px; padding: 6px 14px; font-size: 14.5px; }
  .tabs { padding: 0 6px; }
  .tabs a { min-height: 50px; padding: 14px 12px 12px; font-size: 15px; }
  .more, .more-link, .linkbtn { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
  .playbtn { min-height: 36px; padding: 6px 12px; font-size: 14px; }
  .btn { min-height: 46px; padding: 10px 16px; font-size: 15px; justify-content: center; }
  .field select, .field input { min-height: 42px; font-size: 16px; } /* 16px stops iPhone zooming into inputs */
  .field { font-size: 13px; }
  .search input { font-size: 16px; min-height: 46px; }
  .grow { min-height: 60px; padding: 10px 12px; }
  .teamcell { min-height: 40px; }
  .pickteams.sm button { min-height: 48px; }
  .form a { display: inline-grid; padding: 4px 1px; }
  .form i { width: 26px; height: 26px; font-size: 13px; }

  /* Overview hero: action buttons side by side instead of stacked */
  .mday-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 12px 16px; }
  .mday-actions .btn { padding: 8px 6px; gap: 5px; font-size: 13.5px; letter-spacing: .03em; }
  .mday-actions .btn .ic { display: none; }
  .mday-top { padding: 14px 16px 0; }
  .mday-top .count { font-size: 14px; }
  .mday-side { padding: 16px; }
  .mday-stats b { font-size: 24px; }

  /* Match header */
  .mhead { gap: 6px; }
  .mteam b { font-size: 18px; }
  .band .tb.xl, .tb.xl { width: 64px; height: 64px; }
  .mscore .sc { font-size: 46px; }
  .mscore .sc.sm { font-size: 36px; }

  /* Last small bits */
  .oddsbar { height: 26px; font-size: 13.5px; line-height: 26px; }
  .clip .dur, .lbl, .cmp-row .lbl, .av { font-size: 13px; }
  .tag { font-size: 13px; }
  table.t td[style] { font-size: 13.5px !important; }
  .brand { min-height: 44px; }
  .theme-toggle button { height: 40px; width: 40px; }
  .favbtn { min-height: 44px; padding: 8px 16px; font-size: 15px; }
  .lp { min-height: 48px; }

  /* Video player fills the width */
  dialog.video { width: 100vw; max-width: 100vw; margin: auto 0; border-radius: 16px 16px 0 0; }
  .video-close { width: 44px; height: 44px; }
}

/* Phones: tables line up with the card edges, and the compact table fits without sideways scrolling */
@media (max-width: 700px) {
  .tscroll { margin: 0 -16px; padding: 0 16px; max-width: calc(100% + 32px); }
  table.t.compact .odds span { min-width: 44px; padding: 3px 4px; }
  table.t.compact td, table.t.compact th { padding-inline: 5px; }
  table.t.compact th small { display: none; } /* "topp 10" etc. is explained in the legend */
}

/* =====================================================================
   Statistik: leader sections (Spelare, Målvakter, Backar, Nykomlingar)
   ===================================================================== */
.lsec-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1100px) { .lsec-row { grid-template-columns: minmax(0, 1fr); } }
.lsec .p-head { padding-bottom: 8px; align-items: center; }
.utabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); overflow-x: auto; scrollbar-width: none; }
.utabs button { all: unset; cursor: pointer; padding: 11px 12px 10px; font: 600 15px var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.utabs button:hover { color: var(--text); }
.utabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.utabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lsec .p-body { padding-top: 18px; }
.lsec-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
.lfeat { display: grid; justify-items: center; text-align: center; gap: 12px; }
.portrait.feat { width: 170px; border-radius: 16px; }
.lfeat-info { display: grid; justify-items: center; gap: 6px; }
.lfeat-name { font: 700 24px/1.05 var(--display); text-transform: uppercase; color: var(--text); text-wrap: balance; }
.lfeat-name:hover { color: var(--accent); text-decoration: none; }
.lfeat-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; }
.lfeat-lbl { margin-top: 8px; font: 600 13px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lfeat-val { font: 700 68px/.92 var(--display); letter-spacing: -.01em; }
.ltop10 { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ltop10 li { display: grid; grid-template-columns: 36px 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px;
  padding: 6px 12px; border-radius: 10px; background: var(--panel-2); font-size: 15px; }
.ltop10 li a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ltop10 li .r { color: var(--muted); font: 600 14px var(--display); }
.ltop10 li b { font: 700 17px var(--display); }
/* The highlighted row follows the mouse; the big card shows that player */
.ltop10 li { cursor: pointer; transition: background .18s ease, color .18s ease; }
.ltop10 li:not(.on):hover { background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); }
.ltop10 li.on { background: var(--accent); color: var(--accent-ink); }
.ltop10 li.on a, .ltop10 li.on .r { color: var(--accent-ink); }
.lfeat-slot { min-width: 0; }
.lfeat-slot .lfeat { animation: featIn .25s ease both; }
@keyframes featIn { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ltop10 li { transition: none; } .lfeat-slot .lfeat { animation: none; } }
@media (max-width: 700px) {
  .utabs button { min-height: 48px; box-sizing: border-box; padding: 14px 12px 12px; }
  .ltop10 li { min-height: 46px; font-size: 16px; }
}
@media (max-width: 560px) {
  .lsec-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .lfeat { grid-template-columns: 124px minmax(0, 1fr); justify-items: start; text-align: left; align-items: end; }
  .portrait.feat { width: 124px; }
  .lfeat-info { justify-items: start; }
  .lfeat-name { font-size: 22px; }
  .lfeat-val { font-size: 56px; }
}

/* Brand: bold wordmark and the stick-and-puck mark */
.brand-word { font-family: "Archivo", var(--display); font-weight: 900; font-style: italic; font-stretch: 78%; font-size: 27px; letter-spacing: .01em; }
.brand-mark { width: 34px; height: 34px; }

/* =====================================================================
   Nexus: shot map explorer
   ===================================================================== */
.smap { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.smap-side { display: grid; gap: 14px; align-content: start; }
.smap-who { display: flex; align-items: flex-end; gap: 14px; }
.smap-who .lfeat-name { font-size: 22px; }
.smap-who .lfeat-meta { margin-top: 6px; }
.smap .tiles .tile { flex-basis: 110px; }
@media (max-width: 900px) { .smap { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Overview top: SHL news carousel, your team (or a team picker), article page
   ===================================================================== */
.newshero .mday-grid { min-height: 340px; }
.news { position: relative; border-radius: var(--radius) 0 0 var(--radius); overflow: hidden; background: var(--bg-2); min-height: 340px; }
.news-empty { display: grid; place-items: center; color: var(--muted); }
.nslides { position: absolute; inset: 0; }
.nslide { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none !important; opacity: 0; transition: opacity .8s ease; pointer-events: none;
  overflow: hidden; will-change: opacity; }
.nslide.on { opacity: 1; pointer-events: auto; }
.nslide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nslide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 11, 16, .05) 20%, rgba(8, 11, 16, .82) 78%); }
.nslide-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 24px 54px; display: grid; gap: 8px; }
.nslide-meta { font: 700 12.5px var(--display); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.nslide-text b { font: 700 30px/1.08 var(--display); text-wrap: balance; max-width: 30ch; }
.nslide-intro { font-size: 15px; line-height: 1.45; opacity: .9; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nslide:hover b { text-decoration: underline; text-underline-offset: 4px; }
.nctrl { position: absolute; left: 20px; bottom: 16px; display: flex; align-items: center; gap: 6px; z-index: 2; }
.ndot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .25s, background .25s; }
.ndot.on { width: 24px; background: #fff; }
.nnav { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(8, 11, 16, .45); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.nnav:hover { background: rgba(8, 11, 16, .7); }
.mini-games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-game { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--panel-2); color: var(--text); text-decoration: none !important; }
a.mini-game:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.mg-teams { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mg-teams b { font: 700 20px var(--display); }
.mg-sub { font-size: 13px; color: var(--muted); }
.narticle { overflow: hidden; }
.narticle-img { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.narticle-body { padding: 24px 26px 26px; display: grid; gap: 14px; max-width: 760px; }
.narticle-body h1 { margin: 0; font: 700 36px/1.08 var(--display); text-wrap: balance; }
.narticle-intro { margin: 0; font-size: 18px; line-height: 1.55; color: var(--text); }
.narticle-body .btn { justify-self: start; }
.nlist { display: grid; gap: 10px; }
.nitem { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; color: var(--text); text-decoration: none !important; padding: 6px; border-radius: 12px; }
.nitem:hover { background: var(--panel-2); }
.nitem img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.nitem b { display: block; font: 700 17px/1.2 var(--display); }
@media (max-width: 900px) { .news { border-radius: var(--radius) var(--radius) 0 0; } }
@media (max-width: 700px) {
  .news, .newshero .mday-grid { min-height: 300px; }
  .nslide-text { padding: 16px 16px 50px; }
  .nslide-text b { font-size: 24px; }
  .nslide-meta { font-size: 13px; }
  .nnav { width: 38px; height: 38px; }
  .ndot { width: 10px; height: 10px; }
  .narticle-body { padding: 18px 16px 20px; }
  .narticle-body h1 { font-size: 28px; }
  .narticle-intro { font-size: 17px; }
  .nitem { grid-template-columns: 96px minmax(0, 1fr); }
  .nitem img { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .nslide, .ndot { transition: none; } }

/* Wordmark in the brand ink: black on the light theme, white on the dark */
.brand-word, .brand-word em { color: var(--brand-ink); }

/* Overview top-10 cards: no headshots, four aligned columns (rank, team, name, value) */
ol.lb.noav li { grid-template-columns: 26px 32px minmax(0, 1fr) minmax(44px, auto); gap: 12px; padding: 6px 8px; }
ol.lb.noav .r { text-align: right; font-size: 15px; }
ol.lb.noav .n { display: grid; gap: 1px; }
ol.lb.noav .n a { font-weight: 600; font-size: 15.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.lb.noav .n small { font-size: 12.5px; }
ol.lb.noav .v { text-align: right; font-size: 20px; }
ol.lb.noav li:first-child .v { color: var(--accent); }
@media (max-width: 700px) { ol.lb.noav .n small { font-size: 13px; } }

/* Statistik: the GSAA chart as a compact card rather than full width */
.panel.gsaa-card { max-width: 620px; }
/* Player career: best season per stat, totals row, clubs list */
.t td.best { color: var(--accent); font-weight: 700; }
.t tr.total td { border-top: 2px solid var(--line); }
ul.clubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
ul.clubs li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 10px; }
ul.clubs li:hover { background: var(--panel-2); }
ul.clubs li div { display: grid; gap: 2px; min-width: 0; }
ul.clubs li div a { color: var(--text); text-decoration: none; }
ul.clubs li div span { font-size: 13px; color: var(--muted); }
ul.clubs .clubs-v { font-size: 13px; color: var(--muted); white-space: nowrap; }
ul.clubs .clubs-v b { color: var(--text); font-size: 15px; }
/* ---------- Live games ---------- */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 7px; vertical-align: 1px; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.live-card .p-body { display: grid; gap: 14px; }
.live-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-top b { font: 700 24px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.live-top .faint { margin-left: auto; font-size: 13px; }
.live-badge { display: inline-flex; align-items: center; font: 700 12.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--bad); padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 14%, transparent); }
.live-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.live-nums > div { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; }
.live-nums .k { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.live-nums .v { font: 700 26px/1.05 var(--display); }
.live-nums .v.sm { font-size: 17px; line-height: 1.25; }
.live-nums .v.sm .faint { font: 500 13px var(--sans, inherit); }

/* ---------- Match report ---------- */
.recap .p-body { display: grid; gap: 22px; }
.recap-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.recap-main { display: grid; gap: 14px; min-width: 0; }
.recap-lead { margin: 0; font: 700 25px/1.18 var(--display); text-wrap: balance; letter-spacing: .005em; }
.recap-text { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text); opacity: .9; max-width: 68ch; text-wrap: pretty; }
.recap h3 { margin: 0; font: 700 14px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rx { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 9px; margin-top: 4px; }
.rx-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rx-win { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.rx-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rx-bar .num { font: 700 22px var(--display); }
.rx-track { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; }
.rx-track i:first-child { background: var(--hc); border-radius: 999px 0 0 999px; }
.rx-track i:last-child { background: var(--ac); border-radius: 0 999px 999px 0; }
.rx-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.rx-sub span { display: inline-flex; align-items: center; gap: 6px; }
.rstars { display: grid; gap: 10px; }
.rstars ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rstars li { display: grid; grid-template-columns: 34px auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); }
.rstars li:first-child { background: color-mix(in srgb, var(--gold) 13%, var(--panel-2)); }
.rs-n { color: var(--gold); font-size: 12px; letter-spacing: -1px; text-align: center; line-height: 1; }
.rs-who { display: grid; gap: 3px; min-width: 0; }
.rs-who a, .rs-who b { font: 700 17px/1.15 var(--display); text-transform: uppercase; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-who small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rmoments { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.rmoments ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rmoments li { display: grid; grid-template-columns: auto 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.rm-t { font: 600 13.5px var(--display); color: var(--muted); white-space: nowrap; }
.rm-dot { width: 8px; height: 28px; border-radius: 4px; }
.rm-what { display: grid; gap: 3px; min-width: 0; font-size: 14.5px; }
.rm-what > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rm-tag { font: 700 11px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.rm-sc { font: 700 18px var(--display); }
@media (max-width: 860px) { .recap-grid { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 700px) { .recap-lead { font-size: 22px; } .recap-text { font-size: 16px; } }

/* ---------- Team page: news cards and game-by-game charts ---------- */
.tnews-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tnews { display: grid; grid-template-rows: auto 1fr; border-radius: 12px; overflow: hidden; background: var(--panel-2); color: var(--text); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.tnews:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.tn-img { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); display: grid; place-items: center; overflow: hidden; }
.tn-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tn-body { display: grid; gap: 5px; padding: 11px 13px 14px; align-content: start; }
.tn-meta { font: 600 11.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tn-body b { font: 700 17px/1.2 var(--display); text-wrap: balance; }
.tn-intro { font-size: 13.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) {
  .tnews-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; }
  .tnews { flex: 0 0 78%; scroll-snap-align: start; }
}
.mchart { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.mchart svg { display: block; width: 100%; height: auto; }
.mc-col:hover rect:not(:first-child) { filter: brightness(1.15); }
.mc-col:hover > rect:first-child { fill: color-mix(in srgb, var(--text) 5%, transparent) !important; }@media (max-width: 700px) {
  .tn-meta, .rm-tag { font-size: 12.5px; }
  .rm-t { font-size: 14px; }
  .rx-sub { font-size: 13.5px; }
  .live-top .faint { margin-left: 0; width: 100%; }
}
/* Team page top row: stacked cards in the right column */
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* ---------- Nexus shot map ---------- */
.smap-panel .smap { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; }
.smap-main { display: grid; gap: 12px; min-width: 0; }
.smap-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.smap-bar .seg button { font-size: 13px; padding: 5px 10px; }
.smap-stage { position: relative; border-radius: 16px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 7%, var(--panel-2)), var(--panel-2)); padding: 10px; }
.smap-stage svg.rink { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; overflow: visible; }
.rk-ice { fill: color-mix(in srgb, var(--panel) 55%, var(--panel-2)); }
.rk-boards { fill: none; stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-width: 3; }
.rk-red { stroke: color-mix(in srgb, #e0475b 70%, transparent); stroke-width: 2.5; }
.rk-blue { fill: color-mix(in srgb, #3f7be0 70%, transparent); }
.rk-circle { fill: none; stroke: color-mix(in srgb, #e0475b 45%, transparent); stroke-width: 2; }
.rk-hash { stroke: color-mix(in srgb, #e0475b 45%, transparent); stroke-width: 2; }
.rk-dot { fill: color-mix(in srgb, #e0475b 70%, transparent); }
.rk-crease { fill: color-mix(in srgb, #3f7be0 28%, transparent); stroke: color-mix(in srgb, #e0475b 60%, transparent); stroke-width: 2; }
.rk-net { fill: color-mix(in srgb, var(--text) 8%, transparent); stroke: color-mix(in srgb, var(--text) 55%, transparent); stroke-width: 2; }
.rk-slot { fill: color-mix(in srgb, var(--accent) 7%, transparent); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 5 5; }
.rk-lbl { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; fill: var(--faint); }
.sm-dot { fill: var(--muted); fill-opacity: .32; stroke: var(--muted); stroke-opacity: .6; stroke-width: 1; animation: smIn .45s ease-out both; animation-delay: var(--d); }
.sm-goal { cursor: pointer; outline: none; animation: smIn .5s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: var(--d); }
.sm-goal, .sm-dot, .sm-pulse, .sm-core { transform-box: fill-box; transform-origin: center; }
.sm-core { fill: var(--c); stroke: var(--text); stroke-width: 2; transition: transform .15s; }
.sm-glow { opacity: .9; }
.sm-pulse { fill: none; stroke: var(--c); stroke-width: 2; animation: smPulse 2.4s ease-out infinite; animation-delay: calc(var(--d) + .6s); opacity: 0; }
.sm-goal:hover .sm-core, .sm-goal:focus-visible .sm-core { transform: scale(1.3); }
.sm-goal.sel .sm-core { stroke-width: 3.5; transform: scale(1.35); }
.sm-goal.sel .sm-pulse { animation-duration: 1.2s; }
.rk-heat { animation: smFade .6s ease-out both; }
@keyframes smIn { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes smPulse { 0% { opacity: .8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes smFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sm-dot, .sm-goal, .rk-heat { animation: none; } .sm-pulse { display: none; } }

.chip-team { display: inline-flex; align-items: center; gap: 6px; padding-left: 5px; }
.sm-zones { display: grid; gap: 8px; }
.sm-zones h3 { margin: 0; font: 700 14px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.smz { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.smz-l { color: var(--muted); }
.smz-bar { position: relative; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); overflow: hidden; }
.smz-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--muted) 55%, transparent); transition: width .4s; }
.smz-bar i.g { background: var(--accent); }
.smz-v { font: 700 15px var(--display); text-align: right; white-space: nowrap; }
.smz-v small { font: 500 12.5px var(--sans, inherit); color: var(--muted); margin-left: 4px; }

.sm-hint { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.sm-hint .ic { width: 18px; height: 18px; flex: none; color: var(--accent); }
.smd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel-2); animation: smFade .3s ease-out both; }
.smd-video { all: unset; cursor: pointer; position: relative; width: 190px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.smd-video img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.smd-video:hover img { transform: scale(1.05); }
.smd-video .play-ic { position: absolute; inset: 0; margin: auto; }
.smd-info { display: grid; gap: 5px; min-width: 0; }
.smd-k { font: 600 12.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.smd-info > b { font: 700 22px/1.1 var(--display); text-transform: uppercase; }
.smd-info > b a { color: var(--text); }
.smd-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.smd-facts b { color: var(--text); }
@media (max-width: 900px) { .smap-panel .smap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .smd { grid-template-columns: 1fr; } .smd-video { width: 100%; } .smz { grid-template-columns: 92px minmax(0, 1fr) auto; } }
/* Header mark (the puck icon) next to the wordmark */
/* The file is black; the dark theme turns it white like the wordmark */
img.brand-mark { display: block; width: auto; height: 26px; flex: none; filter: var(--logo-filter, none); }
@media (max-width: 700px) { img.brand-mark { height: 22px; } }
