/* ──────────────────────────────────────────────────────────
   CNL · shared marketing-page styles (legal + simple pages)
   Matches the landing page system: Geist, Geist Mono, Fraunces.
   Dark theme by default; mirrors landing's tokens 1:1.
   ────────────────────────────────────────────────────────── */
:root {
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --bg-card: #0f0f0f;
  --ink: #ededed;
  --muted: #888888;
  --muted-2: #767676;
  --rule: #1c1c1c;
  --rule-strong: #262626;
  --accent: #ededed;
  --accent-ink: #000000;

  --container-w: 1200px;
  --sans: 'Geist', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --serif: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: #ededed; color: #000; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.arrow { display: inline-block; transform: translateY(-1px); }

/* ── NAV ─────────────────────────────────────────────── */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
nav.top .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 22px; height: 22px; }

.nav-back {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 120ms;
}
.nav-back:hover { color: var(--ink); }

/* ── PAGE HEADER (h1 + lede) ─────────────────────────── */
.page-head {
  border-bottom: 1px solid var(--rule);
  padding: 80px 0 56px;
  position: relative;
}
.page-head::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000 20%, transparent 75%);
  pointer-events: none;
}
.page-head .inner { position: relative; }
.page-eyebrow {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted-2); letter-spacing: 0;
  margin: 0 0 22px;
}
.page-h1 {
  font-family: var(--sans); font-weight: 400;
  font-size: 44px; line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0; max-width: 22ch; color: var(--ink);
}
.page-meta {
  margin: 22px 0 0;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--muted);
}
.page-lede {
  margin: 18px 0 0;
  font-size: 16px; color: var(--muted);
  max-width: 60ch; line-height: 1.65;
}

/* ── DOC LAYOUT (TOC + body) ─────────────────────────── */
.doc-wrap { padding: 56px 0 96px; }
.doc-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
.doc-grid.no-toc { grid-template-columns: 1fr; }

/* TOC */
.toc {
  position: sticky; top: 92px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.toc h4 {
  font-family: var(--mono); font-size: 11px;
  font-weight: 400; color: var(--muted-2);
  margin: 0 0 14px; letter-spacing: 0;
}
.toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px;
  font-size: 12.5px; color: var(--muted);
  padding: 4px 6px; border-radius: 4px;
  line-height: 1.4;
  transition: color 120ms, background 120ms;
}
.toc a::before {
  content: counters(toc, ".", decimal-leading-zero);
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted-2); flex-shrink: 0;
  padding-top: 1px;
}
.toc a:hover { color: var(--ink); background: var(--bg-card); }
.toc a.active { color: var(--ink); }
.toc a.active::before { color: var(--ink); }
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 2px; }

/* Mobile TOC */
.toc-mobile {
  display: none;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--bg-card);
  margin-bottom: 32px;
}
.toc-mobile summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: '+'; color: var(--muted); }
.toc-mobile[open] summary::after { content: '−'; }
.toc-mobile .toc { position: static; max-height: 50vh; padding: 4px 12px 14px; }

/* Body */
.doc-body {
  max-width: 720px;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink);
}
.doc-body p,
.doc-body ul,
.doc-body ol,
.doc-body table { margin: 0 0 18px; }
.doc-body p { color: #d4d4d4; }
.doc-body h2 {
  font-family: var(--sans); font-weight: 500;
  font-size: 22px; line-height: 1.25; letter-spacing: -0.018em;
  color: var(--ink);
  margin: 56px 0 18px;
  scroll-margin-top: 88px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h2 .h2-num {
  font-family: var(--mono); font-size: 13px; font-weight: 400;
  color: var(--muted-2); margin-right: 14px; letter-spacing: 0;
}
.doc-body h3 {
  font-family: var(--sans); font-weight: 500;
  font-size: 16px; line-height: 1.35; letter-spacing: -0.012em;
  color: var(--ink);
  margin: 36px 0 14px;
  scroll-margin-top: 88px;
}
.doc-body h3 .h3-num {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  color: var(--muted-2); margin-right: 10px;
}
.doc-body h4 {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  color: var(--muted); letter-spacing: 0;
  margin: 28px 0 10px;
  text-transform: none;
}
.doc-body strong { color: var(--ink); font-weight: 500; }
.doc-body em { font-style: italic; color: #d4d4d4; }
.doc-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 120ms;
}
.doc-body a:hover { border-color: var(--ink); }
.doc-body ul, .doc-body ol {
  padding-left: 20px;
  color: #d4d4d4;
}
.doc-body li { margin: 6px 0; }
.doc-body li::marker { color: var(--muted-2); }
.doc-body code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-card);
  padding: 2px 6px; border-radius: 4px;
  color: var(--ink);
}
.doc-body blockquote {
  border-left: 2px solid var(--rule-strong);
  padding: 4px 0 4px 18px;
  margin: 18px 0;
  color: var(--muted);
  font-style: italic;
}

/* Tables */
.doc-body .table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.doc-body table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
  margin: 0;
  min-width: 520px;
}
.doc-body thead th {
  background: var(--bg-card);
  font-family: var(--mono); font-weight: 400;
  font-size: 11px; letter-spacing: 0.02em;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-strong);
}
.doc-body tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  color: #d4d4d4;
  line-height: 1.55;
}
.doc-body tbody td:first-child { color: var(--ink); font-weight: 500; }

