/*
 * Stylesheet for the two legal pages.
 *
 * These pages are deliberately plain HTML with no JavaScript. Three reasons,
 * all of them practical rather than aesthetic:
 *
 *  1. App Store review opens them. A page that needs a JS bundle to render its
 *     own privacy policy is a page that can fail review for being blank.
 *  2. They must be readable when the API is down, the SPA bundle is broken, or
 *     the reader has JS off entirely.
 *  3. They are the one part of the product a regulator might read. Nothing
 *     should sit between the text and the reader.
 *
 * The tokens mirror src/index.css so these do not look like a different
 * company's pages, but they are duplicated ON PURPOSE: importing the app's
 * stylesheet would couple a legal document to a design refactor.
 */

:root {
  --paper: #f7f6f3;
  --vellum: #ffffff;
  --rule: #ddd9d1;
  --graphite: #1b1e23;
  --graphite-soft: #5f646b;
  --measure: #1f4fd8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15171b;
    --vellum: #1d2025;
    --rule: #33383f;
    --graphite: #f1efea;
    --graphite-soft: #9aa0a8;
    --measure: #6e93f5;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* No font-size override. Setting a px root here is what silently defeats the
     reader's own text-size preference, which is the whole point of rem below. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 2.5rem 1rem 6rem;
  background: var(--paper);
  color: var(--graphite);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

main {
  max-width: 44rem;
  margin: 0 auto;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite-soft);
}

h1 {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.5rem 0 0;
}

h2 {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

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

p,
ul,
ol {
  margin: 0.875rem 0 0;
}

ul,
ol {
  padding-left: 1.5rem;
}

li {
  margin-top: 0.4rem;
}

a {
  color: var(--measure);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--measure);
  outline-offset: 2px;
}

strong {
  font-weight: 600;
}

.lede {
  font-size: 1.125rem;
  color: var(--graphite-soft);
}

.updated {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8125rem;
  color: var(--graphite-soft);
  margin-top: 1rem;
}

/* The summary box. This is the part most people will actually read, so it goes
   first and says the same thing the detail below says. */
.summary {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--vellum);
  border: 1px solid var(--rule);
}

.summary h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.0625rem;
}

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

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

th {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  font-weight: 500;
}

footer {
  max-width: 44rem;
  margin: 4rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--graphite-soft);
}

footer a {
  margin-right: 1.25rem;
}
