/* Shared by privacy.html and terms.html. Tokens mirror src/theme/tokens.ts;
   the palette is fixed and light by design, so there is no dark scheme. */
:root {
  --sage: #9caf9f;
  --sage-deep: #778e7c;
  --sand: #e8dcc8;
  --lavender: #b9aec9;
  --gold: #c9a96a;
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-warm: #f4f0e8;
  --ink: #33322e;
  --ink-soft: #6e6b63;
  --ink-faint: #9a968c;
  --line: rgba(51, 50, 46, 0.1);
  --line-strong: rgba(51, 50, 46, 0.16);
  --r-card: 20px;
  --r-soft: 16px;
  --r-pill: 999px;
  --shadow-card: 0 8px 24px rgba(51, 50, 46, 0.06), 0 2px 4px rgba(51, 50, 46, 0.03);
  --tap: 44px;
  --sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The same soft washes as the landing page. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 420px at 8% 0%, rgba(156, 175, 159, 0.22), transparent 70%),
    radial-gradient(520px 420px at 96% 12%, rgba(185, 174, 201, 0.18), transparent 70%),
    radial-gradient(640px 480px at 50% 115%, rgba(232, 220, 200, 0.5), transparent 70%);
}

.page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; }

/* Header */
header { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); }
.lockup { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.lockup .word { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.back:active { opacity: 0.72; }

/* Hero */
.hero { padding: 56px 0 40px; max-width: 640px; }
.hero-mark { display: flex; gap: 0; margin-bottom: 20px; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.8px;
  text-wrap: balance;
}
h1 .accent { color: var(--sage-deep); }
.lead { margin: 0 0 24px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }

.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--pill, var(--sage));
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ink);
}
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--pill, var(--sage)); }
.pill.gold { --pill: var(--gold); }
.pill.lavender { --pill: var(--lavender); }

/* Layout: contents rail + document */
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }

.toc { display: none; }

/* At a glance */
.glance {
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--sand);
}
.glance h2 { margin: 0 0 16px; font-size: 18px; letter-spacing: -0.2px; }
.glance ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.glance li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-soft);
  background: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
}
.glance li svg { flex: none; margin-top: 1px; }

/* Document card */
.doc {
  padding: 8px 20px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.doc section { padding: 24px 0; border-top: 1px solid var(--line); }
.doc section:first-child { border-top: 0; }

.doc h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--surface-warm);
  font-size: 13px;
  font-weight: 700;
  color: var(--sage-deep);
}

.doc p, .doc li { color: var(--ink-soft); }
.doc p { margin: 0 0 12px; }
.doc p:last-child, .doc ul:last-child { margin-bottom: 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { margin: 0 0 12px; padding-left: 0; list-style: none; }
.doc li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.doc li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
}

/* A named third party, laid out as a small flat card. */
.providers { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 12px; }
.provider {
  padding: 14px 16px;
  border-radius: var(--r-soft);
  background: var(--surface-warm);
}
.provider b { display: block; margin-bottom: 2px; font-weight: 700; color: var(--ink); }
.provider span { font-size: 14px; line-height: 20px; color: var(--ink-soft); }

.callout {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-soft);
  border: 1px dashed var(--line-strong);
  background: var(--surface-warm);
  font-size: 15px;
}

a { color: var(--sage-deep); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

/* Contact card at the end of the document */
.contact {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--sage-deep);
  color: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact h2 { margin: 0; font-size: 20px; letter-spacing: -0.2px; }
.contact p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.contact .btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.contact .btn:active { opacity: 0.72; }

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-faint);
}
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
footer a { color: var(--ink-soft); }
.company { font-size: 13px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (min-width: 560px) {
  .page { padding: 32px 24px 48px; }
  .doc { padding: 8px 32px; }
  .doc section { padding: 32px 0; }
  .glance ul { grid-template-columns: 1fr 1fr; }
  .providers { grid-template-columns: repeat(3, 1fr); }
  .contact { flex-direction: row; align-items: center; justify-content: space-between; }
  .contact .btn { align-self: auto; flex: none; }
}

@media (min-width: 900px) {
  .hero { padding: 72px 0 48px; }
  .layout { grid-template-columns: 220px 1fr; gap: 48px; }
  .main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

  .toc {
    display: block;
    position: sticky;
    top: 24px;
  }
  .toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .toc a {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .toc a span { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
  .toc a:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
  .toc a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
  .toc a.active span { color: var(--sage-deep); }
}
