.stlf-legal {
  --stlf-bg: #191919;
  --stlf-surface: #202024;
  --stlf-surface-2: #25252b;
  --stlf-border: rgba(255,255,255,.09);
  --stlf-text: #f3f3f6;
  --stlf-muted: #aaaab6;
  --stlf-soft: #d7d7df;
  --stlf-accent: #6241ed;
  --stlf-accent-2: #8d79ff;
  --stlf-shadow: 0 22px 70px rgba(0,0,0,.28);
  color: var(--stlf-text);
  font-family: Poppins, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  max-width: 1440px;
  margin: 0 auto;
  padding: 42px 28px 72px;
  scroll-behavior: smooth;
}

.stlf-legal *, .stlf-legal *::before, .stlf-legal *::after { box-sizing: border-box; }
.stlf-legal a { color: var(--stlf-accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.stlf-legal a:hover { color: #b2a5ff; }
.stlf-legal strong { color: #fff; font-weight: 650; }
.stlf-legal p { margin: 0 0 1.05rem; color: var(--stlf-soft); }

.stlf-legal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(98,65,237,.42);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 8%, rgba(98,65,237,.24), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01)),
    var(--stlf-surface);
  box-shadow: var(--stlf-shadow);
  margin-bottom: 24px;
}

.stlf-legal-hero__glow {
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -170px;
  background: rgba(98,65,237,.34);
  filter: blur(80px);
  border-radius: 50%;
  pointer-events: none;
}

.stlf-legal-hero__content { position: relative; z-index: 1; padding: clamp(34px, 6vw, 72px); max-width: 940px; }
.stlf-legal-kicker, .stlf-legal-eyebrow {
  display: inline-block;
  margin-bottom: 13px;
  color: #a796ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.stlf-legal-hero h1 {
  margin: 0 0 17px;
  color: #fff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -.045em;
  font-weight: 750;
}

.stlf-legal-lead {
  max-width: 800px;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
  color: #d4d1df !important;
}

.stlf-legal-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.stlf-legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--stlf-border);
  background: rgba(255,255,255,.035);
  border-radius: 999px;
  color: var(--stlf-muted);
  font-size: 12px;
}

.stlf-legal-snapshot {
  border: 1px solid var(--stlf-border);
  border-radius: 24px;
  background: var(--stlf-surface);
  padding: clamp(24px, 4vw, 38px);
  margin-bottom: 30px;
}

