:root {
  color-scheme: light;
  --ink: #191425;
  --ink-deep: #110e1c;
  --ink-dim: #686678;
  --ink-body: #3c344d;
  --night: #0c0b12;
  --lavender: #5b3fe0;
  --lavender-bright: #7558ff;
  --surface-lilac: #f6f4fa;
  --soft-lilac: #e3d5ff;
  --border-subtle: rgba(25, 20, 37, .09);
  --gutter: clamp(20px, 5.4vw, 72px);
  --sans: "Plus Jakarta Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #ffffff; color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: 0 0 auto; }
:focus-visible { outline: 3px solid #7050ed; outline-offset: 4px; }
.footer-shell :focus-visible { outline-color: #e3d5ff; }
::selection { color: #24183f; background: #e4d6ff; }
section[id], [id] { scroll-margin-top: 96px; }
.mono { font-family: var(--mono); }
.eyebrow { color: var(--lavender); font-size: .75rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.section-width { max-width: 1180px; padding-inline: var(--gutter); margin-inline: auto; }

/* Sticky Legal Top Bar */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
}
.legal-nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 10px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.back-link:hover {
  background: var(--surface-lilac);
  color: var(--lavender);
}
.back-link .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 1.18rem;
  border-radius: 9px;
}
.back-arrow {
  color: var(--lavender);
  font-weight: 800;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.06em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(147deg, #7356f1, #5030cf);
  color: #ffffff;
  font-size: 1.32rem;
  font-weight: 800;
  font-style: italic;
  box-shadow: inset 0 1px #ffffff54;
  padding-right: 2px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.nav-cta {
  background: var(--ink-deep);
  color: #ffffff;
}
.nav-cta:hover {
  background: var(--lavender);
  transform: translateY(-1px);
}
.nav-cta .icon-arrow {
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.nav-cta:hover .icon-arrow {
  transform: translateX(2px);
}

/* Legal Hero Header */
.legal-hero {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(226, 214, 255, .62) 0%, transparent 56%),
    radial-gradient(ellipse at 92% 14%, rgba(235, 250, 242, .65) 0%, transparent 50%),
    var(--surface-lilac);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: clamp(44px, 6vw, 72px) clamp(32px, 4.5vw, 48px);
}
.legal-hero-inner {
  max-width: 780px;
}
.legal-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.05rem, 4.6vw, 3.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.05em;
  color: var(--ink-deep);
  text-wrap: balance;
}
.legal-lead {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--ink-body);
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  font-weight: 500;
  line-height: 1.62;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 22px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(91, 63, 224, .16);
  color: #463963;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.meta-chip-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex: 0 0 auto;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.legal-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(25, 20, 37, .1);
  color: #4b4260;
  font-size: .84rem;
  font-weight: 700;
  transition: background .2s, color .2s, border-color .2s;
}
.legal-tabs a:hover {
  background: #ffffff;
  border-color: rgba(91, 63, 224, .32);
  color: var(--ink-deep);
}
.legal-tabs a[aria-current="page"] {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  color: #ffffff;
}

/* Main Content Layout */
.legal-main {
  padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 88px);
}
.legal-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

/* Table of Contents */
.legal-toc {
  position: sticky;
  top: 94px;
  padding: 20px;
  border-radius: 22px;
  background: var(--surface-lilac);
  border: 1px solid rgba(91, 63, 224, .11);
}
.legal-toc-title {
  color: var(--ink-dim);
  font-size: .71rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-toc a {
  display: block;
  padding: 6px 8px;
  border-radius: 10px;
  color: #4c4362;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.38;
  transition: background .18s, color .18s;
}
.legal-toc a:hover {
  background: #ffffff;
  color: var(--lavender);
}

/* Prose Article */
.legal-article {
  min-width: 0;
  max-width: 74ch;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.summary-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface-lilac);
  border: 1px solid rgba(91, 63, 224, .12);
}
.summary-card strong {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink-deep);
}
.summary-card p {
  margin-top: 6px;
  color: var(--ink-body);
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.5;
}

.legal-section {
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--border-subtle);
}
.legal-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.legal-section h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--ink-deep);
}
.legal-section h3 {
  margin-top: 20px;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink-deep);
}
.legal-section p {
  margin-top: 12px;
  color: var(--ink-body);
  font-size: .97rem;
  font-weight: 500;
  line-height: 1.68;
}
.legal-section ul {
  margin: 12px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--ink-body);
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.64;
}
.legal-section li strong {
  color: var(--ink-deep);
}
.legal-section a {
  color: var(--lavender);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section a:hover {
  color: #3f25ba;
}
.inline-code {
  padding: 2px 7px;
  border-radius: 7px;
  background: #f1ecff;
  color: #4626ba;
  font-family: var(--mono);
  font-size: .86em;
  font-weight: 600;
}
.legal-callout {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(155deg, #f8f5ff 0%, #f1ecfc 100%);
  border: 1px solid rgba(91, 63, 224, .18);
}
.legal-callout-title {
  color: var(--lavender);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.legal-callout p {
  margin-top: 8px;
  font-size: .94rem;
  color: #2f2544;
}

/* Matching Dark Multi-Column Footer */
.footer-shell {
  background: #0c0a14;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #ffffff;
}
.footer {
  padding-top: clamp(44px, 5vw, 64px);
  padding-bottom: clamp(28px, 3.6vw, 40px);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.footer-brand { font-size: 1.18rem; white-space: nowrap; }
.footer-tagline {
  color: #b7b0cc;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.5;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  color: #d6cff0;
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.footer-badge-beta {
  background: rgba(117, 88, 255, .15);
  border-color: rgba(195, 176, 255, .28);
  color: #e7dfff;
}
.footer-badge-beta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  flex: 0 0 auto;
}
.footer-col { min-width: 0; }
.footer-heading {
  margin: 0 0 14px;
  color: #9e96b6;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e3ddf6;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color .2s;
}
.footer-list a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-list .footer-cta-link {
  color: #cbb8ff;
}
.footer-list .footer-cta-link:hover {
  color: #ffffff;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.footer-bottom p {
  color: #9f97b7;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.5;
}
.footer-bottom-meta {
  color: #b4accb;
}

/* Responsive */
@media (max-width: 960px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .legal-toc {
    position: static;
  }
}

@media (max-width: 760px) {
  .legal-nav { min-height: 58px; gap: 10px; }
  .back-link { gap: 7px; padding: 4px 8px 4px 4px; font-size: .84rem; }
  .back-link .brand-mark { width: 28px; height: 28px; font-size: 1.1rem; border-radius: 8px; }
  .nav-cta { min-height: 38px; padding: 8px 13px; font-size: .78rem; gap: 5px; }
  .nav-cta .icon-arrow { width: 13px; height: 13px; }
  .summary-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-list a { font-size: .86rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 355px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