/* Inline contact / address block */
.doc-body .contact-block {
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
  border-radius: 8px;
  padding: 22px 24px;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.65;
}
.doc-body .contact-block p { margin: 0; color: var(--ink); }

/* ── FOOTER ──────────────────────────────────────────── */
footer.site-foot {
  border-top: 1px solid var(--rule);
  padding: 56px 0 32px;
  background: var(--bg);
}
.footer-slim {
  padding-bottom: 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.footer-slim .brand { display: inline-flex; }
.footer-tag {
  font-size: 13.5px; color: var(--muted);
  max-width: 56ch; margin: 0; line-height: 1.55;
}
.footer-inline {
  display: flex; gap: 14px; align-items: center;
  font-size: 13.5px; color: var(--muted); margin-top: 4px;
  flex-wrap: wrap;
}
.footer-inline a { color: var(--muted); transition: color 120ms; }
.footer-inline a:hover { color: var(--ink); }
.footer-inline .sep { color: var(--muted-2); }
.footer-bot {
  border-top: 1px solid var(--rule); padding-top: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted-2);
  flex-wrap: wrap; gap: 12px;
}

/* ── Simple content pages (contact / privacy choices) ── */
.simple {
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--rule);
}
.simple .inner { max-width: 640px; }
.simple .lede {
  font-size: 16px; line-height: 1.65; color: var(--muted);
  margin: 0 0 32px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.contact-card {
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 22px;
}
.contact-card .role {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin: 0 0 12px;
  letter-spacing: 0;
}
.contact-card .name {
  font-size: 15px; font-weight: 500; color: var(--ink);
  margin: 0 0 6px; letter-spacing: -0.005em;
}
.contact-card a.email {
  font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
}
.contact-card a.email:hover { border-color: var(--ink); }

.contact-block {
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 22px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 20px;
  font-size: 14px;
  line-height: 1.65;
  align-items: baseline;
}
.contact-block .k {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted-2);
}
.contact-block .v { color: var(--ink); }
.contact-block .v.addr { font-style: normal; white-space: pre-line; }

/* Forms */
.form-section {
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 8px;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); letter-spacing: 0;
}
.field label .req { color: #e08585; margin-left: 2px; }
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--sans); font-size: 14px;
  color: var(--ink);
  transition: border-color 120ms, background 120ms;
  font-feature-settings: "ss01" on;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #4a4a4a;
  background: #141414;
}
.field textarea {
  resize: vertical; min-height: 100px;
  font-family: var(--sans);
}
.field .hint {
  font-size: 12px; color: var(--muted-2);
}
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.radio-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.radio-group label {
  flex: 1; min-width: 120px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--sans); font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: border-color 120ms, background 120ms;
  text-transform: none;
}
.radio-group label:hover { border-color: #3a3a3a; }
.radio-group input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.radio-group input[type="radio"]:checked {
  border-color: var(--ink);
}
.radio-group input[type="radio"]:checked::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--ink); border-radius: 50%;
}
.radio-group label:has(input:checked) {
  border-color: var(--ink);
  background: #141414;
}

.hp { /* honeypot */
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 11px 18px; font-size: 13.5px; font-weight: 500;
  border-radius: 8px; border: 1px solid var(--accent);
  cursor: pointer;
  font-family: var(--sans);
  transition: opacity 120ms;
  align-self: flex-start;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-confirm {
  border: 1px solid #2d4a3a;
  background: #0e1612;
  border-radius: 10px;
  padding: 22px 24px;
  display: none;
}
.form-confirm.show { display: block; }
.form-confirm .ok {
  font-family: var(--mono); font-size: 11px;
  color: #7be0b5; letter-spacing: 0; margin: 0 0 10px;
}
.form-confirm p { margin: 0; color: var(--ink); font-size: 14.5px; line-height: 1.6; }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 880px) {
  .page-head { padding: 56px 0 36px; }
  .page-h1 { font-size: 32px; }
  .doc-wrap { padding: 36px 0 64px; }
  .doc-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .doc-body { max-width: 100%; }
  .doc-body h2 { font-size: 19px; margin-top: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-block { grid-template-columns: 1fr; gap: 4px 0; }
  .contact-block .k { margin-top: 8px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-bot { flex-direction: column; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  :root {
    --bg: #ffffff; --ink: #111; --muted: #555; --muted-2: #777;
    --rule: #e0e0e0; --rule-strong: #c8c8c8; --bg-card: #f6f6f4;
  }
  body { background: #fff; color: #111; }
  nav.top, footer.site-foot, .toc, .toc-mobile { display: none !important; }
  .page-head::before { display: none; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-body { max-width: 100%; }
  .doc-body p, .doc-body li, .doc-body td, .doc-body em { color: #222; }
  .doc-body h2, .doc-body h3, .doc-body h4 { color: #000; page-break-after: avoid; }
  .doc-body a { color: #111; border-bottom-color: #999; }
  .container { max-width: none; padding: 0; }
  .page-head { padding: 0 0 24px; }
  .page-h1 { font-size: 24px; }
}
