/* Shared public-page styles for welcome + legal (privacy / usage / terms).
   Tokens match the PWA (apps/web/index.html) so these pages feel like COMPASS. */

:root {
  --primary: #0b3d91;
  --bg: #0f172a;
  --fg: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --card: #1e293b;
  --line: #334155;
  --input-bg: #1e293b;
  --on-primary: #f8fafc;
  --ok-bg: #14532d;
  --ok-fg: #bbf7d0;
  --warn-bg: #3a3414;
  --warn-fg: #fde68a;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --fg: #0f172a;
    --muted: #475569;
    --accent: #0369a1;
    --card: #ffffff;
    --line: #cbd5e1;
    --input-bg: #ffffff;
    --ok-bg: #dcfce7;
    --ok-fg: #14532d;
    --warn-bg: #fef9c3;
    --warn-fg: #854d0e;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
}

.brand-mark {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 14px;
}

.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font-weight: 600;
}
.nav .btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.site-footer a { color: var(--muted); }

h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 36px 0 10px; padding-top: 8px; }
h3 { font-size: 16px; margin: 20px 0 8px; }
p, li { color: var(--fg); }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); font-size: 14px; }

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--card);
  padding: 12px 14px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted);
  border-radius: 0 10px 10px 0;
}

.prose { padding: 32px 0 8px; }
.prose h2 { border-top: 1px solid var(--line); padding-top: 24px; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }

table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: 14px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.hero { padding: 40px 0 16px; }
.hero .eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 8px;
}

.cta-row a, .cta-row button, form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.cta-row .primary, form button[type="submit"] {
  background: var(--primary);
  color: var(--on-primary);
}

.cta-row .secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0 8px;
}

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
}

.card h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
form label { font-size: 14px; font-weight: 600; }
form input, form select, form textarea {
  min-height: 44px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--fg);
  font: inherit;
}
form textarea { min-height: 96px; resize: vertical; }

.form-status { margin-top: 12px; font-size: 14px; color: var(--muted); }

@media (max-width: 720px) {
  .site-header { position: static; }
  .nav a:not(.btn) { display: none; }
  .nav .btn-ghost { display: none; }
  .brand { letter-spacing: 0.02em; }
  code { overflow-wrap: anywhere; }
}
