/* Shared styles for /terms, /privacy and /refunds. Same palette, fonts and
   header/footer as the landing page (site/index.html), with a reading layout. */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --inset: #f2f0ea;
  --ink: #14171c;
  --muted: #565e6a;
  --subtle: #7a828f;
  --line: #e5e2da;
  --line-strong: #d1ccc0;
  --accent: #0f6e5c;
  --accent-bg: #e7f4f0;
  --accent-line: #b7ded3;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014;
    --surface: #15181f;
    --inset: #1c2029;
    --ink: #eef1f5;
    --muted: #9aa3b2;
    --subtle: #768091;
    --line: #232833;
    --line-strong: #323947;
    --accent: #4ad295;
    --accent-bg: rgba(74, 210, 149, 0.11);
    --accent-line: rgba(74, 210, 149, 0.28);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1014;
  --surface: #15181f;
  --inset: #1c2029;
  --ink: #eef1f5;
  --muted: #9aa3b2;
  --subtle: #768091;
  --line: #232833;
  --line-strong: #323947;
  --accent: #4ad295;
  --accent-bg: rgba(74, 210, 149, 0.11);
  --accent-line: rgba(74, 210, 149, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 22px; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #14171c;
  color: #f5f5f2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-links { display: none; align-items: center; gap: 28px; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }

/* Document */
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 72px; }

.doc .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 10px;
}

.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 750;
}

.doc .updated { margin: 0 0 32px; color: var(--subtle); font-size: 14px; }

.doc .summary {
  background: var(--accent-bg);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 40px;
}
.doc .summary p { margin: 0 0 8px; }
.doc .summary ul { margin: 0; }
.doc .summary :last-child { margin-bottom: 0; }

.doc h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 44px 0 12px;
  padding-top: 8px;
  scroll-margin-top: 80px;
}

.doc h3 { font-size: 17px; margin: 28px 0 8px; letter-spacing: -0.01em; }

.doc p, .doc li { color: var(--muted); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 0 0 6px; }
.doc strong { color: var(--ink); }

.doc p a, .doc li a, .doc td a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.doc table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 14.5px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); }
.doc th { color: var(--ink); font-weight: 600; background: var(--inset); }
.doc .table-scroll { overflow-x: auto; }

/* Footer, as on the landing page */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--subtle); font-size: 14px; }
.foot-row { display: flex; flex-direction: column; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.foot-links a:hover { color: var(--ink); }
.foot-links a[aria-current="page"] { color: var(--ink); }

@media (min-width: 680px) {
  .wrap { padding: 0 32px; }
  .nav-links { display: flex; }
  .doc { padding-top: 72px; }
  .foot-row { flex-direction: row; justify-content: space-between; align-items: center; }
}
