:root {
  --court: #1463ff;
  --court-deep: #0b45c4;
  --lime: #d8f23a;
  --ink: #0b1220;
  --clay: #ff6a3d;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #dde2ec;
  --text: #0b1220;
  --muted: #56617a;
  --lead: #f4fbcb;
  --link: #0f54dd;
  --display: "Avenir Next Condensed", "HelveticaNeue-CondensedBlack", "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070c16;
    --card: #101a2c;
    --line: #22304a;
    --text: #f2f5fb;
    --muted: #9aa7c0;
    --lead: #27300e;
    --link: #86b0ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3, .num, .brand { font-family: var(--display); font-stretch: condensed; font-weight: 800; line-height: 1.05; margin: 0; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--link); }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.muted { color: var(--muted); }

/* Hero: a padel court seen from above, net on the right */
.hero { position: relative; overflow: hidden; background: var(--court) linear-gradient(160deg, var(--court) 30%, var(--court-deep)); color: #fff; }
.hero svg.court { position: absolute; right: -40px; top: 50%; height: 150%; transform: translateY(-50%) rotate(-14deg); opacity: .32; pointer-events: none; }
.hero .inner { position: relative; max-width: 760px; margin: 0 auto; padding: 20px 16px 68px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 20px; text-decoration: none; letter-spacing: .01em; min-height: 44px; }
.brand i { width: 14px; height: 14px; border-radius: 50%; background: var(--lime); display: block; }
.hero h1 { font-size: clamp(38px, 11vw, 64px); margin-top: 18px; max-width: 14ch; letter-spacing: -.01em; }
.hero p { margin: 10px 0 0; font-size: 17px; max-width: 34ch; color: #e6eeff; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-weight: 600; color: #e6eeff; }

.live-dot { display: inline-flex; align-items: center; gap: 8px; background: var(--lime); color: var(--ink); border-radius: 6px; font-weight: 800; padding: 3px 10px; font-size: 14px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot::before { animation: none; } }
.tag { display: inline-block; background: rgba(255, 255, 255, .18); border-radius: 6px; padding: 3px 10px; font-weight: 700; font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.pull { margin-top: -44px; position: relative; }
.stack > * + * { margin-top: 16px; }

/* Scoreboard strip */
.board { display: flex; align-items: stretch; background: var(--ink); color: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #22304a; }
.board > div { flex: 1; padding: 14px 18px; }
.board > div + div { border-left: 1px solid #22304a; }
.board span { display: block; font-size: 14px; color: #a9b6d0; }
.board b { white-space: nowrap; font-family: var(--display); font-stretch: condensed; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.board .clock b { color: var(--lime); }
.board .clock.done b { color: var(--clay); }

/* Standings */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; padding: 16px 16px 6px; }
caption h2, .section { font-size: 26px; }
.section { margin: 28px 0 12px; }
th { white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; padding: 6px 8px; }
td { padding: 11px 8px; white-space: nowrap; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { padding-left: 16px; text-align: center; width: 52px; }
th:last-child, td:last-child { padding-right: 16px; }
th.name, td.name { white-space: normal; text-align: left; font-weight: 600; width: 99%; overflow-wrap: anywhere; }
td.rank { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 20px; }
td.pts { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 26px; line-height: 1; }
tr.lead { background: var(--lead); }
tr.lead td.rank span { display: inline-block; min-width: 30px; border-radius: 8px; background: var(--lime); color: var(--ink); }
@media (max-width: 430px) { .wide { display: none; } }

/* Rounds */
.round { padding: 14px 16px 16px; }
.round + .round { margin-top: 12px; }
.round > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.round > summary::-webkit-details-marker { display: none; }
.round h3 { font-size: 22px; }
.round > summary .muted::after { content: " +"; }
.round[open] > summary .muted::after { content: " \2212"; }
.matches { display: grid; gap: 10px; margin-top: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.match { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.match.is-live { border-color: var(--court); border-width: 2px; padding: 9px 13px; }
.match header { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.side { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; }
.side span { overflow-wrap: anywhere; }
.side .num { font-size: 28px; }
.side.lost { color: var(--muted); }
.side.won span { font-weight: 700; }
.byes { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.players { margin: 0; padding: 8px 16px 16px; list-style: none; columns: 2; }
.players li { padding: 5px 0; break-inside: avoid; overflow-wrap: anywhere; }

/* Invites */
.invite { padding: 22px 18px; }
.invite h2 { font-size: 28px; margin-bottom: 6px; }
.invite p { margin: 0 0 16px; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 8px 20px; border-radius: 14px; font-weight: 700; font-size: 18px; text-decoration: none; text-align: center; background: var(--lime); color: var(--ink); }
.btn:active { transform: scale(.985); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.btn.store { margin-top: 10px; background: transparent; color: var(--muted); border: 2px dashed var(--line); font-size: 16px; }
.code { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.code b { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px; letter-spacing: .08em; }
footer { text-align: center; padding: 0 16px 28px; color: var(--muted); font-size: 14px; }
footer a { color: inherit; display: inline-block; padding: 12px 6px; }

/* Privacy and support */
.prose { padding: 22px 18px; }
.prose h2 { font-size: 24px; margin: 26px 0 6px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
