/* The legal pages: privacy, terms.
 *
 * Loaded *after* styles/main.css, which supplies the palette, the fonts, the menubar and
 * the footer — these pages are part of the same site and must not look like a PDF someone
 * pasted in. What they add is a reading column, because the landing page is built out of
 * full-bleed panels and none of its layout suits 3,000 words of prose.
 *
 * BODY COPY IS SET IN SYSTEM-UI, not in either of the site's own faces, and that is a
 * deliberate departure. Silkscreen is a display font and is painful past a headline; Jersey
 * 15, which sets the landing page's prose, has ambiguous glyphs at this size — a screenshot
 * of the first draft showed `PBKDF2-SHA256` reading as `PBHDF2-SHA258` and a cross-reference
 * to section 6 reading as 8. That is a cosmetic quirk in marketing copy and a genuine defect
 * in a document made of cross-references, hash names and retention periods. (The landing
 * page's own CSS already notes the 6/9 problem and works around it with `.fig`.)
 *
 * The headings keep Silkscreen, and the palette, frames and drop shadows are the site's, so
 * the pages still read as Plates. */

.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: calc(var(--menubar-h) + 40px) 20px 80px;
}

.legal__kicker {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brown-mid);
  margin: 0 0 10px;
}

.legal h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 6px;
}

.legal__meta {
  color: #5a6470;
  font-size: 15px;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 21px;
  margin: 44px 0 12px;
  padding-bottom: 8px;
  border-bottom: var(--edge) solid var(--ink);
}

.legal h3 {
  /* Sub-headings keep the site's UI face: short phrases, no digits or hashes in them, so
     none of the ambiguity that pushed body copy to system-ui applies. */
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 700;
  margin: 26px 0 8px;
}

.legal p,
.legal li,
.legal td,
.legal__toc ol {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.legal code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.92em;
  background: var(--parchment-2);
  padding: 1px 5px;
}

.legal ul,
.legal ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}

.legal li {
  margin-bottom: 0.45em;
}

.legal a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.legal strong {
  font-weight: 650;
}

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

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 15px;
}

.legal th,
.legal td {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--parchment-2);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* Two columns of prose in a narrow column is unreadable; on a phone the table scrolls
   sideways in its own box rather than forcing the whole page to. */
.legal__scroll {
  overflow-x: auto;
}

/* ------------------------------------------------------------- contents -- */

.legal__toc {
  background: var(--parchment);
  border: var(--edge) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 20px;
  margin: 0 0 40px;
}
.legal__toc h2 {
  font-size: 14px;
  margin: 0 0 10px;
  border: 0;
  padding: 0;
}
.legal__toc ol {
  margin: 0;
  columns: 2;
  column-gap: 28px;
  font-size: 15px;
}
@media (max-width: 620px) {
  .legal__toc ol {
    columns: 1;
  }
}

/* ---------------------------------------------------------- draft state -- */

/* This banner and the `.todo` marks below are the whole safety mechanism for these pages:
   a policy that ships with a blank where the company name goes is worse than no policy at
   all, because it looks like one. e2e/legal.spec.ts asserts that the banner and the marks
   live or die together — remove the banner without filling every blank and the suite
   fails. */
.legal__draft {
  background: #fff3cd;
  border: var(--edge) solid var(--red);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 20px;
  margin: 0 0 36px;
}
.legal__draft h2 {
  font-size: 15px;
  color: var(--red);
  margin: 0 0 8px;
  border: 0;
  padding: 0;
}
.legal__draft p:last-child,
.legal__draft ul:last-child {
  margin-bottom: 0;
}

.todo {
  background: #ffe27a;
  box-shadow: 0 0 0 2px #ffe27a;
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: #6b4a00;
}

/* --------------------------------------------------------------- footer -- */

.legal__nav {
  margin-top: 56px;
  padding-top: 20px;
  border-top: var(--edge) solid var(--ink);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 13px;
}
