/* =====================================================
   AlGray LLC — Legal Stylesheet (privacy + terms)
   DARK charcoal-studio theme
   ONLY loaded on privacy.html and terms-of-service.html
   ===================================================== */

:root {
  --charcoal-studio: #12141A;
  --studio-panel: #1B1E26;
  --darkroom-deep: #232733;
  --deeper-studio: #0D0F14;
  --paper-white: #F5F7FA;
  --body-text: #C4C8CE;
  --graphite-silver: #B9C2CC;
  --warm-silver: #D6B98C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  line-height: 1.75;
  font-family: Georgia, Charter, "Times New Roman", serif;
  background-color: #12141A;
  color: #EAECEF;
}

/* ===== Scope isolation =====
   Ensure legal page section backgrounds never leak. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-page header,
.legal-page footer {
  background: none;
}

/* ===== Legal page header ===== */
.legal-page {
  background-color: #12141A;
  color: #EAECEF;
}

.legal-header {
  background-color: #0D0F14;
  border-bottom: 1px solid #D6B98C;
}

.legal-header .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px;
  position: relative;
  z-index: 1;
}

.legal-header .back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #B9C2CC;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-header .back-link:hover {
  color: #F5F7FA;
  text-decoration: underline;
}

.legal-header h1 {
  color: #F5F7FA;
  font-size: 42px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-header p.updated {
  margin-top: 10px;
  color: #C4C8CE;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ===== Layout ===== */
.legal-content {
  padding: 40px 0 56px;
}

.legal-content .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Table of contents ===== */
.legal-toc {
  background-color: #1B1E26;
  border: 1px solid #D6B98C;
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 44px;
}

.legal-toc h2 {
  color: #B9C2CC;
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
}

.legal-toc ol li {
  margin: 0;
}

.legal-toc a {
  color: #C4C8CE;
  text-decoration: none;
  font-size: 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.legal-toc a:hover {
  color: #F5F7FA;
  text-decoration: underline;
}

/* ===== Sections ===== */
.legal-content section {
  margin-bottom: 36px;
}

.legal-content h2 {
  color: #B9C2CC;
  font-size: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(214, 185, 140, 0.28);
}

.legal-content h3 {
  color: #EAECEF;
  font-size: 19px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 20px 0 10px;
}

.legal-content p {
  color: #C4C8CE;
  font-size: 16px;
  margin-bottom: 16px;
  text-align: justify;
}

.legal-content ul,
.legal-content ol {
  color: #C4C8CE;
  margin: 0 0 16px 28px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content strong {
  color: #EAECEF;
  font-weight: 600;
}

.legal-content a {
  color: #B9C2CC;
}

.legal-content a:hover {
  color: #F5F7FA;
}

/* ===== Back to home ===== */
.return-home {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #D6B98C;
}

.return-home p {
  text-align: left;
}

/* ===== Legal footer ===== */
.legal-footer {
  background-color: #0D0F14;
  border-top: 1px solid #D6B98C;
}

.legal-footer .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  text-align: center;
}

.legal-footer a {
  color: #B9C2CC;
  text-decoration: none;
}

.legal-footer a:hover {
  color: #F5F7FA;
}

.legal-footer span {
  color: #7A8189;
  font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .legal-header h1 {
    font-size: 30px;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .legal-content h2 {
    font-size: 21px;
  }
}
