/* Scorekeeper — design tokens ------------------------------------------- */

:root {
  color-scheme: light dark;

  --bg: #eef3f9;
  --bg-glow-a: rgba(29, 155, 209, 0.18);
  --bg-glow-b: rgba(99, 102, 241, 0.14);
  --surface: #ffffff;
  --surface-2: #f3f7fb;
  --surface-3: #e8eff7;
  --text: #0d1f31;
  --text-soft: #3c5871;
  --muted: #64809b;
  --border: #dbe5ef;
  --border-strong: #c3d3e2;

  --accent: #1d9bd1;
  --accent-strong: #157ca9;
  --accent-ink: #ffffff;
  --accent-soft: rgba(29, 155, 209, 0.12);
  --violet: #5b6ee0;

  --good: #0f8f5f;
  --good-soft: rgba(15, 143, 95, 0.12);
  --bad: #d1453f;
  --bad-soft: rgba(209, 69, 63, 0.12);
  --warn: #b7791f;

  --gold: #d9a441;
  --silver: #9aa9b8;
  --bronze: #b57843;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(13, 31, 49, 0.06), 0 2px 8px rgba(13, 31, 49, 0.05);
  --shadow: 0 4px 12px rgba(13, 31, 49, 0.07), 0 16px 40px rgba(13, 31, 49, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 31, 49, 0.16);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --space: 16px;
  --maxw: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08131f;
    --bg-glow-a: rgba(29, 155, 209, 0.22);
    --bg-glow-b: rgba(91, 110, 224, 0.18);
    --surface: #10202f;
    --surface-2: #16293a;
    --surface-3: #1d3348;
    --text: #e9f2fa;
    --text-soft: #bed2e3;
    --muted: #8aa5bd;
    --border: #1e3448;
    --border-strong: #2b4762;

    --accent: #35b6e8;
    --accent-strong: #55c6f2;
    --accent-ink: #052232;
    --accent-soft: rgba(53, 182, 232, 0.16);
    --violet: #8093f5;

    --good: #35c98d;
    --good-soft: rgba(53, 201, 141, 0.16);
    --bad: #f0736c;
    --bad-soft: rgba(240, 115, 108, 0.16);
    --warn: #e0b25a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.55);
  }
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      70ch 50ch at 12% -10%,
      var(--bg-glow-a),
      transparent 65%
    ),
    radial-gradient(60ch 45ch at 105% 0%, var(--bg-glow-b), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-strong);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
}

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

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

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

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

/* Layout ---------------------------------------------------------------- */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space);
}

main.wrap {
  flex: 1;
  padding-bottom: 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--violet));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.share-menu {
  position: relative;
}

.share-btn {
  min-height: 38px;
  padding: 6px 14px;
  white-space: nowrap;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.share-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: rise 0.16s ease both;
}

.share-pop__title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.share-pop__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.share-pop__row input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  font-size: 1rem;
  color: var(--text-soft);
  text-overflow: ellipsis;
}

.share-pop__row .btn {
  flex: none;
}

.share-pop__hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}

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

.section {
  margin-top: 28px;
}

/* Cards ----------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.card--pad-lg {
  padding: 28px;
}

.card--accent {
  background: linear-gradient(160deg, var(--accent-soft), transparent 55%),
    var(--surface);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

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

.lead {
  font-size: 1.05rem;
  color: var(--text-soft);
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
}

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

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn--danger {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
  background: transparent;
}

.btn--danger:hover:not(:disabled) {
  background: var(--bad-soft);
}

.btn--sm {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.86rem;
}

.btn--icon {
  min-height: 40px;
  width: 40px;
  padding: 0;
  border-radius: 12px;
}

.btn--block {
  width: 100%;
}

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

.btn-row--end {
  justify-content: flex-end;
}

/* Forms ----------------------------------------------------------------- */

label,
.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.field {
  margin-bottom: 14px;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.inline-form input {
  flex: 1;
}

.hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* Messages -------------------------------------------------------------- */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.93rem;
  animation: rise 0.28s ease both;
}

.msg--error {
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
  background: var(--bad-soft);
  color: var(--bad);
}

.msg--success {
  border-color: color-mix(in srgb, var(--good) 40%, transparent);
  background: var(--good-soft);
  color: var(--good);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Chips, badges, avatars ------------------------------------------------ */

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}

.chip--accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-strong);
}

.chip--good {
  background: var(--good-soft);
  border-color: color-mix(in srgb, var(--good) 35%, transparent);
  color: var(--good);
}

.chip--bad {
  background: var(--bad-soft);
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
  color: var(--bad);
}

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

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--violet));
  box-shadow: var(--shadow-sm);
}

.avatar--lg {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  font-size: 1.35rem;
}

