@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --page: #f2f5f9;
  --navy: #1d3557;
  --navy-2: #2b5086;
  --zebra: #eef3f9;
  --hover: #ffe8d4;
  --ink: #15171a;
  --muted: #566070;
  --faint: #9aa0a8;
  --line: #e6e8eb;
  --line-strong: #cfd3d8;
  --wash: #f6f7f8;
  --brand: #e8590c;
  --brand-wash: #fff4ec;
  --accent: #1f5fd1;
  --accent-ink: #174aa5;
  --win: #178043;
  --loss: #c0392b;
  --top: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--wash); padding: 1px 5px; border-radius: 4px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--top);
  /* Same column as the page below: on a wide screen the menu starts where the content starts. */
  padding: 0 max(24px, calc((100% - 1360px) / 2 + 24px));
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-logo { display: block; flex: none; }
.brand-mark { font-weight: 750; letter-spacing: 0.02em; color: var(--navy); }
.brand-text { color: var(--muted); }
.nav { display: flex; gap: 2px; align-self: stretch; align-items: stretch; }
.nav-split { align-self: center; width: 1px; height: 16px; margin: 0 8px; background: var(--line-strong); }
.topnav { position: relative; color: #2b3645; font-weight: 500; padding: 18px 10px; }
.topnav:hover { color: var(--brand); text-decoration: none; }
.topnav[aria-current="page"] { color: var(--ink); font-weight: 600; }
.topnav[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--brand); }
.search { position: relative; flex: 1; max-width: 380px; margin-left: auto; }
.search input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 11px;
  background: var(--bg);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: auto;
  max-height: 360px;
}
.search-results a { display: block; padding: 8px 12px; color: var(--ink); }
.search-results a:hover { background: var(--wash); text-decoration: none; }
.search-results small { display: block; color: var(--muted); }

