/* xRay Rabbit — shared style for trust/legal static pages
   (privacy / terms / payments / support / setup).
   Visual language matches landing/index.html v2: indigo/violet,
   glass cards, dark surface, Geist sans + JetBrains Mono. */

:root {
  color-scheme: dark;
  --bg:       oklch(0.16 0.012 268);
  --bg-2:     oklch(0.18 0.014 270);
  --surface:  oklch(0.22 0.013 270);
  --surface-hi: oklch(0.26 0.013 270);
  --border:   oklch(0.32 0.012 270);
  --border-2: oklch(0.28 0.010 270);

  --text:     oklch(0.96 0.005 270);
  --text-2:   oklch(0.78 0.012 270);
  --text-3:   oklch(0.60 0.014 270);
  --text-4:   oklch(0.46 0.014 270);

  --brand:    oklch(0.72 0.16 282);
  --brand-2:  oklch(0.66 0.18 285);
  --brand-3:  oklch(0.82 0.10 282);
  --brand-bg: oklch(0.30 0.08 282);
  --brand-glow: oklch(0.72 0.16 282 / 0.35);

  --accent:   oklch(0.78 0.12 200);
  --accent-bg: oklch(0.30 0.06 200);

  --ok:       oklch(0.78 0.14 158);
  --ok-bg:    oklch(0.28 0.06 158);

  --warn:     oklch(0.82 0.13 75);
  --warn-bg:  oklch(0.30 0.07 75);

  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sh-2: 0 4px 14px oklch(0.10 0.01 270 / .35), 0 1px 2px oklch(0.10 0.01 270 / .3);
  --sh-3: 0 18px 40px -16px oklch(0.10 0.01 270 / .55), 0 6px 18px -8px oklch(0.10 0.01 270 / .35);

  --sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--brand-3); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }

/* ----- atmosphere ----- */
.aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(50% 40% at 10% 0%,  oklch(0.40 0.12 282 / .45), transparent 60%),
    radial-gradient(45% 35% at 90% 10%, oklch(0.40 0.10 200 / .30), transparent 60%),
    radial-gradient(60% 40% at 50% 100%, oklch(0.30 0.10 282 / .20), transparent 70%);
  filter: blur(20px);
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .25; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ----- layout ----- */
.container { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-3); }

/* ----- nav (shared with landing) ----- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: oklch(from var(--bg) l c h / .72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-2);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1280px; margin: 0 auto; gap: 18px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  color: var(--text);
}
.nav-brand img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 12px var(--brand-glow)); }
.nav-menu { display: flex; gap: 4px; }
.nav-menu a {
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text-2);
  transition: color .15s, background .15s;
}
.nav-menu a:hover { color: var(--text); background: var(--surface); }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 500; font-size: 14.5px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform .18s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: var(--brand); color: oklch(0.18 0.02 282);
  box-shadow: 0 12px 32px -10px var(--brand-glow), inset 0 1px 0 oklch(1 0 0 / .25);
}
.btn-primary:hover { background: oklch(from var(--brand) calc(l + 0.04) c h); color: oklch(0.18 0.02 282); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-hi); border-color: var(--border); color: var(--text); }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* ----- type ----- */
.eyebrow {
  font-family: var(--mono); font-size: 12px;
  color: var(--brand-3); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 8px var(--brand-glow);
}
.legal-title {
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.1;
  font-size: clamp(30px, 4.2vw, 44px);
  margin-top: 14px;
}
.legal-sub {
  color: var(--text-2);
  font-size: 16px;
  margin-top: 12px;
  max-width: 640px;
}
.legal-updated {
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text-4); margin-top: 18px;
}

/* ----- page layout ----- */
.legal-page { padding: 48px 0 88px; }
.legal-head { margin-bottom: 32px; }

/* ----- card ----- */
.legal-card {
  background: linear-gradient(180deg, oklch(from var(--surface) l c h / .9), oklch(from var(--surface) l c h / .7));
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--sh-3);
  padding: clamp(28px, 4vw, 40px);
}

/* ----- sections inside legal page ----- */
.legal-section + .legal-section { margin-top: 28px; }
.legal-section h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.legal-section h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal-section p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.legal-section p + p { margin-top: 10px; }
.legal-section ul {
  margin-top: 10px;
  padding-left: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.legal-section ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}
.legal-section ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
}

