/* dunk.at
   One typeface (Archivo, width axis for the condensed labels), one accent,
   no radius, no shadows. Structure comes from rules and bands. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

:root {
  /* Light or dark follows the visitor's system setting; the dark values
     are in the block below. src/styles.test.ts checks that every colour
     here has a dark counterpart and that text stays readable in both. */
  color-scheme: light dark;

  --ink: #15181b;
  --ink-2: #454c53;
  --ink-3: #636b74;
  --paper: #ffffff;
  --band: #eef0f1;
  --band-hover: #e2e5e7;
  --rule: #d5d9dc;
  --row-hover: #f5f6f7;
  --visited: #75697a;

  --mast: #101214;
  --mast-ink: #f4f5f6;
  --mast-dim: #a9b0b7;
  --mast-rule: #2f3439;

  /* The one accent. The lighter step exists only for use on the masthead. */
  --signal: #d42a12;
  --signal-on-dark: #ff5a3c;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --time-col: 3.1rem;
}

/* Dark: the same hierarchy on a dark page. The masthead stays as it is but
   drops a step darker than the page, so the two still read as separate
   layers. The accent takes its masthead step, which is the one that keeps
   enough contrast on dark ground. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaec;
    --ink-2: #b9c0c7;
    --ink-3: #959ea7;
    --paper: #16191c;
    --band: #21252a;
    --band-hover: #2a2f35;
    --rule: #343a41;
    --row-hover: #1d2125;
    --visited: #b3a4b8;

    --mast: #0b0d0f;

    --signal: #ff5a3c;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.9375rem/1.4 var(--font);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 8px;
}

/* Condensed caps: rubric labels, table heads, meta lines. */
.rub__label,
.band__title,
.hl__src,
.vid__meta,
.sc__meta,
.tbl thead th,
.foot__head {
  font-stretch: 75%;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ */
/* Masthead                                                           */
/* ------------------------------------------------------------------ */
.mast {
  background: var(--mast);
  color: var(--mast-ink);
}

.mast :focus-visible {
  outline-color: var(--signal-on-dark);
}

.mast__in {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  column-gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 52px;
  color: #fff;
  font-size: 1.875rem;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand span {
  color: var(--signal-on-dark);
}

.nav {
  order: 3;
  flex: 1 0 100%;
  min-width: 0;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--mast-rule);
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav ul {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 44px;
  padding: 3px 11px 0;
  border-bottom: 3px solid transparent;
  color: var(--mast-dim);
  font-size: 0.9375rem;
  font-weight: 700;
  font-stretch: 75%;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav li:first-child a {
  padding-left: 0;
}

.nav a:hover {
  color: #fff;
}

.nav a[aria-current] {
  border-bottom-color: var(--signal-on-dark);
  color: #fff;
}

.nav__gap {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--mast-rule);
}

.lang {
  display: flex;
  align-items: center;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: 0.04em;
}

.lang a,
.lang__on {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  color: var(--mast-dim);
  text-decoration: none;
}

.lang a:hover {
  color: #fff;
}

.lang__on {
  background: var(--mast-ink);
  color: var(--mast);
}

/* The German labels need about 940px in one row with the brand and the
   language switch; below that the navigation gets a row of its own. */
@media (min-width: 960px) {
  .nav {
    order: 0;
    flex: 1 1 0;
    margin-inline: 0;
    padding-inline: 0;
    border-top: 0;
  }

  .nav li:first-child a {
    padding-left: 11px;
  }
}

/* ------------------------------------------------------------------ */
/* Score strip                                                        */
/* ------------------------------------------------------------------ */
.strip {
  background: var(--band);
  border-bottom: 1px solid var(--rule);
}

.strip__list {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.sc {
  flex: none;
  border-right: 1px solid var(--rule);
}

.sc:first-child {
  border-left: 1px solid var(--rule);
}

.sc a {
  display: block;
  width: 6.75rem;
  padding: 7px 10px 8px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-decoration: none;
}

.sc a:hover {
  background: var(--band-hover);
}

.sc__meta {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sc__meta b {
  color: var(--ink);
}

.sc__row {
  display: flex;
  justify-content: space-between;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
}

.sc__row.is-win {
  color: var(--ink);
  font-weight: 700;
}

/* Under way: the one place besides navigation where the accent speaks. */
.sc--live .sc__when,
.game--live .game__when {
  color: var(--signal);
  font-weight: 700;
}

.sc--live .sc__row {
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Page frame                                                         */
/* ------------------------------------------------------------------ */
.main {
  padding-bottom: 8px;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 44px;
}

@media (min-width: 1000px) {
  .cols {
    grid-template-columns: minmax(0, 1fr) 23.5rem;
    align-items: start;
  }
}

.bar,
.mod__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 0;
  padding: 8px 0 10px;
  border-top: 4px solid var(--ink);
}

.bar__title,
.mod__head {
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 68%;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.bar__title {
  margin: 0;
}

.mod__head {
  font-size: 1.3125rem;
}

.bar__meta {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.mod__more {
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0;
  text-transform: none;
}

.notice {
  margin: 4px 0 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--ink);
  background: var(--band);
}

.note {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.45;
}

.note--page {
  max-width: 46rem;
  margin: 12px 0 16px;
  font-size: 0.8125rem;
}

/* ------------------------------------------------------------------ */
/* Headlines: label on the left, list on the right                    */
/* ------------------------------------------------------------------ */
.rub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 10px 0 14px;
  border-top: 1px solid var(--rule);
}

.bar + .rub {
  border-top: 0;
  padding-top: 2px;
}

.rub__label {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.09em;
}

.rub__label a {
  text-decoration: none;
}

.rub__label a:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .rub {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    column-gap: 20px;
  }

  .rub__label {
    margin: 0;
    padding-top: 7px;
    text-align: right;
  }
}

.hl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hl__item {
  display: grid;
  grid-template-columns: var(--time-col) minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  padding: 4px 0;
}

.hl__time {
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hl__link {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.hl__link:visited {
  color: var(--visited);
}

.hl__link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.hl__item--lead {
  padding-bottom: 6px;
}

.hl__item--lead .hl__link {
  font-size: 1.375rem;
  font-weight: 700;
  font-stretch: 90%;
  line-height: 1.18;
}

.hl__src {
  margin-left: 3px;
  color: var(--ink-3);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.hl__lang {
  margin-left: 5px;
  padding: 0 3px;
  box-shadow: inset 0 0 0 1px var(--rule);
  text-decoration: none;
}

.rub__more {
  display: inline-block;
  margin: 8px 0 0 calc(var(--time-col) + 10px);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Bands, games, tables                                               */
/* ------------------------------------------------------------------ */
.band {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  background: var(--band);
}

.band__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
}

.band__meta {
  margin-left: 5px;
  color: var(--ink-2);
  font-weight: 400;
}

.band__link {
  font-size: 0.75rem;
  white-space: nowrap;
}

.games {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.game {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
}

.game__when {
  color: var(--ink-3);
  font-size: 0.75rem;
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.game__note {
  display: block;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.game__sides {
  display: grid;
  /* The team names are links: rows 25px apart give each a 24px touch target
     (WCAG 2.5.8), which PageSpeed flagged at 22px. */
  row-gap: 4px;
}

.game__side {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
}

.game__side.is-win,
.game--live .game__side,
.game--next .game__side {
  color: var(--ink);
}

.game__side.is-win {
  font-weight: 700;
}

.game__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.game__name,
a.tbl__name {
  text-decoration: none;
}

a.game__name:hover,
a.tbl__name:hover {
  text-decoration: underline;
}

/* On a club page: which side is the club. */
.game__side.is-self .game__name::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  background: var(--signal);
  vertical-align: 2px;
}

/* Lists that mix competitions name each game's above its date. */
.game__comp {
  display: block;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}

.game__pts {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 700px) {
  .games--wide {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    column-gap: 28px;
  }
}

.tbl {
  width: 100%;
  margin-bottom: 14px;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.tbl th,
.tbl td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  text-align: left;
}

.tbl thead th {
  border-bottom-color: var(--ink);
  color: var(--ink-3);
  font-size: 0.6875rem;
  font-weight: 700;
}

.tbl abbr {
  text-decoration: none;
}

.tbl .num {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.tbl__rank {
  color: var(--ink-3);
}

.tbl .tbl__team {
  max-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tbl .tbl__key {
  font-weight: 700;
}

.tbl tbody tr:hover {
  background: var(--row-hover);
}

.tbl tbody tr.is-self {
  background: var(--band);
}

.tbl tr.is-self .tbl__rank {
  box-shadow: inset 3px 0 0 var(--signal);
  color: var(--ink);
  font-weight: 700;
}

.tbl .tbl__form {
  width: 1%;
  padding-left: 14px;
  white-space: nowrap;
}

.form {
  display: inline-block;
  width: 1.1875rem;
  height: 1.1875rem;
  margin-right: 2px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1875rem;
  text-align: center;
}

.form--w {
  background: var(--ink);
  color: var(--paper);
}

.form--l {
  box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink-3);
}

@media (max-width: 560px) {
  .tbl__wide {
    display: none;
  }
}

.comp {
  scroll-margin-top: 12px;
}

/* Table and games side by side; the table is the wider, left-hand column. */
@media (min-width: 1000px) {
  .comp__split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    column-gap: 44px;
    align-items: start;
  }

  .comp__table {
    grid-area: 1 / 1;
  }

  .comp__games {
    grid-area: 1 / 2;
  }
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 4px;
  font-weight: 600;
}

@media (min-width: 900px) {
  .tables--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

/* ------------------------------------------------------------------ */
/* Videos                                                             */
/* ------------------------------------------------------------------ */
.vids {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Thumbnail left, title and meta line right; the player, once opened, takes
   the full width below. */
.vid {
  display: grid;
  grid-template-columns: clamp(6.5rem, 30vw, 8.5rem) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.vid__thumb {
  position: relative;
  grid-row: 1 / 3;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--band);
}

.vid__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The play mark: a corner of the masthead, with the red of ".AT". */
.vid__play {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 26px;
  height: 22px;
  background: var(--mast);
}

.vid__play::after {
  position: absolute;
  top: 6px;
  left: 10px;
  border-block: 5px solid transparent;
  border-left: 8px solid var(--signal-on-dark);
  content: "";
}

.vid__link {
  display: block;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.vid__link:hover,
.vid__thumb:hover + .vid__link {
  text-decoration: underline;
}

.vid__link:visited {
  color: var(--visited);
}

.vid__meta {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.6875rem;
  font-weight: 600;
}

.vid__player {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.vid__player iframe {
  display: block;
  width: 100%;
  max-width: 46rem;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.vid__close {
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 600 0.8125rem/1.2 var(--font);
  cursor: pointer;
}

.vid__close:hover {
  background: var(--ink);
  color: var(--paper);
}

.vgroup {
  margin-bottom: 22px;
}

/* ------------------------------------------------------------------ */
/* Clubs                                                              */
/* ------------------------------------------------------------------ */
.clubs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 6px 28px;
  margin-bottom: 22px;
}

.clubs__list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.clubs__list a {
  display: block;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  text-decoration: none;
}

.clubs__list a:hover {
  background: var(--band-hover);
}

/* Club page: path above the heading, facts under it. */
.crumbs {
  margin: 14px 0 -12px;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.facts div {
  display: contents;
}

.facts dt,
.facts dd {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  padding-right: 16px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.facts dd {
  margin: 0;
}

/* The facts end on a rule; the first day of news needs no second one. */
.facts + .vh + .rub {
  border-top: 0;
}

.note--empty {
  margin: 0 0 14px;
  padding: 8px;
}

@media (min-width: 760px) {
  .vids--wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
  }

  .vids--wide .vid.is-playing {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------------ */
/* Legal pages                                                        */
/* ------------------------------------------------------------------ */
.prose {
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.55;
}

.prose h1 {
  margin: 22px 0 14px;
  padding-top: 8px;
  border-top: 4px solid var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 68%;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.prose h2 {
  margin: 24px 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.prose p {
  margin: 0 0 10px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */
.foot {
  margin-top: 44px;
  background: var(--mast);
  color: var(--mast-dim);
  font-size: 0.8125rem;
}

.foot :focus-visible {
  outline-color: var(--signal-on-dark);
}

.foot__in {
  display: grid;
  gap: 24px 40px;
  padding-block: 28px 32px;
}

@media (min-width: 820px) {
  .foot__in {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto;
  }
}

.foot a {
  color: var(--mast-ink);
}

.foot p {
  max-width: 26rem;
  margin: 0;
}

.foot .foot__brand {
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 1;
  text-transform: uppercase;
}

.foot__brand span {
  color: var(--signal-on-dark);
}

.foot__head {
  margin: 0 0 8px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot li {
  padding: 2px 0;
}

.foot__src ul {
  columns: 3 8.5rem;
  column-gap: 20px;
}
