/* Onest variable, split by script the same way the font package ships it (SIL OFL, see fonts/OFL.txt). */

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2");
  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;
}

/* Tokens. Dark only, after the user's bookmaker reference. */

:root {
  color-scheme: dark;
  --font: Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #090a0a;
  --strip: #000000;
  --surface: #1d1e1f;
  --tile: #272729;
  --tile-hover: #303133;
  --tile-off: #202122;
  --outline: #3a3b3e;
  --field-line: #696b70;

  --text: #ffffff;
  --text-2: #c9ccd4;
  --muted: #989aa0;
  --off-text: #8a8c91;
  --faint: #696b70;

  --accent: #f3f251;
  --accent-hover: #e4e35a;
  --on-accent: #090a0a;

  --hero: #397b58;
  --hero-line: #498666;
  --hero-press: #2f6548;
  --hero-live: #a9dcbf;

  --pos: #50b17d;
  --won-tint: #24302b;
  --neutral: #87898e;
  --neg: #f0645a;

  --radius: 8px;
  --radius-card: 16px;
  --shadow: 0 16px 40px rgb(0 0 0 / 0.55);
}

/* Base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 0.9375rem/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, dl, dd, ol, ul {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

[hidden] {
  display: none !important;
}

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

::placeholder {
  color: var(--muted);
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: 1448px;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 760px) {
  .wrap {
    padding-inline: 24px;
  }
}

.wrap--narrow {
  max-width: 1248px;
}

.amount--pos {
  color: var(--pos);
}

.amount--neg {
  color: var(--neg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}

.btn:hover {
  background: var(--tile-hover);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.6;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--outline {
  border-color: var(--outline);
  background: transparent;
}

.btn--outline:hover {
  background: var(--tile);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
}

.btn--ghost:hover {
  background: var(--tile);
  color: var(--text);
}

.btn--danger {
  border-color: var(--outline);
  background: transparent;
  color: var(--neg);
}

.btn--danger:hover {
  background: var(--tile);
}

.btn--danger-solid {
  background: var(--neg);
  color: var(--on-accent);
  font-weight: 700;
}

.btn--danger-solid:hover {
  background: #f37b72;
}

.btn--quiet-danger {
  padding-inline: 10px;
  background: transparent;
  color: var(--neg);
}

.btn--quiet-danger:hover {
  background: transparent;
  text-decoration: underline;
}

.btn--compact {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.875rem;
}

.side-dot,
.bet__side::before {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}

.side-dot.is-for,
.bet__side.is-for::before {
  background: var(--pos);
}

/* Forms */

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text);
  line-height: 1.3;
}

.input:hover {
  border-color: var(--muted);
}

.input:focus-visible {
  outline-offset: 1px;
  border-color: var(--accent);
}

.input[aria-invalid="true"] {
  border-color: var(--neg);
}

textarea.input {
  min-height: 88px;
  resize: vertical;
}

select.input {
  appearance: none;
  padding-right: 40px;
  background: var(--tile) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9ccd4' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5 12 15l5.5-5.5'/%3E%3C/svg%3E") no-repeat right 10px center / 20px;
}