.avatar--seat-1 { background: linear-gradient(140deg, #1d9bd1, #4d5fd6); }
.avatar--seat-2 { background: linear-gradient(140deg, #0fa6a0, #1d9bd1); }
.avatar--seat-3 { background: linear-gradient(140deg, #5b6ee0, #8a5ce0); }
.avatar--seat-4 { background: linear-gradient(140deg, #0d8aa4, #23b3a0); }
.avatar--seat-5 { background: linear-gradient(140deg, #4357c8, #1d9bd1); }
.avatar--seat-0 { background: linear-gradient(140deg, #2f80c4, #6a5ae0); }

/* Progress -------------------------------------------------------------- */

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress__track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  transition: width 0.4s ease;
}

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

.table-scroll {
  overflow-x: auto;
  margin: 0 -22px;
  padding: 0 22px;
}

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

th,
td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
}

thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: none;
}

tfoot td {
  font-weight: 800;
  border-top: 2px solid var(--border-strong);
  border-bottom: none;
}

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

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

/* Standings ------------------------------------------------------------- */

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

.standing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid transparent;
}

.standing--top {
  background: linear-gradient(100deg, var(--accent-soft), transparent 70%),
    var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.standing__rank {
  flex: none;
  width: 28px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.standing__name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.standing__points {
  margin-left: auto;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Bidding --------------------------------------------------------------- */

.turn {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.turn__who {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.turn__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0;
}

.bid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
}

.bid-btn {
  position: relative;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 74px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease,
    background 0.15s ease;
}

.bid-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.bid-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--bad) 45%, transparent);
  background: var(--bad-soft);
  color: var(--bad);
}

.bid-btn__lock {
  position: absolute;
  bottom: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Player rows ----------------------------------------------------------- */

.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.player-row__name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-row__seat {
  font-size: 0.78rem;
  color: var(--muted);
}

.player-row__actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* Score entry ----------------------------------------------------------- */

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

.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.entry__body {
  min-width: 0;
  flex: 1;
}

.entry__name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry input {
  width: 72px;
  flex: none;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.entry__label {
  display: block;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tally {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-weight: 650;
}

.tally[data-state="ok"] {
  border-style: solid;
  border-color: color-mix(in srgb, var(--good) 45%, transparent);
  background: var(--good-soft);
  color: var(--good);
}

.tally[data-state="off"] {
  border-color: color-mix(in srgb, var(--warn) 55%, transparent);
  color: var(--warn);
}

/* Podium ---------------------------------------------------------------- */

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 10px;
  margin: 8px 0 26px;
}

.podium--solo {
  grid-template-columns: minmax(0, 260px);
  justify-content: center;
}

.podium--duo {
  grid-template-columns: repeat(2, 1fr);
}

.podium__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  border-radius: var(--radius-lg) var(--radius-lg) 8px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: podium-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.podium__step--1 {
  padding-top: 30px;
  min-height: 330px;
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 18%, transparent), var(--surface) 55%);
  animation-delay: 0.12s;
}

.podium__step--2 {
  min-height: 275px;
  border-color: color-mix(in srgb, var(--silver) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--silver) 20%, transparent), var(--surface) 55%);
}

.podium__step--3 {
  min-height: 240px;
  border-color: color-mix(in srgb, var(--bronze) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bronze) 18%, transparent), var(--surface) 55%);
  animation-delay: 0.24s;
}

@keyframes podium-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

.podium__medal {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
}

.podium__name {
  font-weight: 750;
  text-align: center;
  overflow-wrap: anywhere;
}

.podium__points {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.podium__rank {
  margin-top: auto;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--muted);
}

.podium__rank sup {
  font-size: 0.7em;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

/* Home ------------------------------------------------------------------ */

.hero {
  padding: 40px 0 6px;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero p {
  max-width: 54ch;
  margin: 0 auto 8px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.mode-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 26px;
}

.mode {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mode__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mode__icon svg {
  width: 24px;
  height: 24px;
}

.mode ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.mode ul li {
  margin-bottom: 4px;
}

.mode form {
  margin-top: auto;
}

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

.recent__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.recent__item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.recent__meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Rules page ------------------------------------------------------------ */

.rule-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rule-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  color: var(--text-soft);
}

.rule-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.9rem;
}

.rule-steps strong {
  color: var(--text);
}

.formula {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.formula__box {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.formula__box code {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.seq {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seq span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.seq span.is-peak {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

@media (max-width: 620px) {
  /* The brand already links home, so the duplicate link can go. */
  .site-nav__home {
    display: none;
  }

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

  .share-btn {
    width: 40px;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 18px;
    border-radius: var(--radius);
  }

  .wrap {
    padding: 0 12px;
  }

  .entry input {
    width: 84px;
    min-height: 50px;
  }

  .bid-grid {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }

  .btn-row > form,
  .btn-row > .btn {
    flex: 1 1 auto;
  }

  .btn-row > form > .btn {
    width: 100%;
  }

  .player-row__actions .btn--icon {
    min-height: 44px;
    width: 44px;
  }


  .standing__meta {
    display: block;
  }

  .card__head {
    margin-bottom: 12px;
  }

  .table-scroll {
    margin: 0 -18px;
    padding: 0 18px;
  }

  .podium__step--1 {
    min-height: 260px;
  }

  .podium__step--2 {
    min-height: 220px;
  }

  .podium__step--3 {
    min-height: 195px;
  }

  .podium__points {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
