/* Quiz of the Day — shared styles. Colours, type and spacing follow design/*.dc.html. */

:root {
  --ink: #0E1525;
  --ink-hover: #1B2438;
  --ink-raised: #222B3E;
  --ink-avatar: #2A3447;
  --ink-border: #3A4458;
  --on-ink-muted: #C5CAD6;
  --on-ink-faint: #A9B0BF;
  --page: #EEF0F3;
  --card: #FFFFFF;
  --subtle: #F4F5F8;
  --line: #DDE1E7;
  --line-soft: #E6E9EF;
  --field: #C3C9D4;
  --avatar: #E3E7EE;
  --text-2: #475063;
  --muted: #5C6475;
  --faint: #8A92A3;
  --me-row: #EEF2FA;
  --accent: #C8F03C;
  --link: #1D4FC4;
  --link-hover: #123A99;
  --error-bg: #FDECEC;
  --error-fg: #8A1C1C;
  --ok-bg: #EEF7DA;
  --ok-fg: #2F4A06;
  --display: Archivo, Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }
.mobile-only, .mobile-inline { display: none; }
.avatar-stack { display: flex; }
.notices { display: flex; flex-direction: column; gap: 12px; }

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

.site-header { background: var(--ink); color: #FFFFFF; }
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #FFFFFF; text-decoration: none; }
.brand:hover { color: #FFFFFF; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-stretch: 75%; font-weight: 900; font-size: 20px;
}
.brand__name { font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 22px; letter-spacing: 0.02em; white-space: nowrap; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.main-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px;
  color: var(--on-ink-muted); font-weight: 500; text-decoration: none;
}
.main-nav a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }
.main-nav a[aria-current="page"] { background: var(--ink-raised); color: #FFFFFF; font-weight: 600; }
.main-nav .play-link { gap: 8px; margin-left: auto; border: 1px solid var(--ink-border); color: #FFFFFF; font-weight: 600; }
.main-nav .play-link:hover { border-color: #56617A; }
.play-link__short { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #FFFFFF; text-decoration: none; }
.user-chip:hover { color: #FFFFFF; }
.user-chip__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink-avatar);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-chip__text { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__name { font-weight: 600; }
.user-chip__team { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-ink-muted); }
.signout-btn {
  min-height: 44px; padding: 0 12px; margin-left: -16px; border: 0; border-radius: 8px;
  background: transparent; color: var(--on-ink-muted); font-weight: 500; cursor: pointer;
}
.signout-btn:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.06); }

.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 0 8px env(safe-area-inset-bottom); background: #FFFFFF; border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1 1 0; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 500;
}
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------------------------------------------------------------- layout */

.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head__text { display: flex; flex-direction: column; gap: 6px; }
.page-title { margin: 0; font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 46px; line-height: 1; }
.page-intro { margin: 0; color: var(--text-2); max-width: 720px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.row-2 { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.card-head--stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.card-title { margin: 0; font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 26px; line-height: 1.15; }
.card-subtitle { margin: 0; font-size: 18px; font-weight: 700; }
.note { font-size: 13px; color: var(--muted); }
.footnote { margin: 0; font-size: 13px; color: var(--muted); }
.empty { margin: 14px 0 0; color: var(--text-2); }
.loading { margin: 0; color: var(--muted); }
.more-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------------------------------------------------------------- shared bits */

.swatch { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; background: var(--line); }
.swatch--sm { width: 8px; height: 8px; }
.swatch--lg { width: 12px; height: 12px; border-radius: 3px; }
.team-tag { display: inline-flex; align-items: center; gap: 6px; }
.badge { padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 1.45; }
.badge--accent { background: var(--accent); color: var(--ink); }
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; border: 2px solid #FFFFFF; background: var(--avatar);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
}
.avatar + .avatar { margin-left: -12px; }
.avatar--sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 12px; }
.avatar--sm + .avatar--sm { margin-left: -8px; }
.avatar--flat { border: 0; width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
.dots { display: flex; gap: 3px; }
.dot { width: 7px; height: 16px; border-radius: 2px; background: var(--line); }
.dot--on { background: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0;
  background: var(--ink); color: #FFFFFF; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--ink-hover); color: #FFFFFF; }
.btn:disabled { background: var(--line); color: var(--text-2); cursor: not-allowed; }
.btn--secondary { background: #FFFFFF; color: var(--ink); border: 1px solid var(--field); font-weight: 600; }
.btn--secondary:hover { background: var(--subtle); color: var(--ink); }
.btn--small { min-height: 44px; padding: 0 18px; }
.btn--block { width: 100%; }
.btn--big { min-height: 52px; font-size: 16px; }
.link-btn {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--link);
  font-weight: 500; text-decoration: underline; cursor: pointer;
}
.link-btn:hover { color: var(--link-hover); }
.link-btn--quiet { color: var(--muted); font-size: 13px; min-height: 32px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field--narrow { max-width: 320px; }
.label { font-size: 14px; font-weight: 600; }
.label__hint { font-weight: 400; color: var(--muted); }
.input {
  height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF;
  font-size: 16px; width: 100%;
}
.input:focus { border-color: var(--ink); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input--num { font-size: 17px; font-variant-numeric: tabular-nums; }
.input--code { letter-spacing: 0.08em; text-transform: uppercase; }
.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset > legend { padding: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.form-msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.form-msg--error { background: var(--error-bg); color: var(--error-fg); }
.form-msg--ok { background: var(--ok-bg); color: var(--ok-fg); }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--line); }
.seg--light { background: var(--page); }
.seg button {
  flex: 1 1 auto; min-height: 44px; padding: 0 16px; border-radius: 9px; border: 0;
  background: transparent; color: var(--ink); font-weight: 500; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #FFFFFF; font-weight: 700; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tiles--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile__value {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere;
}
.tiles--6 .tile__value { font-size: 34px; }
.tile__sub { font-size: 13px; color: var(--text-2); }

.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px;
  border-radius: 14px; background: #FFFFFF; border: 1px solid var(--line); border-left: 5px solid var(--accent);
}
.notice__text { flex: 1 1 300px; margin: 0; }
.notice__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- today: log score */

.log-form { display: flex; flex-direction: column; gap: 22px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pick {
  flex: 1 0 44px; height: 52px; border-radius: 10px; border: 1px solid var(--field); background: #FFFFFF; color: var(--ink);
  font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 20px; cursor: pointer;
}
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

.mate-groups { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.mate-group { display: flex; align-items: flex-start; gap: 8px; }
.mate-group__name { flex: 0 0 132px; min-height: 44px; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.mate-group__chips { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mate {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--field); background: #FFFFFF; color: var(--ink); font-weight: 600; cursor: pointer;
}
.mate:hover { border-color: var(--ink); }
.mate__av {
  width: 30px; height: 30px; border-radius: 50%; background: var(--avatar);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.mate__check { display: none; }
.mate__tag { font-size: 12px; font-weight: 500; }
.mate[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.mate[aria-pressed="true"] .mate__av { background: var(--ink-avatar); color: #FFFFFF; }
.mate[aria-pressed="true"] .mate__check { display: block; }
.mate:disabled { background: var(--subtle); border-color: var(--line-soft); color: var(--muted); cursor: not-allowed; }
.mate:disabled .mate__av { background: var(--line-soft); color: var(--muted); }

.log-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px;
  padding-top: 18px; border-top: 1px solid var(--line-soft);
}
.log-foot__summary { flex: 1 1 300px; margin: 0; font-size: 14px; color: var(--text-2); }
.log-foot__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.log-remove { margin-top: -10px; }

.logged { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.logged__big { display: flex; align-items: baseline; gap: 4px; }
.logged__num { font-family: var(--display); font-stretch: 75%; font-weight: 900; font-size: 80px; line-height: 0.9; }
.logged__of { font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 30px; color: var(--muted); }
.logged__info { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.chip-ok {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 700;
}
.logged__headline { font-size: 19px; font-weight: 600; }
.logged__who { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.logged__line { color: var(--text-2); }

/* ---------------------------------------------------------------- today: board, teams, chatter */

.board { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.board-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; }
.board-row--me { background: var(--me-row); }
.board-row--me .avatar { border-color: var(--me-row); }
.rank {
  width: 22px; flex: 0 0 22px; text-align: right;
  font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; color: var(--text-2);
}
.board-row .avatar-stack { flex: 0 0 80px; }
.board-row__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.board-row__names { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.board-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13px; color: var(--muted); }
.board-row__score { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.board-row__correct { width: 48px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-row__points { width: 64px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

.waiting {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--subtle);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--text-2);
}
.waiting__title { font-weight: 600; color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #FFFFFF; border: 1px solid var(--line); }

.team-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.team-item { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.team-item:first-child { border-top-color: transparent; }
.team-item__row { display: flex; align-items: center; gap: 12px; }
.team-item__rank { width: 18px; font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 19px; color: var(--text-2); }
.team-item__name { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.team-item__mine { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.team-item__avg { font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.team-item__bar { display: flex; align-items: center; gap: 10px; padding-left: 30px; font-size: 13px; color: var(--text-2); }
.bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; }

.locked { position: relative; margin-top: 16px; }
.locked__ghost { display: flex; flex-direction: column; gap: 16px; filter: blur(5px); opacity: 0.7; }
.ghost { display: flex; gap: 10px; }
.ghost__av { width: 30px; height: 30px; border-radius: 50%; background: var(--line); }
.ghost__lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ghost__lines span { height: 10px; border-radius: 5px; background: var(--line); }
.ghost__lines span:first-child { background: var(--field); }
.locked__msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
.locked__card {
  max-width: 260px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 16px 18px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line);
}
.locked__card span { font-size: 14px; color: var(--text-2); }
.comments { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 10px; }
.comment__av {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: var(--avatar);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.comment__body { flex: 1 1 auto; min-width: 0; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.comment__meta strong { font-size: 14px; color: var(--ink); }
.comment__meta .link-btn { margin-left: auto; min-height: 24px; }
.comment__text { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------------------------------------------------------------- standings */

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend li { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.legend__line { width: 16px; height: 3px; border-radius: 2px; }

.chart { margin-top: 22px; display: flex; gap: 12px; }
.chart__plot { position: relative; flex: 1 1 auto; min-width: 0; height: 260px; margin-left: 30px; touch-action: pan-y; }
.chart__tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
.chart__tick--base { border-top-color: var(--field); }
.chart__tick-label {
  position: absolute; left: -30px; width: 22px; transform: translateY(-50%);
  text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.chart__svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.chart__point { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; }
.chart__cols { position: absolute; inset: 0; display: flex; }
.chart__cols > div { flex: 1 1 0; }
.chart__hi-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--faint); pointer-events: none; }
.chart__hi-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; box-shadow: 0 0 0 2px #FFFFFF; pointer-events: none; }
.chart__ends { position: relative; flex: 0 0 120px; height: 260px; }
.chart__end { position: absolute; left: 0; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.chart__end b { font-weight: 600; }
.chart__end span:last-child { color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart__x { display: flex; margin: 8px 132px 0 30px; }
.chart__x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tooltip {
  position: absolute; top: 6px; width: 230px; padding: 10px 12px; border-radius: 10px;
  background: var(--ink); color: #FFFFFF; font-size: 13px; pointer-events: none; z-index: 2;
}
.tooltip__title { font-weight: 700; margin-bottom: 6px; }
.tooltip__row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tooltip__row span:nth-child(2) { flex: 1 1 auto; }
.tooltip__row b { font-variant-numeric: tabular-nums; }
.tooltip__row span:last-child { width: 58px; text-align: right; color: var(--on-ink-muted); font-variant-numeric: tabular-nums; }

.table-wrap { margin-top: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data--players { min-width: 900px; }
.data th {
  padding: 8px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap;
}
.data td { padding: 10px 12px; border-bottom: 1px solid var(--page); text-align: right; white-space: nowrap; }
.data .l { text-align: left; }
.data tr.is-me td { background: var(--me-row); }
.data tr.is-unranked td { color: var(--text-2); }
.data .subhead td { padding: 14px 12px 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; }
.data .rank-cell { width: 40px; font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 18px; color: var(--text-2); }
.data .strong { font-weight: 700; font-size: 16px; }
.data .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.data .who a { color: var(--ink); font-weight: 600; text-decoration: none; }
.data .who a:hover { text-decoration: underline; }
.sort {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 40px; padding: 0; border: 0;
  background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
th[aria-sort] .sort { color: var(--ink); }

/* ---------------------------------------------------------------- my stats */

.profile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.profile-head__who { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile-avatar {
  width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; background: var(--ink); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 34px;
}
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-2); }
.profile-meta .team-tag { font-weight: 600; color: var(--ink); }
.today-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px;
  border-radius: 14px; background: #FFFFFF; border: 1px dashed var(--faint);
}
.today-box--done { border-style: solid; border-color: var(--line); }
.today-box__text { display: flex; flex-direction: column; line-height: 1.3; }
.today-box__text span { font-size: 13px; color: var(--text-2); }

.dist { margin-top: 28px; flex: 1 1 auto; min-height: 220px; display: flex; flex-direction: column; }
.dist__bars { flex: 1 1 auto; display: flex; gap: 6px; border-bottom: 1px solid var(--field); }
.dist__col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.dist__bar { border-radius: 4px 4px 0 0; background: #2A78D6; }
.dist__bars.is-hovering .dist__bar { background: #9EC5F4; }
.dist__bars.is-hovering .dist__col.is-hi .dist__bar { background: #2A78D6; }
.dist__label { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dist__tip {
  position: absolute; width: 150px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #FFFFFF;
  font-size: 13px; pointer-events: none; z-index: 2;
}
.dist__tip div:first-child { font-weight: 700; }
.dist__tip div:last-child { color: var(--on-ink-muted); }
.dist__x { display: flex; gap: 6px; margin-top: 6px; }
.dist__x span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.cal { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal__wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal__cell {
  aspect-ratio: 1 / 1; border-radius: 6px; border: 1px solid transparent;
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 4px 6px; font-size: 11px; font-weight: 600;
}
.cal__cell--missed { background: #FFFFFF; border-color: var(--field); color: var(--muted); }
.cal__cell--before { background: var(--subtle); color: var(--faint); }
.cal__cell--today { border: 1.5px dashed var(--ink); }
.cal__legend { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; color: var(--text-2); }
.cal__legend > span { display: flex; align-items: center; gap: 6px; }
.cal__key { width: 14px; height: 14px; border-radius: 4px; }
.cal__ramp { gap: 4px !important; }

.recent { list-style: none; margin: 12px 0 0; padding: 0; }
.recent__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 4px;
  border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums;
}
.recent__row:first-child { border-top-color: transparent; }
.recent__date { flex: 0 0 110px; font-weight: 600; }
.recent__c { flex: 0 0 48px; text-align: right; font-weight: 700; }
.recent__p { flex: 0 0 90px; text-align: right; color: var(--text-2); }
.recent__place { flex: 1 1 120px; }
.recent__place span { color: var(--muted); font-size: 13px; }
.recent__team { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); }

.profile-form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin-top: 16px; }

/* ---------------------------------------------------------------- team picker (sign-up and profile) */

.team-options { display: flex; flex-direction: column; gap: 8px; }
.team-option {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #FFFFFF; cursor: pointer;
}
.team-option:has(input:checked) { border: 2px solid var(--ink); background: var(--subtle); padding: 0 13px; }
.team-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.team-option__name { flex: 1 1 auto; font-weight: 600; }
.team-option__meta { font-size: 13px; color: var(--muted); }
.swatch--new { background: #FFFFFF; border: 1.5px dashed var(--muted); }
.new-team { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; background: var(--subtle); }
.colours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.colour { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #FFFFFF; padding: 4px; cursor: pointer; }
.colour span { display: block; width: 100%; height: 100%; border-radius: 6px; }
.colour[aria-pressed="true"] { border: 2px solid var(--ink); padding: 3px; }

/* ---------------------------------------------------------------- sign in */

.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth__hero {
  flex: 1 1 420px; min-width: 0; background: var(--ink); color: #FFFFFF; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth__brand .brand__mark { width: 40px; height: 40px; border-radius: 9px; font-size: 23px; }
.auth__brand .brand__name { font-size: 26px; }
.auth__pitch { display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.auth__title { margin: 0; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 60px; line-height: 0.98; }
.auth__lede { margin: 0; font-size: 18px; color: var(--on-ink-muted); }
.auth__points { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth__points li { display: flex; align-items: center; gap: 12px; }
.auth__points li > span { width: 32px; height: 32px; border-radius: 8px; background: var(--ink-raised); display: flex; align-items: center; justify-content: center; }
.auth__small { margin: 0; font-size: 13px; color: var(--on-ink-faint); }
.auth__main { flex: 1 1 520px; min-width: 0; padding: 48px 24px; display: flex; justify-content: center; align-items: flex-start; }
.auth__card { width: 100%; max-width: 460px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth__form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.auth__form h2 { margin: 0; font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 28px; }
.auth__form > .note { margin: -8px 0 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row .link-btn { min-height: 0; font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center { text-align: center; }

/* ---------------------------------------------------------------- phones */

@media (max-width: 719px) {
  .mobile-only { display: block; }
  .mobile-inline { display: inline; }
  .desktop-only { display: none !important; }

  .site-header__inner { flex-wrap: nowrap; min-height: 60px; padding: 8px 12px 8px 16px; gap: 8px; }
  .brand { gap: 9px; }
  .brand__mark { width: 30px; height: 30px; border-radius: 7px; font-size: 17px; }
  .brand__name { font-size: 20px; }
  .main-nav { justify-content: flex-end; }
  .main-nav a:not(.play-link) { display: none; }
  .main-nav .play-link { padding: 0 12px; }
  .play-link__long { display: none; }
  .play-link__short { display: inline; }
  .user-chip__text { display: none; }
  .signout-btn { display: none; } /* no room on phones; My stats has a Sign out button */
  .user-chip { width: 44px; justify-content: center; }
  .user-chip__avatar { width: 34px; height: 34px; }
  .tabbar { display: flex; }
  body.has-tabbar { padding-bottom: calc(65px + env(safe-area-inset-bottom)); }

  .page { padding: 20px 16px 24px; gap: 16px; }
  .page-title { font-size: 34px; }
  .eyebrow { font-size: 12px; }
  .page-head .btn { width: 100%; }
  .columns, .col-main, .col-side, .row-2 { gap: 16px; }
  .card { padding: 18px; }
  .card-title { font-size: 22px; }
  .tiles { gap: 12px; }
  .tiles--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles--6 .tile__value { font-size: 28px; }
  .tile { padding: 14px; }

  .log-form { gap: 16px; }
  .picks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .pick { height: 48px; font-size: 19px; }
  .field--narrow { max-width: none; }
  .mate-group { flex-direction: column; gap: 6px; }
  .mate-group__name { flex-basis: auto; min-height: 0; }
  .mate-group__chips { flex-basis: auto; }
  .mate:disabled, .mate-group--done { display: none; }
  .log-foot .btn, .log-foot__actions { width: 100%; }
  .log-foot__actions .btn { flex: 1 1 0; }
  .logged__num { font-size: 64px; }

  .board-row { gap: 12px; padding: 10px 4px; border-radius: 0; border-top: 1px solid var(--line-soft); }
  .board-row:first-child { border-top-color: transparent; }
  .board-row--me { border-radius: 10px; padding: 10px 8px; border-top-color: transparent; }
  .board-row .avatar-stack, .board-row .dots { display: none; }
  .board-row__score { flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.3; }
  .board-row__correct, .board-row__points { width: auto; }
  .board-row__points { font-size: 13px; }

  .chart__plot { height: 200px; }
  .chart__ends { display: none; }
  .chart__x { margin-right: 0; }
  .chart__x span { font-size: 11px; }
  .tooltip { width: 190px; }

  .recent__row { gap: 4px 14px; }
  .recent__date { flex-basis: 100%; }
  .recent__row .dots { display: none; }
  .recent__c, .recent__p { flex-basis: auto; text-align: left; }

  .auth__hero { flex-basis: 100%; padding: 24px 20px 28px; gap: 18px; }
  .auth__title { font-size: 38px; }
  .auth__lede { font-size: 16px; }
  .auth__points, .auth__small { display: none; }
  .auth__main { padding: 20px 16px 40px; }
  .auth__card { padding: 20px; }
}

@media (max-width: 359px) {
  .brand__name { display: none; }
}
