/* =========================================================
   LEGAL PAGES – ctv-legal-* components
   Shared by Terms of Service, Privacy Policy, Refund Policy
   ========================================================= */

.ctv-legal-page { padding-top: 5rem; }

/* ── Hero ─────────────────────────────────────────────── */
.ctv-legal-hero {
  position: relative;
  overflow: hidden;
  background: hsl(220,25%,8%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ctv-legal-hero__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(124,58,237,0.18), transparent 55%),
              radial-gradient(ellipse at bottom right, rgba(236,72,153,0.1), transparent 55%);
}
.ctv-legal-hero__bg--blue {
  background: radial-gradient(ellipse at top left, rgba(59,130,246,0.15), transparent 55%),
              radial-gradient(ellipse at bottom right, rgba(124,58,237,0.1), transparent 55%);
}
.ctv-legal-hero__bg--green {
  background: radial-gradient(ellipse at top left, rgba(16,185,129,0.15), transparent 55%),
              radial-gradient(ellipse at bottom right, rgba(124,58,237,0.08), transparent 55%);
}

.ctv-legal-hero__inner {
  position: relative; z-index: 2;
  max-width: 48rem;
}
.ctv-legal-hero__title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800; color: #fff; margin-bottom: 0.5rem; line-height: 1.15;
}
.ctv-legal-hero__meta {
  font-size: 0.9rem; color: rgba(255,255,255,0.35); margin-top: 0.5rem;
}

/* ── Layout: sidebar + content ────────────────────────── */
.ctv-legal-wrap {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 3.5rem;
  padding: 3.5rem 0 5rem;
  align-items: start;
}

/* ── TOC sidebar ──────────────────────────────────────── */
.ctv-legal-toc {
  position: sticky;
  top: 6.5rem;
}
.ctv-legal-toc__inner {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
  padding: 1.25rem;
}
.ctv-legal-toc__title {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.4);
  margin-bottom: 0.875rem;
}
.ctv-legal-toc__list { counter-reset: none; list-style: none; }
.ctv-legal-toc__list li { margin-bottom: 0; }
.ctv-legal-toc__list a {
  display: block;
  font-size: 0.8125rem; font-weight: 400;
  color: rgba(255,255,255,0.5);
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: var(--tm-transition);
  line-height: 1.4;
}
.ctv-legal-toc__list a:hover {
  color: hsl(270,70%,70%);
  background: rgba(124,58,237,0.1);
}

/* ── Article content ──────────────────────────────────── */
.ctv-legal-content section {
  margin-bottom: 3rem;
  scroll-margin-top: 6.5rem;
}
.ctv-legal-content section:last-child { margin-bottom: 0; }

.ctv-legal-content h2 {
  font-size: 1.5rem; font-weight: 800; color: #fff;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  scroll-margin-top: 6.5rem;
}
.ctv-legal-content h3 {
  font-size: 1.0625rem; font-weight: 700; color: rgba(255,255,255,0.9);
  margin: 1.5rem 0 0.625rem;
}

.ctv-legal-content p {
  font-size: 0.9375rem; color: rgba(255,255,255,0.65);
  line-height: 1.8; margin-bottom: 1rem;
}
.ctv-legal-content p:last-child { margin-bottom: 0; }

.ctv-legal-content ul,
.ctv-legal-content ol {
  margin: 0.625rem 0 1rem 0;
  padding-left: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.ctv-legal-content ul { list-style: disc; }
.ctv-legal-content ol { list-style: decimal; }
.ctv-legal-content li {
  font-size: 0.9375rem; color: rgba(255,255,255,0.6); line-height: 1.7;
}
.ctv-legal-content li strong { color: rgba(255,255,255,0.85); }

.ctv-legal-content a {
  color: hsl(270,70%,65%);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.ctv-legal-content a:hover { color: hsl(270,70%,75%); }

/* Notice/warning box */
.ctv-legal-notice {
  padding: 1.125rem 1.25rem;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-left: 4px solid hsl(260,70%,55%);
  border-radius: 0 0.625rem 0.625rem 0;
  font-size: 0.9rem; color: rgba(255,255,255,0.65);
  line-height: 1.65; margin-bottom: 2.5rem;
}
.ctv-legal-notice--blue {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.2);
  border-left-color: hsl(217,91%,60%);
}
.ctv-legal-notice strong { color: rgba(255,255,255,0.9); display: block; margin-bottom: 0.25rem; }

/* Guarantee highlight box (refund policy) */
.ctv-legal-guarantee-box {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.5rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 1rem;
  margin-bottom: 2.5rem;
}
.ctv-legal-guarantee-box__icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; }
.ctv-legal-guarantee-box strong { display: block; font-size: 1.125rem; font-weight: 700; color: hsl(155,65%,55%); margin-bottom: 0.375rem; }
.ctv-legal-guarantee-box p { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.65; margin: 0; }

/* Highlight box */
.ctv-legal-highlight {
  padding: 1.125rem 1.25rem;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: 0.75rem;
  margin: 1rem 0;
}
.ctv-legal-highlight strong { display: block; color: hsl(155,65%,55%); margin-bottom: 0.5rem; font-size: 0.9rem; }
.ctv-legal-highlight ul { margin-bottom: 0; }

/* Contact box */
.ctv-legal-contact-box {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  margin-top: 1.25rem;
}
.ctv-legal-contact-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9375rem; color: rgba(255,255,255,0.65);
}
.ctv-legal-contact-item svg { width: 1.125rem; height: 1.125rem; color: hsl(230,80%,65%); flex-shrink: 0; }
.ctv-legal-contact-item a {
  color: hsl(270,70%,65%);
  text-decoration: underline; text-underline-offset: 3px;
}
.ctv-legal-contact-item a:hover { color: hsl(270,70%,75%); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .ctv-legal-wrap { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.5rem; }
  .ctv-legal-toc { position: static; }
  .ctv-legal-toc__inner { padding: 1rem; }
  .ctv-legal-toc__list { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .ctv-legal-toc__list li { margin-bottom: 0; }
  .ctv-legal-toc__list a { padding: 0.3rem 0.625rem; white-space: nowrap; }
}
@media (max-width: 600px) {
  .ctv-legal-hero { padding: 3.5rem 0 2.5rem; }
  .ctv-legal-hero__title { font-size: 2rem; }
  .ctv-legal-content h2 { font-size: 1.25rem; }
  .ctv-legal-guarantee-box { flex-direction: column; gap: 0.75rem; }
  .ctv-legal-toc__list { flex-direction: column; }
}
