/* ===== Legal Pages (Privacy Policy & Terms) ===== */

.legal-layout {
  padding: 48px 0 96px;
  background: var(--gray-50);
}

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

/* ===== Sidebar TOC ===== */
.legal-toc {
  position: sticky;
  top: 92px;
}

.toc-inner {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
}

.toc-list a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.4;
}

.toc-list a::before {
  content: counter(toc-counter);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  background: var(--gray-100);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toc-list a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.toc-list a.toc-active {
  background: var(--gold-pale);
  color: var(--gold);
  font-weight: 600;
}

.toc-list a.toc-active::before {
  background: var(--gold);
  color: var(--white);
}

.toc-list a.toc-danger { color: #dc2626; }
.toc-list a.toc-danger::before { background: #fee2e2; color: #dc2626; }
.toc-list a.toc-danger:hover { background: #fee2e2; }
.toc-list a.toc-danger.toc-active { background: #fee2e2; color: #dc2626; }

/* ===== Legal Body ===== */
.legal-body {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.legal-body section {
  padding-top: 48px;
  margin-top: -8px;
}

.legal-body section:first-child {
  padding-top: 16px;
}

.legal-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
}

.legal-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 10px;
}

.legal-body p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

/* Intro box */
.legal-intro-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--gold-pale);
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
}

.lib-icon { font-size: 24px; flex-shrink: 0; }

/* List */
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
  margin-bottom: 16px;
}

.legal-list li {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}

.legal-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* Info block */
.legal-info-block {
  background: var(--gray-50);
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin: 16px 0;
}

.lib-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-200);
  gap: 16px;
}

.lib-row:last-child { border-bottom: none; }
.lib-row span:first-child { color: var(--text-muted); }
.lib-row span:last-child { font-weight: 600; color: var(--primary); text-align: right; }

/* Callout */
.legal-callout {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  color: #1e40af;
  margin: 16px 0;
  line-height: 1.6;
}

/* Use cases grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.use-case {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
}

.uc-icon { font-size: 28px; margin-bottom: 10px; }
.uc-title { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.uc-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Cookie table */
.cookie-table {
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin: 16px 0;
}

.ct-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ct-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
  align-items: start;
}

.ct-row:last-child { border-bottom: none; }

/* ===== DELETE ACCOUNT SECTION ===== */
.delete-account-section {
  border-top: 2px solid #fee2e2;
  padding-top: 48px !important;
  margin-top: 16px;
}

.da-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.da-icon { font-size: 28px; }

.da-header h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
  color: #dc2626;
}

.da-warning {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 15px;
  color: #7f1d1d;
  margin-bottom: 24px;
  line-height: 1.6;
}

.da-alternatives {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 24px;
}

.da-alt {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid var(--gray-200);
}

.da-alt-icon { font-size: 24px; flex-shrink: 0; }

.da-alt div { flex: 1; }
.da-alt strong { font-size: 14px; color: var(--primary); display: block; margin-bottom: 2px; }
.da-alt span { font-size: 13px; color: var(--text-muted); }

.da-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 32px;
}

.da-method {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.da-method-num {
  width: 32px;
  height: 32px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #dc2626;
  flex-shrink: 0;
}

.da-method div {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

.da-method strong {
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.da-form-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 32px;
  margin-top: 32px;
}

.da-success-msg {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 15px;
  color: #166534;
  line-height: 1.7;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    position: static;
  }
  .toc-inner {
    display: none; /* Hide on mobile to save space — rely on scroll */
  }
  .legal-body {
    padding: 32px 24px;
  }
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
  .ct-header, .ct-row {
    grid-template-columns: 1fr 2fr;
  }
  .ct-header span:last-child,
  .ct-row span:last-child { display: none; }
  .da-alt { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .legal-body { padding: 24px 16px; }
  .lib-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .da-form-card { padding: 20px 16px; }
}
