/* The terms, privacy and support pages: the same face, palettes and edges as
   the home page (welcome.html), so they read as one site. The palettes are
   CourtSide's own (src/theme/ThemeProvider.tsx) and match welcome.html's;
   keep the three in step. Nothing chosen is CourtSide's cream; a court picked
   on the home page carries over here. */
@font-face {
  font-family: "Inter var";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("waitlist/font/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F8F7F2; --bg-el: #F1EFE6; --surface: #FFFEFA; --surface-alt: #E9E6DA;
  --border: #DCD6C8; --border-strong: #B8AF9D;
  --text: #24251F; --muted: #5D584C; --faint: #6C665A;
  --brand: #3F7049; --brand-ink: #FAF8F0; --brand-dim: #E3E7D9;
  --brand-fill: var(--brand); --brand-text: var(--brand);
  color-scheme: light;
  --sans: "Inter var", system-ui, -apple-system, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
}
:root[data-theme="clean"] {
  --bg: #FFFFFF; --bg-el: #F7F8F8; --surface: #FAFAFA; --surface-alt: #F0F1F1;
  --border: #E6E7E8; --border-strong: #C7CACC;
  --text: #0F1419; --muted: #536471; --faint: #5F6871;
  --brand: #2C7446; --brand-ink: #FFFFFF; --brand-dim: #E8F3EC;
  color-scheme: light;
}
:root[data-theme="night"] {
  --bg: #0F1412; --bg-el: #161D19; --surface: #1A221E; --surface-alt: #232C27;
  --border: #2C3832; --border-strong: #46554D;
  --text: #EDF1EE; --muted: #A6B1AB; --faint: #8A948F;
  --brand: #6FB483; --brand-ink: #0C1710; --brand-dim: #1F2E25;
  color-scheme: dark;
}
:root[data-theme="ao"] {
  --bg: #EBF5FC; --bg-el: #D7E9F4; --surface: #F8FCFF; --surface-alt: #C8DEEE;
  --border: #AECFE5; --border-strong: #6394BC;
  --text: #0D2B43; --muted: #34566E; --faint: #496273;
  --brand: #2E85BF; --brand-ink: #FFFFFF; --brand-dim: #CFE4F2;
  --brand-fill: #2471A6; --brand-text: #1F6696;
  color-scheme: light;
}
:root[data-theme="roland-garros"] {
  --bg: #F8F0E9; --bg-el: #EFDFD1; --surface: #FFFAF5; --surface-alt: #E6D2C0;
  --border: #D6BCA2; --border-strong: #B08A66;
  --text: #33201A; --muted: #664836; --faint: #6D5745;
  --brand: #AD4E2E; --brand-ink: #FFF6F0; --brand-dim: #ECD9CB;
  --brand-text: #9A4528;
  color-scheme: light;
}
:root[data-theme="wimbledon"] {
  --bg: #F2F6EC; --bg-el: #E4EDD8; --surface: #FBFDF7; --surface-alt: #D7E3C9;
  --border: #C4D5B3; --border-strong: #8CA37B;
  --text: #18291A; --muted: #485943; --faint: #586552;
  --brand: #256B3A; --brand-ink: #FFFFFF; --brand-dim: #D9E6D4;
  color-scheme: light;
}
:root[data-theme="us-open"] {
  --bg: #14283D; --bg-el: #1B3350; --surface: #1F3A5A; --surface-alt: #2A4A6E;
  --border: #32557A; --border-strong: #5C82AC;
  --text: #E9F0F8; --muted: #BDCDDE; --faint: #A9B9CA;
  --brand: #F5D547; --brand-ink: #1B1A0A; --brand-dim: #4A4A2C;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  caret-color: var(--brand); accent-color: var(--brand);
  scrollbar-color: var(--border-strong) transparent;
}
::selection { background: var(--brand-fill); color: var(--brand-ink); }
a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
/* A jump to a section leaves a little air above its heading. */
[id] { scroll-margin-top: 24px; }
.wrap { width: 100%; max-width: calc(68ch + 48px); margin: 0 auto; padding-inline: 24px; }

/* ---------------------------------------------------------------- header and footer */
.site-head { position: relative; }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: repeating-linear-gradient(to right, var(--border) 0 2px, transparent 2px 7px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--brand); }
.brand:hover { color: var(--brand); }
.brand svg { width: 28px; height: 28px; }
.wordmark { font-weight: 600; font-size: 20px; letter-spacing: -0.035em; color: var(--text); }

