/*
 * Stripes website: the one stylesheet.
 *
 * Phone first: every layout starts at 320 px wide and grows. Phones get a bottom tab bar; from 760 px the top nav
 * takes over. Colors are tokens on :root (the site is dark only: the bot's palette is a dark one). The HTML carries no
 * style attributes (the Content-Security-Policy allows only this file), so anything per element, like a bar's width,
 * is set from the page scripts through element.style.
 */

/* ------------------------------------------------------------------------------------------------------------------
 * Fonts: self hosted (font-src 'self'), latin only. Names in other scripts fall back to the system font.
 * ---------------------------------------------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
}

/* ------------------------------------------------------------------------------------------------------------------
 * Tokens
 * ---------------------------------------------------------------------------------------------------------------- */

:root {
  color-scheme: dark;

  --page: #070E19;
  --header: #0A1422;
  --surface: #101C2E;
  --raised: #182A41;
  --border: #2B3D55;
  --rule: #1E2D43;
  --track: #263B55;
  --axis: #3A506D;

  --text: #F4F5F7;
  --text-2: #C0CDDD;
  --muted: #8FA3BD;
  --faint: #4B5873; /* decoration only (a score's colon, a former member's avatar): below 3:1 on the surface */

  --gold: #E9BD71; /* warm brass: buttons, focus rings, the current page */
  --ice: #A9D8F4;
  --rangers: #0038A8;
  --in: #3987e5; /* chips in */
  --out: #e66767; /* chips out */

  /* Chart categorical order (validated against --surface in dark mode: see charts.js). */
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-ref: #8E9BB3; /* a reference line (the group average), drawn dashed */

  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --radius-card: 22px;
  --radius-control: 10px;
  --gutter: 16px;
  --tab-bar: 60px;
  --tap: 44px;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Base
 * ---------------------------------------------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere; /* a long name without spaces wraps instead of widening the page */
  /* room for the fixed tab bar on phones */
  padding-bottom: calc(var(--tab-bar) + env(safe-area-inset-bottom, 0px));
}

a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--axis);
  text-underline-offset: 3px;
}

a:hover {
  color: #FFFFFF;
  text-decoration-color: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

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

button {
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: var(--gold);
  color: var(--page);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--page);
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Header, nav and the phone tab bar
 * ---------------------------------------------------------------------------------------------------------------- */

.site-header {
  background: #091321eF;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(16px);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.brand {
  display: inline-flex;
  flex: none; /* the wordmark never gives way: a long name in the account chip shortens instead */
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

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

.brand-mark {
  flex: none;
  display: block;
  width: 40px;
  height: 43px;
  filter: drop-shadow(0 3px 9px #E9BD7114);
}

.brand-lockup { display:flex; flex-direction:column; gap:5px; }
.brand-wordmark { display:block; width:149px; height:auto; }
.brand-signature { display:block; color:#D2B480; font:600 8px/1.2 var(--font-text); letter-spacing:.31em; padding-left:5px; white-space:nowrap; }
.brand:focus-visible { border-radius:6px; outline:2px solid var(--ice); outline-offset:6px; }

.brand-server {
  display: none;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 18ch;
}

.top-nav {
  display: none;
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: #091321f5;
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--rule);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-bar a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--tab-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.tab-bar a svg {
  width: 22px;
  height: 22px;
}

.tab-bar a[aria-current="page"] {
  color: #FFFFFF;
}

/* the current tab is marked by shape as well as color */
.tab-bar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold);
}

.tab-bar a:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 420px) {
  .brand-server {
    display: inline;
  }
}

@media (min-width: 760px) {
  :root {
    --gutter: 24px;
  }

  body {
    padding-bottom: 0;
  }

  .tab-bar {
    display: none;
  }

  .header-row {
    flex-wrap: wrap;
    gap: 8px 28px;
  }

  .top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    flex: 1 1 320px;
    font-size: 14px;
    font-weight: 500;
  }

  .top-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 10px;
    color: var(--text-2);
    text-decoration: none;
    border-radius: 11px;
  }

  .top-nav a:hover {
    color: #FFFFFF;
    background: #25405C55;
  }

  .top-nav a[aria-current="page"] {
    color: #FFFFFF;
  }

  .top-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
  }

  .account {
    margin-left: 0;
  }
}

/* The logged in member's menu: a <details>, so it opens with a keyboard and a screen reader as it is. */

.account-menu {
  position: relative;
}

