/* Document pages (privacy, terms, AI, legal index, delete account, 404).
   Loaded AFTER landing.css: tokens, top bar, buttons and footer come from
   there; this file only adds the reading layout. */

.doc { padding-bottom: clamp(48px, 7vw, 88px); }
.doc > * { width: min(760px, 100% - 44px); margin-inline: auto; }
.doc > .wide { width: var(--page); }

/* Title block */
.doc-head { padding: clamp(40px, 6vw, 72px) 0 28px; border-bottom: 1px solid var(--border-strong); }
.doc-head h1 { font-size: clamp(2.25rem, 5.4vw, 3.5rem); line-height: 1.04; letter-spacing: -0.035em; }
.doc-head .lede { margin-top: 16px; font-size: 1.1875rem; line-height: 1.5; color: var(--text-secondary); max-width: 34em; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 22px; }
.lang { display: flex; gap: 6px; }
.lang a {
  min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-decoration: none; color: var(--text-secondary);
}
.lang a:hover { border-color: var(--border-strong); color: var(--text-primary); }
.lang a[aria-current="true"] { background: var(--text-primary); border-color: var(--text-primary); color: var(--on-text-primary); }

/* "In short" cards (the AI page) and the legal index */
.short { display: grid; gap: 14px; padding: 32px 0 8px; }
@media (min-width: 640px) { .short { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .short.three { grid-template-columns: repeat(3, 1fr); } }
.short > * {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 22px 24px; box-shadow: var(--shadow-card); text-decoration: none;
}
.short h2, .short h3 { font-size: 1.1875rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 800; margin-top: 10px; }
.short p:not(.tag) { margin-top: 8px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.short a.card { transition: border-color 0.2s ease; }
.short a.card:hover { border-color: var(--text-primary); }
.short a.card h2::after { content: " →"; font-weight: 500; color: var(--text-tertiary); }

.doc-note { display: grid; gap: 20px; align-items: center; margin-top: 28px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 36px); }
.doc-note p { color: var(--ink-muted); margin-top: 8px; }
.doc-note h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.doc-note a { color: var(--on-ink); font-weight: 700; }

/* Contents */
.toc { margin-top: 28px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.toc ol { margin-top: 10px; display: grid; gap: 2px 28px; counter-reset: toc; }
@media (min-width: 640px) { .toc ol { grid-template-columns: 1fr 1fr; } }
.toc a { display: block; padding: 6px 0; font-size: 0.9375rem; color: var(--text-secondary); text-decoration: none; }
.toc a:hover { color: var(--text-primary); text-decoration: underline; }

/* Prose */
.prose { padding-top: 12px; font-size: 1.0625rem; line-height: 1.65; }
.prose h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.025em; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); scroll-margin-top: 84px; }
.prose h3 { font-size: 1.125rem; margin-top: 30px; scroll-margin-top: 84px; }
.prose h4 { font-size: 1rem; margin: 24px 0 0; font-weight: 800; }
.prose p { margin-top: 14px; }
.prose ul, .prose ol { margin-top: 12px; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 7px; padding-left: 4px; }
.prose li::marker { color: var(--text-tertiary); }
.prose a { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
.prose a:hover { color: var(--accent); }
.prose em { color: var(--text-secondary); }
.prose hr { display: none; }
.prose blockquote { margin: 18px 0 0; padding: 14px 18px; border-left: 3px solid var(--text-primary); background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-secondary); }
.prose code { font-family: var(--mono); font-size: 0.875em; background: var(--surface-muted); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.prose .stamp { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-tertiary); }
.prose .stamp strong { font-weight: 500; }

.table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.9375rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-family: var(--mono); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); background: var(--surface-muted); white-space: nowrap; }

.doc-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; }

/* The document pages show the full nav from tablet up (the landing page
   waits until 900px because it also has to fit the hero). */
@media (min-width: 720px) { .top.doc-top nav { display: flex; } }
.top nav a[aria-current="page"] { color: var(--text-primary); font-weight: 700; }
@media (max-width: 480px) { .top.doc-top .btn { display: none; } }
