/* Shared by the document pages — privacy, terms, support — which are
   generated from the Markdown in Legal/ by build-pages.py. The landing page
   keeps its own styles: it is a poster, and these are pages to be read.

   Same palette and the same two faces as index.html, so the site is one
   site. */

:root {
  --paper: #f7f6f9;
  --card: #ffffff;
  --night: #131118;
  --ink: #17151c;
  --ink-2: #4c4656;
  --muted: #857e91;
  --line: #e3dfea;
  --amethyst: #6e4bc4;
  --amethyst-soft: #efe9fb;
  --on-night: #efecf5;
  --on-night-2: #b3aac6;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

.wrap { max-width: 760px; margin: 0 auto; padding-inline: 22px; }

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

/* Matches the landing page's bar, so moving between the two feels like one
   site rather than two that happen to share a domain. */
.doc-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(19, 17, 24, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid #2c2739;
  color: var(--on-night);
  padding: 12px 0;
}

.doc-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand svg { width: 28px; height: 28px; flex: none; }

.doc-head nav { display: flex; gap: 18px; font-size: 15px; }
.doc-head nav a { color: var(--on-night-2); text-decoration: none; }
.doc-head nav a:hover,
.doc-head nav a[aria-current="page"] { color: var(--on-night); }

/* ---------------- the document ---------------- */

.doc { padding: 42px 22px 72px; }

.doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  text-wrap: balance;
}

.doc h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.15;
  margin: 46px 0 12px;
  text-wrap: balance;
}

.doc h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 30px 0 8px;
}

.doc p { margin: 0 0 16px; }
.doc a { color: var(--amethyst); text-underline-offset: 2px; }

.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }

.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px 0;
}

.doc blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--amethyst-soft);
  border-radius: 12px;
  color: var(--ink-2);
}

.doc blockquote p:last-child { margin-bottom: 0; }

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: #ece9f3;
  padding: 2px 5px;
  border-radius: 5px;
}

/* The lead line under the title: dates, versions, what this applies to. */
.doc .lede {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 30px;
}

.doc .lede strong { color: var(--ink-2); font-weight: 600; }

/* ---------------- tables ---------------- */

.doc .table-wrap { overflow-x: auto; margin: 0 0 20px; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15.5px;
}

.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.doc th { background: #f1eef7; font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }

/* ---------------- placeholders ---------------- */

/* Anything still in brackets has not been filled in yet, and is meant to be
   impossible to publish by accident. */
mark.fill {
  background: #ffe9a8;
  color: #6b4a00;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 600;
}

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

.doc-foot {
  background: var(--night);
  color: var(--on-night-2);
  padding: 40px 0;
  font-size: 15px;
}

.doc-foot .wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}

.foot-brand { display: flex; align-items: center; gap: 13px; }
.foot-brand svg { width: 44px; height: 44px; flex: none; }
.foot-brand strong {
  display: block;
  color: var(--on-night);
  font-weight: 600;
  font-size: 16px;
}
.foot-brand span { font-size: 14px; }

.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.doc-foot a { color: var(--on-night-2); text-decoration: none; }
.doc-foot a:hover { color: var(--on-night); }
.foot-mail { font-size: 14px; }
.foot-mail a { text-decoration: underline; text-underline-offset: 2px; }