.input--short {
  max-width: 10rem;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field__label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.field__hint,
.hint {
  color: var(--muted);
  font-size: 0.8125rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.form {
  display: grid;
  gap: 14px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 12px;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form__error {
  color: var(--neg);
  font-weight: 600;
}

.notice {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text-2);
}

/* Strip and top bar */

.strip {
  background: var(--strip);
  color: var(--muted);
  font-size: 0.8125rem;
}

.strip__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 24px;
  padding-block: 8px;
}

.strip__bot {
  color: var(--text-2);
}

.strip__bot a {
  color: var(--text);
  font-weight: 600;
}

.topbar {
  background: var(--surface);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
}

.brand {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 60px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 28px;
  height: 28px;
}

.brand__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.topnav {
  order: 3;
  display: flex;
  flex: 1 0 100%;
  gap: 24px;
}

.topnav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.topnav__link:hover,
.topnav__link[aria-current] {
  color: var(--text);
}

.topnav__link[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.topbar__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.topbar__login,
.topbar__cta-tail,
.topbar__site-full {
  display: none;
}

@media (min-width: 480px) {
  .topbar__login,
  .topbar__cta-tail {
    display: inline;
  }

  .topbar__login {
    display: inline-flex;
  }
}

@media (min-width: 560px) {
  .topbar__site-full {
    display: inline;
  }

  .topbar__site-short {
    display: none;
  }
}

@media (min-width: 900px) {
  .topbar__inner {
    flex-wrap: nowrap;
    min-height: 64px;
  }

  .brand {
    flex: 0 1 auto;
  }

  .topnav {
    order: 0;
    flex: 0 1 auto;
    align-self: stretch;
    gap: 32px;
    margin-inline: 28px auto;
  }

  .topnav__link {
    min-height: 64px;
  }
}

/* Page layout: lines on the left, the feed and players on the right. */

.layout {
  flex: 1;
  display: grid;
  align-items: start;
  gap: 16px;
  padding-block: 16px 40px;
}

.layout__main,
.layout__side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

@media (min-width: 760px) {
  .layout {
    gap: 20px;
    padding-block: 20px 48px;
  }

  .layout__side {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    align-items: start;
  }
}

/* From 1100px the sidebar sits beside the lines, like the bet slip in the reference. */
@media (min-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .layout__side {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout__side--sticky {
    position: sticky;
    top: 16px;
  }
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  background: var(--surface);
  font-weight: 600;
}

.panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: var(--surface);
  scroll-margin-top: 16px;
}

@media (min-width: 760px) {
  .panel {
    padding: 24px;
  }
}

.panel__title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.panel__note {
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.block-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Hero: the featured line, laid out like the reference's match header. */

.hero {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--hero);
  color: var(--text);
}

@media (min-width: 400px) {
  .hero {
    padding: 20px;
  }
}

@media (min-width: 760px) {
  .hero {
    padding: 20px 24px;
  }
}

.hero__crumbs {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  font-weight: 500;
}

.hero__sep {
  padding-inline: 8px;
}

.hero__body {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .hero__body {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 32px;
  }
}

.hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .hero__title {
    font-size: 1.75rem;
  }
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--hero-line);
  font-size: 0.875rem;
}

.hero__status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
}

.hero__status.is-live::before {
  border-color: var(--hero-live);
  background: var(--hero-live);
}

.score {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 760px) {
  .score {
    width: auto;
  }
}

.score th,
.score td {
  padding: 3px 0 3px 8px;
  text-align: right;
}

@media (min-width: 400px) {
  .score th,
  .score td {
    padding-left: 12px;
  }
}

@media (min-width: 760px) {
  .score th,
  .score td {
    padding-left: 24px;
  }
}