main { max-width: 1360px; margin: 0 auto; padding: 32px 24px 72px; }
.foot { background: var(--navy); color: rgba(255, 255, 255, 0.72); font-size: 0.86rem; margin-top: 48px; }
.foot-in { max-width: 1360px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; }
.foot-note { margin: 0; }
.foot-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; }
.foot-k { color: #fff; font-weight: 650; }
.foot-src a { color: #ffd2b0; text-decoration: none; }
.foot-src a:hover { color: #fff; }
.foot-status { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.foot .updated { margin: 0; color: #fff; font-weight: 600; white-space: nowrap; }
.foot-dev { white-space: normal; }

/* Home hero */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.6rem; max-width: 18ch; margin-bottom: 10px; }
.hero .lede { font-size: 1.05rem; margin-bottom: 20px; }
.hero-search { display: flex; align-items: stretch; gap: 8px; max-width: 640px; margin: 0 0 16px; }
.hero-search input {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 13px 16px;
  font-size: 1.05rem;
  border-radius: 8px;
  border-width: 2px;
  border-color: var(--ink);
  color: var(--ink);
  caret-color: var(--ink);
}
.hero-search input::placeholder { color: #6d7580; opacity: 1; }
.hero-search input:focus { outline: 3px solid var(--brand-wash); border-color: var(--brand); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 0.98rem; font-weight: 650; }
body[data-page="home"] .top .search { visibility: hidden; }

/* Type */
h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.03em; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
h3 { font-size: 0.95rem; margin: 0 0 8px; }
.lede { margin: 0 0 8px; color: var(--muted); max-width: 64ch; }
.note { color: var(--muted); font-size: 0.86rem; }
p.note { margin: 8px 0 0; }

.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head h2, .block-title { border-left: 4px solid var(--brand); padding-left: 10px; line-height: 1.2; }
.block-title { font-size: 1.15rem; margin: 32px 0 12px; }
.section-head a { font-size: 0.9rem; }

.crumb { color: var(--muted); font-size: 0.86rem; margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--ink); }
.title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.title-row h1 { margin-bottom: 0; }

/* Status: plain text, no pills */
.pill { color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.pill::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--faint); vertical-align: 0.08em; }
.pill.done::before { background: var(--win); }
.pill:not(.done):not(.partial):not(.plain)::before { background: var(--brand); }
.pill.partial::before { background: #d4a017; }
.pill.plain::before { background: var(--line-strong); }

/* Tables: horizontal rules only */
.table-wrap { width: fit-content; max-width: 100%; overflow-x: auto; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #c5ccd6; border-radius: 4px; }
table.data { width: auto; max-width: 100%; min-width: 0; border-collapse: collapse; font-size: 0.94rem; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td[rowspan] { vertical-align: top; font-weight: 650; }
table.data .emph { font-weight: 700; }
table.data th {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 0;
  white-space: normal;
  line-height: 1.25;
}
table.data td.num, table.data th.num { white-space: nowrap; }
table.data td[data-sort] { white-space: nowrap; }
table.data th.sortable:hover { color: #fff; }
table.data th[aria-sort="descending"]::after { content: " ↓"; }
table.data th[aria-sort="ascending"]::after { content: " ↑"; }
table.data tbody tr { background: var(--bg); }
table.data tbody tr:nth-child(even) { background: var(--zebra); }
table.data.by-year tbody tr:nth-child(even) { background: var(--bg); }
table.data.by-year tbody tr.band { background: var(--zebra); }
table.data tbody tr:hover,
table.data.by-year tbody tr.band:hover { background: var(--hover); }
table.data a { color: inherit; }
table.data td b,
table.data td b a { font-weight: 700; }
table.data td.team a, table.data td:first-child a { color: var(--ink); }
table.data a:hover { color: var(--accent); text-decoration: underline; }
.num, table.data td.num, table.data th.num { text-align: center; font-variant-numeric: tabular-nums; }
.team { font-weight: 550; }
.rank-1 td.team { color: var(--ink); }
.rank-1 td:first-child { font-weight: 700; color: var(--brand); }
table.data tbody tr.rank-1 { background: var(--brand-wash); }

/* Controls: views are tabs, filters are labelled fields */
.filters, .seg {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 22px 0 28px;
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
  scrollbar-width: none;
}
.filters button, .seg button {
  flex: none;
  margin-bottom: -1px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  color: #2b3645;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.filters button:hover, .seg button:hover { color: var(--ink); background: none; }
.filters button:disabled { opacity: 0.38; cursor: default; }
.filters button:disabled:hover { color: #2b3645; }
.filters button[aria-pressed="true"], .seg button[aria-pressed="true"] {
  background: none;
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--brand);
}
.seg { margin-bottom: 40px; }
.toolbar .seg { margin: 0; border-bottom: 0; }
.toolbar .seg button { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 6px; margin: 0; }
.toolbar .seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 16px 0 14px; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.field select, .field input { color: var(--ink); font-size: 0.94rem; font-weight: 400; }
.page-head .field { color: rgba(255, 255, 255, 0.72); }
select, .toolbar input[type="search"] {
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 6px;
  padding: 7px 10px;
}
select { min-width: min(100%, 300px); }
.toolbar input[type="search"] { min-width: 200px; }
select:focus, .toolbar input:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: -1px; }

/* Key figures: label on top, value, explanation underneath */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px 28px;
  margin: 18px 0 14px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.stat { min-width: 0; }
.stat .k { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; margin-top: 3px; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.stat small { display: block; margin-top: 3px; font-size: 0.8rem; color: var(--muted); }

.swatch {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  vertical-align: -0.05em;
}
.swatch.w { background: #fff; }
.swatch.b { background: var(--ink); }

/* Team squad: white and black share of this team's games. --w is the white slice. */
.color-bal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.color-pie {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: conic-gradient(#fff 0 var(--w, 50%), var(--ink) var(--w, 50%) 100%);
  flex: none;
}
.color-bal-k { font-variant-numeric: tabular-nums; }
table.data td.kleur, table.data th.kleur { text-align: center; white-space: nowrap; padding-left: 8px; padding-right: 8px; }

/* Cross table */
.cross { font-size: 0.82rem; }
.cross td, .cross th { text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.cross td.team, .cross th.team { text-align: left; position: sticky; left: 0; background: inherit; }
.cross th.team { background: var(--navy); }
.cross .self { color: var(--faint); }
.pos { color: var(--win); font-weight: 600; }
.neg { color: var(--loss); }
.win, table.data a.win { color: var(--win); font-weight: 650; }
.loss, table.data a.loss { color: var(--loss); }
.draw { color: var(--ink); }
.pending { color: var(--faint); }

/* Result right after the teams */
.res { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 4px; background: var(--brand-wash); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res.pending { background: transparent; color: var(--faint); font-weight: 500; padding: 1px 4px; }
.res.win { background: #dff3e4; color: var(--win); }
.res.loss { background: #fbe1df; color: var(--loss); }
.winner { font-weight: 650; }
.round-block { margin-top: 24px; }
.round-block .block-title { margin: 0 0 8px; }

/* Side column (no panel box) */
.two { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.panel h3 { margin: 0 0 8px; font-size: 1.1rem; }
.panel ol, .panel ul { margin: 0; padding-left: 18px; }
.panel li { margin: 6px 0; }
.panel li a { color: var(--ink); }
.panel li a:hover { color: var(--accent); }
.two > .panel { border-top: 2px solid var(--ink); padding-top: 12px; }

.menu-btn { display: none; }
@media (max-width: 860px) {
  .top { position: sticky; flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    order: 2;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    font-weight: 650;
    cursor: pointer;
  }
  .menu-ico { width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; margin: 0; }
  .nav.open { display: flex; padding-top: 4px; border-top: 1px solid var(--line); }
  .nav.open .nav-split { display: none; }
  .nav.open .topnav { padding: 12px 16px 12px 22px; }
  .nav.open .topnav[aria-current="page"]::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; }
  .hero h1 { font-size: 1.9rem; }
  .search { order: 4; max-width: none; flex-basis: 100%; margin: 0; }
  body[data-page="home"] .top .search { display: none; }
  .two { gap: 24px; }
  h1 { font-size: 1.6rem; }
  main { padding: 20px 14px 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Header band (detail pages and hero) */
.page-head, .hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-radius: 12px;
  padding: 22px 28px 24px;
  margin-bottom: 8px;
}
.page-head h1, .hero h1 { color: #fff; }
.page-head .crumb, .page-head .crumb a { color: rgba(255, 255, 255, 0.68); }
.page-head .crumb a:hover { color: #fff; text-decoration: underline; }
.page-head .lede, .page-head .meta { color: rgba(255, 255, 255, 0.78); margin: 6px 0 0; }
.page-head .meta .pill { color: inherit; }
.page-head a:not(.chip):not(.topnav) { color: #ffd2ad; }
.chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 6px;
  color: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
}
.chip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none; }
.page-head .toolbar { margin: 18px 0 0; }
.page-head select { border-color: transparent; color: var(--ink); }
.page-head .stats {
  margin: 22px 0 0;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 10px;
}
.page-head .stat .k { color: rgba(255, 255, 255, 0.8); }
.page-head .stat b { color: #fff; }
.page-head .stat small { color: rgba(255, 255, 255, 0.72); }
.page-head .stat.pos b { color: #8fe3ae; }
.page-head .stat.neg b { color: #ffaaa4; }
.hero { padding: 36px 32px 32px; margin-top: 4px; }
.hero .lede { color: rgba(255, 255, 255, 0.8); }
.hero .quick a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}
.hero .quick a:hover { background: var(--brand); color: #fff; text-decoration: none; }
#live-board .card-body { padding-top: 18px; }
.home-board .live-round-title { margin: 0 0 4px; font-size: 1.05rem; }
.home-board .live-round-title a { color: var(--navy); }
.home-board .live-matches { list-style: none; margin: 0; padding: 0; }
.home-board .live-matches a { display: block; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.home-board .live-matches a:hover { color: var(--accent); }
.hero-search input { background: #fff; border: 0; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); color: var(--ink); caret-color: var(--ink); }
.hero-search input:focus { outline: 3px solid var(--brand); outline-offset: 0; }

/* Data-driven colour */
.pct { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pn { min-width: 3.7em; text-align: right; font-variant-numeric: tabular-nums; }
.pbar { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: #dbe3ee; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 3px; }
.pbar.up i { background: #2f9e5b; }
.pbar.down i { background: #d9534f; }

/* Rating chart */

/* Headings: one level per role */
h3.block-title { border-left: 0; padding-left: 0; font-size: 1rem; margin: 22px 0 8px; color: var(--navy); }
.view-title { margin: 20px 0 8px; }
.view-title + .toolbar { margin-top: 8px; }
.view-title + .note { margin-top: 0; }

/* Class strip: every class one click away */
.classnav { display: flex; gap: 12px; align-items: baseline; margin: 18px 0 0; }
.cn-label { flex: none; width: 44px; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.cn-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cn-group { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cn { min-width: 36px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 0.88rem; text-align: center; white-space: nowrap; }
.cn:hover { border-color: var(--navy-2); background: var(--wash); text-decoration: none; color: var(--ink); }
.cn.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.classnav + .seg { margin-top: 16px; }

/* Season stepper: ‹ 2025-2026 › */
.stepper { display: flex; align-items: stretch; gap: 4px; }
.stepper select { min-width: 150px; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 36px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 1.3rem; line-height: 1; }
.step:hover { background: rgba(255, 255, 255, 0.3); color: #fff; text-decoration: none; }
.step.off { opacity: 0.3; }
.class-title { margin: 24px 0 0; font-size: 1.25rem; color: var(--ink); }
.class-title + .seg { margin-top: 8px; }
.class-title + #division-body { margin-top: 12px; }
@media (max-width: 860px) {
  .classnav { display: block; }
  .cn-label { display: block; width: auto; margin-bottom: 6px; }
  .cn-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .cn-group { flex-wrap: nowrap; }
}

/* Totals row: the wash is the whole row, edge to edge, including the gaps between columns.
   Dark figures. The score bar and W−We keep their own colours. */
table.data tfoot,
table.data tfoot tr,
table.data tfoot td { background: var(--brand-wash); }
table.data tfoot td { padding: 10px 12px; border-top: 2px solid var(--navy); font-weight: 650; color: var(--ink); }
table.data tfoot td.pos { color: var(--win); }
table.data tfoot td.neg { color: var(--loss); }
table.data tfoot small { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 500; color: var(--muted); }

/* Chart panel: one place for all charts, tabs choose the chart */
.chart-panel { position: relative; margin: 28px 0 8px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 20px 12px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.chart-head .block-title { margin: 0; }
.chart-tabs { margin: 0; border-bottom: 0; }
.chart-view svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.chart-view .note { margin: 4px 0 4px; }
.chart-view[hidden] { display: none; }
.chart .cg, .chart-view .cg { stroke: #e6ebf2; stroke-width: 1; }
.chart-view .cg.v { stroke: #f0f3f8; }
.chart-view .ct { fill: var(--muted); font-size: 15px; }
.chart-view .ca { fill: var(--brand); opacity: 0.12; }
.chart-view .cl { fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-view .cd { fill: #fff; stroke: var(--navy); stroke-width: 2.5; pointer-events: none; }
.chart-view .cm { fill: var(--ink); font-size: 14px; font-weight: 700; pointer-events: none; }
.chart-view .hit { fill: transparent; }
.chart-view circle.hit:hover { fill: rgba(232, 89, 12, 0.18); }
.chart-view rect.hit:hover { fill: rgba(31, 53, 87, 0.07); }
.chart-view .bar { fill: var(--navy); opacity: 0.88; }
.chart-view .bar.up { fill: #2f8f55; }
.chart-view .bar.down { fill: #c0392b; }
.ctip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy); color: #fff; font-size: 0.86rem; font-weight: 600; padding: 6px 10px; border-radius: 6px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.ctip[hidden] { display: none; }

/* Round-by-round result cells */
table.data td.rr { text-align: center; font-variant-numeric: tabular-nums; min-width: 34px; padding-left: 6px; padding-right: 6px; }
table.data td.rr.w { color: var(--win); font-weight: 700; }
table.data td.rr.l { color: var(--loss); }
table.data td.rr.d { color: var(--ink); }
table.data td.rr.none { color: var(--faint); }
table.data td.rr small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 500; }
table.data th.rr { text-align: center; min-width: 34px; padding-left: 6px; padding-right: 6px; }

/* Team page: in-page navigation, section heads, light stepper */
.jump { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 16px 0 0; padding: 8px 10px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
.anchor { scroll-margin-top: 72px; }
.section-head.stacked { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; }
button.step { border: 0; padding: 0; cursor: pointer; font: inherit; }
.jump-label { margin: 0 8px 0 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.jump a { padding: 6px 12px; border-radius: 6px; color: var(--ink); font-size: 0.92rem; font-weight: 500; }
.jump a:hover { background: var(--brand-wash); color: var(--ink); text-decoration: none; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.section-head .block-title { margin-bottom: 0; }
.kind-tabs { margin: 0; }
.kind-tabs .count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 10px; background: var(--wash); color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.kind-table[hidden] { display: none; }
.stepper.light .step { background: var(--navy); color: #fff; }
.stepper.light .step:hover { background: var(--navy-2); }
.stepper.light .step.off { opacity: 0.25; pointer-events: none; }
.pager { margin: 12px 0 4px; }
.pager span { display: inline-flex; align-items: center; padding: 0 6px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Chart extras */
.chart-view .cband { fill: #f3f6fb; }
.chart-view .gapband { fill: #eceff4; stroke: #d9dee7; stroke-dasharray: 4 4; }
.chart-view .cgap { fill: #8a93a3; font-size: 13px; font-style: italic; pointer-events: none; }
.chart-view .cl.dash { stroke-dasharray: 7 7; opacity: 0.55; stroke-width: 2.5; }
.chart-view .cd.multi { stroke: var(--brand); stroke-width: 4.5; }
.chart-view .cm.s { font-size: 13px; font-weight: 600; fill: var(--navy); }
@media (max-width: 860px) { .jump { position: static; } }

/* Team card: groups, badge, secondary lines */
.stat-groups { display: grid; gap: 10px; margin-top: 22px; }
.stat-group { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 8px 24px; padding: 14px 22px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); }
.group-title { margin: 0 0 4px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.stat-group .group-title { margin: 0; }
.stat-group .group-title span { display: block; margin: 3px 0 0; }
.group-title span { margin-left: 6px; letter-spacing: 0; text-transform: none; font-weight: 500; color: rgba(255, 255, 255, 0.65); }
.page-head .stat-group .stats { margin: 0; padding: 0; border: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; background: none; }
.club-box { margin-top: 10px; padding: 14px 22px 16px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); }
.club-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.page-head .club-links a { padding: 8px 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1rem; font-weight: 550; }
.page-head .club-links a:hover { background: rgba(255, 255, 255, 0.26); text-decoration: none; }
.meta-k { display: inline-block; margin-right: 6px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 0.92rem; font-weight: 600; }
.badge.gold { background: #f5c451; color: #3d2b00; }
.badge.gold b { margin-left: 4px; }
.badge-years { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); }
@media (max-width: 860px) { .stat-group { grid-template-columns: 1fr; } .page-head .stat-group .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.btn { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--navy-2); background: var(--wash); }
.btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.view-tabs { margin: 18px 0 14px; }

#stat-tabs, #live-tabs {
  display: grid;
  width: fit-content;
  max-width: 100%;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: start;
  justify-items: start;
  gap: 0 4px;
  overflow: visible;
  border-bottom: 0;
  margin: 18px 0 20px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}
#stat-tabs button, #live-tabs button {
  width: max-content;
  margin: 0;
  padding: 7px 16px;
  border: 0;
  border-radius: 6px;
  text-align: left;
  background: none;
}
#stat-tabs button:hover, #live-tabs button:hover { background: var(--wash); color: var(--ink); }
#stat-tabs button[aria-pressed="true"], #live-tabs button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  font-weight: 650;
  border-bottom-color: transparent;
}

/* Bars: games (light) with points (dark) inside */
.chart-view .bar.games { fill: #d5deee; opacity: 1; }
.chart-view .bar.pts { fill: var(--navy); opacity: 1; }
.chart-view .clegend .ct { font-size: 13px; fill: var(--muted); text-anchor: start; }

/* Player page: bigger key figures, full-width tables */
.page-head .stat-group .stats .stat b { font-size: 1.75rem; }
.page-head .stat-group .stats .stat b a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.page-head .stat-group .stats .stat b a:hover { text-decoration: none; border-bottom-color: #fff; }
.stats.detail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 32px; padding: 26px 30px; }
.stats.detail .stat .k { font-size: 0.76rem; }
.stats.detail .stat b { font-size: 2.1rem; margin-top: 6px; }
.stats.detail .stat small { font-size: 0.88rem; margin-top: 5px; }
@media (max-width: 860px) { .stats.detail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-head .stat-group .stats .stat b { overflow-wrap: normal; }
.page-head .stat-group.solo .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .page-head .stat-group.solo .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-head .stat-group.solo { grid-template-columns: 1fr; padding: 18px 24px; }
.page-head .stat-group.solo .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1.1fr); }
.page-head .stat-group.career .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[id^="career-"][id$="-teams"]:not(:empty) { display: block; margin-bottom: 28px; }
.roundup { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.roundup > .block-title { margin: 4px 0 0; }
.table-wrap.titled { display: flex; flex-direction: column; align-items: stretch; width: max-content; max-width: 100%; }
.table-title {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  background: var(--wash);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
}
.game-q { width: min(360px, 100%); padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; background: #fff; }
#player-kind.seg { margin: 18px 0 8px; }
.page-head .stat-group.career .stats + .stats { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
#p-games-competitie, [id^="p-games-"] {
  margin-top: 28px;
  margin-bottom: 8px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
[id^="p-games-"] .game-q { margin-left: 0; margin-right: auto; }
.game-count { margin: 4px 0 8px; min-height: 1.2em; }
.stats.detail .stat b { font-size: 1.9rem; white-space: nowrap; }
.team-groups .stat-group.solo .stats { grid-template-columns: 1.25fr 1.6fr 1.35fr 0.8fr 1fr; gap: 12px 16px; }
.team-groups .stat-group.solo .stats .stat b { font-size: 1.5rem; }
@media (max-width: 860px) { .team-groups .stat-group.solo .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.classnav.picker { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; }
.classnav.picker .stepper { flex: 1; min-width: 0; }
.classnav.picker select { min-width: 220px; max-width: 420px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; background: #fff; }
#earlier-meetings { margin-top: 36px; }
#earlier-meetings .meeting-kind h3.block-title { margin: 16px 0 2px; }
#earlier-meetings .meeting-kind:first-of-type h3.block-title { margin-top: 0; }
#earlier-meetings .meeting-tally {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 16px;
  margin: 2px 0 10px;
  max-width: 720px;
}
#earlier-meetings .meeting-tally .mt-team,
#earlier-meetings .meeting-tally .mt-draw {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
#earlier-meetings .meeting-tally .mt-team:last-child { justify-content: flex-end; }
#earlier-meetings .meeting-tally .k {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.25;
}
#earlier-meetings .meeting-tally b {
  flex: none;
  font-size: 1.45rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
#earlier-meetings .meeting-tally .mt-draw { gap: 6px; }
#earlier-meetings .meeting-tally .mt-draw .k {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  #earlier-meetings .meeting-tally { column-gap: 10px; }
  #earlier-meetings .meeting-tally b { font-size: 1.2rem; }
  #earlier-meetings .meeting-tally .k { font-size: 0.82rem; }
}
#next-round { margin-top: 28px; }
#next-round:empty { display: none; }
.page-head h1 a { color: #fff; }
.page-head h1 a:hover { text-decoration: underline; }
.page-head h1 a:not(.chip):not(.topnav) { color: #fff; }

.match-groups .stat-group.solo .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-head h1 .res-big { display: inline-block; margin-left: 10px; padding: 2px 14px; border-radius: 10px; background: rgba(255,255,255,0.16); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.match-table td.emph { white-space: nowrap; }
table.match-table thead tr.side-names th { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; text-transform: none; color: #fff; text-align: center; padding: 12px 14px 2px; }
table.match-table thead tr.side-names th.home,
table.match-table thead tr.side-names + tr th.home,
table.match-table td.to-center { text-align: right; }
table.match-table thead tr.side-names th.away { text-align: left; }
table.match-table thead tr.side-names th.versus { padding-left: 10px; padding-right: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* A line between the team match (names and score) and the column heads of its boards. */
table.match-table thead tr.side-names th { padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
table.match-table thead tr.side-names + tr th { padding-top: 8px; }
table.match-table thead tr.side-names th a { color: #fff; }
table.match-table thead tr.side-names th a:hover { text-decoration: underline; }
table.match-table thead tr.side-names + tr th { padding-top: 4px; padding-bottom: 8px; font-size: 0.68rem; }
@media (min-width: 861px) {
  .round-block:has(table.match-table) { margin-top: 32px; }
  .table-wrap:has(table.match-table) {
    width: min(100%, 920px);
    margin-top: 8px;
    margin-bottom: 8px;
    box-shadow: 0 10px 24px rgba(20, 33, 61, 0.08);
  }
  table.match-table { width: 100%; table-layout: fixed; }
  table.match-table col.c-board { width: 3.4rem; }
  table.match-table col.c-rating { width: 4.6rem; }
  table.match-table col.c-swatch { width: 2.4rem; }
  table.match-table col.c-score { width: 5.4rem; }
  table.match-table tbody td:nth-child(3),
  table.match-table tbody td:nth-child(7) { white-space: normal; }
}

.round-pair { display: grid; gap: 8px 28px; align-items: start; }
.round-pair .block-title { margin-top: 8px; }
@media (min-width: 861px) {
  /* Played round keeps the room it needs. The next round sits beside it, capped, and does not take half the page. */
  /* Last and next round: two panels of one fixed width, with clear room between them. */
  .round-pair { grid-template-columns: minmax(0, 27rem); justify-content: start; }
  .round-pair.pair { grid-template-columns: repeat(2, minmax(0, 27rem)); column-gap: 120px; }
}
.home-board h3.block-title { margin-top: 22px; }
.home-board .note { max-width: 70ch; }

.home-board .stepper button.step { border: 0; padding: 0; cursor: pointer; }

@media (max-width: 860px) {
  .page-head, .hero { padding: 18px 16px 20px; }
  .hero { padding: 22px 16px 20px; }
  .anchor { scroll-margin-top: 120px; }
  .page-head .stat-group,
  .page-head .stat-group.solo { padding: 14px 12px; }
  .page-head .stat-group .stats,
  .page-head .stat-group.solo .stats,
  .page-head .stat-group.career .stats,
  .stats.detail,
  .team-groups .stat-group.solo .stats,
  .match-groups .stat-group.solo .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.detail .stat b,
  .page-head .stat-group .stats .stat b { white-space: normal; overflow-wrap: break-word; font-size: 1.2rem; }
  .jump a { display: inline-flex; align-items: center; min-height: 40px; }
  button.step, a.step { width: 44px; min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  select, .toolbar input[type="search"], .game-q, .hero-search input, .search input { min-height: 44px; }
  #stat-tabs, #live-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  #stat-tabs button, #live-tabs button { width: 100%; min-height: 38px; padding: 6px 8px; font-size: 0.92rem; text-align: center; white-space: normal; line-height: 1.2; }
  #stat-tabs, #live-tabs { padding: 4px; gap: 2px; margin: 14px 0 16px; }
  .filters, .seg { flex-wrap: wrap; overflow: visible; max-width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .field, .toolbar .stepper, .classnav.picker { width: 100%; min-width: 0; }
  .classnav.picker { flex-wrap: wrap; }
  .classnav.picker select { flex: 1; }
  .toolbar .field select, .toolbar .field input, .toolbar select, .toolbar input[type="search"],
  .stepper, .stepper select, .classnav.picker select, .game-q { width: 100%; min-width: 0; max-width: 100%; }
  .toolbar .seg, .seg { width: 100%; }
  .seg button { flex: 1; text-align: center; }
  .hero-search { width: 100%; }
  .table-wrap { width: 100%; }
  table.data { width: 100%; max-width: none; }
  table.data th, table.data td { white-space: nowrap; }
  table.data th:first-child, table.data td:first-child { white-space: normal; }
  table.data:not(.cross):not(.match-table) th:first-child,
  table.data:not(.cross):not(.match-table) td:first-child { position: sticky; left: 0; z-index: 1; background: inherit; }
  table.data:not(.cross):not(.match-table) tfoot td,
  table.data:not(.cross):not(.match-table) tfoot td:first-child { background: var(--brand-wash); }
  table.data:not(.cross):not(.match-table) th:first-child { background: var(--navy); z-index: 2; }
  .cross td.team, .cross th.team { position: sticky; left: 0; z-index: 1; background: inherit; }
  .cross th.team { background: var(--navy); }
  table.match-table, .table-wrap:has(table.match-table) { width: 100%; min-width: 0; overflow: visible; }
  table.match-table thead tr:not(.side-names) { display: none; }
  table.match-table thead tr.side-names { display: flex; justify-content: space-between; gap: 12px; background: var(--navy); }
  table.match-table thead tr.side-names th { display: none; }
  table.match-table thead tr.side-names th.home,
  table.match-table thead tr.side-names th.versus,
  table.match-table thead tr.side-names th.away { display: block; padding: 10px 12px; text-align: left; border-bottom: 0; }
  table.match-table thead tr.side-names th.versus { padding: 10px 0; flex: none; }
  table.match-table thead tr.side-names th.away { text-align: right; }
  /* One row per board, mirrored: home player left, result in the middle, away player right;
     rating and colour small under each name. No board number: the order says it. */
  table.match-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 8px 12px;
  }
  table.match-table tbody td { display: block; border: 0; padding: 0; white-space: nowrap; }
  table.match-table tbody td:nth-child(1) { display: none; }
  table.match-table tbody td:nth-child(3) { grid-column: 1; grid-row: 1; align-self: end; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  table.match-table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; justify-self: end; margin-right: 18px; font-size: 0.78rem; color: var(--muted); }
  table.match-table tbody td:nth-child(4) { grid-column: 1; grid-row: 2; justify-self: end; align-self: center; line-height: 0; }
  table.match-table tbody td:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; text-align: center; min-width: 2.8em; }
  table.match-table tbody td:nth-child(7) { grid-column: 3; grid-row: 1; align-self: end; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  table.match-table tbody td:nth-child(8) { grid-column: 3; grid-row: 2; justify-self: start; margin-left: 18px; font-size: 0.78rem; color: var(--muted); }
  table.match-table tbody td:nth-child(6) { grid-column: 3; grid-row: 2; justify-self: start; align-self: center; line-height: 0; }
  table.match-table tfoot tr { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: var(--brand-wash); border-top: 2px solid var(--navy); }
  table.match-table tfoot td { display: block; border: 0; padding: 0; background: var(--brand-wash); }
  table.match-table tfoot td:empty { display: none; }
}

.round-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 22px; }
.round-strip .rn { min-width: 36px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 0.88rem; text-align: center; white-space: nowrap; }
.round-strip .rn:hover { border-color: var(--navy-2); background: var(--wash); text-decoration: none; color: var(--ink); }
.round-strip .rn.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.round-strip .rn.next { border-color: var(--brand); }
.page-head .next-match { margin: 16px 0 0; color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; }
.programme { margin-top: 8px; }
.programme .section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
table.data tbody tr.next-row { background: #fff6ec; }
.stats.career { margin: 8px 0 18px; }

/* Last and next match in the team header */
.page-head .next-match + .next-match { margin-top: 6px; }
.page-head .next-match .nm-k { color: rgba(255, 255, 255, 0.72); }
.page-head .next-match .res { margin-left: 6px; }
table.data td.nowrap { white-space: nowrap; }

@media (max-width: 860px) {
  /* Tighter cells, so standings (# team MP BP W R V) fit a phone without sideways scrolling. */
  table.data th, table.data td { padding: 8px 7px; }
  table.data th:first-child, table.data td:first-child { padding-left: 10px; }
  /* Season spans ("2025-2026") must not break at the hyphen. */
  table.data.by-year td:first-child { white-space: nowrap; }
  /* Team names may wrap; numbers stay on one line. */
  table.data td.team { white-space: normal; min-width: 8em; }
  #earlier-meetings table.data td:nth-child(2) { white-space: normal; min-width: 11em; }
  /* "Home – Away" cells wrap, so the score next to them stays on screen. */
  table.data td.teams { white-space: normal; min-width: 7.5em; }
  .page-head h1 .res-big { display: table; margin: 8px 0 0; }
  /* Team programme: the match wraps, so date and result stay on screen. */
  .programme table.data td:nth-child(3) { white-space: normal; min-width: 8em; }
  /* Key figures: hyphenate long words (Meesterklasse) instead of breaking anywhere. */
  .page-head .stat b, .stats.career .stat b { overflow-wrap: normal; hyphens: auto; }
  .stats.career .stat b { font-size: 1.25rem; }
  .team-groups .stat-group.solo .stats .stat b { font-size: 1.2rem; }
  /* Club links: chips, not big buttons, so the programme is closer to the top. */
  .page-head .club-links { gap: 6px; }
  .page-head .club-links a { padding: 5px 10px; font-size: 0.9rem; }
}

/* Own team in a standings table */
table.data tbody tr.own { background: #ffefdc; }
table.data tbody tr.own td { font-weight: 700; }
table.data tbody tr.own:hover { background: var(--hover); }

/* Team page: standings and programme side by side when there is room */
.team-now { display: grid; gap: 28px; align-items: start; }
.team-now .section-head h2 { font-size: 1.15rem; }
.team-now .table-wrap { margin-top: 10px; }
@media (min-width: 1100px) {
  .team-now { grid-template-columns: repeat(2, max-content); }
}

/* Search icon in the phone header */
.search-btn { display: none; }

/* Scrollable strips and tables fade at the edge that has more content */
.more-right { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32px); mask-image: linear-gradient(to left, transparent 0, #000 32px); }
.more-left:not(.table-wrap) { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px); mask-image: linear-gradient(to right, transparent 0, #000 32px); }
.more-left.more-right:not(.table-wrap) {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

@media (max-width: 860px) {
  .search-btn {
    display: inline-flex;
    order: 1;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
  }
  .search-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
  .top .search { display: none; }
  .top.searching .search { display: block; }
  body[data-page="home"] .search-btn { display: none; }

  /* Views and rounds: one row that scrolls sideways, not three rows of buttons. */
  .seg:not(.toolbar .seg):not(#player-kind),
  .filters:not(#stat-tabs):not(#live-tabs) { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .seg:not(.toolbar .seg):not(#player-kind) button,
  .filters:not(#stat-tabs):not(#live-tabs) button { flex: 1 0 auto; }
  .seg::-webkit-scrollbar, .filters::-webkit-scrollbar, .round-strip::-webkit-scrollbar { display: none; }
  .round-strip { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .round-strip .rn { flex: none; min-height: 40px; display: inline-flex; align-items: center; }

  /* Standings: rank and team stay pinned while the numbers scroll. */
  table.standings th:first-child, table.standings td:first-child { width: 2.4rem; min-width: 2.4rem; max-width: 2.4rem; box-sizing: border-box; padding-left: 6px; padding-right: 4px; }
  table.standings th:nth-child(2), table.standings td:nth-child(2) { position: sticky; left: 2.4rem; z-index: 1; background: inherit; }
  table.standings th:nth-child(2) { background: var(--navy); z-index: 2; }
}
.team-now .programme { margin-top: 0; }

/* Team page top: one line of facts in the header, then the last and next match */
.page-head .team-facts { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 4px; margin: 10px 0 0; font-size: 1rem; color: rgba(255, 255, 255, 0.82); }
.page-head .team-facts span + span::before { content: "·"; margin: 0 9px; color: rgba(255, 255, 255, 0.4); }
.page-head .team-facts b { color: #fff; font-weight: 700; }
.page-head .team-facts a:not(.chip) { color: #fff; font-weight: 650; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 3px; }
.match-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; max-width: 820px; margin: 14px 0 0; }
.mcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "k score" "teams score" "when score";
  align-items: center;
  column-gap: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
}
a.mcard:hover { border-color: var(--navy-2); color: var(--ink); text-decoration: none; box-shadow: 0 2px 8px rgba(20, 33, 61, 0.08); }
.mc-k { grid-area: k; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mc-teams { grid-area: teams; margin-top: 2px; font-size: 1rem; line-height: 1.3; }
.mc-when { grid-area: when; margin-top: 2px; font-size: 0.86rem; color: var(--muted); }
.mcard .res { grid-area: score; margin: 0; padding: 4px 10px; font-size: 1.1rem; }
.mcard .res.draw { background: var(--wash); }
.club-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 22px 0 0; }
.club-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.club-row .club-links { margin: 0; gap: 6px; }
.team-aliases { margin: 0 0 6px; color: var(--ink); }
.team-aliases .club-k { margin-right: 6px; }
#t-seasons .badge-years { color: var(--muted); }
#t-seasons .badges { margin-top: 4px; }

/* Header key figures on a phone: compact, so the content starts on the first screen */
@media (max-width: 860px) {
  .page-head h1 { font-size: 1.5rem; }
  .page-head .crumb { margin-bottom: 6px; }
  .page-head .stats, .page-head .stat-group, .page-head .stat-group.solo { padding: 12px 14px; }
  .page-head .stats { gap: 10px 16px; margin-top: 14px; }
  .page-head .stat-group .stats, .page-head .stat-group.solo .stats { padding: 0; }
  .page-head .stat .k { font-size: 0.66rem; }
  .page-head .stat b, .page-head .stat-group .stats .stat b, .team-groups .stat-group.solo .stats .stat b { font-size: 1.15rem; }
  .page-head .stat small { font-size: 0.76rem; }
  .page-head .team-facts { font-size: 0.95rem; }
  .page-head .chip { padding: 5px 10px; font-size: 0.84rem; }
}
@media (max-width: 860px) {
  /* Facts wrap on a phone: spacing instead of dots, so no line starts with a separator. */
  .page-head .team-facts { column-gap: 16px; }
  .page-head .team-facts span + span::before { content: none; }
  .team-now { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  /* Standings on a phone: rank, team, MP and BP. Won/drawn/lost are on the desktop table. */
  table.standings .wgv { display: none; }
}

/* Season header: tabs for every part of one season, plus its players and stats, along the card's bottom edge */
.page-head nav.season-tabs {
  display: flex; gap: 2px; margin: 18px -28px -24px; padding: 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  overflow-x: auto; scrollbar-width: none;
}
.page-head nav.season-tabs::-webkit-scrollbar { display: none; }
.page-head nav.season-tabs a.tab {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 12px;
  border-bottom: 3px solid transparent; color: rgba(255, 255, 255, 0.74);
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
}
.page-head nav.season-tabs a.tab:hover { color: #fff; text-decoration: none; border-bottom-color: rgba(255, 255, 255, 0.35); }
.page-head nav.season-tabs a.tab.on { color: #fff; border-bottom-color: var(--brand); }
.season-head > .head-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; column-gap: 16px; row-gap: 10px; }
.season-head .head-title { flex: 0 1 auto; min-width: 0; }
.season-head .head-title h1 { margin-bottom: 0; }
.season-head .head-pick { flex: 0 0 auto; }
.season-head .head-pick .toolbar { margin: 0; }
.season-head .head-pick .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.season-head .head-pick .stepper select { min-width: 128px; }
.page-head .team-facts .src a:not(.chip) { color: rgba(255, 255, 255, 0.78); font-weight: 500; }
.page-head .team-facts .src a:not(.chip):hover { color: #fff; }
@media (max-width: 860px) {
  .page-head nav.season-tabs { margin: 14px -16px -20px; padding: 0 6px; }
  .page-head nav.season-tabs a.tab { padding: 0 10px; }
  .season-head .head-pick, .season-head .head-pick .toolbar, .season-head .head-pick .field, .season-head .head-pick .stepper { width: auto; }
}

/* Postponed match inside its round */
table.data small.moved { display: block; margin-top: 1px; font-size: 0.78rem; font-weight: 500; color: var(--muted); }

/* One class of a round: its own heading, then its matches. */
.class-groups { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.class-group { max-width: 100%; }
.class-group .block-title { margin: 0 0 8px; font-size: 1.05rem; }
/* As wide as the content, never wider than the screen: names wrap before anything hides on the right. */
table.data.standings,
table.data.leaders { width: auto; }
.table-wrap:has(> table.data.standings),
.table-wrap:has(> table.data.leaders) { width: fit-content; max-width: 100%; }
@media (max-width: 860px) {
  /* Leaders per class on a phone: class, team, MP and BP, like the standings. */
  table.leaders .extra { display: none; }
}

/* Loading: the page on screen stays, dims after a moment, and a thin bar runs along the top */
body.loading #app { opacity: 0.55; pointer-events: none; transition: opacity 0.2s ease 0.15s; }
body.loading::before {
  content: "";
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0, var(--brand) 50%, transparent 100%) no-repeat;
  background-size: 40% 100%;
  animation: knsb-loading 1s linear infinite;
}
@keyframes knsb-loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { body.loading::before { animation: none; background: var(--brand); } }

/* Standings: penalty and zeroed-line markers */
.standings sup.pen { font-size: 0.68em; font-weight: 600; color: var(--loss, #c0392b); margin-left: 2px; vertical-align: super; line-height: 0; }
.standings tr.zeroed td { color: var(--muted); }
.standings tr.zeroed td.team a { color: inherit; }
p.table-note { margin: 8px 2px 0; max-width: 75ch; line-height: 1.45; }

table.game-list td.g-season, table.game-list td.g-date { white-space: nowrap; }
table.game-list td.g-opp .swatch { margin-right: 0.4em; }
table.game-list td.g-line2, table.game-list td.g-line3 { display: none; }

/* Player games on a phone: three lines, with the result alone on the right of line 1.
   1: colour and name (rating), result
   2: date · ronde n · bord n, W-We on the right
   3: season and class · own team – opposing team and the team score (own side first) */
@media (max-width: 860px) {
  table.game-list thead { display: none; }
  table.game-list,
  .table-wrap:has(table.game-list) { width: 100%; min-width: 0; overflow: visible; background: transparent; border: 0; }
  table.data.game-list tbody tr,
  table.data.game-list tbody tr:nth-child(even) {
    display: grid;
    grid-template-columns: minmax(0, max-content) auto minmax(1.6rem, 1fr);
    column-gap: 8px;
    row-gap: 4px;
    align-items: baseline;
    margin: 0 0 14px;
    padding: 12px 12px 14px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
  }
  table.data.game-list:not(.cross):not(.match-table) tbody td {
    display: block;
    position: static;
    left: auto;
    padding: 0;
    border: 0;
    background: none;
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--muted);
  }
  table.game-list tbody td[colspan] { white-space: normal; font-size: 0.95rem; color: var(--ink); }
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-none,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-season,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-date,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-round,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-board,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-team,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-oteam,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-match { display: none; }
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-opp {
    display: flex; align-items: center; gap: 0.35em;
    grid-column: 1; grid-row: 1; min-width: 0; white-space: normal; font-size: 1rem; font-weight: 600; color: var(--ink);
  }
  table.game-list td.g-opp .swatch { margin-right: 0; flex: none; }
  table.game-list td.g-opp a { min-width: 0; }
  table.game-list td.g-rating { grid-column: 2; grid-row: 1; font-weight: 600; color: var(--ink); }
  table.game-list td.g-rating::before { content: "("; font-weight: 600; }
  table.game-list td.g-rating::after { content: ")"; font-weight: 600; }
  table.game-list td.g-score { grid-column: 3; grid-row: 1; justify-self: end; min-width: 1.6em; font-size: 1.05rem; font-weight: 700; text-align: right; color: var(--ink); }
  table.game-list td.g-line2,
  table.game-list td.g-line3 { display: block; grid-column: 1 / -1; padding-left: 1.35rem; }
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-opp,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-line2,
  table.data.game-list:not(.cross):not(.match-table) tbody td.g-line3 { white-space: normal; }
  table.game-list td.g-line2 { grid-row: 2; grid-column: 1 / 3; }
  /* W-We at the end of line 2, under the result. */
  table.game-list td.g-wwe { grid-column: 3; grid-row: 2; justify-self: end; font-weight: 600; }
  table.game-list td.g-wwe::before { content: "W-We "; font-weight: 400; color: var(--muted); }
  table.game-list td.g-line3 { grid-row: 3; color: var(--ink); }
  table.data.sides th:first-child,
  table.data.sides td:first-child,
  table.data.sides th:nth-child(2),
  table.data.sides td:nth-child(2) { white-space: nowrap; }
}

/* Home: hero names the competition; quick links sit clear of the search box. */
.hero h1 { max-width: none; }
.hero h1 .hero-span { color: #ffd2ad; white-space: nowrap; }
.hero .lede { margin: 4px 0 18px; }
.hero .lede b { color: #fff; }
.hero .hero-search { margin-bottom: 18px; }
.hero .quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.hero .quick a { font-weight: 650; }

/* Home: one class at a glance, in its own card, so it does not look like the list of all classes. */
/* Home: two cards of the same build. A tinted head names what is inside; the body holds it. */
.card { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px 20px; padding: 12px 18px; background: var(--wash); border-bottom: 1px solid var(--line-strong); }
.card-head h2 { margin: 0; font-size: 1.15rem; border-left: 4px solid var(--brand); padding-left: 10px; line-height: 1.2; }
.card-body { padding: 4px 18px 22px; }
.home-classes .card-body { padding-top: 18px; }

/* Season stats: dense wrap of label-only chips (nav for fillLive; hide duplicate live-tabs). */
.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.stat-chips a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}
.stat-chips a:hover {
  border-color: var(--navy-2);
  color: var(--navy);
  text-decoration: none;
}
.stat-chips a.on,
.stat-chips a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.stat-chips ~ #stat-body #live-tabs { display: none; }
.stat-chips ~ #stat-body .live-bar { padding-top: 10px; }
.home-board.home-board { margin-top: 24px; }
.home-board .board-head .stepper select,
.home-board .round-nav .stepper select { min-width: 200px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-weight: 650; background: #fff; }
.home-board .seg { margin: 12px 0 18px; }
/* Same head height on both panels, then room before the table. */
.round-panel .panel-head { display: flex; align-items: center; min-height: 44px; margin: 0 0 14px; }
.home-board .round-nav { margin: 0; }
.round-panel .next-head { margin: 0; font-size: 1.05rem; color: var(--navy); }
.round-panel .next-head .panel-k { margin-right: 6px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.round-panel .table-wrap, .round-panel table.data { width: 100%; }
.head-link { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
/* The class picker says what it is; the word "Klasse" in front of it is not needed. */
.classnav.picker .cn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 860px) {
  .home-board.home-board { margin-top: 18px; }
  .card-head { padding: 10px 12px; }
  .card-body { padding: 4px 12px 16px; }
  .home-classes .card-body { padding-top: 12px; }
  .round-pair { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .home-board .board-head .stepper,
  .home-board .round-nav .stepper { width: 100%; }
  .home-board .board-head .stepper select,
  .home-board .round-nav .stepper select { flex: 1; min-width: 0; }
  .home-board .seg { margin-top: 8px; }
  .hero .quick a { padding: 9px 14px; }
}

/* Tabs that are links (all classes: Uitslagen / Stand) look like the button tabs. */
.seg.seg-links a { flex: none; margin-bottom: -1px; padding: 10px 14px; border-bottom: 3px solid transparent; color: #2b3645; font-weight: 500; white-space: nowrap; }
.seg.seg-links a:hover { color: var(--ink); text-decoration: none; }
.seg.seg-links a[aria-current="page"] { color: var(--ink); font-weight: 650; border-bottom-color: var(--brand); }
/* Rounds sit right under the tab they belong to. */
.seg + .round-strip { margin-top: -14px; }
@media (max-width: 860px) {
  .seg.seg-links a { flex: 1; text-align: center; }
  .seg + .round-strip { margin-top: -18px; }
}

/* Phone: no table hides content on the right. Long tables fold each row into short lines. */
.m-class { display: none; }
@media (max-width: 860px) {
  /* Column heads may wrap ("Meeste tegelijk"), numbers stay on one line. */
  table.data thead th, table.data thead th.num { white-space: normal; }
  /* Home: the class list fills its card edge to edge. */
  .home-classes .card-body { padding: 0; }
  .home-classes .card-body .table-wrap { width: 100%; border: 0; border-radius: 0; }
  .home-classes .card-body table.data.leaders { width: 100%; }

  /* Earlier meetings: the class moves under the match. */
  table.meetings .m-col { display: none; }
  table.meetings .m-class { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }
  table.meetings .m-class a { color: inherit; }

  /* A team's seasons: line 1 season, class, place, MP, BP; line 2 games, rating, score, details. */
  table.team-seasons thead { display: none; }
  table.team-seasons tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.team-seasons tbody tr::after { content: ""; order: 5; flex-basis: 100%; height: 0; }
  table.data.team-seasons:not(.cross):not(.match-table) tbody td { display: block; position: static; padding: 0; border: 0; background: none; white-space: nowrap; }
  table.team-seasons td:nth-child(1) { order: 1; font-weight: 700; }
  table.team-seasons td:nth-child(2) { order: 2; flex: 1 1 auto; white-space: normal; }
  table.team-seasons td:nth-child(3) { order: 3; }
  table.team-seasons td:nth-child(3)::before { content: "#"; color: var(--muted); }
  table.team-seasons td:nth-child(4) { order: 4; }
  table.team-seasons td:nth-child(4)::after { content: " MP"; font-weight: 400; color: var(--muted); }
  table.team-seasons td:nth-child(5) { order: 4; }
  table.team-seasons td:nth-child(5)::after { content: " BP"; color: var(--muted); }
  table.team-seasons td:nth-child(n+6) { order: 6; font-size: 0.86rem; color: var(--muted); }
  table.team-seasons td:nth-child(6)::after { content: " gespeeld"; }
  table.team-seasons td:nth-child(7)::before { content: "gem. rating "; }
  table.team-seasons td:nth-child(8)::before { content: "score "; }
  table.team-seasons td:nth-child(9) { margin-left: auto; }

  /* Archive on a phone: season and champion only; cup and the rest are one tap away on the season page. */
  #arch-table th:nth-child(n+3), #arch-table td:nth-child(n+3) { display: none; }
}

/* Folding tables (class "fold"): on a phone each row becomes a main line and a small second line.
   f-main and f-right on line 1, f-sub cells on line 2; data-k / data-k-after add a short label. */
@media (max-width: 860px) {
  table.fold thead { display: none; }
  table.fold tfoot tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; width: 100%; padding: 10px 12px; background: var(--brand-wash); border-top: 2px solid var(--navy); }
  table.data.fold tfoot td { display: block; padding: 0; border: 0; background: var(--brand-wash); color: var(--ink); white-space: nowrap; }
  table.data.fold tfoot td.pos { color: var(--win); }
  table.data.fold tfoot td.neg { color: var(--loss); }
  table.data.fold tfoot td.f-main { order: 1; flex: 1 1 0; font-weight: 700; }
  table.fold tfoot tr::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  table.fold tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.data.fold:not(.cross):not(.match-table) tbody td { display: block; position: static; padding: 0; border: 0; background: none; white-space: nowrap; }
  table.data.fold:not(.cross):not(.match-table) tbody td.f-main { order: 1; flex: 1 1 0; min-width: 0; white-space: normal; font-weight: 600; }
  table.fold td.f-head { order: 1; font-weight: 600; }
  table.fold td.f-right { order: 2; font-weight: 700; }
  table.fold td.f-sub small { margin-left: 4px; }
  table.fold td.f-paren::before { content: "("; }
  table.fold td.f-paren::after { content: ")"; }
  table.fold tbody tr::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  table.fold td.f-sub { order: 4; font-size: 0.86rem; color: var(--muted); }
  table.fold td[data-k]::before { content: attr(data-k) " "; color: var(--muted); font-weight: 400; }
  table.fold td[data-k-after]::after { content: " " attr(data-k-after); color: var(--muted); font-weight: 400; }
  table.fold td[colspan] { white-space: normal; }
}
/* A class that plays this round on its own date says so next to its name. */
.class-group .class-date { margin-left: 8px; font-size: 0.85rem; font-weight: 500; color: var(--muted); }

/* Form: last five results as small W / G / V circles, newest on the right. */
.form { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; }
.form a { display: inline-flex; align-items: center; justify-content: center; }
.form a:hover { text-decoration: none; }
.form-chip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 0.68rem; font-weight: 750; color: #fff; line-height: 1; }
.form-chip.win { background: var(--win); }
.form-chip.draw { background: #8a94a3; }
.form-chip.loss { background: var(--loss); }
.team-form { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 12px 0 0; }
.team-form .form-chip { width: 24px; height: 24px; font-size: 0.75rem; }
.team-form .form { gap: 4px; }
/* In the player's blue header the form sits on the dark band. */
/* Form inside the blue header card: label in light text, the circles on the dark band. */
.page-head .team-form { margin: 12px 0 0; }
.page-head .player-form { margin: 10px 0 14px; }
.page-head .team-form .mc-k { color: rgba(255, 255, 255, 0.75); }
.page-head .team-form .form-chip { width: 17px; height: 17px; font-size: 0.6rem; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8); }
.page-head .team-form .form { gap: 6px; }

/* Team page: runs and home/away under the history totals. */
.team-records { margin: 18px 0 26px; }
.team-records .block-title { margin: 22px 0 10px; font-size: 1.05rem; }
.team-records .streak-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-records .stat b.pos { color: var(--win); }
.team-records .stat b.neg { color: var(--loss); }
.home-away-blocks { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; }
table.home-away td:first-child { font-weight: 650; }
@media (max-width: 860px) {
  .team-records .streak-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-away-blocks { flex-direction: column; align-items: stretch; }
  .home-away-blocks .table-wrap.titled { width: 100%; }
}
@media (max-width: 860px) {
  /* Stats-page lists: text wraps on a phone, numbers do not, so nothing hides on the right. */
  table.data.live:not(.fold) td:not(.num) { white-space: normal; }
  table.data.live:not(.fold) td:not(.num) a { overflow-wrap: anywhere; }
}

/* Zones from the competitiegids: a coloured bar at the left of the row.
   The pale row fill is only for a confirmed promotion or relegation (zone-confirmed):
   the class has played every match, and the place is a sure one. While matches remain,
   or the place is only "mogelijk", the bar is the whole mark. The legend is that same bar. */
table.standings tbody tr.zone-up td:first-child { box-shadow: inset 4px 0 0 var(--win); }
table.standings tbody tr.zone-up-maybe td:first-child { box-shadow: inset 4px 0 0 #8fd1a8; }
table.standings tbody tr.zone-down td:first-child { box-shadow: inset 4px 0 0 var(--loss); }
table.standings tbody tr.zone-down-maybe td:first-child { box-shadow: inset 4px 0 0 #f0a39b; }
table.standings tbody tr.zone-confirmed.zone-up:not(.own) { background: #eaf6ee; }
table.standings tbody tr.zone-confirmed.zone-down:not(.own) { background: #fbecea; }
.zone-legend .zone { display: inline-block; width: 4px; height: 1em; margin-right: 3px; border-radius: 2px; vertical-align: -2px; }
.zone-legend .zone-up { background: var(--win); }
.zone-legend .zone-up-maybe { background: #8fd1a8; }
.zone-legend .zone-down { background: var(--loss); }
.zone-legend .zone-down-maybe { background: #f0a39b; }
.zone-legend small { display: block; margin-top: 4px; }

/* Venue and start time (team, club and match pages). */
.venue-box { margin: 14px 0 6px; padding: 12px 16px; max-width: 820px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
.venue + .venue { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.venue .mc-k { display: block; margin-bottom: 2px; }
.venue-line { margin: 0; line-height: 1.5; }
.venue-notes { margin: 4px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.venue-src { margin: 10px 0 0; font-size: 0.78rem; }

/* Team header: Netstand and Clubinfo on the breadcrumb line, at its right end. */
.page-head .crumb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.page-head .crumb-row .crumb { margin: 0; }
.page-head .head-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.page-head .head-links .chip { padding: 4px 10px; font-size: 0.84rem; }
.page-head .head-links .ext-icons { display: contents; }
.page-head .head-links a.ext-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 0;
  background: none; line-height: 0;
}
.page-head .head-links a.ext-icon:hover { background: none; text-decoration: none; opacity: 0.8; }
.page-head .head-links a.ext-icon svg,
.page-head .head-links a.ext-icon img { width: 32px; height: 32px; display: block; }

/* Team and player pages: one part at a time under the tabs. */
[data-tab-panel][hidden] { display: none !important; }
.page-tabs { margin: 18px 0 20px; }
.page-head .badges { margin-top: 12px; }
@media (max-width: 860px) {
  /* Four page tabs fit a phone screen. */
  .page-tabs button { padding: 10px 6px; font-size: 0.92rem; }
}

/* Phone: tab rows with more tabs than fit end in "Meer ▾" (see layout.js priority()). */
@media (max-width: 860px) {
  /* The stats tab boxes become one tab row, like every other row of views. */
  #stat-tabs, #live-tabs {
    display: flex; flex-wrap: nowrap; width: 100%; max-width: 100%; margin: 14px 0 18px; padding: 0; gap: 2px;
    background: none; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; overflow: visible;
  }
  #stat-tabs button, #live-tabs button {
    flex: 1 0 auto; width: auto; min-height: 0; margin: 0 0 -1px; padding: 10px 10px; border: 0; border-bottom: 3px solid transparent;
    border-radius: 0; background: none; font-size: 0.95rem; line-height: 1.3; text-align: center; white-space: nowrap;
  }
  #stat-tabs button[aria-pressed="true"], #live-tabs button[aria-pressed="true"] { background: none; color: var(--ink); font-weight: 650; border-bottom-color: var(--brand); }
  .prio-measure > button, .prio-measure > a { flex: none !important; }
  .prio-hidden { display: none !important; }
  .prio { overflow: visible !important; }
  .more-wrap { position: relative; flex: none; margin-left: auto; }
  .more-btn {
    display: inline-flex; align-items: center; margin-bottom: -1px; padding: 10px 12px; border: 0; border-bottom: 3px solid transparent;
    background: none; font: inherit; font-weight: 500; color: #2b3645; white-space: nowrap; cursor: pointer;
  }
  .more-btn.is-on { font-weight: 650; color: var(--ink); border-bottom-color: var(--brand); }
  .more-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px;
    flex-direction: column; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  }
  .more-wrap.open .more-menu { display: flex; }
  .more-menu a, .more-menu button {
    display: block; padding: 11px 12px; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 500;
    color: var(--ink); text-align: left; white-space: nowrap;
  }
  .more-menu a:hover, .more-menu button:hover { background: var(--wash); text-decoration: none; }
  .more-menu .is-on { background: var(--wash); font-weight: 650; }
  /* The season tabs sit on the dark header band. */
  .page-head .more-btn { min-height: 46px; padding: 0 10px; color: rgba(255, 255, 255, 0.74); font-weight: 600; }
  .page-head .more-btn.is-on { color: #fff; border-bottom-color: var(--brand); }
}

/* View bar: class picker, view tabs and rounds in one white panel under the dark season card.
   The tabs sit on its bottom edge, like the season tabs on the card. */
.view-bar { margin: 14px 0 20px; padding: 12px 16px 0; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; }
.view-bar > :last-child:not(.seg) { margin-bottom: 12px; }
.view-bar .classnav { margin: 0; }
.view-bar .seg { margin: 12px -16px 0; padding: 0 8px; border-bottom: 0; border-top: 1px solid var(--line); }
.view-bar .seg button, .view-bar .seg a { margin-bottom: 0; }
.view-bar .seg + .round-strip { margin: 12px 0 12px; }
.view-bar .seg:first-child { margin-top: 0; border-top: 0; }
@media (max-width: 860px) {
  .view-bar { padding: 10px 12px 0; }
  .view-bar .seg { margin: 10px -12px 0; padding: 0 4px; }
  .view-bar .seg + .round-strip { margin: 10px 0 10px; }
}
@media (max-width: 860px) {
  .view-bar .seg button, .view-bar .seg a { padding: 10px 8px; }
  .view-bar .more-btn { padding: 10px 8px; }
}
@media (max-width: 860px) {
  /* The tab line runs edge to edge of the bar (a phone rule elsewhere sets tab rows to 100%). */
  .view-bar .seg { max-width: none; width: calc(100% + 24px); }
}

/* Season and class pickers are as wide as their content, also on a phone. */
@media (max-width: 860px) {
  .season-head .head-pick .stepper select,
  .view-bar .classnav.picker select,
  .home-board .board-head .stepper select,
  .home-board .round-nav .stepper select { flex: none; width: auto; min-width: 0; max-width: 62vw; }
  .view-bar .classnav.picker, .view-bar .classnav.picker .stepper,
  .home-board .board-head .stepper, .home-board .round-nav .stepper { width: auto; flex: none; }
  .season-head .head-pick .stepper, .view-bar .classnav.picker .stepper { display: inline-flex; }
}

.playoff { margin-top: 22px; }
.playoff .note { margin: 0 0 10px; }
.playoff td.po-round, .playoff th.po-round { white-space: nowrap; }
.playoff td.po-round a, .playoff td.teams a { color: var(--ink); }
.playoff td.teams a { display: block; }
sup.pl { margin-left: 3px; font-size: 0.75em; font-weight: 700; color: var(--brand); }

/* A link tab inside a row of button tabs (Stats, Beker stats) looks the same. */
.seg a.tab-link { flex: none; margin-bottom: -1px; padding: 10px 14px; border-bottom: 3px solid transparent; color: #2b3645; font-weight: 500; white-space: nowrap; }
.seg a.tab-link:hover { color: var(--ink); text-decoration: none; }
.view-bar .seg a.tab-link { margin-bottom: 0; }
/* Netstand and Clubinfo always sit at the right end of the breadcrumb line. */
.page-head .crumb-row { column-gap: 16px; }
.page-head .crumb-row .head-links { margin-left: auto; }
@media (max-width: 860px) {
  .view-bar .seg a.tab-link { padding: 10px 8px; }
  /* A cell with "Meester-klasse" may wrap there instead of widening the table. */
  table.data td.brk, table.data th.brk { white-space: normal; }
}

/* Form inside a row of facts: Vorm label + chips; newest chip marked (Google-style). */
.page-head .team-facts .vorm-fact { display: inline-flex; align-items: center; gap: 8px; }
.page-head .team-facts .vorm-k {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.page-head .team-facts .form { display: inline-flex; align-items: center; vertical-align: middle; gap: 4px; position: static; }
.page-head .team-facts .form a { color: inherit; font-weight: inherit; text-decoration: none; }
.page-head .team-facts .form a:hover { text-decoration: none; }
.page-head .team-facts .form-chip { width: 17px; height: 17px; font-size: 0.6rem; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8); }
.form-chip.latest {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}
.page-head .team-facts .form-chip.latest,
.page-head .team-form .form-chip.latest {
  box-shadow: 0 0 0 2px #fff;
}
.stats .stat-form b { display: block; }
.stats .stat-form .form { gap: 4px; }
.stats .stat-form .form-chip { width: 22px; height: 22px; font-size: 0.7rem; }
@media (max-width: 860px) {
  /* Header buttons stay on the breadcrumb line on a phone. */
  .page-head .crumb-row { column-gap: 10px; }
  .page-head .head-links { gap: 5px; }
  .page-head .head-links .chip { padding: 3px 8px; font-size: 0.78rem; }
  .page-head .head-links a.ext-icon { width: 28px; height: 28px; }
  .page-head .head-links a.ext-icon svg,
  .page-head .head-links a.ext-icon img { width: 28px; height: 28px; }
}

/* Earlier meetings: the tally in a box, with a bar of wins, draws and wins for the other side. */
#earlier-meetings .h2h { margin: 6px 0 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
#earlier-meetings .h2h .meeting-tally { margin: 0; }
.h2h-bar { display: flex; gap: 2px; height: 8px; margin-top: 10px; border-radius: 4px; overflow: hidden; background: var(--line); }
.h2h-bar .a { background: var(--navy); }
.h2h-bar .d { background: #b8c0cc; }
.h2h-bar .b { background: var(--brand); }

/* White boxes are as wide as what they hold, not the whole page (desktop; on phone they fill the screen). */
@media (min-width: 861px) {
  .home-board.home-board, .home-classes, .view-bar, .venue-box { width: fit-content; max-width: 100%; }
  #earlier-meetings .meeting-kind { width: fit-content; max-width: 100%; }
}

/* Head-to-head: the three numbers close together, the bar only as long as they are. */
#earlier-meetings .h2h { width: fit-content; max-width: 100%; }
#earlier-meetings .h2h .meeting-tally { display: flex; justify-content: flex-start; gap: 22px; }
#earlier-meetings .h2h .h2h-bar { width: 100%; height: 6px; margin-top: 8px; }

/* Match header before play: speellocatie as a fact line, notes small under it. */
.page-head .venue-facts { margin-top: 6px; font-size: 0.92rem; }
.page-head .venue-notes { max-width: 70ch; margin: 6px 0 0; font-size: 0.82rem; line-height: 1.45; color: rgba(255, 255, 255, 0.7); }

/* Phone match sheet: names row uses the same three columns as the boards, so 4–6 sits right above the board results. */
@media (max-width: 860px) {
  table.match-table thead tr.side-names { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 12px; padding: 0 12px; }
  table.match-table thead tr.side-names th.home { padding: 10px 0; text-align: right; min-width: 0; }
  table.match-table thead tr.side-names th.versus { padding: 10px 0; text-align: center; min-width: 2.8em; }
  table.match-table thead tr.side-names th.away { padding: 10px 0; text-align: left; min-width: 0; }
  table.match-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 12px; }
  table.match-table tfoot td:nth-child(2) { text-align: right; }
}
@media (max-width: 860px) {
  table.match-table tfoot td:nth-child(8) { text-align: left; }
  table.match-table tfoot td:nth-child(5) { text-align: center; }
}

/* Head-to-head numbers on top, names under them: left team, draws, right team. Names wrap at spaces only. */
#earlier-meetings .h2h .meeting-tally { align-items: end; gap: 28px; }
#earlier-meetings .h2h .mt-team,
#earlier-meetings .h2h .mt-draw { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
#earlier-meetings .h2h .mt-draw { align-items: center; }
#earlier-meetings .h2h .mt-team:last-child { align-items: flex-end; text-align: right; }
#earlier-meetings .h2h .meeting-tally .k { overflow-wrap: normal; font-size: 0.8rem; }
#earlier-meetings .h2h .meeting-tally .mt-draw .k { font-size: 0.7rem; }
#earlier-meetings .h2h .meeting-tally b { font-size: 1.45rem; }
@media (max-width: 860px) {
  #earlier-meetings .h2h { width: auto; }
  #earlier-meetings .h2h .meeting-tally { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; }
}
#earlier-meetings .h2h .meeting-tally { align-items: start; }
#earlier-meetings .h2h .mt-draw { flex-direction: column; }

/* Cup: poules and final as buttons in the view bar, the poule's rounds side by side. */
.view-bar > .poule-strip { margin: 0; }
.view-bar > .poule-strip:last-child { margin-bottom: 12px; }
.cup-rounds { margin-top: 4px; }
.cup-rounds .round-block:first-child { margin-top: 0; }
@media (min-width: 861px) {
  .cup-rounds { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 28px; }
  .cup-rounds .round-block { margin-top: 0; }
}
.tie-mark { margin-left: 2px; font-size: 0.75em; font-weight: 700; color: var(--brand); }
.tie-legend { margin-top: 14px; }
@media (max-width: 860px) {
  /* Nothing hides on the right: round buttons wrap, poule buttons share the width. */
  .round-strip { flex-wrap: wrap; overflow: visible; }
  .round-strip .rn { min-height: 36px; justify-content: center; }
  .view-bar > .poule-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
  .view-bar > .poule-strip .rn { min-width: 0; padding: 5px 2px; font-size: 0.84rem; }
}
.round-strip .rs-k { display: none; }
@media (max-width: 860px) {
  .round-strip:has(.rs-k) { flex-wrap: nowrap; align-items: center; gap: 4px; }
  .round-strip .rs-k { display: block; flex: none; margin-right: 4px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .round-strip:has(.rs-k) .rn { flex: 1 1 0; min-width: 0; padding: 5px 0; }
  .round-strip .rn .rn-k { display: none; }
}

/* Stats pages and team/player pages use the same white view bar as the competition pages:
   the tabs sit on its bottom edge. On a narrow screen, what does not fit goes under "Meer ▾". */
.view-bar > #stat-tabs, .view-bar > #live-tabs {
  display: flex; flex-wrap: nowrap; width: auto; max-width: none; margin: 0 -16px; padding: 0 8px; gap: 2px;
  background: none; border: 0; border-radius: 0; overflow: visible;
}
.view-bar > #stat-tabs button, .view-bar > #live-tabs button {
  flex: none; width: auto; min-height: 0; margin: 0; padding: 12px 14px; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; background: none; color: #2b3645; font-size: 0.95rem; line-height: 1.3; text-align: center; white-space: nowrap;
}
.view-bar > #stat-tabs button:hover, .view-bar > #live-tabs button:hover { background: none; color: var(--ink); }
.view-bar > #stat-tabs button[aria-pressed="true"], .view-bar > #live-tabs button[aria-pressed="true"] { background: none; color: var(--ink); font-weight: 650; border-bottom-color: var(--brand); }
.view-bar.page-bar, .view-bar:has(> #stat-tabs:first-child), .view-bar.live-bar { padding-top: 0; }
.view-bar.page-bar .seg { margin-top: 0; border-top: 0; }
.view-bar > #live-tools { margin: 0 -16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.view-bar > #live-tools:empty { display: none; }
.view-bar > :last-child#live-tools { margin-bottom: 0; }
.view-bar > #live-tabs:last-child, .view-bar > #stat-tabs:last-child { margin-bottom: 0; }
@media (min-width: 861px) {
  .view-bar.page-bar, .view-bar.live-bar { width: fit-content; max-width: 100%; }
  .view-bar:has(> #stat-tabs) { width: 100%; max-width: 100%; }
  .view-bar > #stat-tabs { flex-wrap: wrap; }
  .view-bar .prio-measure > button, .view-bar .prio-measure > a { flex: none !important; }
  .view-bar .prio-hidden { display: none !important; }
  .view-bar .more-wrap { position: relative; flex: none; margin-left: auto; }
  .view-bar .more-btn {
    display: inline-flex; align-items: center; padding: 12px 14px; border: 0; border-bottom: 3px solid transparent;
    background: none; font: inherit; font-size: 0.95rem; font-weight: 500; color: #2b3645; white-space: nowrap; cursor: pointer;
  }
  .view-bar .more-btn.is-on { font-weight: 650; color: var(--ink); border-bottom-color: var(--brand); }
  .view-bar .more-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 6px;
    flex-direction: column; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  }
  .view-bar .more-wrap.open .more-menu { display: flex; }
  .view-bar .more-menu a, .view-bar .more-menu button {
    display: block; padding: 10px 12px; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 500;
    color: var(--ink); text-align: left; white-space: nowrap; cursor: pointer;
  }
  .view-bar .more-menu a:hover, .view-bar .more-menu button:hover { background: var(--wash); text-decoration: none; }
  .view-bar .more-menu .is-on { background: var(--wash); font-weight: 650; }
}
/* The open menu is moved onto the body: the tab row clips anything that hangs out of it. */
body > .more-menu {
  position: fixed; z-index: 30; display: flex; flex-direction: column; min-width: 210px; padding: 6px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
body > .more-menu a, body > .more-menu button {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: none;
  font: inherit; font-weight: 500; color: var(--ink); text-align: left; white-space: nowrap; cursor: pointer;
}
body > .more-menu a:hover, body > .more-menu button:hover { background: var(--wash); text-decoration: none; }
body > .more-menu .is-on { background: var(--wash); font-weight: 650; }
.view-bar > #stat-tabs .more-menu button, .view-bar > #live-tabs .more-menu button {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; text-align: left; font-weight: 500;
}
.view-bar > #stat-tabs .more-menu button.is-on, .view-bar > #live-tabs .more-menu button.is-on { font-weight: 650; background: var(--wash); }
.view-bar > #stat-tabs .more-btn, .view-bar > #live-tabs .more-btn { width: auto; }
.view-bar + .view-title { margin-top: 4px; }
