/* ABC-Swindregt competitieoverzicht
   Huisstijl follows abcswindregt.nl: primary #006bb3, navy #08267c,
   dark navy #101b2e, body #444, borders #e1e1e1, "Open Sans" / "Heebo".
   Mobiel eerst. */

:root {
  --blauw: #006bb3;
  --blauw-donker: #08267c;
  --donker: #101b2e;
  --text: #3a4450;
  --text-zacht: #566270;
  --lijn: #e1e1e1;
  --achtergrond: #f4f6f9;
  --wit: #fff;
  --winst: #1c8a4c;
  --verlies: #c0392b;
  --schaduw: 0 1px 2px rgba(16, 27, 46, .08), 0 2px 8px rgba(16, 27, 46, .06);
  --radius: 10px;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Heebo", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--achtergrond);
}

h1, h2, h3 { font-family: var(--font-head); color: var(--donker); margin: 0 0 .4em; line-height: 1.25; text-wrap: pretty; }

a { color: var(--blauw); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blauw); outline-offset: 2px; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #eef2f6; padding: .1em .35em; border-radius: 4px; }

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 14px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--wit);
  border-bottom: 3px solid var(--blauw);
  box-shadow: var(--schaduw);
}
.top__in { display: flex; align-items: center; gap: 10px; padding-top: 6px; padding-bottom: 5px; }
.brand { display: flex; align-items: center; gap: 9px; color: inherit; }
.brand__logo { height: 32px; width: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt strong { font-family: var(--font-head); font-size: 15.5px; color: var(--blauw-donker); letter-spacing: .2px; }
.brand__txt span { font-size: 12.5px; color: var(--text-zacht); }

.nav { background: var(--wit); border-bottom: 1px solid var(--lijn); }
.nav__in { display: flex; flex-direction: column; gap: 3px; padding-bottom: 0; }

.teams { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 5px 0 1px; scrollbar-width: thin; min-width: 0; }
.chip {
  flex: 0 0 auto; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--lijn); background: #f7f9fb; color: var(--blauw-donker);
  font-size: 13.5px; white-space: nowrap;
}
.chip.is-on { background: var(--blauw); border-color: var(--blauw); color: #fff; font-weight: 600; }

.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 0 0 auto; }
.tab {
  flex: 0 0 auto; padding: 8px 11px 9px; font-size: 14.5px; color: var(--blauw-donker);
  border-bottom: 3px solid transparent;
}
.tab.is-on { font-weight: 700; border-bottom-color: var(--blauw); }

/* ---------------------------------------------------------------- meta */
.comp {
  margin: 0; padding: 6px 14px 0; font-size: 13.5px; color: var(--text-zacht);
  max-width: 940px; margin-inline: auto;
}
.notice {
  margin: 0; padding: 9px 14px; background: #fff4e5; color: #7a4b12;
  border-bottom: 1px solid #f0d9b5; font-size: 14px; text-align: center;
}

main { display: block; padding: 12px 12px 26px; }

.page { font-size: 20px; margin: 4px 0 12px; }
.empty { color: var(--text-zacht); }
.more { margin: 12px 0 0; }
.more a { font-weight: 600; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius);
  padding: 12px 13px; box-shadow: var(--schaduw);
}
.card__kicker {
  margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blauw); font-weight: 700;
}

