/* ============================================================
   DrySource — shared legal stylesheet
   Used by privacy.html and terms-of-service.html only.
   Dark violet-black theme to match the main site.
   ============================================================ */

:root {
  --bg: #12101B;
  --bg-soft: #1A1628;
  --text: #EFECF8;
  --muted: #B9A8E8;
  --accent: #8B5CF6;
  --accent-dark: #6D3FD4;
  --deep: #3F3566;
  --hairline: #2B2442;
  --hairline-soft: #241F38;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scope isolation for legal pages */
.legal-page {
  background-color: #12101B;
  color: #EFECF8;
}

/* Guarantee that any section inside the legal content never
   inherits a dark background that would clash with text. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--text);
  font-weight: 700;
}

/* ============================================================
   MESH NAV (repeated for legal pages — they load only legal.css)
   ============================================================ */
.mesh-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--hairline-soft);
}

.mesh-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.mesh-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.mesh-nav .brand:hover {
  text-decoration: none;
}

.mesh-nav .mesh-glyph {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  width: 21px;
  height: 21px;
}

.mesh-nav .mesh-glyph .dot {
  width: 5px;
  height: 5px;
  background-color: var(--accent);
}

.mesh-nav .brand-word {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--text);
}

.mesh-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1 1 auto;
  justify-content: center;
}

.mesh-nav .nav-link {
  position: relative;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  text-decoration: none;
}

.mesh-nav .nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.mesh-nav .nav-link.active {
  color: var(--text);
}

.mesh-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: var(--accent);
}

.mesh-nav .nav-cta {
  display: inline-block;
  background-color: var(--accent);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.mesh-nav .nav-cta:hover {
  background-color: var(--accent-dark);
  text-decoration: none;
}

.mesh-nav .nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mesh-nav .nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
}

/* ============================================================
   LEGAL HERO (title banner)
   ============================================================ */
.legal-hero {
  background-color: var(--deep);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 64px 0;
}

.legal-hero .legal-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-hero .legal-kicker {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.legal-hero h1 {
  font-size: 42px;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.legal-hero .legal-updated {
  color: var(--muted);
  font-size: 15px;
}

/* ============================================================
   LEGAL CONTENT
   ============================================================ */
.legal-content {
  padding: 56px 0 64px;
}

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

.legal-content h2 {
  font-size: 26px;
  color: var(--muted);
  margin: 48px 0 16px;
  padding-top: 8px;
}

.legal-content h3 {
  font-size: 19px;
  color: var(--text);
  margin: 26px 0 10px;
}

.legal-content p {
  color: var(--text);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text);
  margin: 0 0 20px 24px;
}

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

.legal-content a {
  color: var(--accent);
}

.legal-content a:hover {
  color: var(--muted);
}

.legal-content strong {
  color: var(--muted);
}

/* Table of contents */
.toc {
  background-color: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 28px 30px;
  margin-bottom: 40px;
}

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

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 36px;
}

.toc ol li {
  margin-bottom: 10px;
  break-inside: avoid;
}

.toc ol a {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}

.toc ol a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   SILO FOOTER (repeated for legal pages)
   ============================================================ */
.silo-footer {
  background-color: var(--bg);
  border-top: 3px solid var(--accent);
  padding: 64px 0 40px;
}

.silo-footer .footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 40px;
}

.silo-footer .footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.silo-footer .footer-mesh {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin-top: 5px;
}

.silo-footer .footer-mesh .dot {
  width: 5px;
  height: 5px;
  background-color: var(--accent);
}

.silo-footer .footer-brand-text .brand-word {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
}

.silo-footer .footer-brand-text p {
  color: var(--muted);
  font-size: 15px;
}

.silo-footer h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
}

.silo-footer .footer-links {
  list-style: none;
}

.silo-footer .footer-links li {
  margin-bottom: 12px;
}

.silo-footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.silo-footer .footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.silo-footer .footer-contact p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.silo-footer .footer-contact a {
  color: var(--muted);
}

.silo-footer .footer-contact a:hover {
  color: var(--text);
}

.silo-footer .footer-legal {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.silo-footer .footer-legal a {
  color: var(--muted);
}

.silo-footer .footer-legal a:hover {
  color: var(--text);
}

.silo-footer .footer-legal .sep {
  color: var(--hairline);
  margin: 0 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .silo-footer .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .toc ol {
    columns: 1;
  }
}

@media (max-width: 720px) {
  .mesh-nav .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--bg);
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--hairline-soft);
    display: none;
  }

  .mesh-nav .nav-links.open {
    display: flex;
  }

  .mesh-nav .nav-link {
    padding: 14px 0;
    width: 100%;
    font-size: 17px;
  }

  .mesh-nav .nav-cta {
    display: none;
  }

  .mesh-nav .nav-toggle {
    display: flex;
  }

  .legal-hero h1 {
    font-size: 32px;
  }
}
