/* Shared stylesheet for the standalone legal pages (/terms.html,
   /privacy.html, /guidelines.html).

   External file rather than inline <style> on purpose: the production CSP
   (web/src/proxy.ts) is `style-src 'self' 'nonce-…'`, and static HTML can't
   carry a nonce — inline <style> blocks are silently stripped in prod (dev
   adds 'unsafe-inline', which hid this). A same-origin stylesheet passes
   under 'self'.

   Color values mirror the design tokens in src/app/globals.css (Skylines
   Day / City Nights). Keep them in sync when the tokens change. No JS runs
   on these pages (script-src is nonce + strict-dynamic), so dark mode
   follows the OS preference via prefers-color-scheme — it can't read the
   in-app `sociory-theme` localStorage choice. */

:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Skylines Day */
  --background: #fbf6ec;
  --surface: #fffdf8;
  --foreground: #241b12;
  --muted: #5e5245;
  --border: #eae0cf;
  --link: #0a6076;
  --well: #f3ece0;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* City Nights */
    --background: #0a132b;
    --surface: #111e3c;
    --foreground: #e9e7e0;
    --muted: #a9bcdc;
    --border: #24375f;
    --link: #7fd4ee;
    --well: #0a1226;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
}

/* Slim site header: wordmark back to the app + the three legal pages. */
header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--foreground);
  text-decoration: none;
}

header nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
}

header nav a:hover {
  color: var(--foreground);
}

header nav a[aria-current="page"] {
  color: var(--foreground);
  font-weight: 600;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  line-height: 1.7;
}

h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

h2 {
  font-size: 1.25rem;
  margin-top: 40px;
}

a {
  color: var(--link);
}

code {
  background: var(--well);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.95rem;
}

th {
  background: var(--well);
}

.back-link {
  margin-top: 56px;
  font-size: 0.9rem;
}
