:root { --bg: #150a1e; --surface: #241333; --text: #f4ece2; --muted: #b3a0c2; --accent: #ffb347; --warn: #ffd166; --border: #3c2452; color-scheme: dark; }
@media (prefers-color-scheme: light) { :root { --bg: #fbf9ff; --surface: #fff; --text: #1a1325; --muted: #544a66; --accent: #a4128f; --warn: #8a4b00; --border: #ddd3ee; color-scheme: light; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; overflow-wrap: break-word; }
/* Links are always underlined (not colour alone) and every colour pair here is at least 4.5:1 (scripts/legal tests). */
a, a:visited { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-note { border: 2px solid var(--warn); color: var(--warn); border-radius: 12px; padding: 12px 16px; margin: 16px 0 24px; font-weight: 600; }
.legal-note p { margin: 4px 0; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 8px 0; }
h2 { font-size: 1.15rem; margin-top: 2em; }
.meta { color: var(--muted); font-size: 0.9rem; }
.changes { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 4px 16px; margin: 16px 0; }
.changes h2 { margin-top: 12px; font-size: 1rem; }
.versions li { margin: 6px 0; }
blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--border); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }
nav.back { margin-top: 8px; }
.site-footer { max-width: 720px; margin: 0 auto; padding: 16px 16px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; text-align: center; }
.site-footer p { margin: 0 0 4px; }
/* The iOS app (public/legal/ios.js sets data-ios-shell; Apple 3.1.1): no links to pages about buying. Footer links, index rows and the Terms §7 line (its links sit directly in the <li>, so :has() hides the whole line). */
html[data-ios-shell] li:has(> a[href="/legal/terms-of-sale"]), html[data-ios-shell] li:has(> a[href="/legal/refunds"]) { display: none; }
/* Placeholder pages (Community Guidelines, Copyright, Accessibility, Brand, Safety Notice): hidden in the app (App Review 2.1), still linked on the web. Footer links and /legal index rows (Safety has no footer link, only its index row). */
html[data-ios-shell] li:has(> a[href="/legal/guidelines"]), html[data-ios-shell] li:has(> a[href="/legal/copyright"]), html[data-ios-shell] li:has(> a[href="/legal/accessibility"]), html[data-ios-shell] li:has(> a[href="/legal/brand"]), html[data-ios-shell] li:has(> a[href="/legal/safety"]) { display: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.site-footer a, .site-footer a:visited { display: inline-block; padding: 6px; min-height: 24px; color: var(--text); }
@media (max-width: 480px) { table, thead, tbody, tr, th, td { display: block; } thead { display: none; } td { border: 0; padding: 2px 0; } tr { border-bottom: 1px solid var(--border); padding: 8px 0; } }