.account-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  max-width: 220px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 759px) {
  /* On a phone the chip shrinks to the room left beside the wordmark, and the name ellipsizes. */
  .account-menu {
    min-width: 0;
    max-width: 100%;
  }

  .account-menu > summary {
    max-width: min(220px, 100%);
  }
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu > summary:hover {
  background: var(--raised);
}

.account-menu[open] > summary {
  background: var(--raised);
}

.account-menu .account-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-menu .chevron {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: min(280px, calc(100vw - 2 * var(--gutter)));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.menu-panel .menu-who {
  padding: 4px 6px 10px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.menu-panel .menu-who strong {
  color: var(--text);
  font-weight: 600;
}

.menu-panel a,
.menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--tap);
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

.menu-panel a:hover,
.menu-panel button:hover {
  background: var(--surface);
  color: #FFFFFF;
}

.menu-panel .menu-hint {
  padding: 0 8px 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------------------------------------------------------------
 * Buttons and controls
 * ---------------------------------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  background: var(--raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  color: #FFFFFF;
  border-color: var(--axis);
}

.btn svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--gold);
  color: var(--page);
}

.btn-primary:hover {
  color: var(--page);
  border-color: #FFFFFF;
}

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

.btn-danger {
  background: transparent;
  border-color: #6b3540;
  color: #F3B4B4;
}

.btn-danger:hover {
  border-color: var(--out);
  color: #FFFFFF;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-large {
  min-height: 52px;
  padding: 0 22px;
  font-size: 16px;
}

.login-short {
  display: inline;
}

.login-long {
  display: none;
}

@media (min-width: 420px) {
  .login-short {
    display: none;
  }

  .login-long {
    display: inline;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label,
.field .label {
  font-size: 13px;
  color: var(--muted);
}

.select,
.search {
  min-height: var(--tap);
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.select {
  padding-right: 36px;
  appearance: none;
  background-image: url("/static/img/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.select:hover,
.search:hover {
  border-color: var(--axis);
}

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

.pill {
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
}

.pill:hover {
  border-color: var(--axis);
  color: #FFFFFF;
}

/* pressed is shown by a check mark and a light border, not only a color */
.pill[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--raised);
  color: var(--text);
}

.pill[aria-pressed="true"]::before {
  content: "\2713\00a0";
}

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

.page {
  padding-top: 24px;
  padding-bottom: 48px;
}

.page:focus {
  outline: none;
}

#view {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.website-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid #ffb81c80;
  border-radius: var(--radius-card);
  background: linear-gradient(120deg, #3e2b15 0%, #17223a 64%, #111a2c 100%);
  box-shadow: 0 0 24px #ffb81c14, inset 0 1px 0 #ffe6ae18;
}
.website-welcome-mark {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: #1b1720;
  box-shadow: inset 0 0 0 4px #ffb81c19;
  font: 700 28px var(--font-display);
}
.website-welcome-copy { flex: 1 1 230px; min-width: 0; }
.website-welcome-copy h2 { margin: 0 0 5px; font: 700 27px/1.1 var(--font-display); }
.website-welcome-copy p { margin: 0; color: var(--text-2); }
.website-welcome-copy .website-welcome-status { margin-top: 7px; font-size: 13px; line-height: 1.5; }
.website-welcome-status.is-error { color: #ffd29b; }
.website-welcome.is-claimed { border-color: #72dcaa70; background: linear-gradient(120deg, #15372c, #17223a 70%); }
.website-welcome.is-claimed .website-welcome-mark { color: #8be4b9; border-color: #72dcaa; }
.website-welcome-actions { flex: 0 0 auto; }
.website-welcome-actions .btn { white-space: normal; text-align: center; }
.landing-welcome { color: var(--gold); font-weight: 600; }
@media (max-width: 540px) {
  .website-welcome { gap: 12px; padding: 16px; }
  .website-welcome-mark { flex-basis: 50px; width: 50px; height: 50px; font-size: 24px; }
  .website-welcome-copy { flex-basis: calc(100% - 66px); }
  .website-welcome-actions { width: 100%; }
  .website-welcome-actions .btn { width: 100%; }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.page-head.spread {
  justify-content: space-between;
  align-items: flex-end;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.page-sub {
  font-size: 14px;
  color: var(--muted);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.section-note {
  font-size: 13px;
  color: var(--muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.row > * {
  flex: 1 1 320px;
  min-width: 0;
}

.row > .wide {
  flex: 1.4 1 420px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.row.top {
  align-items: flex-start;
}

.toolbar.bottom {
  align-items: flex-end;
}

@media (min-width: 760px) {
  .page {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  #view {
    gap: 36px;
  }

  .page-title {
    font-size: 44px;
  }

  .section-title {
    font-size: 32px;
  }
}

/* ------------------------------------------------------------------------------------------------------------------
 * Cards, tiles, notes
 * ---------------------------------------------------------------------------------------------------------------- */

.card {
  min-width: 0;
  margin: 0;
  padding: 20px;
  background: linear-gradient(145deg, #16253A, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.card-note {
  font-size: 13px;
  color: var(--muted);
}

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

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.tiles.single {
  grid-template-columns: minmax(0, 340px);
}

.tile {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.tile-label {
  font-size: 13px;
  color: var(--muted);
}

.tile-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.1;
}

.tile-sub {
  font-size: 13px;
  color: var(--text-2);
}

@media (min-width: 760px) {
  .tiles {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }

  .tile {
    padding: 18px 20px;
  }

  .tile-value {
    font-size: 42px;
  }
}

.note {
  font-size: 13px;
  color: var(--muted);
}

.money-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
}

.money-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted);
}

.badge-sample {
  font-size: 12px;
  font-weight: 600;
  color: var(--page);
  background: var(--text-2);
  border-radius: 999px;
  padding: 2px 10px;
}

.empty {
  padding: 18px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-2);
  font-size: 14px;
}

/* Friendly states: loading, not a member, no access, an error */

.notice {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.notice h1,
.notice h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

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

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

.status-line {
  color: var(--muted);
  font-size: 14px;
}

.loading-dots::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: dots 1.4s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.flash {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--border);
  font-size: 14px;
}

.flash.bad {
  border-color: #6b3540;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Landing (logged out)
 * ---------------------------------------------------------------------------------------------------------------- */

.landing {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  min-height: 590px;
  padding: 46px;
  background: linear-gradient(90deg,#06101be8 0%,#06101b66 55%,#06101b00), url("/static/img/club/arena-hero.webp") center / cover;
  border: 1px solid #647C9855;
  border-radius: 28px;
  box-shadow: 0 28px 80px #02060d70, inset 0 1px 0 #DCEEFF18;
}

.landing-kicker { display:flex; align-items:center; gap:14px; }
.landing-brand-copy { display:flex; flex-direction:column; gap:6px; }
.landing-wordmark { display:block; width:235px; height:auto; }
.landing-brand-copy .brand-signature { font-size:10px; letter-spacing:.35em; padding-left:6px; }

.landing-mark {
  display: block;
  width: 58px;
  height: auto;
  filter: drop-shadow(0 4px 14px #E9BD7126);
}

.landing-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(64px,8.2vw,112px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  white-space: pre-line;
  text-transform: uppercase;
  text-shadow: 0 5px 34px #0006;
}

.landing-lead {
  font-size: 16px;
  color: var(--text-2);
  max-width: 43ch;
  line-height: 1.7;
}

.landing-small {
  font-size: 13px;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.7;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 27px 24px;
  background: linear-gradient(140deg,#132137,#0E192A);
  border: 1px solid #2B405866;
  border-radius: 15px;
}

.features svg {
  flex: none;
  width: 27px;
  height: 27px;
  color: var(--ice);
  margin-top: 1px;
}

.features strong {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
}

.features span {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}

.landing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14px;
}

.landing-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-hero {
    padding: 48px;
  }

  .landing-title {
    font-size: clamp(76px,8.2vw,112px);
  }
}

.landing-actions .btn { min-height:54px; padding-inline:28px; }
.landing-hero .landing-welcome { max-width:40ch; padding-left:13px; border-left:2px solid var(--gold); font-size:13px; line-height:1.7; }
@media (max-width:639px) {
  .landing { gap:18px; }
  .landing-kicker { gap:12px; }
  .landing-mark { width:46px; }
  .landing-wordmark { width:190px; }
  .landing-hero { min-height:520px; padding:28px 22px; gap:20px; background-image:linear-gradient(90deg,#06101be8,#06101b80),url("/static/img/club/arena-hero-small.webp"); background-position:60% center; border-radius:22px; }
  .landing-title { font-size:clamp(44px,12vw,70px); }
  .landing-lead { font-size:14px; }
  .features { gap:8px; }
  .features li { padding:20px; }
  .landing-actions,.landing-actions .btn { width:100%; }
}

/* ------------------------------------------------------------------------------------------------------------------
 * People: avatar, name, "you"
 * ---------------------------------------------------------------------------------------------------------------- */

.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.person-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person.former .person-name {
  color: var(--muted);
  font-style: italic;
}

.you-tag {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--page);
  background: var(--gold);
  border-radius: 999px;
  padding: 1px 7px;
}

.avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: var(--track);
  color: var(--text-2);
}

.avatar.big {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.names {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Tonight: game cards
 * ---------------------------------------------------------------------------------------------------------------- */

.games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.game {
  container-type: inline-size;
  gap: 20px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% -20%,#25446655,transparent 65%),linear-gradient(145deg,#142338,#0D192B);
}

.game-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-2);
}

.status-tag.live {
  color: var(--gold);
}

.status-tag.final {
  color: var(--text);
}

.live-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: pulse 2s ease-in-out infinite;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.status-aside {
  font-size: 12px;
  color: var(--muted);
}

.matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-align: center;
}

.team-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
}

.team-badge {
  flex: none;
  width: 72px;
  max-width: 100%;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.3px;
  background: var(--team-tint,var(--raised));
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.team-badge.has-logo { position:relative; overflow:hidden; background:radial-gradient(ellipse at 50% 0,#BDDFFF12,transparent 75%),#102034; border-color:#8FAFD52E; box-shadow:inset 0 1px 0 #FFFFFF12,0 7px 16px #0003; }
.team-badge-logo { position:absolute; top:50%; left:50%; display:block; width:145%; height:145%; max-width:none; object-fit:contain; transform:translate(-50%,-50%); filter:drop-shadow(0 3px 5px #0005); }
.team-badge.has-logo .team-abbr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

.team-badge.small {
  width: 40px;
  height: 36px;
  border-radius: 11px;
  font-size: 15px;
}

.score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score .colon {
  color: var(--faint);
  padding: 0 6px;
}

.score.versus {
  font-weight: 600;
  font-size: 28px;
  color: var(--muted);
}

@container (min-width: 440px) {
  .matchup {
    gap: 16px;
  }

  .team {
    flex-direction: row;
    gap: 14px;
    text-align: left;
  }

  .team.home {
    flex-direction: row-reverse;
    text-align: right;
  }

  .team-name {
    font-size: 15px;
  }

  .team-badge {
    width: 62px;
    height: 58px;
    border-radius: 17px;
    font-size: 20px;
  }

  .score {
    font-size: 56px;
  }

  .score .colon {
    padding: 0 10px;
  }

  .score.versus {
    font-size: 30px;
  }
}

.picks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.split-bar {
  display: flex;
  gap: 2px;
  height: 10px;
}

.split-bar > span {
  min-width: 4px;
  height: 100%;
}

.split-bar > span:first-child {
  border-radius: 4px 0 0 4px;
}

.split-bar > span:last-child {
  border-radius: 0 4px 4px 0;
}

.split-bar > span:only-child {
  border-radius: 4px;
}

.seg-away { background: var(--series-1); }
.seg-home { background: var(--series-4); }
.seg-done { background: var(--series-4); }
.seg-left { background: var(--track); }

.picks-line {
  font-size: 13px;
  color: var(--text-2);
}

.picks-line strong {
  color: var(--text);
  font-weight: 600;
}

.who-picked > summary,
.table-view > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  list-style: none;
}

.who-picked > summary::-webkit-details-marker,
.table-view > summary::-webkit-details-marker {
  display: none;
}

.who-picked > summary::before,
.table-view > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 4px;
}

.who-picked[open] > summary::before,
.table-view[open] > summary::before {
  transform: rotate(45deg);
}

.who-picked > summary:hover,
.table-view > summary:hover {
  color: #FFFFFF;
}

.who-picked-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-bottom: 4px;
}

@container (min-width: 440px) {
  .who-picked-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.who-picked-body h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 14px;
  background: var(--raised);
  border-radius: 12px;
}

/* May shrink below its widest line (a flex item would not), so a long leader name ends in "..." instead of
   pushing the row past a 320 px screen. */
.extra-body {
  min-width: 0;
}

.extra-title {
  font-weight: 600;
}

.extra-sub {
  font-size: 13px;
  color: var(--text-2);
}

.leaders-inline {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--text-2);
}

.leaders-inline li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.leaders-inline .chips-count {
  flex: none;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.live-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.live-state .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.live-state.on .dot {
  background: var(--series-3);
}

.next-game {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Tables
 * ---------------------------------------------------------------------------------------------------------------- */

.table-wrap {
  /* positioned, so a visually hidden header stays inside the scroll box instead of widening the page */
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-card);
}

.table-card {
  padding: 4px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 15px 9px;
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 14px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 14px;
}

.data-table thead th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.data-table tbody tr {
  border-top: 1px solid var(--rule);
}

.data-table tbody tr:nth-child(-n+3) .rank { color:var(--gold); font-weight:700; }
@media (hover:hover) { .data-table tbody tr:hover { background:#89BCED08; } }

.data-table .left {
  text-align: left;
}

.data-table .rank {
  color: var(--muted);
  width: 2.5em;
}

.data-table .strong {
  font-weight: 600;
}

.data-table .soft {
  color: var(--text-2);
}

.data-table .name-cell .person {
  max-width: min(15em, 40vw);
}

.data-table tr.is-you {
  background: rgba(255, 184, 28, 0.07);
}

.standings-table .name-cell {
  font-weight: 500;
}

@media (max-width: 479px) {
  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 4px;
  }

  .data-table .rank {
    width: auto;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 10px;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    padding-right: 10px;
  }

  .data-table .name-cell .person {
    max-width: 25vw;
  }

  /* on a phone the avatar's room goes to the name */
  .data-table .avatar {
    display: none;
  }
}

.table-view {
  border-top: 1px solid var(--rule);
  padding-top: 2px;
}

.table-view .table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 4px;
}

.table-view .data-table {
  font-size: 13px;
}

.table-view .data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
}

/* ------------------------------------------------------------------------------------------------------------------
 * Charts and CSS bars
 * ---------------------------------------------------------------------------------------------------------------- */

.chart-card {
  gap: 10px;
}

.chart {
  width: 100%;
  height: 260px;
  min-width: 0;
}

@media (min-width: 760px) {
  .chart {
    height: 300px;
  }
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--text-2);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.legend .legend-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend .legend-value {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.key-line {
  flex: none;
  display: inline-block;
  width: 14px;
  height: 0;
  border-top: 3px solid currentColor;
  border-radius: 2px;
}

.key-line.dashed {
  border-top-style: dashed;
  border-top-width: 2px;
}

.key-box {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.key-in { background: var(--in); }
.key-out { background: var(--out); }

/* The chart tooltip: built by charts.js with textContent, inside the chart's own box. */
.chart-tip {
  min-width: 140px;
  max-width: 240px;
  font-family: var(--font-text);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.chart-tip-title {
  margin-bottom: 6px;
  color: var(--text-2);
  font-weight: 600;
  white-space: normal;
}

.chart-tip-row {
  display: grid;
  grid-template-columns: 14px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.chart-tip-row .key-line {
  width: 12px;
}

.chart-tip-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chart-tip-name {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bars drawn in CSS: one row per member, the value always written next to the bar. */
.bars {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-row .bar-name {
  position: relative;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}

.bar-row.is-you .bar-name {
  color: var(--text);
  font-weight: 600;
}

.bar-row .bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 3.5em;
}

.bar-track {
  display: block;
  height: 14px;
  background: var(--raised);
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--series-1);
  border-radius: 0 4px 4px 0;
}

.bar-row.is-you .bar-fill {
  background: var(--gold);
}

@media (min-width: 760px) {
  .bar-row {
    grid-template-columns: minmax(0, 10em) minmax(0, 1fr) auto;
  }
}

/* Diverging bars: chips in to the right of the middle line, chips out to the left. */
.div-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label value" "bar bar";
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
}

.div-row .div-label {
  grid-area: label;
  color: var(--text-2);
  min-width: 0;
}

.div-row .div-value {
  grid-area: value;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.div-bar {
  grid-area: bar;
  display: flex;
  height: 14px;
}

.div-half {
  flex: 1 1 0;
  display: flex;
}

.div-half.neg {
  justify-content: flex-end;
  border-right: 1px solid var(--axis);
}

.div-fill {
  height: 100%;
}

.div-half.neg .div-fill {
  background: var(--out);
  border-radius: 4px 0 0 4px;
}

.div-half.pos .div-fill {
  background: var(--in);
  border-radius: 0 4px 4px 0;
}

@media (min-width: 560px) {
  .div-row {
    grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 4.5em;
    grid-template-areas: "label bar value";
    gap: 10px;
  }
}

/* Leader lists (Goal Draw, quiz, rivalry) */

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

.leaders li {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

.leaders li:first-child {
  border-top: 0;
}

.leaders .rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.leaders .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rivalry-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rivalry-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.rivalry-line .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rivalry-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Recent results */

.results {
  margin: 0;
  padding: 4px 16px;
  gap: 0;
  list-style: none;
}

.results li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.results li:first-child {
  border-top: 0;
}

.result-score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  min-width: 9em;
}

.result-when {
  font-size: 13px;
  color: var(--muted);
  min-width: 5em;
}

.result-note {
  flex: 1 1 260px;
  font-size: 14px;
  color: var(--text-2);
}

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

/* My bets */

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

.bets li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.bet-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  font-size: 12px;
  color: var(--muted);
}

.bet-detail {
  font-size: 14px;
}

.at-stake {
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--text-2);
}

/* ------------------------------------------------------------------------------------------------------------------
 * Commands
 * ---------------------------------------------------------------------------------------------------------------- */

.lead {
  max-width: 72ch;
  color: var(--text-2);
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--text);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar .search {
  flex: 1 1 260px;
}

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

.command-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1100px) {
  .command-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }
}

.command-group h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

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

.commands li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
}

.command-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.command-name {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.command-usage {
  color: var(--muted);
}

.command-desc {
  font-size: 14px;
  color: var(--text-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--page);
  background: var(--text-2);
  text-decoration: none;
}

a.tag {
  position: relative;
  min-height: 24px;
}

a.tag::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: -10px;
  bottom: -10px;
}

a.tag:hover {
  color: var(--page);
  background: #FFFFFF;
}

.tag.mods {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--axis);
}

.tag.admins {
  background: transparent;
  color: var(--gold);
  border: 1px solid #6b5523;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Plain text pages (privacy) and the server's small message pages (http.html_page)
 * ---------------------------------------------------------------------------------------------------------------- */

.prose {
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-2);
}

.prose h2 {
  margin-top: 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.prose ul {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.message-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
}

.message {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.message h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

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

.message a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
}

/* ------------------------------------------------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  padding-top: 18px;
  padding-bottom: 22px;
  font-size: 13px;
  color: var(--muted);
}

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

/* ------------------------------------------------------------------------------------------------------------------
 * Motion, contrast and print
 * ---------------------------------------------------------------------------------------------------------------- */

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

@media (forced-colors: active) {
  .bar-fill,
  .div-fill,
  .split-bar > span,
  .live-dot,
  .key-box {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .seg-left,
  .bar-track {
    forced-color-adjust: none;
    background: Canvas;
    outline: 1px solid CanvasText;
  }

  .tab-bar a[aria-current="page"]::before,
  .top-nav a[aria-current="page"]::after {
    background: Highlight;
  }
}

@media print {
  .tab-bar,
  .site-header .account,
  .skip-link {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}

/* The clubhouse: local original backdrops, team marks and self-hosted type. */
body { background: radial-gradient(ellipse at 86% -15%,#24466966,transparent 52%),radial-gradient(ellipse at 0 35%,#18344A22,transparent 40%),var(--page); }
.site-header { background:#091321ed; box-shadow:0 1px 0 #9bbfe810; }
.page-title { letter-spacing:.015em; font-size:clamp(40px,5vw,58px); }
.card { box-shadow:0 18px 45px #02071140,inset 0 1px 0 #DCEFFF08; }
.arena-hero { position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; min-height:320px; margin-bottom:26px; padding:32px 38px; border:1px solid #6B8AA155; border-radius:26px; background:linear-gradient(90deg,#06101bd9,#06101b55 58%,#06101b0d),url("/static/img/club/arena-hero.webp") center / cover; box-shadow:0 25px 64px #0005,inset 0 1px 0 #FFFFFF12; }
.arena-hero::after { content:""; position:absolute; z-index:-1; height:2px; bottom:0; left:38px; right:38px; background:linear-gradient(90deg,var(--gold),#A9D8F433,transparent); }
.arena-copy { max-width:620px; }
.eyebrow { color: #d9b675; font-size: 11px; font-weight: 600; letter-spacing: .19em; text-transform: uppercase; }
.arena-hero h2 { margin:0 0 18px; font-family:var(--font-display); font-size:clamp(48px,5.4vw,76px); line-height:.94; font-weight:700; text-transform:uppercase; white-space:pre-line; letter-spacing:-.015em; text-shadow:0 5px 28px #0005; }
.arena-hero p { max-width:410px; margin:0; color:#C0D1E3; font-size:14px; line-height:1.75; }
.arena-hero .arena-eyebrow { color:var(--ice); font-size:10px; margin-bottom:19px; letter-spacing:.22em; }
.arena-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:25px; }
.arena-links .btn { background:#13243AE6; border-color:#5D799855; backdrop-filter:blur(8px); }
.arena-links .btn-primary { background:linear-gradient(135deg,#F1D399,#DFB16A); border-color:#E9BD71; color:#101725; }
.game-context-links { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-bottom:12px; }
.game-context-links .game-crumb { margin-bottom:0; }
@media(max-width:380px) { .tab-bar a { font-size:10px; } .tab-bar a span { white-space:nowrap; } }
@media (min-width: 760px) and (max-width: 1100px) { .brand-server { display: none; } .top-nav { gap: 1px; } .top-nav a { padding-inline: 9px; } }
@media (max-width:1200px) { .brand-server { display:none; } }
@media (max-width:1100px) {
  .brand { gap:8px; }
  .brand-server { display:none; }
  .brand-mark { width:34px; height:36px; }
  .brand-wordmark { width:128px; }
  .brand-signature { font-size:7px; letter-spacing:.24em; padding-left:3px; }
  #sound-control .sound-toggle { width:44px; height:44px; padding:10px; }
  #sound-control .sound-toggle-label { display:none; }
}
@media (max-width:380px) {
  .brand-mark { width:31px; height:33px; }
  .brand-wordmark { width:116px; }
  .brand-lockup { gap:4px; }
  .brand-signature { font-size:6.5px; }
  .landing-kicker { gap:11px; }
  .landing-mark { width:43px; }
  .landing-wordmark { width:158px; }
  .landing-brand-copy .brand-signature { font-size:8px; }
}
@media (min-width:760px) and (max-width:900px) {
  .account-menu .account-name,.account-menu .chevron { display:none; }
  .account-menu>summary { width:44px; min-width:44px; min-height:44px; padding:4px; justify-content:center; }
  .account { flex:0 0 auto; }
  .account .login-short { display:inline; }
  .account .login-long { display:none; }
}
@media (min-width: 760px) and (max-width: 900px) { .header-row { column-gap: 12px; } .top-nav { flex-wrap: nowrap; gap: 0; font-size: 13px; } .top-nav a { padding-inline: 5px; white-space: nowrap; } }
@media (max-width:600px) {
  .header-row { min-height:68px; }
  .arena-hero { min-height:350px; padding:26px 22px; background-image:linear-gradient(90deg,#06101be8,#06101b55),url("/static/img/club/arena-hero-small.webp"); background-position:60% center; border-radius:22px; }
  .arena-hero h2 { font-size:clamp(43px,10.5vw,62px); }
  .arena-hero p { font-size:13px; max-width:31ch; }
  .arena-links { gap:8px; margin-top:22px; }
  .arena-links .btn { padding-inline:13px; font-size:12px; }
  .arena-hero::after { left:22px; right:22px; }
}
@container (max-width:360px) { .game .score { font-size:42px; }.game .team-badge { width:56px; height:52px; }.game .team-name { font-size:12px; } }

/* Tactile controls and truthful wager feedback. Confirmation pulses are added
   only after an acknowledged action; ordinary reads restore the calm state. */
:root {
  --control-halo: 229 193 132;
  --bet-saved: 117 224 177;
  --bet-waiting: 239 194 110;
  --bet-closed: 157 184 215;
}
/* The shared selectors intentionally outrank local surface shadows. Page styles
   preserve physical depth through --control-depth, and state colors through --control-halo. */
html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):not(:disabled):not([disabled]):not([aria-disabled="true"]) {
  box-shadow:var(--control-depth,0 1px 2px #0003),0 0 0 1px rgb(var(--control-halo) / .13),0 0 12px rgb(var(--control-halo) / .12);
  transition:box-shadow 180ms ease,border-color 180ms ease,filter 180ms ease,translate 140ms ease;
}
html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):not(:disabled):not([disabled]):not([aria-disabled="true"]):is([aria-pressed="true"],[aria-selected="true"]) {
  box-shadow:var(--control-depth,0 1px 2px #0003),inset 0 0 0 1px rgb(var(--control-halo) / .22),0 0 17px rgb(var(--control-halo) / .22);
}
@media (hover:hover) {
  html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):not(:disabled):not([disabled]):not([aria-disabled="true"]):hover {
    border-color:rgb(var(--control-halo) / .76);
    box-shadow:var(--control-depth,0 1px 2px #0003),inset 0 0 0 1px rgb(var(--control-halo) / .2),0 0 0 1px rgb(var(--control-halo) / .3),0 0 24px rgb(var(--control-halo) / .28);
    filter:brightness(1.07);
  }
}
html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):not(:disabled):not([disabled]):not([aria-disabled="true"]):focus-visible {
  box-shadow:var(--control-depth,0 1px 2px #0003),0 0 0 3px rgb(var(--control-halo) / .24),0 0 27px rgb(var(--control-halo) / .3);
}
html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):not(:disabled):not([disabled]):not([aria-disabled="true"]):active {
  translate:0 1px;
  box-shadow:var(--control-depth,0 1px 2px #0003),inset 0 2px 4px #0004,0 0 0 1px rgb(var(--control-halo) / .4),0 0 28px rgb(var(--control-halo) / .33);
  filter:brightness(1.1);
}
html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):is(:disabled,[disabled],[aria-disabled="true"]) {
  box-shadow:none!important; filter:none!important; translate:none; cursor:not-allowed;
}
html body :is(.btn-danger,.admin-action-danger>summary) { --control-halo:245 116 134; }
:where(button, .btn, [role="tab"], summary) { min-height:44px; }
html body :is(.news-filter,.news-clear-game,.news-read-link,.hub-wallet-actions .btn,.pill,.game-link-button) { min-height:44px; }
:where(input, select, textarea):focus-visible { box-shadow:0 0 0 3px rgb(156 206 255 / .12),0 0 18px rgb(156 206 255 / .12); }
@media(hover:hover) { :where(.top-nav a,.tab-bar a):hover { text-shadow:0 0 13px rgb(var(--control-halo) / .6); } }
[data-bet-state="confirmed"] {
  --control-halo:var(--bet-saved);
  border-color: rgb(var(--bet-saved) / .7);
  box-shadow: inset 0 0 0 1px rgb(var(--bet-saved) / .12), 0 0 19px rgb(var(--bet-saved) / .13);
}
[data-bet-state="pending"] {
  --control-halo:var(--bet-waiting);
  border-color: rgb(var(--bet-waiting) / .72);
  box-shadow: 0 0 18px rgb(var(--bet-waiting) / .17);
}
[data-bet-state="uncertain"] {
  --control-halo:213 169 107;
  border-color: #d5a96b;
  box-shadow: inset 0 0 0 1px #d5a96b22, 0 0 15px #d5a96b22;
}
[data-bet-state="locked"] {
  --control-halo:var(--bet-closed);
  border-color: rgb(var(--bet-closed) / .6);
  box-shadow: inset 0 0 0 1px rgb(var(--bet-closed) / .1), 0 0 15px rgb(var(--bet-closed) / .1);
}
.bet-state-label {
  display:inline-flex; align-items:center; gap:6px; border:1px solid currentColor;
  border-radius:999px; padding:5px 9px; font-size:11px; font-weight:600; line-height:1.3;
}
.bet-confirmed-flash-a { animation: bet-confirmed-a 820ms ease-out; }
.bet-confirmed-flash-b { animation: bet-confirmed-b 820ms ease-out; }
@keyframes bet-confirmed-a {
  0% { box-shadow: 0 0 0 0 rgb(var(--bet-saved) / .5), 0 0 10px rgb(var(--bet-saved) / .25); }
  42% { box-shadow: 0 0 0 7px rgb(var(--bet-saved) / .16), 0 0 34px rgb(var(--bet-saved) / .36); }
  100% { box-shadow: 0 0 0 14px rgb(var(--bet-saved) / 0), 0 0 19px rgb(var(--bet-saved) / .13); }
}
@keyframes bet-confirmed-b {
  0% { box-shadow: 0 0 0 0 rgb(var(--bet-saved) / .5), 0 0 10px rgb(var(--bet-saved) / .25); }
  42% { box-shadow: 0 0 0 7px rgb(var(--bet-saved) / .16), 0 0 34px rgb(var(--bet-saved) / .36); }
  100% { box-shadow: 0 0 0 14px rgb(var(--bet-saved) / 0), 0 0 19px rgb(var(--bet-saved) / .13); }
}
@media (prefers-reduced-motion:reduce) {
  html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a) { transition:none!important; translate:none!important; }
  .bet-confirmed-flash-a, .bet-confirmed-flash-b { animation:none!important; }
  :where(button, .btn, [role="tab"], summary):active { transform:none!important; }
}
@media (forced-colors:active) {
  [data-bet-state] { border-color:Highlight; box-shadow:none!important; }
  html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a) { forced-color-adjust:auto; box-shadow:none!important; filter:none!important; }
  html body :is(button, .btn, [role="tab"], summary, .top-nav a, .tab-bar a):focus-visible { outline:2px solid Highlight; }
}

/* The header control becomes icon-only on phones; its accessible name stays in the button. */
#sound-control { display:flex; align-items:center; flex:0 0 auto; min-width:0; }
#sound-control:empty { display:none; }
.sound-toggle { --control-halo:205 193 153; display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:44px; min-height:44px; padding:10px 12px; border:1px solid #65705e; border-radius:10px; background:#182c2c; color:#eadfbe; font:500 12px/1.2 var(--font-text); white-space:nowrap; cursor:pointer; }
.sound-toggle[aria-pressed="true"] { --control-halo:149 170 197; background:#172338; border-color:#4c607d; color:#bdccdf; }
.sound-toggle-icon { display:inline-flex; width:19px; height:19px; align-items:center; justify-content:center; flex-shrink:0; }
.sound-toggle-icon svg { display:block; width:19px; height:19px; }
.sound-toggle-label { display:inline; }
.win-actions { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:12px; }
.win-actions .sound-toggle { min-height:44px; }
.win-actions .sound-toggle-label { display:inline; }
@media(max-width:600px) { #sound-control .sound-toggle { width:44px; height:44px; padding:10px; } #sound-control .sound-toggle-label { display:none; } .header-row { column-gap:8px; } }
@media(max-width:380px) { .header-row { flex-wrap:nowrap; } .account-menu .account-name,.account-menu .chevron { display:none; } .account-menu>summary { width:44px; min-width:44px; min-height:44px; padding:4px; justify-content:center; } .account { flex:0 0 auto; } .account>.btn { padding-inline:10px; font-size:12px; } }

/* One obvious game-night destination, including when the desktop nav is hidden. */
.header-gamecenter {
  flex:none; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:9px 13px; font-size:13px; font-weight:700; white-space:nowrap;
}
.header-gamecenter svg { flex:none; }
.header-gamecenter[aria-current="page"] { outline:2px solid var(--ice); outline-offset:3px; }
@media(min-width:1100px) {
  .header-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto auto; gap:12px; }
  .top-nav { min-width:0; justify-content:center; gap:1px; font-size:13px; }
  .top-nav a { padding-inline:8px; white-space:nowrap; }
  .account { justify-content:flex-end; }
}
@media(min-width:760px) and (max-width:1099px) {
  .header-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:6px 12px; padding-block:9px; }
  .brand { grid-column:1; grid-row:1; }
  #sound-control { grid-column:2; grid-row:1; }
  .account { grid-column:3; grid-row:1; justify-content:flex-end; }
  .top-nav { grid-column:1/3; grid-row:2; min-width:0; flex-wrap:nowrap; gap:2px; font-size:13px; }
  .top-nav a { padding-inline:10px; white-space:nowrap; }
  .header-gamecenter { grid-column:3; grid-row:2; }
}
@media(max-width:1499px) {
  .header-row .brand-server { display:none; }
  .header-row #sound-control .sound-toggle { width:44px; height:44px; padding:10px; }
  .header-row #sound-control .sound-toggle-label { display:none; }
}
@media(max-width:759px) {
  .header-row { display:grid; grid-template-columns:auto auto minmax(0,1fr); gap:5px 8px; padding-top:8px; padding-bottom:8px; }
  .header-row .brand { grid-column:1; grid-row:1; }
  .header-row #sound-control { grid-column:2; grid-row:1; }
  .header-row .account { grid-column:3; grid-row:1; margin-left:0; justify-content:flex-end; }
  .header-row .account .login-short { display:inline; }
  .header-row .account .login-long { display:none; }
  .header-gamecenter { grid-column:1/-1; grid-row:2; width:100%; min-width:0; }
}
@media(forced-colors:active) {
  .header-gamecenter[aria-current="page"] { outline-color:Highlight; }
}

/* A finite, dismissible victory scene. Forms underneath keep their own focus. */
.win-celebration { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:24px; pointer-events:none; }
.win-veil { position:absolute; inset:0; background:radial-gradient(ellipse at center,#0f332d70,#07111bd9 75%); backdrop-filter:blur(3px); animation:win-veil-in 300ms ease-out; }
.win-confetti { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.win-card { position:relative; isolation:isolate; overflow:hidden; width:min(570px,100%); max-height:calc(100dvh - 48px); overflow-y:auto; padding:34px 42px 30px; text-align:center; pointer-events:auto; border:1px solid #e4c17dbb; border-radius:28px; background:radial-gradient(ellipse at top,#315447,#17352f 45%,#101f2e); box-shadow:0 0 0 7px #d4b7740b,0 0 90px #8de2ad30,0 36px 100px #0008; animation:win-card-in 650ms cubic-bezier(.16,.8,.2,1); }
.win-card::before { content:""; position:absolute; z-index:-1; inset:0; background:conic-gradient(from 10deg,transparent 0 20deg,#edcf8522 22deg 24deg,transparent 26deg 60deg,#a9dbb51a 62deg 64deg,transparent 66deg 110deg,#edcf851a 112deg 114deg,transparent 116deg); animation:win-rays 6500ms ease-out both; }
.win-orbit { width:124px; height:124px; margin:0 auto 15px; filter:drop-shadow(0 0 23px #f2d58b55); animation:win-trophy-in 850ms cubic-bezier(.16,.8,.2,1); }
.win-orbit svg { display:block; width:100%; height:100%; }
.win-eyebrow { color:#d6c18c; margin:0 0 8px; font-size:10px; text-transform:uppercase; letter-spacing:.25em; font-weight:600; }
.win-card h2 { margin:0; font:700 clamp(42px,7vw,64px)/1 "Barlow Condensed",sans-serif; color:#fff1c0; text-shadow:0 0 28px #e6c47755; }
.win-amount { margin:14px 0 10px; color:#b2f0c8; font:700 clamp(44px,12vw,82px)/1 "Barlow Condensed",sans-serif; font-variant-numeric:tabular-nums; text-shadow:0 0 35px #89dca44d; overflow-wrap:anywhere; }
.win-amount span { display:block; color:#c3d8c9; margin-top:9px; font:500 12px/1.4 var(--font-text); letter-spacing:.04em; }
.win-context { color:#c3d4d1; font-size:13px; line-height:1.6; margin:18px 0 22px; }
.win-dismiss.btn { min-width:154px; min-height:44px; color:#1c2d2b; background:#edcf8c; border:1px solid #fff1c5; box-shadow:0 0 22px #e8ca7f25; }
.win-dismiss:focus-visible { outline:3px solid #fff; outline-offset:4px; }
@keyframes win-card-in { from { opacity:0; transform:translateY(24px) scale(.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes win-trophy-in { from { opacity:0; transform:translateY(10px) rotate(-12deg) scale(.7); } to { opacity:1; transform:translateY(0) rotate(0) scale(1); } }
@keyframes win-veil-in { from { opacity:0; } to { opacity:1; } }
@keyframes win-rays { from { opacity:.35; } to { opacity:1; } }
@media(max-width:600px) { .win-celebration { padding:18px; } .win-card { padding:26px 24px 24px; border-radius:23px; max-height:calc(100dvh - 36px); } .win-orbit { width:100px; height:100px; } .win-card h2 { font-size:46px; } .win-context { font-size:12px; } }
@media(prefers-reduced-motion:reduce) { .win-celebration *,.win-card::before { animation:none!important; transition:none!important; } .win-confetti { display:none; } }
@media(forced-colors:active) { .win-veil { background:Canvas; opacity:.8; } .win-card { background:Canvas; border:2px solid Highlight; } .win-card h2,.win-amount,.win-context,.win-eyebrow { color:CanvasText; text-shadow:none; } .win-card::before,.win-confetti { display:none; } }

/* One explanation for season scoring and the spendable chip balance. */
.rewards-guide { margin: 18px 0; color: var(--text-2); }
.rewards-guide > summary { display: flex; align-items: center; min-height: 44px; width: fit-content; max-width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer; }
.rewards-guide-body { max-width: 76ch; padding: 4px 14px; }
.rewards-guide-body p { line-height: 1.65; margin: 12px 0; }
.rewards-guide-body strong { color: var(--text); }
