/* Legal pages (/privacy, /terms) — solar long-form reading layout.
   Standalone sheet: these pages carry no site-base link of their own today, so
   every token has a solar-literal fallback and upgrades to the shared token
   once site-base.css is present. No :root / @font-face defined here.

   Defensive by design — it fully restyles the existing markup and neutralises
   the page's former dark inline theme (grid overlay, glass card) whether or not
   that inline <style> block is removed when this sheet is wired in. */

/* ---- Reset the old dark theme ------------------------------------------- */
body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface, #fff);
  color: var(--ink, #242532);
  font-family: var(--sans, Inter, -apple-system, BlinkMacSystemFont, sans-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Kill the former fixed grid + vignette overlays. */
body::before,
body::after {
  content: none !important;
  background: none !important;
}

/* ---- Page shell + measure (~68ch) --------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  margin: 0 auto;
  padding: 40px 0 30px;
}

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  text-transform: none;
  letter-spacing: normal;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink, #242532);
  font-family: var(--display, Georgia, serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line, #e3e5ef);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar nav a {
  color: var(--faint, #8a8fa6);
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--blue, #3d3df5);
}

/* ---- The document "card" ------------------------------------------------- */
.legal {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e3e5ef);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(36, 37, 50, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

/* The faux "filename" bar. */
.legal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #e3e5ef);
  background: var(--sunk, #f4f5fb);
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--faint, #8a8fa6);
}

.legal__dots { display: flex; gap: 6px; }
.legal__dots i { width: 9px; height: 9px; border-radius: 50%; display: block; background: var(--line, #e3e5ef); }
.legal__dots i:nth-child(1) { background: #d6d9e6; }
.legal__dots i:nth-child(2) { background: #e0e3ef; }
.legal__dots i:nth-child(3) { background: #eaecf5; }

/* ---- Long-form article -------------------------------------------------- */
article {
  padding: clamp(26px, 5vw, 48px);
}

h1 {
  margin: 0 0 20px;
  font-family: var(--display, Georgia, serif);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  color: var(--ink, #242532);
}

h2 {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line, #e3e5ef);
  font-family: var(--display, Georgia, serif);
  font-weight: 400;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink, #242532);
}

h3 {
  margin-top: 28px;
  font-family: var(--sans, Inter, sans-serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink, #242532);
}

p, li, blockquote {
  color: var(--muted, #606477);
  font-size: 16px;
  line-height: 1.65;
}

p { margin: 16px 0 0; }
ul, ol { margin: 16px 0 0 22px; padding: 0; }
li + li { margin-top: 9px; }

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

/* Article links — the single blue accent. */
a {
  color: var(--blue, #3d3df5);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-dark, #2929cb);
}

/* The topbar/footer links opt back out of the accent underline. */
.topbar a, footer a { text-decoration: none; }

code {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 0.9em;
  color: var(--ink, #242532);
  background: var(--sunk, #f4f5fb);
  border: 1px solid var(--line, #e3e5ef);
  border-radius: 5px;
  padding: 1px 5px;
}

blockquote {
  margin-top: 18px;
  padding: 16px 20px;
  border-left: 3px solid var(--blue, #3d3df5);
  background: var(--wash, #edf0ff);
  border-radius: 0 10px 10px 0;
}

/* The "Manage analytics preferences" button carries a dark-theme inline style
   in the HTML; override it to solar (external !important beats inline). */
#manage-analytics-preferences {
  padding: 11px 18px !important;
  border: 1px solid var(--line, #e3e5ef) !important;
  border-radius: 9px !important;
  background: var(--surface, #fff) !important;
  color: var(--ink, #242532) !important;
  font-family: var(--sans, Inter, sans-serif) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 2px rgba(36, 37, 50, 0.04) !important;
  cursor: pointer;
}

#manage-analytics-preferences:hover {
  background: var(--sunk, #f4f5fb) !important;
}

/* ---- Footer -------------------------------------------------------------- */
footer {
  position: relative;
  z-index: 1;
  padding: 26px 0 30px;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint, #8a8fa6);
  text-align: center;
}

footer a { color: var(--muted, #606477); }
footer a:hover { color: var(--ink, #242532); }
footer .sep { margin: 0 10px; opacity: 0.5; }

@media (max-width: 600px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar nav { flex-wrap: wrap; }
  article { padding: 24px; }
  h2 { margin-top: 36px; padding-top: 24px; }
}
