/* ============================================================
   TRS Finance — Legal Pages Stylesheet
   Loaded ONLY by privacy.html and terms-of-service.html
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body.legal-page {
  background-color: #F7F8F5;
  color: #26301F;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #33693B;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  margin: 14px 0 14px 24px;
}

li {
  margin-bottom: 8px;
}

/* Scope isolation for legal content sections */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ==== Legal header (a solid header element, NOT a section) ==== */
.legal-header {
  width: 100%;
  background-color: #26301F;
  padding: 0;
  border-bottom: 6px solid #33693B;
}

.legal-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}

.legal-header h1 {
  color: #F7F8F5;
  font-size: 34px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.legal-header .company-line {
  color: #C9A44C;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-header .updated-line {
  color: #AAB6AB;
  font-size: 13px;
  margin-top: 10px;
}

.legal-header .home-link {
  display: inline-block;
  margin-top: 18px;
  color: #F7F8F5;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(247, 248, 245, 0.5);
  border-radius: 20px;
  padding: 7px 18px;
}

.legal-header .home-link:hover {
  background: #33693B;
  border-color: #33693B;
  text-decoration: none;
}

/* ==== Layout ==== */
.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 44px 0 60px;
  align-items: start;
}

.legal-title {
  font-size: 40px;
  color: #26301F;
  margin-bottom: 8px;
}

.legal-intro {
  color: #3A4436;
  font-size: 17px;
  background: #FFFFFF;
  border-left: 4px solid #C9A44C;
  padding: 22px 26px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 36px;
  box-shadow: 0 6px 16px rgba(38, 48, 31, 0.06);
}

/* ==== Table of contents ==== */
.legal-toc {
  background: #FFFFFF;
  border: 1px solid #DFE6DB;
  border-radius: 8px;
  padding: 22px 24px;
  position: sticky;
  top: 24px;
}

.legal-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #33693B;
  margin-bottom: 14px;
  border-bottom: 2px solid #C9A44C;
  padding-bottom: 10px;
}

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

.legal-toc li {
  margin: 0 0 6px;
}

.legal-toc a {
  display: block;
  color: #3A4436;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 4px 0;
  border-bottom: 1px solid #F0F2EC;
}

.legal-toc a:hover {
  color: #33693B;
  text-decoration: none;
  font-weight: 600;
}

/* ==== Legal content ==== */
.legal-content {
  overflow-wrap: break-word;
}

.legal-content section {
  margin-bottom: 44px;
  background: #FFFFFF;
  border: 1px solid #DFE6DB;
  border-radius: 8px;
  padding: 28px 30px;
}

.legal-content section:target {
  box-shadow: 0 0 0 3px rgba(51, 105, 59, 0.22);
}

.legal-content h2 {
  font-size: 26px;
  color: #28552F;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E8B4B0;
}

.legal-content h3 {
  font-size: 19px;
  color: #26301F;
  margin: 20px 0 10px;
}

.legal-content h4 {
  font-size: 16px;
  color: #33693B;
  margin: 16px 0 8px;
}

.legal-content p {
  color: #3A4436;
  margin-bottom: 14px;
  font-size: 15.5px;
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  color: #3A4436;
  font-size: 15.5px;
  line-height: 1.8;
}

.legal-content strong {
  color: #26301F;
}

.legal-content .backtop {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #33693B;
  font-weight: 600;
}

/* ==== Legal footer ==== */
.legal-footer {
  width: 100%;
  background-color: #1F2A20;
  padding: 34px 24px;
  text-align: center;
  border-top: 4px solid #33693B;
}

.legal-footer .legal-brand {
  color: #F7F8F5;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.legal-footer .legal-nav {
  color: #C9A44C;
  margin-bottom: 14px;
  font-size: 14px;
}

.legal-footer .legal-nav a {
  color: #E7F1E6;
  margin: 0 8px;
}

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

.legal-footer .legal-meta {
  color: #B9C4BB;
  font-size: 13px;
  line-height: 1.9;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .legal-toc {
    position: static;
  }

  .legal-title {
    font-size: 32px;
  }
}

@media (max-width: 540px) {
  .legal-header h1 {
    font-size: 26px;
  }

  .legal-content section {
    padding: 22px;
  }
}
