/* Shared styles for /terms, /privacy and /delete-account.
   Same tokens and Inter type as the homepage; plain document layout. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:           #0a57ff;
  --blue-dark:      #0046d4;
  --blue-light:     #e6eeff;
  --blue-border:    #9dbcff;
  --orange:         #ff8a22;
  --text-primary:   #01091a;
  --text-heading:   #170d33;
  --text-body:      #2a3142;
  --text-secondary: #5f656c;
  --surface:        #ffffff;
  --surface-fg:     #f6f7f8;
  --border-primary: #d7d9db;
  --border-tertiary:#e8eaee;
  --danger:         #ea3900;
  --danger-bg:      #fdebe6;
  --warning:        #c25e00;
  --warning-bg:     #fff3e8;
  --success:        #05744c;
  --success-bg:     #e3f4ec;
  --footer-bg:      #151718;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-input: 12px;
  --radius-md: 16px;
  --radius-xl: 24px;
  --radius-full: 40px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-body);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 600; color: var(--text-heading); text-wrap: balance; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue-border); outline-offset: 2px; border-radius: 4px; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar { background: var(--footer-bg); }
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-logo img { display: block; height: 24px; width: auto; }
.topbar-back { color: #fff; opacity: 0.8; font-size: 14px; text-decoration: none; }
.topbar-back:hover { color: #fff; opacity: 1; text-decoration: underline; }

/* ── Page header ─────────────────────────────────────── */
.page-head { background: var(--surface-fg); border-bottom: 1px solid var(--border-tertiary); }
.page-head-inner { max-width: 1120px; margin: 0 auto; padding: 56px 24px 40px; }
.page-head h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.page-head .lead { margin-top: 16px; max-width: 620px; font-size: 18px; line-height: 1.5; color: var(--text-body); }
.updated { margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.updated:empty { display: none; }

/* ── Document layout ─────────────────────────────────── */
.doc {
  width: 100%; max-width: 1120px; margin: 0 auto; flex: 1 0 auto;
  padding: 40px 24px 96px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
}
.doc.solo { max-width: 728px; }

.toc { font-size: 14px; }
.toc summary {
  list-style: none; cursor: pointer; font-weight: 600; color: var(--text-heading);
  padding: 14px 16px; background: var(--surface-fg); border-radius: var(--radius-md);
  display: flex; justify-content: space-between; align-items: center;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--text-secondary); }
.toc[open] summary::after { content: '\2212'; }
.toc ol { list-style: none; margin-top: 8px; display: flex; flex-direction: column; }
.toc a {
  display: block; padding: 8px 16px; color: var(--text-secondary);
  text-decoration: none; border-left: 2px solid var(--border-tertiary);
}
.toc a:hover { color: var(--text-primary); border-left-color: var(--blue-border); }

@media (min-width: 900px) {
  .doc.has-toc { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; }
  .toc { position: sticky; top: 24px; align-self: start; }
  .toc summary { background: none; padding: 0 0 12px; cursor: default; pointer-events: none; }
  .toc summary::after { content: none; }
}
@media (max-width: 899px) {
  .page-head-inner { padding: 40px 16px 32px; }
  .doc { padding: 24px 16px 72px; }
  .topbar-inner { padding: 16px; }
}

/* ── Prose ───────────────────────────────────────────── */
.prose { max-width: 680px; min-width: 0; font-size: 16px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin-top: 48px; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; line-height: 1.3; margin-top: 32px; }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--text-secondary); }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.9em; background: var(--surface-fg); padding: 2px 6px; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--border-tertiary); margin-top: 40px; }
.prose blockquote { background: var(--blue-light); border-radius: var(--radius-md); padding: 16px 20px; color: var(--text-primary); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-tertiary); border-radius: var(--radius-md); }
.prose table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border-tertiary); }
.prose th { background: var(--surface-fg); font-weight: 600; color: var(--text-primary); font-size: 14px; }
.prose tr:last-child td { border-bottom: 0; }
.load-error { background: var(--danger-bg); color: var(--text-primary); border-radius: var(--radius-md); padding: 16px 20px; }

