/* Shared styling for the standalone legal pages (terms.html, privacy.html).
 *
 * A separate file rather than inlined twice: these two documents are the only pages that need it,
 * they will be edited by non-developers, and duplicating ~150 lines of CSS into both guarantees
 * they drift apart.
 *
 * Tokens are copied from landing.html rather than imported, because that page keeps all its CSS
 * inline and these pages are served as flat objects from S3 with no build step. If the brand
 * palette changes, both need updating — the duplication is deliberate and bounded.
 */

:root {
  --color-teal:          oklch(60% 0.075 195);
  --color-teal-dark:     oklch(48% 0.072 195);
  --color-teal-faint:    oklch(94% 0.020 195);
  --color-gold-mid:      oklch(82% 0.090 85);
  --color-ink:           oklch(22% 0.010 195);
  --color-ink-mid:       oklch(42% 0.012 195);
  --color-ink-muted:     oklch(58% 0.010 195);
  --color-paper:         oklch(100% 0 0);
  --color-paper-warm:    oklch(98% 0.008 90);
  --color-paper-section: oklch(97% 0.005 195);
  --color-border:        oklch(88% 0.010 195);
  --color-focus:         oklch(72% 0.120 195);

  --font-display:  'Raleway', sans-serif;
  --font-body:     'Open Sans', sans-serif;
  --font-wordmark: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-paper-warm);
  color: var(--color-ink-mid);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: var(--font-wordmark); font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.logo__quiz  { color: var(--color-teal-dark); font-weight: 700; }
.logo__skill { color: var(--color-ink); }
.topbar__back {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  color: var(--color-teal-dark); text-decoration: none;
  border: 1.5px solid var(--color-border); border-radius: 25px; padding: 0.45rem 1rem;
  background: var(--color-teal-faint);
}
.topbar__back:hover { border-color: var(--color-teal); }

/* ── Document ─────────────────────────────────────────────────────────────── */
main { padding: 3rem 0 4rem; }

h1 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--color-ink); line-height: 1.15; margin: 0 0 0.5rem;
}
.updated { font-size: 0.85rem; color: var(--color-ink-muted); margin: 0 0 2.5rem; }

h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: var(--color-ink); margin: 2.75rem 0 0.75rem; line-height: 1.3;
}
h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--color-ink); margin: 1.75rem 0 0.5rem;
}
p, li { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
li { margin-bottom: 0.5rem; }
strong { color: var(--color-ink); font-weight: 600; }
a { color: var(--color-teal-dark); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--color-focus); border-radius: 2px; }

/* The plain-English summary at the top of each document. Legal text nobody reads protects nobody,
   so the obligations that actually affect a customer are stated once in short sentences first. */
.summary {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
}
.summary h2 { margin-top: 0; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink-muted); }
.summary ul { margin-bottom: 0; }
.summary li:last-child { margin-bottom: 0; }

/* For the sub-processor table and the retention table. */
table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
th {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-muted);
  border-bottom-width: 2px;
}
td:first-child { color: var(--color-ink); font-weight: 600; white-space: nowrap; }

.callout {
  background: var(--color-paper-section);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.foot {
  background: var(--color-ink);
  color: oklch(100% 0 0 / 0.55);
  padding: 2rem 0;
  font-size: 0.85rem;
}
.foot__inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.foot a { color: oklch(100% 0 0 / 0.55); text-decoration: none; }
.foot a:hover { color: var(--color-gold-mid); }
.foot__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (max-width: 40rem) {
  main { padding: 2rem 0 3rem; }
  table { font-size: 0.85rem; }
  th, td { padding: 0.5rem 0.4rem; }
  td:first-child { white-space: normal; }
}
