/* Barlow, SIL Open Font License (fonts/OFL.txt) */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/Barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/Barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/Barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/BarlowCondensed-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/BarlowCondensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(fonts/BarlowCondensed-800.woff2) format("woff2"); }

:root {
  --ink: #edf0e9;
  --dim: #8f988f;
  --faint: #5b645c;
  --bg: #101311;
  --raised: #171b18;
  --rule: #262c27;
  --grass: #6c8a55;
  --grass-2: #66834f;
  --red: #e56e56;          /* HaxBall red */
  --blue: #5689e5;         /* HaxBall blue */
  --armband: #f4d35e;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Nothing may push the page wider than the screen (it wobbles sideways on phones). */
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 "Barlow", system-ui, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; }
b { font-weight: 600; }
.n { text-align: right; font-variant-numeric: tabular-nums; }
.blank { color: var(--dim); padding: 40px 0; }
.aside { color: var(--dim); font-size: 13px; margin: 12px 0 0; }

/* ---------------------------------------------------------------- header */

.bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 8px 32px;
  padding: 18px 32px 0;
  border-bottom: 1px solid var(--rule);
}
.brand { padding-bottom: 12px; }
.wordmark {
  display: block;
  font: 800 30px/0.9 var(--cond);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
/* Logo: a red HaxBall player disc with "AF" on it, then the wordmark. */
.brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; justify-content: start; }
.logo-disc {
  grid-row: 1 / 3;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 3px solid #000; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px var(--ink);
  color: #fff; font: 800 18px/1 var(--cond); letter-spacing: -0.02em;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.edition { display: block; margin-top: 6px; white-space: nowrap; color: var(--dim); font: 500 13px/1 var(--cond); letter-spacing: 0.04em; text-transform: uppercase; }

.tabs { display: flex; gap: 26px; }
.tabs button {
  font: 700 17px/1 var(--cond);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dim);
  padding: 0 0 14px;
  border-bottom: 3px solid transparent;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="page"] { color: var(--ink); border-color: var(--ink); }

