/* Statystyki: panele, tabele i podpowiedzi. Wspólna góra serwisu — barwy,
   kroje, tytuł, kafelki i menu — siedzi w site-header.css, wczytywanym wcześniej. */
.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 #000;
  margin-bottom: 22px;
  overflow: hidden;
}
#downloads-panel {
  position: relative;
  background: linear-gradient(145deg, #112a3a 0%, #0c1d2c 45%, #152538 100%);
}
#downloads-panel h2 {
  background: linear-gradient(90deg, #173f58, #142f46 48%, #102638);
}
.panel h2 {
  margin: 0;
  padding: 10px 14px;
  font-family: "Handel Gothic", "Courier New", monospace;
  background: var(--panel-2);
  border-bottom: 2px solid var(--line);
  font-size: 19px;
  letter-spacing: 2px;
  color: var(--gold);
}
.scroll { overflow-x: auto; }
/* Narrow screens keep the SWOS-style abbreviations; from tablet width up the
   table has room for the full column names. */
th .full { display: none; }
@media (min-width: 720px) {
  th .full { display: inline; }
  th .short { display: none; }
}
table {
  width: 100%; border-collapse: collapse; white-space: nowrap;
  font-variant-numeric: tabular-nums; /* columns stay aligned if Courier falls back */
}
th {
  background: var(--header);
  padding: 8px 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-align: right;
  color: #fff;
}
th .material-symbols-outlined {
  font-size: 18px;
  cursor: help;
  opacity: 0.85;
}
th .material-symbols-outlined:hover {
  opacity: 1;
}
th:nth-child(2), td:nth-child(2) { text-align: left; }
td { padding: 7px 10px; text-align: right; border-bottom: 1px solid #0a121c; }
tbody tr:nth-child(odd) { background: var(--row); }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr.leader td { font-weight: bold; }
/* Tabela i Elo mają tę samą spokojną głębię co historia meczów. */
.standings-table thead tr, .elo-table thead tr {
  background: linear-gradient(90deg, #285582, #20476c 48%, #16334e);
}
.standings-table thead th, .elo-table thead th { background: transparent; }
.standings-table tbody tr, .elo-table tbody tr,
.standings-table tbody tr:nth-child(odd), .elo-table tbody tr:nth-child(odd) {
  background: linear-gradient(100deg, #13334b, #102536 45%, #0c1c2c);
}
.standings-table tbody tr:nth-child(even), .elo-table tbody tr:nth-child(even) {
  background: linear-gradient(100deg, #173b52, #122b3d 45%, #102131);
}
.standings-table tbody tr:first-child, .elo-table tbody tr:first-child {
  background: linear-gradient(90deg, #237f48, #1a5a43 28%, #123e3b 62%, #102b35);
}
.standings-table tbody tr:nth-child(2), .elo-table tbody tr:nth-child(2) {
  background: linear-gradient(90deg, #285676, #214960 34%, #16354a 68%, #102737);
}
.standings-table tbody tr:nth-child(3), .elo-table tbody tr:nth-child(3) {
  background: linear-gradient(90deg, #344677, #293c66 34%, #1c3452 68%, #112a3d);
}
.standings-table tbody tr:nth-last-child(2):not(:first-child),
.elo-table tbody tr:nth-last-child(2):not(:first-child) {
  background: linear-gradient(90deg, #894152, #633446 34%, #392e3d 68%, #172b39);
}
.standings-table tbody tr:last-child:not(:first-child),
.elo-table tbody tr:last-child:not(:first-child) {
  background: linear-gradient(90deg, #a62e43, #742a3e 28%, #43283b 62%, #172634);
}
.standings-table tbody tr:first-child td:first-child,
.elo-table tbody tr:first-child td:first-child { box-shadow: inset 4px 0 #a7f3bd; }
.standings-table tbody tr:nth-child(2) td:first-child,
.elo-table tbody tr:nth-child(2) td:first-child { box-shadow: inset 4px 0 #a8cfe9; }
.standings-table tbody tr:nth-child(3) td:first-child,
.elo-table tbody tr:nth-child(3) td:first-child { box-shadow: inset 4px 0 #aab8ef; }
.standings-table tbody tr:nth-last-child(2):not(:first-child) td:first-child,
.elo-table tbody tr:nth-last-child(2):not(:first-child) td:first-child { box-shadow: inset 4px 0 #e8a0aa; }
.standings-table tbody tr:last-child:not(:first-child) td:first-child,
.elo-table tbody tr:last-child:not(:first-child) td:first-child { box-shadow: inset 4px 0 #ff7683; }
.standings-table tbody tr:first-child .name a,
.elo-table tbody tr:first-child .name a { color: #ffe17a; }
.standings-table tbody tr:nth-child(2) .name a,
.elo-table tbody tr:nth-child(2) .name a { color: #e7f0f7; }
.standings-table tbody tr:nth-child(3) .name a,
.elo-table tbody tr:nth-child(3) .name a { color: #efbd92; }
.standings-table tbody tr:hover, .elo-table tbody tr:hover {
  background-color: transparent !important;
  filter: brightness(1.16);
}
.pts { color: var(--gold); font-weight: bold; }
/* Numer miejsca stoi w każdej tabeli tak samo szeroko, więc przy przełączaniu
   zakładek kolumna LP i nazwa gracza obok niej nie przeskakują w bok. */
th.lp, td.lp { width: 56px; padding-right: 14px; text-align: right; }
/* Nicknames wear the game's menu face wherever they appear. */
.name, .match-result-name, .squad {
  font-family: "Handel Gothic", "Courier New", monospace;
}
.name { letter-spacing: 1px; }
.name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.name a:hover { color: var(--green); }
.scorers-table td.squad { text-align: left; letter-spacing: 1px; font-size: 13px; }
.scorers-table tbody tr {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--scorer-kit, #276987) 68%, #0b1928),
    color-mix(in srgb, var(--scorer-kit, #276987) 27%, #0b1928) 50%,
    #0b1928);
}
.scorers-table tbody tr:nth-child(even) {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--scorer-kit, #276987) 72%, #102133),
    color-mix(in srgb, var(--scorer-kit, #276987) 30%, #102133) 50%,
    #102133);
}
.scorers-table tbody td { height: 52px; }
.scorers-table tbody td:is(.name, .squad) { color: #f7fbff; }
.scorers-table tbody tr:is([data-team-name="England"], [data-team-name="Poland"]) {
  background: linear-gradient(90deg, #f7faf8 0%, #eaf1f1 30%, #b2cad3 47%, #244456 68%, #0b1928 100%);
}
.scorers-table tbody tr:is([data-team-name="England"], [data-team-name="Poland"]) td:is(.lp, .name, .squad),
.scorers-table tbody tr[data-team-name="Brazil"] td:is(.lp, .name, .squad) {
  color: #10283a;
}
.scorers-table td.squad { position: relative; }
.scorers-table .squad-label { position: relative; z-index: 1; }
.scorers-table .scorer-watermark-clip {
  position: absolute; z-index: 0; left: 0; right: -48px; top: 0; bottom: 0;
  overflow: hidden; pointer-events: none;
}
.scorers-table .scorer-watermark {
  position: absolute; right: 18px; top: 50%;
  width: 78px; height: 78px; object-fit: contain;
  transform: translateY(-50%) rotate(45deg);
  opacity: .13;
}
.results { table-layout: fixed; white-space: normal; }
.results .results-scorers-col { width: 25%; }
.results .results-team-col { width: 18%; }
.results .results-score-col { width: 14%; }
.results th:nth-child(3) { text-align: center; }
.results td { text-align: center; }
.results td.host, .results td.guest { vertical-align: middle; }
.results td.host { text-align: right; }
.results td.guest { text-align: left; }
.results .match-result-name { display: inline-block; max-width: 100%; vertical-align: middle; }
.results .result-identity { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; text-align: left; }
.results .result-crest { display: block; flex: none; width: 36px; height: 36px; object-fit: contain; }
.results .result-identity-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 4px; }
.results .result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
.results .result-meta .team-tag { display: inline; margin: 0; line-height: 1.2; }
.results .result-meta .platform-tag { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border: 1px solid #a6bfd044; border-radius: 5px; background: #06142188; }
.results td.host .result-identity-copy { align-items: flex-end; text-align: right; }
.results td.host .result-meta { justify-content: flex-end; }
.results .row-date { display: block; margin-top: 5px; color: #e3f4ff; font-size: 11px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.results .history-legacy-scorers { display: block; max-width: 160px; margin: 4px auto 0; color: #d4e6f1; font-size: 10px; font-weight: normal; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }

/* Wynik meczu wygląda tak samo na każdej stronie i mieszka w site-header.css;
   tu zostaje tylko to, czego używa wyłącznie tabela historii. */
.win { font-weight: bold; }
.score { color: var(--gold); font-weight: bold; letter-spacing: 1px; }
.score a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.score a:hover, .score a:focus-visible { color: var(--green); }
.results td.score > .scoreboard { border-bottom: 0; }
.scorers { color: var(--muted); font-size: 12px; white-space: normal; overflow-wrap:anywhere; }
.scorers .minute { color: #fff; }
.results .scorers { vertical-align: middle; }
.results .host-scorers { text-align: right; }
.results .guest-scorers { text-align: left; }
.results .goal-line { display: inline-block; margin: 2px 4px; }
/* Hover effect for all tables */
table tbody tr:hover {
  background-color: #1a2d45 !important;
  cursor: pointer;
}
/* Make the history table rows clickable */
.results tbody tr {
  cursor: pointer;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--host-kit, #248f92) 28%, #0b1824) 0%,
    color-mix(in srgb, var(--host-kit, #248f92) 12%, #0b1824) 39%,
    #0b1824 50%,
    color-mix(in srgb, var(--guest-kit, #924e72) 12%, #0b1824) 61%,
    color-mix(in srgb, var(--guest-kit, #924e72) 28%, #0b1824) 100%);
}
.results tbody tr:hover { filter: brightness(1.13); }
.results td.score { padding-left: 7px; padding-right: 7px; vertical-align: middle; }
.team-tag {
  display: block;
  font-size: 10px; letter-spacing: 1px; opacity: 0.7; font-weight: normal;
  text-transform: uppercase;
}
/* Platforma gracza pod nazwą reprezentacji — w barwie tła strony, nie kitu,
   żeby nie konkurowała z nazwiskiem. Nie jest przemalowywana przez JS,
   dlatego stoi obok .team-tag, a nie w nim. */
.platform-tag {
  display: block;
  font-size: 10px; letter-spacing: 1px; font-weight: normal;
  color: var(--muted) !important; font-family: "Courier New", ui-monospace, monospace;
}
.results .platform-tag .platform-icon { width: 15px; height: 15px; margin-right: 0; opacity: .9; }
.empty { padding: 26px 14px; text-align: center; color: var(--muted); }
/* Kafelki paczek i biegnący Parowczak w panelu POBIERZ. */
.downloads-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  max-width: min(1400px, calc(100% - 140px)); padding: 14px;
}
.downloads-mascot {
  position: absolute; z-index: 2; top: 58px; right: clamp(18px, 5vw, 72px);
  width: 100px; height: 150px; pointer-events: none;
  filter: drop-shadow(0 8px 14px #0008);
}
.downloads-mascot img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; animation: parowczak-run 2s steps(1, end) infinite;
}
.downloads-mascot img:nth-child(1) { animation-delay: 0s; }
.downloads-mascot img:nth-child(2) { animation-delay: .25s; }
.downloads-mascot img:nth-child(3) { animation-delay: .5s; }
.downloads-mascot img:nth-child(4) { animation-delay: .75s; }
.downloads-mascot img:nth-child(5) { animation-delay: 1s; }
.downloads-mascot img:nth-child(6) { animation-delay: 1.25s; }
.downloads-mascot img:nth-child(7) { animation-delay: 1.5s; }
.downloads-mascot img:nth-child(8) { animation-delay: 1.75s; }
@keyframes parowczak-run {
  0%, 12.49% { opacity: 1; }
  12.5%, 100% { opacity: 0; }
}
.download {
  min-width: 0; margin: 0; padding: 14px;
  background: linear-gradient(135deg, #244967, #173248 48%, #102535);
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 4px; box-shadow: 3px 3px 0 #0005;
  position: relative; overflow: hidden;
}
/* Grafika aplikacji danej platformy w tle kafelka, w prawym dolnym rogu; treść kafelka leży nad nią. */
.download-art {
  position: absolute; right: 0; bottom: 0; height: 178px; width: auto;
  opacity: .92; pointer-events: none; z-index: 0;
}
.download > :not(.download-art) { position: relative; z-index: 1; }
.download:nth-child(3n+2) { background: linear-gradient(135deg, #254d56, #183d45 48%, #102b37); }
.download:nth-child(3n) { background: linear-gradient(135deg, #4a3956, #302d4b 48%, #18283b); }
.download-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: bold; color: var(--gold); margin-bottom: 6px;
}
/* Ikona z PNG (np. Linux, którego nie ma w Material Symbols) w kolorze tytułu kafelka. */
.download-icon-img {
  display: inline-block; width: 24px; height: 24px; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.icon-linux { -webkit-mask-image: url(platforms/linux.png); mask-image: url(platforms/linux.png); }
.download-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.download-meta code { background: #000; padding: 2px 4px; }
.download-button {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #ffe07a, var(--gold) 60%, #e4a51f); color: #000;
  padding: 8px 16px; text-decoration: none; font-weight: bold;
  border-radius: 2px; cursor: pointer;
}
.download-button-size { display: none; }
.download-button:hover { filter: brightness(1.12); }
/* Telefon i tablet: bez UUID, rozmiar na przycisku, grafika w rogu kafelka,
   a biegnący Parowczak siedzi w nagłówku panelu. */
@media (max-width: 860px) {
  .downloads-list { grid-template-columns: 1fr; max-width: 100%; }
  .download-uuid, .download-size { display: none; }
  .download-button-size { display: inline; font-weight: normal; }
  .download-art { height: 100%; max-width: 100%; object-fit: contain; object-position: right bottom; }
  .downloads-mascot { top: 2px; right: 14px; width: 40px; height: 60px; }
}
@media (min-width: 861px) and (max-width: 1500px) {
  .downloads-list { max-width: calc(100% - 140px); }
}
/* Pięć kafelków: dwie kolumny pod biegnącym Parowczakiem zajmuje piąty kafelek
   (trzecia kolumna, drugi rząd), a Parowczak biegnie nad nim. Na węższych
   ekranach zostaje układ w dwóch kolumnach z zarezerwowanym marginesem. */
@media (min-width: 1100px) {
  .downloads-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
  .download:nth-child(3) { grid-column: 1; grid-row: 2; }
  .download:nth-child(4) { grid-column: 2; grid-row: 2; }
  .download:nth-child(5) { grid-column: 3; grid-row: 2; }
  .downloads-mascot { right: calc(14px + (100% - 56px) / 6 - 50px); }
}
@media (prefers-reduced-motion: reduce) {
  .downloads-mascot img { animation: none; }
  .downloads-mascot img:first-child { opacity: 1; }
}
/* Zakładki changeloga w panelu POBIERZ (PC/Mac, Vita, C64) — mniejsza wersja
   .tabs/.tab-button z site-header.css, bo to podzakładki wewnątrz panelu, nie
   nawigacja całej strony. Przełącza je bindChangelogTabs w stats.js. */
.changelog-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0 14px 4px; border-bottom: 2px solid var(--line);
}
.changelog-tab {
  padding: 8px 14px; background: transparent; border: none; color: var(--muted);
  font-family: "Handel Gothic", "Courier New", monospace; font-size: 13px; font-weight: bold;
  cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s;
  text-transform: uppercase; letter-spacing: 1px;
}
.changelog-tab:hover { color: var(--text); }
.changelog-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
#changelog-section { background: linear-gradient(145deg, #10283a, #0b1c2b 58%, #17283b); }
#changelog-section .changelog-panel { background: linear-gradient(115deg, #15314588, #0d213200 70%); }
.changelog-tab-heading {
  margin: 18px 14px 0; color: var(--gold); font-size: 15px; letter-spacing: 1px;
}
.changelog-entry {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #1b3c5280, #10283a30 58%, transparent);
}
.changelog-entry:nth-child(even) { background: linear-gradient(90deg, #24404f80, #13263830 58%, transparent); }
.changelog-entry:last-child { border-bottom: none; }
.changelog-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 4px;
}
/* Tytuł wpisu i jego data to nagłówek, który gracz przegląda z odległości —
   data czyta się jak w kafelkach na górze strony: biała, nie przygaszona. */
.changelog-title { color: var(--gold); font-weight: bold; font-size: 18px; letter-spacing: 0.5px; }
.changelog-date { color: #fff; font-size: 15px; white-space: nowrap; }
.changelog-group {
  color: var(--muted); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; margin: 8px 0 3px;
}
.changelog-items { margin: 0; padding-left: 18px; }
.changelog-items li { font-size: 14px; color: var(--text); padding: 2px 0; }
/* Podpowiedzi: dymek jest jednym elementem doklejanym do <body> i ustawianym z
   JavaScriptu, więc nie przycina go przewijana tabela. */
.tooltip {
  position: fixed; z-index: 50; max-width: 260px;
  padding: 7px 10px;
  background: var(--panel-2); color: var(--text);
  border: 2px solid var(--line); box-shadow: 3px 3px 0 #000;
  font-family: "Courier New", ui-monospace, monospace; font-size: 12px;
  line-height: 1.35; letter-spacing: 0.5px; text-align: left;
  pointer-events: none; opacity: 0; transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.tooltip.visible { opacity: 1; transform: translateY(0); }
/* Strzałka celuje w element, nad którym stoi dymek — nawet gdy dymek został
   dosunięty do krawędzi okna. */
.tooltip::after {
  content: ""; position: absolute; left: var(--arrow-x, 50%); margin-left: -6px;
  border: 6px solid transparent; border-top-color: var(--line);
  top: 100%;
}
.tooltip.below::after {
  top: auto; bottom: 100%;
  border-top-color: transparent; border-bottom-color: var(--line);
}
[data-tip] { cursor: help; }

/* Ruch w tabeli czyta się kolorem, zanim przeczyta się liczbę. */
.delta-up { color: var(--green); font-weight: bold; }
.delta-down { color: var(--red); font-weight: bold; }
.delta-flat { color: var(--muted); }
.delta-new { color: var(--gold); font-size: 11px; letter-spacing: 1px; }
.filter { text-align: center; margin-bottom: 14px; }
.filter a { color: var(--green); text-decoration: none; border-bottom: 1px dotted; }
/* Objaśnienie pod tabelą, a nie nad nią: nad tabelą przesuwałoby jej pierwszy
   wiersz w dół tylko na jednej zakładce. */
.note { margin: 0; padding: 10px 14px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 620px) {
  td, th { padding: 6px 7px; }
}
@media (max-width: 719px) {
  #history-panel .scroll { overflow-x: visible; }
  .results, .results tbody { display: block; width: 100%; }
  .results colgroup { display: none; }
  .results thead { display: none; }
  .results tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); width: 100%; min-height: 118px; align-items: center; column-gap: 3px; padding: 10px 8px; }
  .results td { display: block; min-width: 0; width: auto !important; padding: 2px 3px; border: 0; }
  .results td.host { grid-column: 1; grid-row: 1; }
  .results td.score { grid-column: 2; grid-row: 1 / span 2; }
  .results td.guest { grid-column: 3; grid-row: 1; }
  .results td.host-scorers { grid-column: 1; grid-row: 2; }
  .results td.guest-scorers { grid-column: 3; grid-row: 2; }
  .results .match-result-name { overflow-wrap: anywhere; }
  .results .result-crest { display: none; }
  .results .goal-line { display: block; margin: 2px 0; line-height: 1.25; }
  .results .row-date { font-size: 10px; letter-spacing: 0; }
  .results .scoreboard-small .board-score { font-size: 20px; }
  .results .result-identity { gap: 0; }
  .results .result-meta { gap: 4px; }
}
@media (min-width: 1440px) {
  th { font-size: 15px; }
  td { font-size: 16px; }
  .panel h2 { font-size: 20px; }
}

/* --- Zakładka STATYSTYKI ----------------------------------------------------
   Wykresy są rysowane samym HTML-em: słupek to element z wysokością w
   pikselach policzoną przez serwer (insights.go), poziomy pasek — z
   szerokością w procentach, mapa ciepła — tabela z klasami .heat-N. Tabela
   jako szkielet wykresu pionowego nie jest przypadkiem: komórki same
   rozkładają szerokość i wyrównują do dołu, także w arkuszu legacy. */
:root {
  /* Trzy barwy dokładane do złota, zieleni i czerwieni nagłówka, żeby wykresy
     dało się odróżnić na pierwszy rzut oka; wszystkie tak samo nasycone. */
  --blue: #4f9de0;
  --orange: #ff9a3c;
  --violet: #b48cff;
}
.insights { padding: 14px; }
.insights .insight-tiles { margin-bottom: 18px; }
.insights .insight-tiles .chip {
  --chip-accent: var(--gold);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--chip-accent) 19%, #172b3d), #0b1b2b 78%);
  border-color: color-mix(in srgb, var(--chip-accent) 35%, var(--line));
}
.insights .insight-tiles .chip:nth-child(4n+2) { --chip-accent: var(--blue); }
.insights .insight-tiles .chip:nth-child(4n+3) { --chip-accent: var(--green); }
.insights .insight-tiles .chip:nth-child(4n+4) { --chip-accent: var(--violet); }
.insights .insight-tiles .chip b { color: var(--chip-accent); }
.chip b.chip-text { font-size: 17px; color: #fff; letter-spacing: 1px; text-transform: uppercase; }
.chip .chip-delta { font-size: 11px; letter-spacing: 0.5px; margin-top: -2px; white-space: normal; }
@media (min-width: 720px) {
  .insights { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .insights .insight-tiles, .insights .card-wide { grid-column: 1 / -1; }
  .insights .insight-tiles { margin-bottom: 4px; }
}
.insight {
  background: linear-gradient(145deg, #172f42, #102536 52%, #0b1a2a);
  border: 1px solid var(--line); min-width: 0;
}
.insight h3 {
  margin: 0; padding: 8px 12px;
  font-family: "Handel Gothic", "Courier New", monospace; font-weight: normal;
  font-size: 14px; letter-spacing: 2px; color: var(--green);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #214b56, #163445 48%, #102637);
}
.insight .legend {
  margin: 0; padding: 8px 12px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line);
}
.insight .empty { padding: 18px 12px; }
.rating-leaderboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 12px; }
.rating-leaderboard h4 { margin: 0 0 8px; color: var(--green); font: 13px "Handel Gothic", "Courier New", monospace; letter-spacing: 1px; }
.rating-leaderboard.lowest h4 { color: var(--orange); }
.rating-leaderboard-table { background: var(--row); }
.rating-leaderboard-table thead tr { background: linear-gradient(90deg, #26516d, #193c55); }
.rating-leaderboard-table thead th { background: transparent; }
.rating-leaderboard-table tbody tr:nth-child(odd) { background: linear-gradient(90deg, #18384b, #102838); }
.rating-leaderboard-table tbody tr:nth-child(even) { background: linear-gradient(90deg, #1b3d50, #132b3b); }
.rating-leaderboard-table th { font-size: 11px; padding: 6px 8px; }
.rating-leaderboard-table td { padding: 6px 8px; }
.rating-leaderboard-table .average-rating { color: var(--gold); font-weight: bold; }
/* Wiersze wykresów nie prowadzą nigdzie, więc nie udają odnośników. */
.insight tbody tr:nth-child(odd):hover { background-color: var(--row) !important; cursor: default; }
.insight tbody tr:nth-child(even):hover { background-color: var(--row-alt) !important; cursor: default; }
.insight .bars tbody tr:hover, .insight .stack tbody tr:hover,
.insight .heat tbody tr:hover { background-color: transparent !important; cursor: default; }

/* Wykres pionowy. */
.bars { table-layout: fixed; }
.bars tbody tr, .bars tbody tr:nth-child(odd) { background: transparent; }
.bars td {
  vertical-align: bottom; text-align: center; padding: 10px 2px 8px;
  border-bottom: none;
}
.bars td.current .bar-fill { background: var(--green); }
.bar-value { font-size: 12px; color: #fff; margin-bottom: 3px; min-height: 16px; }
.bar-value small { color: var(--muted); font-size: 10px; }
.bar-fill { background: var(--gold); width: 70%; margin: 0 auto; }
.bar-fill.alt { background: var(--muted); }
.bar-pair { font-size: 0; white-space: nowrap; }
.bar-pair .bar-fill { display: inline-block; vertical-align: bottom; width: 38%; margin: 0 1px; }
.bar-label {
  margin-top: 5px; font-size: 11px; letter-spacing: 1px; color: var(--muted);
  font-family: "Handel Gothic", "Courier New", monospace;
}
/* Barwy wykresów. Dni tygodnia: zieleń, weekend pomarańczowy. Pory dnia i
   godziny dzielą jedną skalę — noc fioletowa, rano niebieskie, popołudnie
   złote, wieczór pomarańczowy — więc oba wykresy czyta się tym samym kluczem.
   Fazy meczu grzeją się od zieleni do czerwieni w stronę końcówki. */
.bars.weekdays .bar-fill { background: var(--green); }
.bars.weekdays td:nth-child(n+6) .bar-fill { background: var(--orange); }
.bars.dayparts td:nth-child(1) .bar-fill, .bars.hours td:nth-child(-n+6) .bar-fill { background: var(--violet); }
.bars.dayparts td:nth-child(2) .bar-fill, .bars.hours td:nth-child(n+7):nth-child(-n+12) .bar-fill { background: var(--blue); }
.bars.dayparts td:nth-child(3) .bar-fill, .bars.hours td:nth-child(n+13):nth-child(-n+18) .bar-fill { background: var(--gold); }
.bars.dayparts td:nth-child(4) .bar-fill, .bars.hours td:nth-child(n+19) .bar-fill { background: var(--orange); }
.bars.goals .bar-fill { background: var(--violet); }
.bars.phases td:nth-child(1) .bar-fill { background: var(--green); }
.bars.phases td:nth-child(2) .bar-fill { background: #9edc7a; }
.bars.phases td:nth-child(3) .bar-fill { background: var(--gold); }
.bars.phases td:nth-child(4) .bar-fill { background: var(--orange); }
.bars.phases td:nth-child(5) .bar-fill { background: var(--red); }
.hbars.platforms .hbar-fill { background: var(--blue); }
.hbars.scorelines .hbar-fill { background: var(--orange); }
.hbars.rivalries .hbar-fill { background: var(--green); }
.bars.hours td { padding-left: 0; padding-right: 0; }
.bars.hours .bar-value { font-size: 10px; }
.bars.hours .bar-label { font-size: 9px; letter-spacing: 0; }
.bars.weeks .bar-label { font-size: 10px; letter-spacing: 0; }
.legend .swatch {
  display: inline-block; width: 10px; height: 10px; background: var(--gold);
  vertical-align: middle; margin: 0 2px 0 6px;
}
.legend .swatch.alt { background: var(--muted); }
.legend .swatch.host { background: var(--green); }
.legend .swatch.draw { background: var(--muted); }
.legend .swatch.guest { background: var(--red); }

/* Wykres poziomy: nazwa, liczba, pasek, reszta liczb. */
.hbars th, .hbars td { padding: 6px 10px; }
.hbars th:nth-child(2), .hbars td:nth-child(2) { text-align: right; }
.hbars td.label { text-align: left; font-size: 13px; letter-spacing: 1px; }
.hbars td.label.score { color: var(--gold); font-weight: bold; font-size: 15px; }
.hbars td.name { font-family: "Handel Gothic", "Courier New", monospace; }
.hbars td.date { color: #fff; font-size: 12px; text-align: left; white-space: nowrap; }
.hbars td.squad { text-align: left; letter-spacing: 1px; font-size: 13px; font-family: "Handel Gothic", "Courier New", monospace; }
.hbars td small { color: var(--muted); font-size: 11px; }
.hbars .bar-cell { width: 40%; padding-left: 6px; padding-right: 6px; }
.hbar { background: #000; height: 10px; }
.hbar-fill { background: var(--gold); height: 10px; }
.hbars.pairs { border-top: 1px solid var(--line); }
.hbars.pairs th:nth-child(2), .hbars.pairs td:nth-child(2) { text-align: right; }

/* Podział zwycięstw: jeden pasek z trzema odcinkami. */
.stack { margin: 12px 0 0; }
.stack tbody tr, .stack tbody tr:nth-child(odd) { background: transparent; }
.stack td.seg {
  padding: 6px 0; text-align: center; font-size: 12px; font-weight: bold;
  color: #000; border-bottom: none; overflow: hidden; white-space: nowrap;
}
.stack td.seg.host { background: var(--green); }
.stack td.seg.draw { background: var(--muted); }
.stack td.seg.guest { background: var(--red); }
.stack td.seg.m3, .legend .swatch.m3 { background: var(--gold); }
.stack td.seg.m2, .legend .swatch.m2 { background: var(--orange); }
.stack td.seg.m1, .legend .swatch.m1 { background: var(--violet); }
.stack + .legend + .stack { margin-top: 4px; }
.facts td.pts small { color: var(--muted); font-weight: normal; font-size: 11px; }

/* Lista faktów: etykieta po lewej, liczba po prawej. */
.facts td.label { text-align: left; color: var(--text); font-size: 12px; letter-spacing: 1px; }
.facts td:nth-child(2) { text-align: right; }

/* Mapa ciepła: dzień tygodnia × godzina. */
.heat { table-layout: fixed; }
.heat th { padding: 4px 0; font-size: 9px; text-align: center; background: transparent; color: var(--muted); }
.heat tbody th { text-align: right; padding-right: 6px; width: 30px; font-size: 11px; letter-spacing: 1px; }
.heat td { padding: 0; height: 18px; border: 1px solid var(--row-alt); }
.heat td[data-tip] { cursor: default; }
.heat .heat-0 { background: #0a121c; }
.heat .heat-1 { background: #133a3c; }
.heat .heat-2 { background: #176054; }
.heat .heat-3 { background: #1f8a6e; }
.heat .heat-4 { background: #35b78f; }
.heat .heat-5 { background: var(--green); }

/* Poniżej progu dwóch kolumn kart (720 px) wszystko, co jest kafelkiem albo
   osią, robi się zwarte: ten sam próg co układ, żeby szeroki telefon nie dostał
   jednokolumnowych kart z pełnowymiarowymi kaflami. */
@media (max-width: 719px) {
  .insights { padding: 8px; }
  .rating-leaderboard-grid { grid-template-columns: 1fr; gap: 16px; }
  /* Kafelki na telefonie: dwie kolumny, mniejsze liczby — sześć kafelków w
     pełnym rozmiarze zajmowałoby cały ekran, zanim pokaże się pierwszy wykres. */
  .insights .insight-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .insights .insight-tiles .chip { min-width: 0; padding: 6px 8px; box-shadow: 2px 2px 0 #000; }
  .insights .insight-tiles .chip b { font-size: 20px; }
  .insights .insight-tiles .chip b.chip-text { font-size: 13px; }
  .insights .insight-tiles .chip > span { font-size: 10px; letter-spacing: 0.5px; }
  .insights .insight-tiles .chip .chip-delta { font-size: 10px; }
  .bars.hours .bar-value { display: none; }
  /* Co drugi podpis: 12 dat i 24 godziny nie mieszczą się na szerokości telefonu. */
  .bars.weeks td:nth-child(even) .bar-label,
  .heat thead th:nth-child(odd) { color: transparent; }
  .hbars .bar-cell { width: 28%; }
}

.bars.rates .bar-fill { background: var(--blue); }
.bars.rates.passing .bar-fill { background: var(--green); }
.bars.rates .bar-label { font-size: 10px; letter-spacing: 0; }
.hbars.passers .hbar-fill { background: var(--green); }
.hbars.passers td.name { font-size: 13px; }

/* Światło na wykresach podkreśla bryłę słupków, nie zmieniając ich barw
   znaczeniowych (drużyny, pory dnia, wyniki i natężenie mapy). */
.insight .bar-fill {
  background-image: linear-gradient(180deg, #ffffff55, #ffffff0b 48%, #00000025);
}
.insight .hbar-fill {
  background-image: linear-gradient(90deg, #ffffff48, #ffffff08 58%, #00000025);
}
.insight .stack td.seg {
  background-image: linear-gradient(180deg, #ffffff40, #ffffff05 50%, #00000020);
}
.insight .heat td {
  background-image: linear-gradient(135deg, #ffffff14, transparent 70%);
}
.insight .hbars tbody tr:nth-child(odd),
.insight .facts tbody tr:nth-child(odd) {
  background: linear-gradient(90deg, #173247, #102637);
}
.insight .hbars tbody tr:nth-child(even),
.insight .facts tbody tr:nth-child(even) {
  background: linear-gradient(90deg, #1b394e, #12293a);
}