/* ── Footer (same as the homepage) ───────────────────── */
.footer { background: var(--footer-bg); padding: 0 56px 48px; display: flex; flex-direction: column; gap: 64px; align-items: center; margin-top: auto; }
.footer-cta {
  position: relative; background: var(--blue);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 64px 128px; width: 100%; max-width: 946px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.footer-pattern { position: absolute; width: 240px; height: 240px; opacity: 0.5; pointer-events: none; }
.footer-pattern.top-left { left: -85px; bottom: -160px; }
.footer-pattern.bottom-right { left: 432px; bottom: 98px; transform: scaleY(-1); }
.footer-cta-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; color: white; }
.footer-cta-text h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; line-height: 1.1; letter-spacing: -0.28px; color: white; }
.footer-cta-text p { font-size: 16px; line-height: 1.4; opacity: 0.8; max-width: 560px; }
.footer-form { position: relative; z-index: 1; background: var(--surface); border-radius: var(--radius-full); padding: 4px; display: flex; gap: 8px; width: 100%; }
.footer-form input {
  flex: 1; min-width: 0; border: none; outline: none; background: var(--surface);
  border-radius: var(--radius-md); padding: 16px; font-size: 14px; font-family: var(--font);
  color: var(--text-primary); text-align: left;
}
.footer-form input::placeholder { color: var(--text-secondary); }
.footer-form-group { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.footer-cols { display: flex; justify-content: space-between; gap: 16px; width: 100%; max-width: 946px; flex-wrap: wrap; }
.footer-col-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; flex: 0 1 320px; }
.footer-logo { height: 24px; width: auto; }
.footer-tagline { font-size: 16px; font-weight: 500; line-height: 28px; color: var(--orange); }
.footer-link-cols { display: flex; gap: 40px; flex: 1 1 412px; justify-content: flex-end; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: white; }
.footer-links a { text-decoration: none; opacity: 0.8; color: white; }
.footer-links a:hover { opacity: 1; text-decoration: underline; color: white; }
.footer-social { display: flex; align-items: center; gap: 16px; height: 22px; }
.footer-social a { display: block; line-height: 0; opacity: 0.8; }
.footer-social a:hover { opacity: 1; }
.footer-social img { width: 16px; height: 16px; display: block; }

.waitlist-success {
  display: flex; gap: 10px; align-items: flex-start; justify-content: center;
  color: white; font-size: 16px; line-height: 24px; letter-spacing: -0.32px; text-align: left;
  opacity: 0; max-height: 0; overflow: hidden; transition: opacity 0.3s ease;
}
.waitlist-success img { width: 24px; height: 24px; flex-shrink: 0; }
.waitlist-success.show { opacity: 1; max-height: 72px; }
.btn-primary {
  background: var(--blue); color: #fafafa; border: none; border-radius: 36px; padding: 12px 16px;
  font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1); font-family: var(--font); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: padding 0.3s var(--reveal-ease), width 0.3s var(--reveal-ease);
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary .btn-icon-check { display: none; width: 16px; height: 16px; }
.btn-primary.btn-icon .btn-label { display: none; }
.btn-primary.btn-icon .btn-icon-check { display: block; }
@media (min-width: 769px) { .btn-primary.btn-icon { padding: 12px; width: 48px; } }

@media (max-width: 1024px) {
  .footer-link-cols { flex: 1 1 100%; justify-content: space-between; }
}
@media (max-width: 768px) {
  .footer { padding: 0 20px 32px; }
  .footer-cta { padding: 40px 24px; }
  .footer-form input { font-size: 16px; text-align: center; }
  .footer-form { flex-direction: column; border-radius: var(--radius-lg); }
  .footer-link-cols { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 40px; }
}