footer { margin-top: 72px; border-top: 1px solid var(--border); padding: 24px 0 40px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; font-size: 14px; color: var(--muted); }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.foot-brand svg { width: 20px; height: 20px; color: var(--brand); }
footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
/* Each link's tap area reaches 4px past its word on both sides (44pt and up), so the words
   themselves start at the column's edge and sit evenly apart. */
footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; margin-inline: -4px; color: var(--text); text-decoration: none; }
footer nav a:hover { color: var(--brand-text); }
footer nav a[aria-current="page"] { color: var(--muted); }

/* ---------------------------------------------------------------- the page */
main { padding-top: 48px; }
h1, h2 { margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.035em; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -0.03em; margin: 48px 0 10px; }
p, li { text-wrap: pretty; }
p { margin: 0 0 14px; }
strong { font-weight: 600; }
ul { margin: 0 0 16px; padding-left: 1.25em; }
li { margin: 0 0 8px; padding-left: 2px; }
li::marker { color: var(--faint); }
.meta { color: var(--faint); font-size: 14px; margin: 8px 0 28px; }
main > .meta:last-child { margin-top: 32px; }

/* On this page: closed on a phone, so the policy starts where it starts; open on a computer. */
.toc { margin: 28px 0 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.toc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px;
  cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.toc summary::-webkit-details-marker { display: none; }
.toc .toc-count { color: var(--faint); font-weight: 400; }
.pm { position: relative; flex: none; width: 14px; height: 14px; color: var(--faint); }
.pm::before, .pm::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 1px; }
.pm::before { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
.pm::after { width: 1.5px; height: 14px; transform: translate(-50%, -50%); transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease-out; }
.toc[open] .pm::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
/* Two columns on a computer, read down then across, in rows shared by both
   columns so an entry that wraps keeps its neighbour level (--rows: half the
   entries, rounded up, set on each page's list). */
.toc ol { list-style: none; margin: 0; padding: 0 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 12), auto); grid-auto-flow: column; column-gap: 32px; }
.toc li { margin: 0; padding: 0; }
.toc a { display: flex; align-items: center; min-height: 40px; padding: 4px 0; color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--brand-text); }

/* Support's way to reach a person. */
.contact { margin: 28px 0 8px; padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.contact p { margin: 0 0 6px; }
.contact p:last-child { margin: 0; }
.contact a { font-weight: 600; font-size: 18px; }
/* A link standing on its own line is a 44pt target without moving the text around it. */
main p > a:only-child, main .links a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.contact p > a:only-child { padding-block: 8px; margin-block: -8px; }

/* What we collect. */
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.55; margin: 8px 0 16px; }
caption { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--border); }
th { color: var(--faint); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }
td:first-child { width: 44%; }
@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  main { padding-top: 36px; }
  h1 { font-size: 34px; }
  h2 { font-size: 21px; margin-top: 40px; }
  .toc ol { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  .toc a { min-height: 44px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
  /* Each row of the table as a block: what it is in full, then why and whether it is needed. */
  table, tbody, tr, td { display: block; width: auto; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { padding: 14px 0; border-bottom: 1px solid var(--border); }
  tr:first-child { border-top: 1px solid var(--border); }
  td { border: 0; padding: 0; }
  td:first-child { width: auto; color: var(--text); margin-bottom: 8px; }
  td[data-label] { font-size: 14px; color: var(--muted); margin-top: 6px; }
  td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--faint); margin-bottom: 1px; }
}
