/*
 * Shared styling for the legal pages.
 *
 * Deliberately plain. These are documents to be read, and the measure, line
 * height and type size matter far more than anything decorative — a privacy
 * notice set in small grey text is a privacy notice nobody reads, which
 * defeats the point of writing a clear one.
 */

:root {
  --ink: #111827;
  --ink-muted: #4b5563;
  --brand: #1d4ed8;
  --border: #e5e7eb;
  --surface-sunken: #f3f4f6;
  --measure: 38rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  /* 18px, because these are long documents read once and carefully. */
  font-size: 1.125rem;
  line-height: 1.65;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}

.bar nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 1rem;
}

.bar nav a:hover {
  color: var(--brand);
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

.meta {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: var(--brand);
}

/* The one thing on the page somebody must not miss. */
.callout {
  background: var(--surface-sunken);
  border-left: 3px solid var(--brand);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 0 0 1rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  border-bottom-width: 2px;
}

/*
 * A table wants more width than a paragraph does. The measure is set for
 * reading prose, and inside it a three-column table wraps every cell onto
 * three lines — so on a wide screen the table breaks out of the measure
 * slightly rather than being squeezed into it.
 */
@media (min-width: 60rem) {
  table {
    width: calc(100% + 8rem);
    margin-left: -4rem;
  }
}

/* A three-column table does not fit a phone, so it scrolls in its own box
   rather than forcing the page sideways. */
@media (max-width: 34rem) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6;
    --ink-muted: #9ca3af;
    --brand: #93b4fd;
    --border: #374151;
    --surface-sunken: #1f2937;
  }

  body {
    background: #111827;
  }

  .wordmark {
    color: var(--ink);
  }
}