.hero { display: grid; gap: 10px; margin-bottom: 14px; }
.next { border-left: 5px solid var(--blauw); }
.next__title { font-size: 22px; margin: 0 0 6px; }
.next__when { display: flex; align-items: baseline; gap: 9px; margin: 0 0 3px; flex-wrap: wrap; }
.next__when .big { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--blauw-donker); }
.next__when .time { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.next__when .rel { font-size: 13.5px; color: var(--text-zacht); }
.next__where { margin: 0 0 6px; font-size: 13.5px; color: var(--text-zacht); }

.last { border-left: 5px solid var(--lijn); }
.last__title { font-size: 18px; margin: 0 0 4px; }
.last__meta { margin: 5px 0 6px; font-size: 13.5px; color: var(--text-zacht); }

.btn {
  display: inline-block; margin-top: 2px; padding: 7px 12px; border-radius: 6px;
  background: var(--blauw); color: #fff; font-weight: 600; font-size: 14px;
  border: 1px solid var(--blauw); white-space: nowrap;
}
.btn:hover, .btn:focus { background: var(--blauw-donker); border-color: var(--blauw-donker); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--blauw); }
.btn--ghost:hover { background: #eef5fa; color: var(--blauw-donker); }

.block { margin: 16px 0; }
.block__title {
  font-size: 16.5px; margin: 0 0 8px; padding-bottom: 5px; border-bottom: 2px solid var(--blauw);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}

/* ---------------------------------------------------------------- rows */
.rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 9px; align-items: center;
  background: var(--wit); border: 1px solid var(--lijn); border-left: 4px solid var(--lijn);
  border-radius: var(--radius); padding: 8px 10px; color: inherit;
}
a.row:hover { text-decoration: none; border-left-color: var(--blauw); background: #fbfdff; }
.row.is-scored { border-left-color: var(--blauw); }
.row__date { display: flex; flex-direction: column; line-height: 1.25; }
.row__date .d { font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--blauw-donker); white-space: nowrap; }
.row__date .t { font-size: 13px; color: var(--text-zacht); }
.row__date .rel { font-size: 12px; color: var(--text-zacht); white-space: nowrap; }
.row__body { min-width: 0; }
.row__title { display: block; margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--donker); }
.row__sub { display: block; margin: 2px 0 0; font-size: 13.5px; color: var(--text-zacht); }
.row__aside { display: flex; align-items: center; gap: 8px; text-align: right; }
.row__aside .sub, .row__meta { font-size: 12.5px; color: var(--text-zacht); }
.chev { font-size: 18px; color: var(--blauw); line-height: 1; }

