/* Shared styling for the static legal + status pages (terms, privacy,
   risk-disclosure, status). Matches the landing's dark theme tokens. Served
   once at /legal.css; each page links it (DRY — no per-page <style> dup).
   Reuses the landing's self-hosted Inter font + favicon (already in webroot). */

:root {
  --bg: #0b0e14;
  --bg-2: #0e1320;
  --surface: #131722;
  --raised: #1c2230;
  --border: #262c3a;
  --border-soft: #1b2130;
  --text: #e6e9ef;
  --dim: #9aa4b2;
  --mute: #7c8593;
  --accent: #4f8cff;
  --accent-2: #8b5cf6;
  --accent-hover: #6ea0ff;
  --up: #34d399;
  --down: #f0616d;
  --warn: #f5a623;
  --grad: linear-gradient(135deg, #4f8cff 0%, #8b5cf6 100%);
  --radius: 16px;
  --maxw: 820px;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { display: block; }
header.site nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 22px;
  transition: color 0.15s;
}
header.site nav a:hover { color: var(--text); }

/* ---- document body ---- */
main { padding: 56px 0 88px; }
.doc-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.updated { color: var(--mute); font-size: 0.86rem; margin: 0 0 8px; }
.lead {
  color: var(--dim);
  font-size: 1.02rem;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin: 24px 0 8px;
}
h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
}
h3 { font-size: 1.02rem; margin: 26px 0 8px; color: var(--text); }
p, li { color: var(--dim); }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin: 0 0 7px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { color: var(--text); font-weight: 650; }
code {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.86em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--text);
}

/* Callout — disclaimers / important notes. */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Table of contents (legal docs). */
.toc {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0 8px;
}
.toc h2 { margin: 0 0 10px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mute); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 5px; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--mute);
  font-size: 0.85rem;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer.site a { color: var(--dim); margin-right: 18px; }

/* ---- status page ---- */
.status-hero { text-align: center; padding: 40px 0 8px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.05rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--mute); box-shadow: 0 0 0 0 rgba(0,0,0,0); }
.status-pill.ok { border-color: rgba(52, 211, 153, 0.4); }
.status-pill.ok .status-dot { background: var(--up); box-shadow: 0 0 12px rgba(52, 211, 153, 0.55); }
.status-pill.down { border-color: rgba(240, 97, 109, 0.45); }
.status-pill.down .status-dot { background: var(--down); box-shadow: 0 0 12px rgba(240, 97, 109, 0.55); }
.status-pill.checking .status-dot { background: var(--warn); }
.components { margin: 34px 0; display: grid; gap: 10px; }
.component {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.component .name { font-weight: 600; color: var(--text); }
.component .state { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 0.9rem; }
.component .state .status-dot { width: 9px; height: 9px; }
.checked-at { text-align: center; color: var(--mute); font-size: 0.84rem; margin-top: 18px; }
.incidents { margin-top: 44px; }
.incident-none {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--mute);
}