.score thead th {
  padding-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.score .score__side {
  padding-left: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.score td {
  font-weight: 600;
}

.score__odds {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.score__odds--link {
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}

.score__odds--link:hover {
  border-color: var(--text);
  background: var(--hero-press);
}

.hero__text {
  font-size: 0.9375rem;
}

/* Filter chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

@media (min-width: 760px) {
  .chips {
    padding: 16px 20px;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--tile-hover);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 400px) {
  .chip {
    padding-inline: 18px;
  }
}

.chip:hover {
  background: var(--outline);
}

.chip[aria-selected="true"] {
  background: var(--text);
  color: var(--on-accent);
}

.chip__count {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* Line cards */

.lines {
  display: grid;
  gap: 16px;
}

.lines__grid,
.lines__column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

@media (min-width: 900px) {
  .lines__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.lines__empty {
  grid-column: 1 / -1;
  padding: 24px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted);
}

.line {
  container-type: inline-size;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: var(--surface);
  scroll-margin-top: 16px;
}

@media (min-width: 760px) {
  .line {
    padding: 20px;
  }
}

.line__head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.line__icon {
  display: flex;
  color: var(--muted);
}

.line__icon.is-live {
  color: var(--text);
}

.line__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.line__toggle {
  padding: 0;
  border: 0;
  background: none;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

/* The whole header toggles the card, and the focus ring follows that hit area. */
.line__toggle::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 10px;
}

.line__toggle:focus-visible {
  outline: none;
}

.line__toggle:focus-visible::after {
  outline: 2px solid var(--accent);
}

.line__sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.875rem;
}

.line__chevron {
  color: var(--muted);
  transform: rotate(180deg);
  transition: transform 0.15s, color 0.12s;
}

.line__head:hover .line__chevron {
  color: var(--text);
}

.line--collapsed .line__chevron {
  transform: none;
}

.line__body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.line__desc {
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Odds tiles */

.odds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* The label wraps between words beside the odds; only when its longest word does not fit there do the odds move
   to a line of their own, so words are never hyphenated. */
.tile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 8px;
  min-width: 0;
  min-height: 52px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text);
  text-decoration: none;
}

@container (min-width: 420px) {
  .tile {
    padding-inline: 16px;
  }
}

.tile--link {
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s;
}

.tile--link:hover {
  background: var(--tile-hover);
}

.tile__side,
.tile--edit .tile__label {
  flex: 1 1 min-content;
  min-width: 0;
}

/* A column, not a grid: a grid track would keep an unbroken long label at its full width and clip it. */
.tile__side {
  display: flex;
  flex-direction: column;
}

.tile__label {
  color: var(--text-2);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.tile__note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.tile__note .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.25;
}

.tile__odds {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tile__lock {
  width: 16px;
  height: 16px;
  color: var(--faint);
}

.tile--off {
  background: var(--tile-off);
}

.tile--off .tile__label,
.tile--off .tile__odds {
  color: var(--off-text);
}

.tile--won {
  border-color: var(--pos);
  background: var(--won-tint);
}

.tile__note--won {
  color: var(--pos);
  font-weight: 600;
}

/* Stake split, after the reference's share bar */

.split {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.split__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--tile-hover);
  color: var(--muted);
}

.split__main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.split__bar {
  display: flex;
  gap: 4px;
  height: 6px;
}

.split__seg {
  flex: 1 1 0;
  min-width: 6px;
  border-radius: 3px;
  background: var(--text);
}

.split__seg.is-for {
  background: var(--pos);
}

.split__seg.is-empty {
  background: var(--neutral);
}

.split__sides {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
}

.split__side {
  display: grid;
  min-width: 0;
  font-size: 0.875rem;
}

.split__side.is-against {
  justify-items: end;
  margin-left: auto;
  text-align: right;
}

.split__label {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.split__share {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.split__sum {
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.split__empty {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Bet rows: the line history, the sidebar feed and the admin list share them. */

.bets {
  display: grid;
}

.bets__list,
.feed {
  display: grid;
  gap: 6px;
}

.bet {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--tile);
}

.bet__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.bet__who {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}

.bet__name {
  font-weight: 600;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.bet__time {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bet__stake {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* The line title in the feed takes two lines at most; the card has the full title. */
.bet__line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text-2);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.bet__side {
  color: var(--text-2);
}

.bet__side::before {
  content: "";
  display: inline-block;
  margin-right: 6px;
  vertical-align: 0.05em;
}

.bet__amount {
  flex: none;
  max-width: 65%;
  font-weight: 700;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bet__note {
  flex: none;
  max-width: 50%;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
}

.bet--active .bet__amount,
.bet--lost .bet__amount {
  color: var(--muted);
  font-weight: 500;
}

.bet--won .bet__amount {
  color: var(--pos);
}

.bets__more,
.players__more {
  justify-self: start;
  margin-top: 6px;
  padding-inline: 12px;
}

/* Odds movement */

.moves__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--tile);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.moves__summary::-webkit-details-marker {
  display: none;
}

.moves__summary:hover {
  background: var(--tile-hover);
}

.moves__chevron {
  width: 20px;
  height: 20px;
  transition: transform 0.15s;
}

.moves[open] .moves__chevron {
  transform: rotate(180deg);
}

.moves__list {
  display: grid;
  gap: 6px;
  padding: 10px 12px 0;
}

.moves__item {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2px 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.moves__odds {
  color: var(--text);
  overflow-wrap: anywhere;
}

.move {
  margin-left: 2px;
  color: var(--text-2);
}

/* Sidebar: empty state and players */

.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 12px;
  text-align: center;
}

.empty__art {
  width: 132px;
  height: 110px;
  margin-bottom: 6px;
}

.empty__title {
  font-size: 1.1875rem;
  font-weight: 700;
}

.empty__text {
  max-width: 18rem;
  color: var(--muted);
}

.players {
  display: grid;
  gap: 6px;
}

.player {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas:
    "place name result"
    "place stats stats";
  gap: 2px 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--tile);
}

.player__place {
  grid-area: place;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--tile-hover);
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.player__name {
  grid-area: name;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.player__result {
  grid-area: result;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.player__result.is-pos {
  color: var(--pos);
}

.player__result.is-zero {
  color: var(--muted);
}

.player__stats {
  grid-area: stats;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Footer */

.footer {
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 12px 24px;
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
}

/* Dialog and toasts: the only elements that float above the page, so the only ones with a shadow. */

.dialog {
  width: min(28rem, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.7);
}

.dialog__text {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.dialog__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 8px;
}

.toasts {
  position: fixed;
  z-index: 10;
  inset-inline: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-inline: 16px;
  pointer-events: none;
}

.toast {
  max-width: 28rem;
  padding: 12px 16px;
  border: 1px solid var(--outline);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.toast--error {
  border-left-color: var(--neg);
}

/* Admin */

.admin {
  flex: 1;
  padding-block: 20px 48px;
}

.admin__app,
.admin__section {
  display: grid;
  gap: 16px;
}

.state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

.login {
  display: grid;
  justify-items: center;
  padding-top: 24px;
}

.login .panel {
  width: min(100%, 26rem);
}

.cashbox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cash {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.cash--bank {
  grid-column: 1 / -1;
}

@media (min-width: 900px) {
  .cashbox {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .cash--bank {
    grid-column: auto;
  }
}

.cash__label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.cash__value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cash__note {
  color: var(--muted);
  font-size: 0.75rem;
}

.create {
  border-radius: var(--radius-card);
  background: var(--surface);
}

.create__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 20px;
  border-radius: var(--radius-card);
  font-size: 1.0625rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.create__summary::-webkit-details-marker {
  display: none;
}

.create__plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
}

.create__plus .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}

.create__chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s;
}

.create[open] .create__chevron {
  transform: rotate(180deg);
}

.create__form {
  padding: 4px 20px 20px;
}

.admin__lines {
  display: grid;
  gap: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions__group--end {
  margin-left: auto;
}

/* In a narrow panel the actions line up in pairs instead of wrapping raggedly: the two results side by side. */
@container (max-width: 519px) {
  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions__group {
    display: contents;
  }
}

.line__columns {
  display: grid;
  gap: 16px;
}

@container (min-width: 760px) {
  .line__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.edit-form {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--tile-off);
}

.odds-editor {
  gap: 10px;
}

.odds-editor .block-title {
  margin-bottom: -2px;
}

.odds-editor__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.odds-editor__row .btn {
  grid-column: 1 / -1;
}

@container (min-width: 520px) {
  .odds-editor__row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .odds-editor__row .btn {
    grid-column: auto;
  }
}

.tile--edit {
  border-color: var(--field-line);
  cursor: text;
}

.tile--edit:hover {
  border-color: var(--muted);
}

.tile--edit:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.tile__input {
  flex: none;
  width: 5ch;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tile__input:focus-visible {
  outline: none;
}

.suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.875rem;
}

.money {
  display: grid;
  gap: 12px;
}

.money .block-title {
  margin-bottom: -4px;
}

.risk {
  display: grid;
  gap: 4px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.bet-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.bet-form__name,
.bet-form__side,
.bet-form .btn {
  grid-column: 1 / -1;
}

@container (min-width: 760px) {
  .bet-form {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .bet-form__name,
  .bet-form__side,
  .bet-form .btn {
    grid-column: auto;
  }
}

.bet__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

@container (min-width: 640px) {
  .bet--admin {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
  }
}

.bet__source {
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--tile-hover);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
}

.bet__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.paid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.875rem;
  cursor: pointer;
}

.paid:hover {
  background: var(--tile-hover);
}

.paid input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--pos);
}

.settings,
.tg {
  display: grid;
  align-items: start;
  gap: 16px;
}

.settings__side {
  display: grid;
  gap: 16px;
}

@media (min-width: 960px) {
  .settings {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }

  .tg {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tg__block {
  display: grid;
  gap: 8px;
}

.tg__lead {
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.facts {
  display: grid;
  gap: 6px;
}

.facts__row {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--tile);
}

.facts__label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.facts__value {
  color: var(--text);
  overflow-wrap: anywhere;
}

.tg-admins {
  display: grid;
  gap: 6px;
}

.tg-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 8px 8px 12px;
  border-radius: var(--radius);
  background: var(--tile);
}

.tg-admin__who {
  display: grid;
  min-width: 0;
}

.tg-admin__handle {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tg-admin__name,
.tg-admin__tag {
  color: var(--muted);
  font-size: 0.8125rem;
}

.tg-admin__tag {
  padding-right: 4px;
}

.tg-add {
  display: flex;
  gap: 8px;
}

.tg-add .btn {
  flex: none;
}

/* Motion is limited to hover feedback and the chevrons; none of it is needed to read the page. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .chip[aria-selected="true"],
  .topnav__link[aria-current] {
    text-decoration: underline;
  }

  .split__seg {
    background: CanvasText;
  }
}
