/* Legal pages for legal.paxworld.co — layout after Loom / ClickUp policy centres:
   policy nav + "on this page" index on the left, readable text column on the right. */

:root {
  --bg: #ffffff;
  --surface: #f6f6f8;
  --fg: #111113;
  --muted: #62626d;
  --border: #e5e5ea;
  --accent: #3b5bdb;
  --accent-soft: #eef1fd;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --surface: #17171a;
    --fg: #ececf0;
    --muted: #9b9ba6;
    --border: #27272c;
    --accent: #8ea4ff;
    --accent-soft: #1b2040;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }

/* ── Top bar ─────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); text-decoration: none; }
.brand-mark { display: block; width: 2rem; height: 2rem; flex-shrink: 0; }
.brand-mark img { display: block; width: 100%; height: 100%; border-radius: 0.55rem; }
.brand-name { font-weight: 650; font-size: 0.95rem; line-height: 1.2; }
.brand-name span { display: block; color: var(--muted); font-weight: 400; font-size: 0.75rem; }
.topbar a.contact { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.topbar a.contact:hover { color: var(--fg); }

/* ── Layout ──────────────────────────────── */

.layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3.5rem;
}

.sidebar { position: sticky; top: 5.5rem; align-self: start; font-size: 0.875rem; }
.sidebar h3 {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar nav + h3 { margin-top: 1.75rem; }
.sidebar nav a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.4;
}
.sidebar nav a:hover { background: var(--surface); }
.sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .toc a { color: var(--muted); padding-block: 0.3rem; }
.sidebar .toc a:hover { color: var(--fg); }

/* ── Document ────────────────────────────── */

.doc { max-width: 44rem; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.doc .subtitle { font-size: 1.1rem; color: var(--muted); margin: 0.6rem 0 0; }
.doc .updated { font-size: 0.85rem; color: var(--muted); margin: 1rem 0 2rem; }

.tldr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 2.25rem;
}
.tldr strong { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.tldr p { margin: 0; }

.doc section { padding-top: 0.5rem; }
.doc h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 2.25rem 0 0.6rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.35rem; }

.email-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  border: 1px solid var(--border); border-radius: 0.9rem; padding: 1rem 1.25rem; margin: 0 0 1.25rem;
}
.email-box span { color: var(--muted); font-size: 0.9rem; }
.email-box a {
  background: var(--fg); color: var(--bg); text-decoration: none;
  padding: 0.5rem 0.9rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.9rem;
}

/* ── Hub cards ───────────────────────────── */

.cards { display: grid; gap: 0.9rem; margin-top: 2rem; }
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.15rem 1.25rem;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.card:hover { border-color: var(--muted); background: var(--surface); }
.card strong { display: block; font-size: 1.05rem; }
.card span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.card em { display: inline-block; margin-top: 0.6rem; font-style: normal; font-size: 0.85rem; color: var(--accent); font-weight: 600; }

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}
footer.site .inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; justify-content: space-between; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--fg); }

/* ── Phone ───────────────────────────────── */

@media (max-width: 52rem) {
  .layout { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.25rem; }
  .sidebar { position: static; }
  .sidebar .toc, .sidebar .toc-title { display: none; }
  .sidebar nav.policies { display: flex; gap: 0.35rem; overflow-x: auto; }
  .sidebar nav.policies a { white-space: nowrap; }
  .sidebar h3 { display: none; }
}