.account { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; font-size: 14px; }
.me { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.me img { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #000; }
.text { color: var(--dim); font-size: 14px; }
.text:hover { color: var(--ink); text-decoration: underline; }
.discord {
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 3px;
}
.dev { display: flex; gap: 8px; }
.dev input { width: 150px; background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 4px 0; font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 3px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.5);
}
.toast.ok { background: var(--ink); color: var(--bg); }
.toast.error { background: var(--red); color: #1a0b07; }

main { padding: 24px 32px 64px; max-width: 1120px; margin: 0 auto; }

/* ---------------------------------------------------------------- match day strip */

.strip {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  scrollbar-width: none;
}
.strip button {
  flex: none;
  min-width: 62px;
  padding: 8px 10px 7px;
  text-align: left;
  border-right: 1px solid var(--rule);
}
.strip b { display: block; font: 700 22px/1 var(--cond); }
.strip small { display: block; margin-top: 3px; font: 500 12px/1 var(--cond); color: var(--dim); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.strip button.past b { color: var(--dim); }
.strip button.later b, .strip button.later small { color: var(--faint); }
.strip button:hover { background: var(--raised); }
.strip button[aria-pressed="true"] { background: var(--ink); }
.strip button[aria-pressed="true"] b, .strip button[aria-pressed="true"] small { color: var(--bg); }

.signin { margin: 18px 0 0; color: var(--dim); }
.signin a { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- lineups */

.team-grid { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 32px 56px; margin-top: 22px; align-items: start; }
.pitches { display: grid; gap: 28px; }
.side { display: grid; gap: 28px; padding-top: 44px; }

.week-card { background: var(--raised); border-top: 4px solid var(--ink); }
.week-card header { padding: 16px 20px 12px; }
.week-card h3 { margin: 6px 0 0; font: 800 26px/1 var(--cond); text-transform: uppercase; }
.week-card ul { margin: 0; padding: 0; list-style: none; }
.week-card li + li { border-top: 1px solid var(--rule); }
.week-card li { display: flex; align-items: center; }
.week-card li .srow { flex: 1; min-width: 0; }
.remove { flex: none; width: 36px; height: 36px; margin-right: 10px; color: var(--dim); font-size: 22px; line-height: 1; }
.remove:hover { color: var(--red); }
/* On the pitch: a small x at the disc's top-left, opposite the captain armband. */
.remove.pitch-x { position: absolute; bottom: -4px; left: -6px; width: 24px; height: 24px; margin: 0; border-radius: 50%; background: rgb(0 0 0 / 0.72); color: var(--ink); font-size: 16px; }
.remove.pitch-x:hover { background: var(--red); color: #fff; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 20px; text-align: left; }
.srow:not(:disabled):hover { background: #1e231f; }
.srow .pos { width: 26px; flex: none; color: var(--dim); font: 700 15px/1 var(--cond); }
.srow .nm { flex: 1; min-width: 0; }
.srow .nm b { font-weight: 600; }
.srow .nm small { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--dim); font-size: 13px; }
.srow .nm small .logo { width: 14px; height: 14px; }
.srow .nm.empty { color: var(--dim); }
.srow .nm small.line { display: block; color: #c9cfc6; }
.srow .cap { margin-left: 6px; padding: 1px 5px; background: var(--armband); color: #000; font: 700 11px/1.2 var(--cond); font-style: normal; border-radius: 50%; }
.srow .div { color: var(--dim); font: 600 13px/1 var(--cond); }
.srow .n { font: 800 22px/1 var(--cond); }
.lineup { max-width: 470px; }
.lineup header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.lineup h2 { margin: 0; font: 800 26px/1 var(--cond); text-transform: uppercase; }
.lineup header p { margin: 4px 0 0; color: var(--dim); font: 500 14px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.03em; }
.lineup header p.locked { color: var(--armband); }
.total { text-align: right; }
.total b { font: 800 40px/0.85 var(--cond); }
.total small { margin-left: 4px; color: var(--dim); font: 600 14px/1 var(--cond); text-transform: uppercase; }

.pitch {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 520px;
  background: repeating-linear-gradient(180deg, var(--grass) 0 12.5%, var(--grass-2) 12.5% 25%);
  border: 2px solid #000;
}
.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.lines * { fill: none; stroke: rgb(255 255 255 / 0.55); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.lines .goal { fill: rgb(0 0 0 / 0.25); }

.spot { position: absolute; transform: translate(-50%, -32px); display: flex; flex-direction: column; align-items: center; }
.spot-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.spot-btn:not(:disabled):hover .disc { transform: scale(1.06); }
.spot-btn:not(:disabled):hover .tag { background: #000; }
/* Sits exactly over the disc, so the label, armband, score and remove button
   stay next to it however wide the name tag below is. */
.anchor { position: absolute; top: 0; left: 50%; width: 64px; height: 64px; transform: translateX(-50%); pointer-events: none; }
.anchor > * { pointer-events: auto; }
.spot .pos {
  position: absolute;
  top: -2px;
  right: calc(100% + 2px);
  font: 800 13px/1 var(--cond);
  color: rgb(255 255 255 / 0.8);
  text-shadow: 0 1px 0 rgb(0 0 0 / 0.5);
}
.tag {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 140px;
  padding: 3px 7px;
  background: rgb(0 0 0 / 0.72);
  font: 600 14px/1.1 var(--cond);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag .logo { width: 14px; height: 14px; flex: none; }
.tag .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.score {
  position: absolute;
  top: 34px;
  left: calc(100% + 2px);
  min-width: 26px;
  padding: 2px 5px;
  background: var(--ink);
  color: var(--bg);
  font: 800 15px/1 var(--cond);
  text-align: center;
}
.armband {
  position: absolute;
  top: -4px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #000;
  background: rgb(0 0 0 / 0.45);
  color: rgb(255 255 255 / 0.6);
  font: 800 12px/18px var(--cond);
  text-align: center;
}
.armband[aria-pressed="true"] { background: var(--armband); color: #000; }
button.armband:hover { color: #fff; }
@media (hover: hover) {
  button.armband[aria-pressed="false"] { opacity: 0; transition: opacity 0.12s; }
  .spot:hover button.armband, button.armband:focus-visible { opacity: 1; }
  .remove.pitch-x { opacity: 0; transition: opacity 0.12s; }
  .spot:hover .remove.pitch-x, .remove.pitch-x:focus-visible { opacity: 1; }
}

/* Discs: the HaxBall look, thick black outline. */
.disc {
  --size: 64px;
  --fill: #4a5a49;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 3px solid #000;
  background: var(--fill);
  overflow: hidden;
  flex: none;
  transition: transform 0.12s;
}
/* D1/D2 players in blue, D3 in red, like the two HaxBall teams. */
.spot .disc:not(.empty) { --fill: var(--blue); }
.spot[data-div="d3"] .disc:not(.empty) { --fill: var(--red); }
.disc img { width: 100%; height: 100%; object-fit: cover; }
.disc b { font: 800 calc(var(--size) * 0.4)/1 var(--cond); color: #fff; text-transform: none; }
.disc.empty { background: rgb(0 0 0 / 0.18); border: 2px dashed rgb(255 255 255 / 0.6); }
.disc.sm { --size: 34px; border-width: 2px; }
.disc.xs { --size: 22px; border-width: 2px; }

/* ---------------------------------------------------------------- picker */

dialog {
  width: min(760px, 100vw);
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-top: 4px solid var(--ink);
  background: var(--raised);
  color: var(--ink);
}
dialog::backdrop { background: rgb(5 7 6 / 0.75); }
dialog[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px 10px; }
.kicker { margin: 0; color: var(--dim); font: 600 13px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.05em; }
.sheet-head h3 { margin: 6px 0 0; font: 700 22px/1.1 var(--cond); }
.close { color: var(--dim); font-size: 14px; }
.close:hover { color: var(--ink); text-decoration: underline; }
.sheet-tools { display: flex; gap: 16px; padding: 0 20px 12px; border-bottom: 1px solid var(--rule); }
.sheet-tools input, .sheet-tools select {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--faint);
  padding: 6px 0;
  outline: none;
}
.sheet-tools input:focus, .sheet-tools select:focus { border-color: var(--ink); }
.sheet-tools select option { background: var(--raised); }
.sheet-body { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 0 12px; }
/* Don't let the page scroll (and rubber-band) behind an open sheet. */
html:has(dialog[open]) { overflow: hidden; }
.picker-login { margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--rule); color: var(--dim); font-size: 14px; }

.players { width: 100%; border-collapse: collapse; }
.players th {
  position: sticky;
  top: 0;
  background: var(--raised);
  padding: 10px 8px 6px;
  color: var(--dim);
  font: 600 13px/1 var(--cond);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.players th.n { text-align: right; }
.players th:first-child, .players td:first-child { padding-left: 20px; }
.players th:last-child, .players td:last-child { padding-right: 20px; }
.players td { padding: 7px 8px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.players tbody tr { cursor: pointer; }
.players tbody tr:hover, .players tbody tr:focus { background: #1e231f; outline: none; }
.players tr.current { box-shadow: inset 3px 0 0 var(--ink); }
.players tr.off { cursor: default; opacity: 0.38; }
.players tr.off:hover { background: none; }
.players .who div { display: flex; align-items: center; gap: 10px; }
.players .who div > span:not(.disc) { display: flex; flex-direction: column; min-width: 0; }
.players .who small { color: var(--dim); font-size: 12px; }
.players .who small.pos { font: 500 11px/1.4 var(--cond); letter-spacing: 0.03em; }
.players .who small.pos b { color: var(--ink); }
.players .rank { margin-right: 6px; font: 600 12px/1 var(--cond); font-style: normal; color: var(--dim); }
.players tr.divider td { padding: 14px 20px 6px; font: 600 12px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.players tbody tr.divider { cursor: default; }
.players tbody tr.divider:hover { background: none; }
.players tr.divider .more { color: var(--ink); font: inherit; text-transform: none; letter-spacing: 0; font-size: 14px; text-decoration: underline; }
.players .club { color: var(--dim); white-space: nowrap; }
.players .club .logo { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.players .strong { font-weight: 700; color: var(--ink); font-size: 15px; }
.players .n { font-family: var(--cond); font-size: 16px; }

/* ---------------------------------------------------------------- league table */

.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.league { border-collapse: collapse; min-width: 100%; }
.league th {
  padding: 8px 8px;
  color: var(--dim);
  font: 600 13px/1 var(--cond);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
.league th.n { text-align: right; }
.league td { padding: 9px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.league tr[data-row] { cursor: pointer; }
.league tr[data-row]:hover td { background: var(--raised); }
.league .pos { color: var(--dim); font: 600 16px/1 var(--cond); width: 28px; }
.league .mgr div { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.league .mgr img, .league .noav { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #000; background: var(--faint); flex: none; }
.league .md { font: 500 16px/1 var(--cond); color: var(--dim); min-width: 44px; }
.league .md.hot { color: var(--ink); font-weight: 700; }
.league .tot { font: 800 20px/1 var(--cond); padding-left: 18px; }
.league tr.mine td:first-child { box-shadow: inset 4px 0 0 var(--armband); }
.league tr.mine .mgr b { color: var(--armband); }
.league tbody tr:first-child .tot { color: var(--armband); }
.league .detail td { background: var(--raised); padding: 6px 16px 14px; white-space: normal; }
.round-detail h3 { margin: 12px 0 8px; font: 700 16px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.03em; }
.round-detail h3 span { color: var(--dim); margin-left: 6px; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.mini h4 { margin: 0 0 4px; font: 600 14px/1 var(--cond); text-transform: uppercase; }
.mini h4 span { color: var(--dim); font-weight: 500; margin-left: 4px; text-transform: none; }
.mini ul { list-style: none; margin: 0; padding: 0; }
.mini li { display: grid; grid-template-columns: 26px 22px 1fr auto; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; }
.mini .pos { font: 700 12px/1 var(--cond); color: var(--dim); }
.mini i { font-style: normal; font: 800 11px/1 var(--cond); background: var(--armband); color: #000; padding: 1px 4px; margin-left: 4px; }

/* ---------------------------------------------------------------- rules */

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 56px; max-width: 980px; }
.rules h2 { margin: 8px 0 10px; font: 800 22px/1 var(--cond); text-transform: uppercase; }
.rules h2:not(:first-child) { margin-top: 28px; }
.rules p { margin: 0 0 12px; color: #c9cfc6; }
.points { border-collapse: collapse; width: 100%; }
.points th { text-align: left; vertical-align: top; padding: 8px 18px 8px 0; font: 700 16px/1.2 var(--cond); text-transform: uppercase; white-space: nowrap; border-top: 1px solid var(--rule); }
.points td { padding: 8px 0; border-top: 1px solid var(--rule); color: #c9cfc6; }

/* ---------------------------------------------------------------- captain prompt */

/* When all four are picked but there's no captain, the C buttons show and pulse red. */
@keyframes cap-pulse {
  0% { box-shadow: 0 0 0 0 rgb(229 110 86 / 0.75); }
  70% { box-shadow: 0 0 0 10px rgb(229 110 86 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(229 110 86 / 0); }
}
.needs-cap button.armband { opacity: 1 !important; border-color: var(--red); background: var(--red); color: #fff; animation: cap-pulse 1.4s ease-out infinite; }
.pulse-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 1px; animation: cap-pulse 1.4s ease-out infinite; }
.cap-banner { margin: 0 0 10px; padding: 9px 12px; background: rgb(229 110 86 / 0.14); border-left: 3px solid var(--red); font-size: 14px; }
.cap-hint { margin: 8px 0 0; color: #f0b3a6; font-size: 14px; }
.cap-banner.warn { background: rgb(244 211 94 / 0.12); border-left-color: var(--armband); }
.cap-banner b, .cap-hint b { color: #fff; }
.row-cap { position: static; flex: none; margin-right: 4px; }
.week-card:not(.needs-cap) .row-cap { opacity: 0.55; }
.week-card:not(.needs-cap) .row-cap:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .needs-cap button.armband, .pulse-dot { animation: none; } }

/* ---------------------------------------------------------------- admin */

.admin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 14px; }
.admin-head h2 { margin: 0; font: 800 26px/1 var(--cond); text-transform: uppercase; }
.admin-head select { padding: 6px 8px; background: var(--raised); border: 1px solid var(--rule); color: var(--ink); }
.admin-head .aside { flex-basis: 100%; margin: 0; }
.league.admin td { vertical-align: top; }
.league.admin td small { display: block; margin-top: 2px; color: var(--dim); font-size: 12px; }
.league.admin td.empty { color: var(--faint); }
.league.admin tr.none td { color: var(--faint); }
.league.admin .cap { padding: 0 4px; background: var(--armband); color: #000; font: 700 11px/1.3 var(--cond); font-style: normal; border-radius: 50%; }
.league.admin .when { color: var(--dim); font-size: 12px; white-space: nowrap; }

/* ---------------------------------------------------------------- login redirect */

.redirecting { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgb(5 7 6 / 0.88); }
.redirecting[hidden] { display: none; }
.redirecting > div { text-align: center; }
.redirecting p { margin: 16px 0 0; font: 700 20px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.04em; }
.spinner { display: inline-block; width: 40px; height: 40px; border: 4px solid rgb(88 101 242 / 0.3); border-top-color: #5865f2; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------------------------------------------------------------- intro */

#welcome { width: min(560px, 100vw); }
.intro { padding: 4px 20px 20px; }
.intro ol { margin: 0; padding-left: 22px; }
.intro li { margin: 0 0 10px; color: #c9cfc6; line-height: 1.45; }
.intro li b, .quick-rules b { color: var(--ink); }
.intro h4 { margin: 16px 0 6px; font: 800 16px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.03em; }
.intro .points th { padding: 6px 14px 6px 0; font-size: 15px; }
.intro .points td { padding: 6px 0; font-size: 14px; }
.intro-actions { display: flex; gap: 18px; align-items: center; margin-top: 18px; }
.intro .go { padding: 9px 18px; background: var(--ink); color: var(--bg); font: 700 16px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.03em; }
.intro .ghost { color: var(--dim); font-size: 14px; }
.intro .ghost:hover, .quick-rules .more:hover { color: var(--ink); text-decoration: underline; }

.quick-rules { padding-top: 18px; border-top: 1px solid var(--rule); }
.quick-rules h2 { margin: 0 0 10px; font: 800 18px/1 var(--cond); text-transform: uppercase; }
.quick-rules .more { margin-top: 6px; color: var(--dim); font-size: 14px; }
.quick-rules h2 + .steps, .quick-rules h2 + .score-grid { margin-top: 0; }
.quick-rules h2:not(:first-child) { margin-top: 26px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 0 0 8px; color: #c9cfc6; font-size: 14px; line-height: 1.45; }
.steps li::marker { color: var(--dim); font: 700 14px var(--cond); }
.score-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.score-grid th, .score-grid td { padding: 7px 8px; border-top: 1px solid var(--rule); text-align: center; }
.score-grid thead th { border-top: 0; color: var(--dim); font: 600 12px/1 var(--cond); text-transform: uppercase; letter-spacing: 0.04em; }
.score-grid tbody th, .score-grid.gk th { text-align: left; padding-left: 0; font: 700 15px/1 var(--cond); text-transform: uppercase; white-space: nowrap; }
.score-grid td { font: 700 16px/1 var(--cond); }
.score-grid td.no { color: var(--faint); font-weight: 500; }
.score-grid.gk td { padding: 7px 4px; }
.score-grid.gk tr:first-child td { color: var(--dim); font-weight: 500; }
.score-sub { margin: 14px 0 4px; color: #c9cfc6; font-size: 14px; }
.score-note { margin: 10px 0 12px; color: var(--dim); font-size: 13px; }

/* ---------------------------------------------------------------- small screens */

/* Header lines up with the centred page. */
.bar { padding-left: max(32px, calc((100vw - 1120px) / 2 + 32px)); padding-right: max(32px, calc((100vw - 1120px) / 2 + 32px)); }
.strip button { flex: 1 0 auto; }

@media (max-width: 900px) {
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .side { padding-top: 0; }
}

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; padding: 14px 16px 0; }
  .tabs { grid-column: 1 / -1; grid-row: 2; }
  .account { padding-bottom: 0; align-self: start; gap: 12px; }
  .me span, .dev { display: none; }
  main { padding: 16px 16px 56px; }
  .disc { --size: 54px; }
  .tag { max-width: 112px; font-size: 13px; }
  .anchor { width: 54px; height: 54px; }
  .players .club span { display: none; }
  dialog { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; }
  /* Hide G, A and /gm so the picker fits a phone without sideways scrolling. */
  .players th:nth-child(4), .players td:nth-child(4), .players th:nth-child(5), .players td:nth-child(5),
  .players th:nth-child(7), .players td:nth-child(7) { display: none; }
  .players th, .players td { padding-left: 5px; padding-right: 5px; }
  .players th:first-child, .players td:first-child { padding-left: 14px; }
  .players th:last-child, .players td:last-child { padding-right: 14px; }
  .players .who b, .players .who small { overflow-wrap: anywhere; }
}
