/* ───────────────────────────────────────────────
   Shared styling for the Privacy Policy and Terms
   of Service pages. Matches the type and palette
   of plns.app and of the app itself: system stack
   (SF Pro on Apple devices), iOS system colours,
   no webfont, no framework.
   ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; }

:root {
  --bg:        #ffffff;
  --bg-alt:    #f5f5f7;
  --surface:   #ffffff;
  --line:      rgba(0,0,0,0.11);
  --line-soft: rgba(0,0,0,0.06);
  --ink:       #0a0a0c;
  --ink-2:     #44444d;
  --ink-3:     #6b6b74;
  --blue:      #007aff;
  --blue-ink:  #0059c2;
  --focus:     #007aff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b0b0f;
    --bg-alt:    #131318;
    --surface:   #17171d;
    --line:      rgba(255,255,255,0.14);
    --line-soft: rgba(255,255,255,0.08);
    --ink:       #f6f6f8;
    --ink-2:     #b9b9c3;
    --ink-3:     #8e8e99;
    --blue-ink:  #7ab6ff;
    --focus:     #6fb0ff;
  }
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a { color: var(--blue-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 5vw, 2rem) clamp(3rem, 8vw, 5rem);
}

/* Brand lockup at the top of the page (markup carries inline styles too). */
header.brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
header.brand img, .brand img { width: 1.75rem; height: 1.75rem; border-radius: 0.45rem; }
header.brand span, .brand span {
  font-weight: 800; font-size: 1.0625rem; letter-spacing: 0.06em;
}

/* The document itself sits on the page, not in a floating card — it is a
   legal document, and it should read like one. */
.doc {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.updated {
  color: var(--ink-3);
  font-size: 0.9375rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}

h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 1.75rem 0 0.5rem;
}

p { margin-bottom: 0.9rem; }

ul, ol { margin: 0 0 1.1rem 1.25rem; padding-left: 0.35rem; }
li { margin-bottom: 0.5rem; }

strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--blue);
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}
.callout p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
th { color: var(--ink); font-weight: 600; }

footer.page {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}
footer.page a { color: var(--ink-2); text-decoration: none; }
footer.page a:hover { color: var(--ink); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