.stlf-legal-snapshot__head h2 { margin: 0 0 22px; font-size: clamp(24px, 3vw, 34px); color: #fff; letter-spacing: -.025em; }
.stlf-legal-snapshot__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stlf-legal-stat {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--stlf-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stlf-legal-stat span { color: var(--stlf-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stlf-legal-stat strong { font-size: 27px; letter-spacing: -.035em; color: #fff; }
.stlf-legal-stat small { color: #bcbcc6; line-height: 1.45; }

.stlf-legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.stlf-legal-toc { position: relative; }
.stlf-legal-toc__inner {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--stlf-border);
  border-radius: 18px;
  background: rgba(31,31,35,.96);
  scrollbar-width: thin;
  scrollbar-color: rgba(98,65,237,.5) transparent;
}
.stlf-legal-toc__title { display: block; margin-bottom: 10px; color: #fff; font-weight: 650; font-size: 13px; }
.stlf-legal-toc nav { display: flex; flex-direction: column; gap: 2px; }
.stlf-legal-toc a {
  text-decoration: none;
  color: #aaaab5;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 9px;
  border-radius: 9px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.stlf-legal-toc a:hover { background: rgba(98,65,237,.12); color: #fff; transform: translateX(2px); }

.stlf-legal-mobile-toc { display: none; margin-bottom: 18px; }
.stlf-legal-mobile-toc details { border: 1px solid var(--stlf-border); border-radius: 15px; background: var(--stlf-surface); overflow: hidden; }
.stlf-legal-mobile-toc summary { cursor: pointer; padding: 16px 18px; color: #fff; font-weight: 650; }
.stlf-legal-mobile-toc nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 14px 15px; }
.stlf-legal-mobile-toc a { text-decoration: none; color: #c4c4cf; border-radius: 9px; padding: 8px 9px; background: rgba(255,255,255,.025); font-size: 12px; }

.stlf-legal-content { min-width: 0; }
.stlf-legal-intro, .stlf-legal-section {
  border: 1px solid var(--stlf-border);
  border-radius: 22px;
  background: var(--stlf-surface);
  padding: clamp(23px, 4vw, 40px);
  margin-bottom: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
}
.stlf-legal-intro { border-color: rgba(98,65,237,.25); background: linear-gradient(145deg, rgba(98,65,237,.07), rgba(255,255,255,.018)), var(--stlf-surface); }
.stlf-legal-intro p:last-child, .stlf-legal-section__body > *:last-child { margin-bottom: 0; }
.stlf-legal-section { scroll-margin-top: 110px; }
.stlf-legal-section h2 {
  margin: 0 0 19px;
  color: #fff;
  font-size: clamp(21px, 2.5vw, 29px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.stlf-legal-section h2::after { content: ""; display: block; width: 48px; height: 2px; background: var(--stlf-accent); border-radius: 99px; margin-top: 13px; }
.stlf-legal-section__body { color: var(--stlf-soft); }

.stlf-legal-table-wrap { width: 100%; overflow-x: auto; margin: 22px 0; border: 1px solid var(--stlf-border); border-radius: 16px; }
.stlf-legal-table { width: 100%; border-collapse: collapse; min-width: 620px; margin: 0; }
.stlf-legal-table th, .stlf-legal-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--stlf-border); vertical-align: top; }
.stlf-legal-table th { background: rgba(98,65,237,.10); color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.stlf-legal-table td { color: #c7c7d0; font-size: 13px; }
.stlf-legal-table tbody tr:last-child td { border-bottom: 0; }
.stlf-legal-table tbody tr:hover td { background: rgba(255,255,255,.018); }

.stlf-legal-contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(98,65,237,.14), rgba(98,65,237,.04));
  border: 1px solid rgba(98,65,237,.32);
}
.stlf-legal-contact-card__eyebrow { color: #a795ff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.stlf-legal-contact-card strong { font-size: 20px; }
.stlf-legal-contact-card span:last-child { color: #bcbcc6; }

.stlf-legal-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 16px 4px;
  color: #8e8e99;
  font-size: 12px;
}
.stlf-legal-bottom-bar a { text-decoration: none; font-weight: 600; }

@media (max-width: 1100px) {
  .stlf-legal-snapshot__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stlf-legal-layout { grid-template-columns: 1fr; }
  .stlf-legal-toc { display: none; }
  .stlf-legal-mobile-toc { display: block; }
}

@media (max-width: 700px) {
  .stlf-legal { padding: 22px 14px 52px; font-size: 14px; }
  .stlf-legal-hero, .stlf-legal-snapshot, .stlf-legal-intro, .stlf-legal-section { border-radius: 18px; }
  .stlf-legal-hero__content { padding: 30px 22px 32px; }
  .stlf-legal-hero h1 { font-size: 39px; }
  .stlf-legal-snapshot { padding: 22px 18px; }
  .stlf-legal-snapshot__grid { grid-template-columns: 1fr; }
  .stlf-legal-stat { min-height: 125px; }
  .stlf-legal-mobile-toc nav { grid-template-columns: 1fr; }
  .stlf-legal-intro, .stlf-legal-section { padding: 22px 18px; }
  .stlf-legal-bottom-bar { align-items: flex-start; flex-direction: column; }
}

@media print {
  .stlf-legal { max-width: none; color: #000; background: #fff; padding: 0; font-size: 11pt; }
  .stlf-legal-hero, .stlf-legal-snapshot, .stlf-legal-intro, .stlf-legal-section { background: #fff !important; color: #000 !important; border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
  .stlf-legal h1, .stlf-legal h2, .stlf-legal strong, .stlf-legal p, .stlf-legal td, .stlf-legal th { color: #000 !important; }
  .stlf-legal-toc, .stlf-legal-mobile-toc, .stlf-legal-bottom-bar, .stlf-legal-hero__glow { display: none !important; }
  .stlf-legal-layout { display: block; }
  .stlf-legal a { color: #000 !important; text-decoration: underline; }
}

/* v0.2.0 — Terms-specific components */
.stlf-legal-hero--terms {
  background:
    radial-gradient(circle at 86% 12%, rgba(98,65,237,.28), transparent 31%),
    radial-gradient(circle at 68% 110%, rgba(141,121,255,.10), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01)),
    var(--stlf-surface);
}

.stlf-legal-context-strip {
  display: grid;
  grid-template-columns: minmax(240px,.8fr) minmax(0,1.5fr);
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
  margin: -6px 0 30px;
  border: 1px solid rgba(98,65,237,.26);
  border-radius: 20px;
  background: linear-gradient(110deg, rgba(98,65,237,.10), rgba(255,255,255,.018));
}
.stlf-legal-context-strip strong { display: block; font-size: 18px; letter-spacing: -.015em; }
.stlf-legal-context-strip p { margin: 0; }

.stlf-legal-callout {
  position: relative;
  margin: 0 0 22px;
  padding: 21px 22px;
  border: 1px solid var(--stlf-border);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.stlf-legal-callout strong { display: block; margin-bottom: 7px; font-size: 16px; line-height: 1.5; }
.stlf-legal-callout p { margin: 0; }
.stlf-legal-callout--accent {
  border-color: rgba(98,65,237,.34);
  background: linear-gradient(145deg, rgba(98,65,237,.11), rgba(98,65,237,.025));
}
.stlf-legal-callout--important {
  border-color: rgba(141,121,255,.42);
  background:
    radial-gradient(circle at 95% 0%, rgba(98,65,237,.16), transparent 36%),
    linear-gradient(145deg, rgba(98,65,237,.09), rgba(255,255,255,.018));
}
.stlf-legal-callout__label {
  display: inline-block;
  margin-bottom: 9px;
  color: #a796ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.stlf-legal--terms .stlf-legal-section:nth-of-type(10) {
  border-color: rgba(98,65,237,.30);
}

@media (max-width: 700px) {
  .stlf-legal-context-strip { grid-template-columns: 1fr; gap: 12px; padding: 21px 18px; border-radius: 16px; }
  .stlf-legal-callout { padding: 18px; }
}
