/* =========================================================
   DirectAuto — legal pages shared stylesheet
   Loaded by privacy.html and terms-of-service.html ONLY.
   Theme: near-black with cyan accent (dark), matching the homepage.
   ========================================================= */

/* Define the body background explicitly so legal pages never
   render on a white default background with light headings. */
.legal-page {
  background-color: #0B0E14;
  color: #E8EAED;
}

html {
  font-size: 16px;
}

body {
  font-size: 16px;
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background-color: #0B0E14;
  color: #E8EAED;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: #22D3EE;
  text-decoration: none;
}

a:hover {
  color: #E8EAED;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* =========================================================
   Header (must be <header>, never <section>)
   ========================================================= */

.legal-header {
  background: linear-gradient(135deg, #0A2230 0%, #06222E 45%, #041A24 100%);
  border-bottom: 1px solid #1F2836;
  padding: 40px 24px 48px;
}

.legal-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #E8EAED;
}

.legal-brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #22D3EE, #0891B2);
  color: #06131A;
  font-weight: 900;
}

.legal-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #2A3547;
  border-radius: 10px;
  background-color: #0B0E14;
  color: #22D3EE;
  font-size: 0.88rem;
  font-weight: 700;
}

.legal-home-link:hover {
  border-color: #06B6D4;
  color: #E8EAED;
}

.legal-title-wrap {
  max-width: 1100px;
  margin: 44px auto 0;
}

.legal-title-wrap h1 {
  color: #E8EAED;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}

.legal-updated {
  color: #9BA6B6;
  font-size: 0.95rem;
}

/* =========================================================
   Main content
   ========================================================= */

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

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

.legal-intro {
  color: #A8B2C1;
  font-size: 1.08rem;
  margin-bottom: 40px;
}

/* Scope isolation: legal sections never inherit homepage section
   backgrounds (homepage CSS is not loaded here, but this guarantees it). */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  color: #E8EAED;
  font-size: 1.45rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1F2836;
}

.legal-content h3 {
  color: #E8EAED;
  font-size: 1.1rem;
  margin: 20px 0 10px;
}

.legal-content p {
  color: #A8B2C1;
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: none;
  margin: 0 0 16px;
  padding-left: 4px;
}

.legal-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: #A8B2C1;
}

.legal-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: #06B6D4;
}

.legal-content strong {
  color: #E8EAED;
  font-weight: 700;
}

.legal-content a {
  color: #22D3EE;
  font-weight: 600;
}

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

/* =========================================================
   Table of contents
   ========================================================= */

.toc {
  margin-bottom: 48px;
  padding: 26px 28px;
  border: 1px solid #1F2836;
  border-radius: 14px;
  background-color: #0E121B;
}

.toc-title {
  color: #E8EAED;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  counter-reset: toc-counter;
}

.toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 10px;
}

.toc ol li:last-child {
  margin-bottom: 0;
}

.toc ol li a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: #A8B2C1;
  font-weight: 500;
  padding: 4px 0;
}

.toc ol li a:hover {
  color: #22D3EE;
}

.toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  color: #06B6D4;
  font-weight: 800;
  font-size: 0.85rem;
}

/* =========================================================
   Footer
   ========================================================= */

.legal-footer {
  background-color: #080B10;
  border-top: 1px solid #1F2836;
  padding: 48px 24px 40px;
}

.legal-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.legal-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #E8EAED;
  margin-bottom: 16px;
}

.legal-footer .footer-brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22D3EE, #0891B2);
  color: #06131A;
  font-weight: 900;
}

.legal-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-bottom: 20px;
}

.legal-footer .footer-links a {
  color: #A8B2C1;
  font-size: 0.92rem;
  font-weight: 600;
}

.legal-footer .footer-links a:hover {
  color: #22D3EE;
}

.legal-footer .footer-bottom {
  color: #7C8799;
  font-size: 0.85rem;
}

.legal-footer .footer-bottom a {
  color: #7C8799;
}

.legal-footer .footer-bottom a:hover {
  color: #22D3EE;
}

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

@media (max-width: 640px) {
  .legal-header {
    padding: 28px 20px 36px;
  }

  .legal-title-wrap {
    margin-top: 30px;
  }

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

  .legal-footer .footer-links {
    gap: 14px;
  }
}
