:root {
  --bg: #0a0805;
  --bg-2: #0f0c07;
  --surface: #16120b;
  --surface-2: #1d1810;
  --gold: #e3a83f;
  --gold-2: #f4cd7c;
  --gold-deep: #b07d28;
  --cream: #f3ead9;
  --text: #ece3d2;
  --muted: #a4977f;
  --muted-2: #7d7058;
  --border: rgba(227, 168, 63, 0.16);
  --border-soft: rgba(243, 234, 217, 0.08);
  --radius: 16px;
  --maxw: 1160px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold); }
ul { list-style: none; }

.page-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(680px 460px at 50% -6%, rgba(227, 168, 63, 0.14), transparent 70%);
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* NAV */
.legal-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 8, 5, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.legal-nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand span { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--cream); }
.legal-nav__links { display: flex; align-items: center; gap: 22px; }
.legal-nav__links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.legal-nav__links a:hover { color: var(--gold-2); }
.legal-nav__links a.is-active { color: var(--gold-2); }
.legal-nav__home {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; color: var(--cream) !important;
}
.legal-nav__home:hover { border-color: var(--gold); }

/* HERO */
.legal-hero { position: relative; z-index: 1; text-align: center; padding: 70px 0 40px; }
.legal-hero .eyebrow {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 16px;
}
.legal-hero h1 {
  font-family: var(--serif); font-weight: 700; color: var(--cream);
  font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.01em;
}
.legal-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.legal-hero__meta span {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px;
  font-size: 0.82rem; color: var(--muted); background: rgba(227, 168, 63, 0.04);
}
.legal-hero__meta b { color: var(--cream); font-weight: 600; }

/* LAYOUT */
.legal-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 260px 1fr; gap: 56px; padding: 30px 0 90px; align-items: start; }

/* TOC */
.toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 8px; }
.toc__title { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc a {
  display: block; padding: 7px 12px; border-radius: 9px; color: var(--muted);
  font-size: 0.88rem; line-height: 1.4; border-left: 2px solid transparent;
}
.toc a:hover { color: var(--cream); background: rgba(243, 234, 217, 0.03); }
.toc a.is-active { color: var(--gold-2); background: rgba(227, 168, 63, 0.08); border-left-color: var(--gold); }
.toc::-webkit-scrollbar { width: 6px; }
.toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

.toc-mobile { display: none; }

/* CONTENT */
.legal-content { max-width: 780px; min-width: 0; }
.legal-content .lead {
  font-size: 1.08rem; color: var(--text); padding: 22px 26px; margin-bottom: 28px;
  border: 1px solid var(--border-soft); border-left: 3px solid var(--gold);
  border-radius: 14px; background: rgba(243, 234, 217, 0.02);
}
.legal-content h2 {
  font-family: var(--serif); font-weight: 700; color: var(--cream);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -0.01em;
  margin: 48px 0 16px; padding-bottom: 12px; scroll-margin-top: 88px;
  border-bottom: 1px solid var(--border-soft);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--serif); font-weight: 600; color: var(--gold-2);
  font-size: 1.18rem; margin: 30px 0 10px; scroll-margin-top: 88px;
}
.legal-content p { color: var(--muted); margin-bottom: 16px; }
.legal-content p strong, .legal-content li strong { color: var(--text); font-weight: 600; }
.legal-content ul { display: grid; gap: 10px; margin: 4px 0 20px; }
.legal-content li { position: relative; padding-left: 26px; color: var(--muted); }
.legal-content li::before {
  content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(227, 168, 63, 0.5);
}

/* FOOTER */
.legal-footer { position: relative; z-index: 1; border-top: 1px solid var(--border-soft); background: var(--bg-2); padding: 44px 0 30px; }
.legal-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.legal-footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.legal-footer__links a { color: var(--muted); font-size: 0.92rem; }
.legal-footer__links a:hover { color: var(--gold-2); }
.legal-footer__note { color: var(--muted-2); font-size: 0.84rem; margin-top: 18px; }

.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--gold-2);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.2s ease;
}
.back-top.is-shown { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); border-color: var(--gold); }

@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .toc-mobile {
    display: block; margin-bottom: 26px; border: 1px solid var(--border-soft);
    border-radius: 14px; background: var(--surface); overflow: hidden;
  }
  .toc-mobile summary {
    cursor: pointer; padding: 16px 20px; color: var(--cream); font-weight: 600;
    font-size: 0.95rem; list-style: none;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: "▾"; float: right; color: var(--gold); }
  .toc-mobile[open] summary::after { content: "▴"; }
  .toc-mobile ol { list-style: none; padding: 0 12px 14px; display: grid; gap: 2px; }
  .toc-mobile a { display: block; padding: 8px 12px; color: var(--muted); font-size: 0.9rem; border-radius: 8px; }
  .toc-mobile a:hover { color: var(--gold-2); background: rgba(227, 168, 63, 0.06); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
