/*
 * Legal pages stylesheet — served at /legal/*.
 *
 * Intentionally minimal: system font stack + Georgia for headings, single
 * dark-on-light palette, no JS, no external resources. These pages must
 * render instantly for store reviewers, search-engine crawlers, and link-
 * preview bots.
 *
 * Contrast: body text #1a1a1a on #ffffff = 18.2:1 (well above WCAG AAA).
 */

:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #d8d8d8;
  --accent: #0b4a6f;
  --bg: #ffffff;
  --bg-callout: #f4f1ea;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

main {
  max-width: 70ch;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.doc-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

header.doc-header .brand {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

header.doc-header .brand a {
  color: var(--muted);
  text-decoration: none;
}

header.doc-header .brand a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
}

h4 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

p, ul, ol {
  margin: 0 0 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg-callout);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--bg-callout);
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.doc-meta span + span {
  margin-left: 1.25rem;
}

.callout {
  background: var(--bg-callout);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 2px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.doc-nav {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.doc-nav a {
  color: var(--accent);
}

.doc-index {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.doc-index li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.doc-index a {
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
}

.doc-index .desc {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  main {
    padding: 2rem 1rem 3rem;
  }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  table { font-size: 0.875rem; }
  th, td { padding: 0.4rem 0.5rem; }
}
