/* ============================================================
   SpoolBase — legal / policy pages
   Loaded ONLY by Privacy.html, Terms.html, Cookies.html and
   Refunds.html, on top of spoolbase.css. Deliberately its own
   file rather than a block appended to the shared design
   system: nothing here is reused by the app itself, and these
   four pages are the only things that should ever change when
   it changes.
   ============================================================ */

body { background: var(--bg-deep); }

/* ---- top bar / footer: same shape as Landing.html's .lp-nav /
   .lp-footer, redeclared here under a .doc- prefix. Those rules
   live in Landing.html's own page-local <style> and are not
   reachable from another page; this is a deliberate copy of the
   look, not shared code. Keep the two visually in step. ---- */
.doc-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 40px 16px;
  max-width: 1240px; margin: 0 auto;
  backdrop-filter: blur(10px);
}
.doc-nav .brand { padding: 0; }
.doc-nav .links { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.doc-wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

.doc-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 64px; }
.doc-foot-grid { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.doc-foot-links { margin-left: auto; display: flex; gap: 24px; flex-wrap: wrap; }
.doc-foot-links a { color: var(--text-2); font-size: 13px; text-decoration: none; }
.doc-foot-links a:hover { color: var(--text); }
.doc-foot-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.doc-copy { color: var(--text-4); font-size: 12.5px; width: 100%; margin-top: 18px; line-height: 1.6; }

/* ---- page head ---- */
.doc-head { padding: 56px 0 32px; border-bottom: 1px solid var(--border); }
.doc-eye { color: var(--accent); font-weight: 650; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.doc-head h1 { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin: 0; }
.doc-dates { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--text-4); }
.doc-dates b { color: var(--text-2); font-weight: 500; }
.doc-lead { color: var(--text-2); font-size: 16px; line-height: 1.6; margin: 22px 0 0; max-width: 760px; }

/* ---- body layout: sticky contents rail + prose ---- */
.doc-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px; padding: 40px 0 0; align-items: start; }

.doc-toc { position: sticky; top: 96px; }
.doc-toc .t { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); margin-bottom: 14px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.doc-toc a {
  display: block; padding: 6px 10px; border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.45; color: var(--text-2); text-decoration: none;
  border-left: 2px solid transparent;
}
.doc-toc a:hover { background: var(--hover); color: var(--text); }
.doc-toc a.on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---- prose ---- */
.doc-prose { max-width: 760px; font-size: 15px; line-height: 1.68; color: var(--text); }
.doc-prose section { scroll-margin-top: 96px; padding-bottom: 12px; }
.doc-prose h2 {
  font-size: 22px; font-weight: 750; letter-spacing: -.02em;
  margin: 44px 0 14px; padding-top: 8px;
}
.doc-prose section:first-of-type h2 { margin-top: 8px; }
.doc-prose h2 .num { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent); margin-right: 10px; }
.doc-prose h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 8px; }
.doc-prose p { margin: 0 0 14px; color: var(--text-2); }
.doc-prose strong { color: var(--text); font-weight: 650; }
.doc-prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); }
.doc-prose a:hover { border-bottom-color: var(--accent); }
.doc-prose ul, .doc-prose ol { margin: 0 0 16px; padding-left: 22px; color: var(--text-2); }
.doc-prose li { margin-bottom: 8px; }
.doc-prose li::marker { color: var(--text-4); }
.doc-prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; color: var(--text); }
.doc-prose hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

/* callout — used for the plain-language summaries and the notes that
   matter more than the surrounding paragraph */
.doc-note {
  display: flex; gap: 14px; padding: 18px 20px; margin: 0 0 20px;
  border: 1px solid var(--border); border-left: 2px solid var(--accent);
  border-radius: var(--r); background: var(--surface);
}
.doc-note .ico { color: var(--accent); flex: 0 0 18px; margin-top: 2px; }
.doc-note .ico svg { width: 18px; height: 18px; display: block; }
.doc-note p { margin: 0 0 10px; font-size: 14px; }
.doc-note p:last-child { margin-bottom: 0; }
.doc-note .lbl { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.doc-note.warn { border-left-color: var(--warn); }
.doc-note.warn .ico, .doc-note.warn .lbl { color: var(--warn); }

/* tables — sub-processors, retention, data collected */
.doc-table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.doc-table th {
  text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-4);
  background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.doc-table td { padding: 13px 16px; border-top: 1px solid var(--border-soft); color: var(--text-2); vertical-align: top; line-height: 1.55; }
.doc-table tr:first-child td { border-top: 0; }
.doc-table td:first-child { color: var(--text); font-weight: 600; }

/* legal boilerplate that convention renders in caps — kept readable */
.doc-caps { font-size: 13px; letter-spacing: .01em; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; margin: 0 0 18px; }

/* cross-links to the other three documents, at the foot of each page */
.doc-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 44px 0 0; }
.doc-related a {
  display: block; padding: 18px 20px; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface); text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.doc-related a:hover { border-color: var(--accent-line); background: var(--surface-2); }
.doc-related .k { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-4); margin-bottom: 6px; }
.doc-related .v { font-size: 14.5px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }

@media (max-width: 980px) {
  .doc-body { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { display: none; }
  .doc-related { grid-template-columns: 1fr; }
  .doc-nav, .doc-wrap { padding-left: 20px; padding-right: 20px; }
  .doc-head h1 { font-size: 32px; }
  .doc-head { padding-top: 32px; }
}
