/*
 * Shared styling for the standalone content pages (/rules, /help) and the base for the legal shelf.
 *
 * These are static HTML rather than routes in the React app: they are prose,
 * they never change with state, and serving them as files keeps the landing a
 * single bundle. The tokens mirror frontend/src/index.css so the pages look
 * like the rest of the site.
 */
:root {
  --bg: #000000;
  --card: #0c0c0d;
  --text: #ffffff;
  --text-soft: #f2f4fb;
  --text-muted: #9aa3c8;
  --text-dim: #8e98c0;
  --border: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.08);
  --green: #1fbf5b;
  --green-soft: rgba(31, 191, 91, 0.16);
  --green-border: rgba(31, 191, 91, 0.5);
  --green-text: #7ce6a6;
  color-scheme: dark;
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--green-text);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(6, 6, 8, 0.86);
  backdrop-filter: blur(14px);
}

.top a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-style: italic;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.top img {
  width: 26px;
  height: 26px;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 24px 100px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-text);
}

h1 {
  margin: 14px 0 0;
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.lead {
  margin-top: 18px;
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--text-muted);
}

h2 {
  margin: clamp(38px, 5vw, 56px) 0 0;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  margin: 26px 0 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

p.tight {
  margin-top: 6px;
}

ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
}

li + li {
  margin-top: 8px;
}

.card {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--card);
}

.card--green {
  border-color: var(--green-border);
  background: var(--green-soft);
}

.card p:first-child {
  margin-top: 0;
}

.contact {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #04220f;
  font-weight: 700;
  text-decoration: none;
}

footer {
  padding: 28px 24px 60px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

footer a {
  color: var(--text-muted);
}

/* Rules tables: the point tiers and anything else that reads as a grid. */
.rules__table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 14px;
}

.rules__table th {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
}

.rules__table th:last-child,
.rules__table td:last-child {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.rules__table td {
  padding: 9px 0;
  color: var(--text-muted);
}

.rules__table tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rules__table td:last-child {
  font-weight: 800;
  color: var(--green-text);
}

/* ── Legal documents ───────────────────────────────────────────────────
 *
 * The five classes a legal page needs on top of the ordinary page furniture.
 * They are here and not in a stylesheet of their own because a Terms of Use is
 * the same kind of page as the rules and the help centre — one column of prose
 * with a nav on top — and a second stylesheet for one document would be a
 * second thing to keep in step with this one.
 */

/* Numbered sections, so a reader can cite one. The document numbers them in
   its own headings; this only makes the numbers sit apart from the words. */
.legal h2 {
  margin-top: 44px;
}

.legal h3 {
  margin-top: 26px;
}

/* Version, effective date and who the document applies to. */
.meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.breadcrumb {
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* The banner that says this is not signed off yet. Amber rather than green:
   every other panel on these pages is the brand's colour and means "this is
   how it works", and this one means the opposite. */
.draft {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 210, 74, 0.4);
  border-radius: var(--r-md);
  background: rgba(255, 210, 74, 0.08);
  font-size: 14px;
  line-height: 1.6;
}

.draft strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
}

/* The notices a reader has to meet before the contract starts: age, where we
   operate, arbitration, and that nobody is on the other side of their pick. */
.callout {
  margin: 22px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
}

.callout p + p {
  margin-top: 12px;
}

.toc {
  columns: 2;
  column-gap: 34px;
  margin-top: 14px;
}

.toc li {
  break-inside: avoid;
}

/* Where the law wants a term to be conspicuous, it is set in capitals. It is
   not shouting: a disclaimer that is not conspicuous is a disclaimer a court
   can decline to enforce. */
.upper {
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .toc {
    columns: 1;
  }
}

/* An entry that is not a link yet: the same shape as one, in the same list,
   with the state said out loud. Used where the legal documents used to be
   linked from — they are drafts and are not published. */
.soon {
  color: inherit;
  opacity: 0.62;
}

.soon em {
  font-style: normal;
  font-size: 0.82em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}