.legal-section .note {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.legal-section .note-warn {
  border-left-color: var(--warn);
  background: oklch(from var(--warn-bg) l c h / .35);
}

.payment-flow {
  margin: 14px 0 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.payment-flow-step {
  position: relative;
  min-height: 82px;
  padding: 13px 12px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text);
}
.payment-flow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  font-family: var(--mono);
  font-size: 14px;
}
.payment-flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--brand-bg);
  color: var(--brand-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
.payment-flow-step strong {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 500;
}

/* ----- table of contents ----- */
.toc {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
}
.toc-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex; flex-direction: column; gap: 6px;
}
.toc ol li {
  counter-increment: toc;
  position: relative;
  padding-left: 28px;
  font-size: 14px;
}
.toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-4);
}
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--text); }

/* ----- support quick-card ----- */
.support-card {
  margin-top: 24px;
  padding: 22px 24px;
  background:
    radial-gradient(60% 60% at 100% 0%, oklch(from var(--brand-bg) l c h / .4), transparent 70%),
    var(--surface);
  border: 1px solid oklch(from var(--brand) l c h / .25);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.support-card-text {
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 460px;
}
.support-card-text strong { color: var(--text); font-weight: 500; }

/* ----- docnav (cross-link chips between legal pages) ----- */
.docnav {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
}
.docnav-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}
.docnav a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s;
}
.docnav a:hover { color: var(--text); border-color: var(--border); background: var(--surface); }
.docnav a[aria-current="page"] {
  background: var(--brand-bg);
  border-color: oklch(from var(--brand) l c h / .35);
  color: var(--brand-3);
}

/* ----- related pages cross-link block ----- */
.related-pages {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
}
.related-pages-title {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.related-pages-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  list-style: none;
}
.related-pages-list a {
  display: block;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.related-pages-list a:hover { border-color: var(--border); background: var(--surface-hi); }
.related-pages-list .rp-title {
  font-size: 14px; font-weight: 500; color: var(--text);
  margin-bottom: 2px;
}
.related-pages-list .rp-sub {
  font-size: 12.5px; color: var(--text-3);
}

/* ----- back link ----- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 14px; height: 14px; }

/* ----- footer (compact) ----- */
.legal-footer {
  border-top: 1px solid var(--border-2);
  padding: 32px 0 32px;
  margin-top: 64px;
}
.legal-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.legal-footer-links {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.legal-footer-links a {
  font-size: 13px;
  color: var(--text-3);
  padding: 6px 10px;
  border-radius: var(--r-sm);
}
.legal-footer-links a:hover { color: var(--text); background: var(--surface); }
.legal-footer-copy {
  font-size: 13px;
  color: var(--text-4);
}

/* ----- setup guides ----- */
.setup-page .container { max-width: 960px; }
.setup-page .legal-card { padding: clamp(24px, 4vw, 36px); }
.setup-head-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.setup-head-actions .btn { white-space: normal; }
.setup-nav {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-2);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.2;
}
.setup-nav a:hover,
.setup-nav a[aria-current="page"] {
  color: var(--text);
  border-color: oklch(from var(--brand) l c h / .35);
  background: var(--brand-bg);
}
.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.setup-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.setup-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.setup-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.setup-card a {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  color: var(--brand-3);
  font-size: 13.5px;
  font-weight: 500;
}
.setup-steps {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.setup-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-bg);
  color: var(--brand-3);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.setup-step h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.setup-step p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.setup-checklist {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.setup-check {
  position: relative;
  padding: 11px 12px 11px 34px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: oklch(from var(--surface) l c h / .65);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.setup-check::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px oklch(from var(--ok) l c h / .45);
}
.setup-callout {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid oklch(from var(--brand) l c h / .25);
  border-radius: var(--r-lg);
  background:
    radial-gradient(80% 120% at 100% 0%, oklch(from var(--brand-bg) l c h / .35), transparent 70%),
    var(--surface);
}
.setup-callout strong {
  color: var(--text);
  font-weight: 600;
}
.setup-callout p {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.setup-compact-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 12.5px;
}
.setup-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

/* ----- responsive ----- */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .legal-page { padding: 32px 0 64px; }
  .nav-inner { padding: 12px 18px; gap: 10px; }
  .nav-brand span { display: none; }
  .nav-menu { display: none; }
  .support-card { flex-direction: column; align-items: flex-start; }
  .support-card .btn { width: 100%; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
  .related-pages-list { grid-template-columns: 1fr; }
  .payment-flow { grid-template-columns: 1fr; }
  .payment-flow-step { min-height: auto; }
  .payment-flow-step:not(:last-child)::after { display: none; }
  .setup-head-actions .btn { width: 100%; }
  .setup-grid,
  .setup-two-col { grid-template-columns: 1fr; }
  .setup-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .setup-step-num {
    width: 30px;
    height: 30px;
  }
}
