/* Blockstead — legal pages.
   Dark first, because the app is locked to a pure-black scoreboard and these
   pages are opened from inside it. A light palette follows for anyone reading
   a long legal document in daylight. */

:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --ink: #2b2440;
  --muted: #625a78;
  --faint: #9a93ad;
  --rule: #eadfcf;
  --red: #d9534a;
  --green: #3a9a4f;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141f;
    --surface: #211d2c;
    --ink: #f3eefb;
    --muted: #b3abc6;
    --faint: #7a7290;
    --rule: #332d42;
    --red: #f07a70;
    --green: #6cc77d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

header {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 3.5rem;
}

header .wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mark svg { display: block; }

nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }

/* Type */

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.75rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  margin: 1.75rem 0 0.5rem;
}

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

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.stamp {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin: 0 0 1.5rem;
}

a { color: var(--ink); text-decoration-color: var(--faint); }
a:hover { text-decoration-color: currentColor; }

ul { padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 650; }

.mark img { width: 28px; height: 28px; border-radius: 7px; display: block; }

/* The one place colour appears: a claim worth reading twice. */
.pull {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin: 2rem 0;
}

.pull p { margin: 0; }
.pull p + p { margin-top: 0.65rem; }

/* Definition-style rows for the data table */

dl.rows {
  margin: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

dl.rows > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.25rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}

dl.rows dt {
  font-weight: 600;
  font-size: 0.95rem;
}

dl.rows dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 34rem) {
  dl.rows > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Contents */

.toc {
  font-size: 0.92rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

.toc li { margin-bottom: 0.3rem; break-inside: avoid; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 34rem) { .toc { columns: 1; } }

/* Footer */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2rem 0 4rem;
  color: var(--faint);
  font-size: 0.85rem;
}

footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .spacer { margin-left: auto; }

/* Landing */

.hero { padding: 2rem 0 1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.35rem;
  text-decoration: none;
  color: var(--ink);
}

.card:hover { border-color: var(--faint); }
.card h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
