/* ==========================================================================
   DeepSlate — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Legal pages load ONLY this stylesheet (never style.css)
   ========================================================================== */

.legal-page {
  background-color: #0D1014;
  color: #E6EAF0;
}

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

.legal-page html {
  font-size: 16px;
}

.legal-page body {
  font-size: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
  color: #E6EAF0;
  background-color: #0D1014;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.legal-page a {
  color: #A8C0D4;
  text-decoration: none;
}

.legal-page a:hover {
  color: #E6EAF0;
}

.legal-page ul,
.legal-page ol {
  list-style: none;
}

/* ==========================================================================
   Legal header — a <header> element with a gradient background
   ========================================================================== */

.legal-header {
  background: linear-gradient(160deg, #334155 0%, #1B2531 55%, #141B23 100%);
  border-bottom: 4px solid #5B7C99;
}

.legal-header__bar {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2A3542;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: #5B7C99;
  color: #0D1014;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 18px;
  border-radius: 4px;
}

.legal-brand:hover {
  color: #0D1014;
  background-color: #A8C0D4;
}

.legal-home-link {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A8C0D4;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 4px;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.legal-home-link:hover {
  border-color: #A8C0D4;
  color: #E6EAF0;
}

.legal-header__title {
  max-width: 900px;
  margin: 0 auto;
  padding: 44px 24px 40px;
}

.legal-header__title h1 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  color: #E6EAF0;
  margin-bottom: 14px;
}

.legal-header__title .legal-updated {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #A8C0D4;
}

/* ==========================================================================
   Legal content
   ========================================================================== */

.legal-content {
  padding: 56px 0 80px;
}

/* Scope isolation: keep any section background transparent on legal pages */
.legal-page .legal-content section {
  background-color: transparent !important;
}

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

/* Table of contents */
.legal-toc {
  background-color: #1B2531;
  border: 1px solid #2A3542;
  border-left: 4px solid #5B7C99;
  border-radius: 4px;
  padding: 24px 28px;
  margin-bottom: 48px;
}

.legal-toc__title {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #A8C0D4;
  margin-bottom: 14px;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
}

.legal-toc ol li {
  counter-increment: toc-item;
}

.legal-toc ol a {
  font-size: 14px;
  color: #C9D6E3;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease;
}

.legal-toc ol a:hover {
  color: #E6EAF0;
  border-bottom-color: #5B7C99;
}

/* Sections */
.legal-content section {
  padding: 40px 0;
  border-bottom: 1px solid #2A3542;
}

.legal-content section:last-of-type {
  border-bottom: none;
}

.legal-content h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 600;
  color: #E6EAF0;
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 3px solid #5B7C99;
}

.legal-content h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: #E6EAF0;
  margin: 24px 0 10px;
}

.legal-content p {
  color: #C9D6E3;
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.legal-content ul {
  margin: 0 0 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-content ul li {
  position: relative;
  padding-left: 22px;
  color: #C9D6E3;
  font-size: 1rem;
}

.legal-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background-color: #5B7C99;
  border-radius: 1px;
}

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

.legal-address {
  background-color: #141B23;
  border: 1px solid #2A3542;
  border-radius: 4px;
  padding: 20px 24px;
  margin: 18px 0;
  font-family: "Space Mono", monospace;
  font-size: 14px;
  line-height: 1.9;
  color: #A8C0D4;
}

/* ==========================================================================
   Legal footer
   ========================================================================== */

.legal-footer {
  background-color: #141B23;
  border-top: 4px solid #334155;
  padding: 32px 0 28px;
}

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

.legal-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-footer p {
  font-size: 13px;
  color: #8A99A8;
}

.legal-footer__link {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #A8C0D4;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 4px;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.legal-footer__link:hover {
  border-color: #A8C0D4;
  color: #E6EAF0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  .legal-content {
    padding: 40px 0 56px;
  }

  .legal-header__title {
    padding: 32px 24px 30px;
  }
}
