/* =============================================
   THETA SOLUTIONS — LEGAL PAGE STYLES
   Extends styles.css (load both) · light theme
   ============================================= */

/* --- LEGAL PAGE HERO --- */
.legal-hero {
  padding: 150px 0 64px;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(26,111,206,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 85% 10%, rgba(126,200,32,0.10) 0%, transparent 60%),
    var(--white);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.legal-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: rgba(126,200,32,0.10);
  border: 1px solid rgba(126,200,32,0.28);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  margin-bottom: 20px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 16px;
}

.legal-hero__meta {
  font-size: 0.9rem;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.legal-hero__meta strong {
  color: var(--text-muted);
  font-weight: 600;
}

.legal-hero__desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- LEGAL LAYOUT --- */
.legal-body {
  padding: 64px 0 100px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}

/* --- TOC SIDEBAR --- */
.legal-toc {
  position: sticky;
  top: 96px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.legal-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.legal-toc__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-toc__list a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  display: block;
  line-height: 1.4;
}

.legal-toc__list a:hover {
  color: var(--ink);
  background: var(--panel);
}

.legal-toc__list a.active {
  color: var(--blue);
  background: rgba(26,111,206,0.10);
  font-weight: 600;
}

.legal-toc__divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* --- LEGAL CONTENT --- */
.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: 56px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}

.legal-section:last-child { margin-bottom: 0; }

.legal-section__num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
  margin: 12px 0 18px 0;
  padding-left: 20px;
}

.legal-section ul { list-style: none; padding-left: 0; }

.legal-section ul li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.legal-section ol {
  list-style: decimal;
}

.legal-section ol li {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-section a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.legal-section a:hover { color: var(--blue-dark); }

/* CALLOUT BOXES */
.legal-callout {
  background: rgba(26,111,206,0.06);
  border: 1px solid rgba(26,111,206,0.18);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

.legal-callout.legal-callout--warn {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.25);
  border-left-color: #f59e0b;
}

.legal-callout strong {
  color: var(--ink);
  font-weight: 600;
}

/* BOTH DOCS LINK BAR */
.legal-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  padding: 18px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.legal-switch span {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.legal-switch a {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.legal-switch a:hover { color: var(--blue); border-color: var(--blue); background: var(--panel); }
.legal-switch a.active {
  background: var(--grad-brand);
  color: var(--white);
  border-color: transparent;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    position: static;
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .legal-hero { padding: 130px 0 48px; }
  .legal-body { padding: 40px 0 72px; }
  .legal-section { margin-bottom: 40px; }
  .legal-section h2 { font-size: 1.25rem; }
}
