/**
 * The legal documents. Tokens come from theme.css.
 *
 * These are the only pages on the site that are genuinely read start to finish,
 * so they are set as a document rather than as an interface: one narrow column
 * near 68 characters, the brand serif for headings, and enough space between
 * sections that a reader can find their place again. Nothing is collapsed
 * behind a summary — a term you have to click to see is a term you can say you
 * were not shown.
 */

html, body { height: auto; min-height: 100%; }

.doc-body {
  background: var(--bg);
  padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 32px) 96px;
}

.doc {
  max-width: 660px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 54px) clamp(22px, 5vw, 52px);
}

/* -------------------------------------------------------------------- head */

.doc-head { margin-bottom: 34px; }

/* Layout only. The lockup itself is .wordmark, in theme.css. */
.doc-brand { --wordmark: 19px; margin-bottom: 26px; }

.doc h1 {
  margin: 0 0 8px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(31px, 5.6vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.doc-date {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-lede {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink);
}

/* ---------------------------------------------------------------- identity */

.doc-identity {
  margin: 0 0 34px;
  padding: 22px 24px;
  border-radius: var(--r);
  background: var(--sunk);
}

.doc-identity h2 {
  margin: 0 0 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-identity dl { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.doc-identity dl > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: baseline;
}
.doc-identity dt { color: var(--muted); font-size: 12.5px; }
.doc-identity dd { margin: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.doc-identity dd a { color: var(--brand); }
.doc-unset { color: var(--faint); font-weight: 400; font-style: italic; }

/* An unfilled trader is a blocking problem, not a nicety, so it is coloured
   like an error rather than tucked away as a hint. */
.doc-gap {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: rgba(176, 58, 38, .09);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .doc-identity dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ----------------------------------------------------------------- prose */

.doc-section { margin-bottom: 30px; }
.doc-section:last-of-type { margin-bottom: 0; }

.doc-section h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
}

.doc-section p {
  margin: 0 0 11px;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-soft);
}
.doc-section p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------- foot */

.doc-foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.doc-also {
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-foot nav { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-foot nav a {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.doc-foot nav a:hover { border-color: var(--brand); color: var(--ink); }