.score {
  display: inline-block; min-width: 48px; text-align: center; padding: 3px 7px;
  border-radius: 6px; font-family: var(--font-head); font-weight: 700; font-size: 16px;
  background: #eef2f6; color: var(--donker);
}
.score.is-win { background: #e3f4ea; color: var(--winst); }
.score.is-loss { background: #fbe9e7; color: var(--verlies); }
.score.is-draw { background: #fff4e0; color: #8a6100; }
.score.is-open { background: #eef2f6; color: var(--text-zacht); font-weight: 600; }

.badge {
  display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge--moved { background: #fff4e0; color: #8a6100; }
.badge--fixed { background: #e8f1f8; color: var(--blauw-donker); }

/* Spelersrijen hebben geen datumkolom: twee kolommen, anders krijgt de naam
   de smalle datumkolom en breekt hij over drie regels. */
.row.player { grid-template-columns: 1fr auto; }
.player__body { min-width: 0; }
.player .row__title { font-size: 15.5px; }
.linkout { font-size: 13.5px; white-space: nowrap; }

/* ------------------------------------------------------------- stand */
.tablescroll { overflow-x: auto; }
table.stand { width: 100%; border-collapse: collapse; background: var(--wit); font-size: 14.5px; }
table.stand th, table.stand td { padding: 6px 7px; border-bottom: 1px solid var(--lijn); text-align: right; }
table.stand th { font-family: var(--font-head); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-zacht); }
table.stand th.c-team, table.stand td.c-team { text-align: left; }
table.stand td.c-rank { text-align: center; width: 28px; }
.rank { display: inline-block; min-width: 22px; font-family: var(--font-head); font-weight: 700; color: var(--blauw-donker); }
table.stand td.c-team .team { display: block; font-weight: 600; color: var(--donker); }
table.stand td.c-team .club { display: block; font-size: 12.5px; color: var(--text-zacht); }
table.stand tr.is-own { background: #eaf4fb; }
table.stand tr.is-own td.c-team .team { color: var(--blauw-donker); }
table.stand tr.is-own { box-shadow: inset 4px 0 0 var(--blauw); }

/* --------------------------------------------------- partij (detail) */
.matchhead { border-left: 5px solid var(--blauw); }
.matchhead__teams { display: grid; gap: 4px; text-align: center; margin: 4px 0 6px; }
.matchhead__teams > span { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--donker); }
.matchhead__teams .vs { font-size: 22px; color: var(--blauw); }
.matchhead__teams .vs.is-win { color: var(--winst); }
.matchhead__teams .vs.is-loss { color: var(--verlies); }
.matchhead__loc, .matchhead__sub { margin: 3px 0; font-size: 13.5px; color: var(--text-zacht); text-align: center; }
.matchhead__sub .score { vertical-align: middle; margin-right: 4px; }

.games { display: grid; gap: 6px; }
.game {
  display: grid; gap: 5px;
  grid-template-columns: 74px 1fr 118px 1fr;
  align-items: center;
  background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 8px 11px;
}
.game__what strong { display: block; font-family: var(--font-head); font-size: 14.5px; color: var(--blauw-donker); }
.game__what span { display: block; font-size: 12px; color: var(--text-zacht); }
.game__side { font-size: 14px; }
.game__side:nth-child(2) { text-align: right; }
.game__side.is-win { font-weight: 700; color: var(--winst); }
.teamtag { display: none; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-zacht); }
.game__score { text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--donker); }
.game__score span { display: inline-block; margin: 0 2px; }

/* ------------------------------------------------------------- footer */
.foot { background: var(--donker); color: #cfd8e3; padding: 16px 0 22px; font-size: 13.5px; }
.foot p { margin: 4px 0; }
.foot strong { color: #fff; }
.foot a { color: #7fc0e8; }

/* -------------------------------------------------------- groter scherm */
@media (min-width: 600px) {
  .hide-sm { display: table-cell; }
  .hero { grid-template-columns: 2fr 1fr; }
  .brand__logo { height: 46px; }
  .brand__txt strong { font-size: 17px; }
  .chip { font-size: 14px; padding: 6px 11px; }
  .tab { font-size: 15px; padding: 10px 12px 11px; }
  .card { padding: 16px; }
  .next__title { font-size: 26px; }
  .next__when .big, .next__when .time { font-size: 20px; }
  .next__where { font-size: 14px; margin-bottom: 10px; }
  .block { margin: 22px 0; }
  .rows { gap: 8px; }
  .row { grid-template-columns: 78px 1fr auto; gap: 10px; padding: 10px 12px; }
  table.stand { font-size: 15px; }
  table.stand th, table.stand td { padding: 9px 8px; }
  .game { grid-template-columns: 110px 1fr 150px 1fr; padding: 10px 12px; }
  .nav__in { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .teams { padding: 6px 0; }
}

@media (min-width: 820px) {
  .hide-md { display: table-cell; }
}

@media (max-width: 599px) {
  .hide-sm, .hide-md { display: none; }
  .page { font-size: 19px; }
  .card { padding: 11px 12px; }
  .next__title { font-size: 21px; }
  .matchhead__teams > span { font-size: 17px; }
  .game { grid-template-columns: 1fr; text-align: left; }
  .game__side:nth-child(2) { text-align: left; }
  .teamtag { display: block; margin-bottom: 2px; }
  .game__score { text-align: left; font-size: 16px; }
}

/* Brede telefoon (o.a. Galaxy S24 Ultra: 412 css px, ook 440-480 bij minder zoom):
   de twee hero-kaarten naast elkaar, scheelt ~90 px boven aan de pagina. */
@media (min-width: 400px) and (max-width: 599px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 8px; }
  .next__title { font-size: 18px; }
  .last__title { font-size: 16px; }
  .next__when .big, .next__when .time { font-size: 16.5px; }
  .btn { padding: 6px 10px; font-size: 13.5px; }
}

@media (prefers-color-scheme: dark) {
  body { background: #0d1420; color: #d7dee8; }
  h1, h2, h3, .brand__txt strong, .chip, .tab, .row__title, .rank,
  .matchhead__teams > span, .game__what strong, .game__score, .score { color: #eaf1f8; }
  .top, .nav, .card, .row, table.stand, .game { background: #131c2b; border-color: #24314a; }
  .top { box-shadow: none; }
  .chip { background: #1b2739; }
  .chip.is-on { background: var(--blauw); color: #fff; }
  a.row:hover { background: #17233a; }
  table.stand th { color: #93a3ba; }
  table.stand tr.is-own { background: #17293d; }
  .score { background: #1b2739; }
  .score.is-win { background: #123324; color: #66c68f; }
  .score.is-loss { background: #3a1e1c; color: #f0918a; }
  .score.is-open { color: #93a3ba; }
  .row__date .t, .row__sub, .card__kicker, .next__where, .last__meta, .matchhead__loc,
  .matchhead__sub, .game__what span, .row__aside .sub, .comp { color: #93a3ba; }
  .card__kicker { color: #57a8dd; }
  code { background: #1b2739; }
  .notice { background: #3a2c14; color: #f0c88a; border-color: #57411d; }
  .badge--moved { background: #3a2c14; color: #f0c88a; }
  .badge--fixed { background: #17293d; color: #9ccdec; }
  .btn--ghost { color: #57a8dd; }
  .foot { background: #0a1017; }
}
