/*
 * Anchor public pages (landing, privacy, terms). Plain static CSS — no build step, no
 * framework. Mirrors the Harbor design tokens (context/ui-tokens.md) so these pages look
 * like the app. Light by default; dark via an explicit [data-theme="dark"] (set by the
 * inline script, shared with the app through the same localStorage key) OR the OS
 * preference when JavaScript is off. Every color is a token so the two themes stay honest.
 */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --surface-app: #f6f3ec;
  --surface-card: #ffffff;
  --surface-canvas: #f1eee8;
  --text-primary: #262320;
  --text-secondary: #6e685d;
  --text-muted: #736c5d;
  --accent: #3e5a55;
  --accent-press: #2f463f;
  --accent-ink: #f4f1ea;
  --accent-tint: #e8ece9;
  --accent-tint-border: #dce6e2;
  --border-hairline: #e6e0d4;
  --border-soft: #efeae0;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-card: 0 1px 2px rgba(30, 27, 24, 0.04), 0 8px 24px rgba(30, 27, 24, 0.06);
}

/* Explicit dark choice wins in both directions. */
:root[data-theme='dark'] {
  --surface-app: #1b1815;
  --surface-card: #24211b;
  --surface-canvas: #131110;
  --text-primary: #ede8de;
  --text-secondary: #b8b0a2;
  --text-muted: #9a9285;
  --accent: #7fa39b;
  --accent-press: #9db3ad;
  --accent-ink: #14120f;
  --accent-tint: rgba(127, 163, 155, 0.12);
  --accent-tint-border: rgba(127, 163, 155, 0.28);
  --border-hairline: #34302a;
  --border-soft: #2c2822;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* No-JS dark: honor the OS when no explicit choice was stamped. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --surface-app: #1b1815;
    --surface-card: #24211b;
    --surface-canvas: #131110;
    --text-primary: #ede8de;
    --text-secondary: #b8b0a2;
    --text-muted: #9a9285;
    --accent: #7fa39b;
    --accent-press: #9db3ad;
    --accent-ink: #14120f;
    --accent-tint: rgba(127, 163, 155, 0.12);
    --accent-tint-border: rgba(127, 163, 155, 0.28);
    --border-hairline: #34302a;
    --border-soft: #2c2822;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

/* --- site header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.brand span {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-link {
  font-size: 14.5px;
  color: var(--text-muted);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text-primary);
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 120ms ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent-press);
}

/* --- typography helpers --- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p {
  color: var(--text-secondary);
  text-wrap: pretty;
}

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

/* --- legal / prose pages --- */
.prose {
  padding: 8px 0 64px;
}
.prose h1 {
  font-size: 34px;
  margin: 24px 0 4px;
}
.prose .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}
.prose h2 {
  font-size: 20px;
  margin: 34px 0 8px;
}
.prose p,
.prose li {
  font-size: 16px;
  color: var(--text-secondary);
}
.prose ul {
  padding-left: 20px;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- footer --- */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  padding: 22px 0 40px;
  margin-top: 8px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--text-primary);
}
.site-footer .spacer {
  flex: 1;
}
