/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL PAGES STYLING - Privacy Policy & Terms of Use
   Dark hero header + cyan accents + styled tables
   ═══════════════════════════════════════════════════════════════════════════ */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden !important;
}

/* Hero Header - relies on Quarto's column-screen for full width */
.legal-hero {
  background: linear-gradient(135deg, #0B1120 0%, #131d2e 50%, #0B1120 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 2rem;
  width: 100%;
}

/* Grid background */
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.legal-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.legal-hero-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.legal-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.75rem 0;
  font-family: 'Poppins', sans-serif;
}

.legal-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.legal-hero-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #22d3ee;
}

.legal-hero-updated svg {
  width: 16px;
  height: 16px;
}

/* Main Content Styling */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Headings */
.legal-content h2 {
  color: #0f172a;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #22d3ee;
  position: relative;
}

.legal-content h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #f59e0b;
}

.legal-content h3 {
  color: #1e293b;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid #22d3ee;
}

.legal-content h4 {
  color: #334155;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Paragraphs */
.legal-content p {
  color: #475569;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Strong/Bold text */
.legal-content strong {
  color: #1e293b;
  font-weight: 600;
}

/* Lists */
.legal-content ul,
.legal-content ol {
  margin: 1rem 0 1.5rem 0;
  padding-left: 1.5rem;
}

.legal-content li {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  position: relative;
}

.legal-content ul li::marker {
  color: #22d3ee;
}

.legal-content ol li::marker {
  color: #22d3ee;
  font-weight: 600;
}

/* Tables */
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legal-content thead {
  background: linear-gradient(135deg, #0B1120 0%, #1e293b 100%);
}

.legal-content th {
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-content tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s ease;
}

.legal-content tbody tr:hover {
  background: rgba(34, 211, 238, 0.05);
}

.legal-content tbody tr:last-child {
  border-bottom: none;
}

.legal-content td {
  padding: 1rem;
  color: #475569;
  vertical-align: top;
}

.legal-content td:first-child {
  font-weight: 500;
  color: #1e293b;
}

/* Links */
.legal-content a {
  color: #22d3ee;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.legal-content a:hover {
  color: #0891b2;
  border-bottom-color: #0891b2;
}

/* Blockquotes / Important notices */
.legal-content blockquote {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08) 0%, rgba(34, 211, 238, 0.03) 100%);
  border-left: 4px solid #22d3ee;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.legal-content blockquote p {
  color: #1e293b;
  margin: 0;
  font-weight: 500;
}

/* Code/monospace */
.legal-content code {
  background: #f1f5f9;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: #0f172a;
}

/* Horizontal rules */
.legal-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  margin: 3rem 0;
}

/* Contact section styling */
.legal-content h2:last-of-type + p,
.legal-content h2:last-of-type ~ ul {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Final disclaimer at bottom */
.legal-content > p:last-child {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
  color: #92400e;
  font-style: italic;
  margin-top: 2rem;
}

/* Rights cards */
.rights-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.rights-card h4 {
  color: #22d3ee;
  margin-top: 0;
}

/* Table of Contents styling */
#TOC {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

#TOC .toc-title {
  color: #0f172a;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #22d3ee;
}

#TOC ul {
  list-style: none;
  padding-left: 0;
}

#TOC li {
  margin-bottom: 0.5rem;
}

#TOC a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

#TOC a:hover,
#TOC a.active {
  color: #22d3ee;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-hero {
    padding: 3rem 1rem 2rem;
  }
  
  .legal-hero-title {
    font-size: 1.75rem;
  }
  
  .legal-hero-subtitle {
    font-size: 1rem;
  }
  
  .legal-content h2 {
    font-size: 1.5rem;
  }
  
  .legal-content h3 {
    font-size: 1.15rem;
  }
  
  .legal-content table {
    font-size: 0.8rem;
  }
  
  .legal-content th,
  .legal-content td {
    padding: 0.75rem;
  }
}
