/*
 * All of the site's styling.
 *
 * The palette is the app's own (src/theme/theme.ts): paper and ink by day, the
 * same near-black the scoreboard uses by night, and the ball yellow as the one
 * accent. Dark mode follows the reader's system setting, because somebody
 * opening this from the court at nine in the evening should not get a flash of
 * white.
 *
 * No web fonts: the system stack paints with the first frame, and a request to
 * fonts.googleapis.com would hand every visitor's IP address to Google before
 * they had agreed to anything.
 */

:root {
  --paper: #f5f4ef;
  --surface: #ffffff;
  --ink: #14161a;
  --ink-muted: #4a4d4f;
  --rule: #d8d7d1;
  --accent: #16b84e;
  --ball: #ffd000;
  --radius: 14px;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013;
    --surface: #1a1d21;
    --ink: #f5f4ef;
    --ink-muted: #a6a9ac;
    --rule: #3a3d42;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc {
  max-width: 760px;
}

.doc-narrow {
  max-width: 680px;
}

section {
  padding: 64px 0;
}

section.tight-top {
  padding-top: 0;
}

.band {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.lead {
  font-size: 1.12rem;
  color: var(--ink-muted);
  margin-top: 18px;
}

.fine {
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* Header ------------------------------------------------------------------ */

.site-head {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark svg {
  display: block;
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.93rem;
}

.lang {
  position: relative;
}

.lang summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink-muted);
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  margin: 0;
  padding: 8px 0;
  list-style: none;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.lang li a,
.lang li span {
  display: block;
  padding: 7px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.lang li span[aria-current] {
  color: var(--ink-muted);
}

/* Hero and calls to action ------------------------------------------------ */

.hero {
  padding-top: 76px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

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

/* Cards, steps and lists -------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
}

.step-n {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ball);
  color: #14161a;
  font-weight: 700;
  font-size: 0.88rem;
  display: grid;
  place-items: center;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  padding-left: 26px;
  position: relative;
  color: var(--ink-muted);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* Documents: privacy and support ------------------------------------------ */

.summary-card {
  margin-top: 30px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.summary-card p {
  margin: 0;
}

.legal {
  margin-top: 34px;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 34px 0 12px;
}

.legal ul,
.legal ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--ink-muted);
}

.legal li {
  margin-bottom: 7px;
}

.translation-note {
  margin-top: 28px;
}

.qa {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.qa h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.qa p,
.qa li {
  color: var(--ink-muted);
}

.qa ul {
  margin: 0;
  padding-left: 22px;
}

.qa li {
  margin-bottom: 7px;
}

.qa.callout {
  border-top: none;
  border-left: 4px solid var(--ball);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 8px;
}

.page-nav {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  font-size: 0.95rem;
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foot-row p {
  margin: 0;
}

.foot-row nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

@media (max-width: 620px) {
  section {
    padding: 44px 0;
  }

  .hero {
    padding-top: 52px;
  }

  .head-nav {
    gap: 14px;
    font-size: 0.86rem;
  }
}
