/* Shared layout for the plain policy pages (/privacy, /cookies).
   Colour and type come entirely from theme.css, so both follow light/dark. */

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
*, *::before, *::after { box-sizing: border-box; }

.doc-wrap { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }

/* Back link on the left, theme toggle on the right, in normal flow. */
.doc-topbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.doc-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
}
.doc-back:hover { color: var(--text-primary); }

.doc-wrap h1 {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; letter-spacing: -.6px;
  margin: 0 0 8px;
}
.doc-meta { font-size: 12.5px; color: var(--text-muted); margin: 0 0 32px; }

.doc-wrap h2 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 600; letter-spacing: -.2px;
  margin: 34px 0 10px; padding-top: 22px;
  border-top: 1px solid var(--border);
}
.doc-wrap h2:first-of-type { border-top: none; padding-top: 0; }

.doc-wrap p, .doc-wrap li { font-size: 14px; line-height: 1.65; color: var(--text-secondary); }
.doc-wrap p { margin: 0 0 12px; }
.doc-wrap ul { margin: 0 0 12px; padding-left: 20px; }
.doc-wrap li { margin-bottom: 5px; }
.doc-wrap strong { color: var(--text-primary); font-weight: 600; }
.doc-wrap a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 2px; }
.doc-wrap code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--surface-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 1px 5px; color: var(--text-primary);
}

/* Data tables */
.doc-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; }
.doc-table th, .doc-table td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600; white-space: nowrap;
}
.doc-table td { color: var(--text-secondary); }
.doc-table td:first-child { color: var(--text-primary); font-family: var(--font-mono); font-size: 12px; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-scroll { overflow-x: auto; }

/* Callouts */
.doc-note {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 18px;
}
.doc-note p:last-child { margin-bottom: 0; }

.doc-todo {
  border: 1px solid var(--warning-border);
  background: var(--warning-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 18px;
}
.doc-todo p:last-child { margin-bottom: 0; }
.doc-todo .todo-label {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--warning); margin-bottom: 6px;
}
.doc-todo li, .doc-todo p { color: var(--text-primary); }

.doc-foot {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted);
}
.doc-foot a { color: var(--text-secondary); }

@media (max-width: 560px) {
  .doc-wrap { padding: 36px 16px 64px; }
  .doc-wrap h1 { font-size: 25px; }
}
