/* ============================================================
   Legal page stylesheet — loaded ONLY by privacy.html and
   terms-of-service.html (matching the light rehab theme).
   Tuned for WYSIWYG content containers.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #4E5D68;             /* clinic-body text */
  background-color: #F4F6F2;  /* towel-white canvas */
  overflow-x: hidden;
}

/* Scope isolate: nothing on body/legal page forces a section bg.
   We keep explicit solid backgrounds on the header / footer blocks. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ---- Legal page header (a header/div element, split? keep solid) ---- */
.legal-header {
  position: relative;
  z-index: 1;
  background-color: #2E3B45;   /* gown-grey solid header band */
  color: #FBFCFA;
  border-bottom: 6px solid #2E6E8E;
}

.legal-header .topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.legal-header .lh-brand {
  color: #FBFCFA;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 17px;
}

.legal-header .lh-home a {
  color: #B9C6CE;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.legal-header .lh-home a:hover { color: #FBFCFA; text-decoration: none; }

.legal-titleblock {
  background-color: #F4F6F2;
  padding: 30px 24px 14px;
  border-bottom: 1px solid #3E4C57;
}

.legal-titleblock .doclabel {
  display: inline-block;
  background: #D97A5A;
  color: #FBFCFA;
  border-radius: 900px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.legal-titleblock h1 {
  margin: 0 0 8px;
  font-size: 32px;
  color: #22303E;
  font-weight: 800;
  line-height: 1.15;
}

.legal-titleblock .updated {
  color: #4E5D68;
  font-size: 14px;
  margin: 0;
}

/* ---- Main legal content container ---- */
.legal-main {
  display: inline-block;
  padding: 34px 24px 46px;
}

.legal-content {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-intro p {
  color: #4E5D68;
  font-size: 16px;
}

/* ---- Table of contents ---- */
.toc {
  background: #FBFCFA;
  border: 1px solid #3E4C57;
  border-radius: 8px;
  padding: 20px 26px;
  margin: 22px 0 30px;
}

.toc h2 {
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2E6E8E;
  margin: 0 0 12px;
}

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

@media (min-width: 700px) {
  .toc ol { columns: 2; }
}

.toc li { margin-bottom: 6px; }

.toc a {
  color: #22303E;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #D9C9A8;
}
.toc a:hover { color: #2E6E8E; }

/* ---- Content sections ---- */
.legal-content section {
  padding: 8px 0 22px;
}

.legal-content h2 {
  font-size: 23px;
  color: #22303E;
  font-weight: 800;
  margin: 34px 0 10px;
  padding-top: 6px;
  border-bottom: 2px solid #2E6E8E;
  display: inline-block;
  padding-bottom: 4px;
}

.legal-content h3 {
  font-size: 18px;
  color: #2E6E8E;
  margin: 22px 0 8px;
  font-weight: 700;
}

.legal-content p {
  color: #4E5D68;
  margin: 0 0 14px;
}

.legal-content ul, .legal-content ol {
  color: #4E5D68;
  padding-left: 22px;
  margin: 0 0 14px;
}

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

/* ---- Footer with solid bg + strong contrast text ---- */
.legal-footer {
  background-color: #1B262E;   /* recovery-deep solid footer */
  color: #B9C6CE;
  padding: 34px 24px 40px;
}

.legal-footer .lfoot-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.legal-footer .lf-links {
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.legal-footer .lf-links a {
  color: #FBFCFA;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid #2E6E8E;
  padding-bottom: 2px;
}
.legal-footer .lf-links a:hover { border-color: #D97A5A; }

.legal-footer p {
  color: #B9C6CE;
  font-size: 13px;
  margin: 10px auto 0;
  max-width: 640px;
  line-height: 1.7;
}

.legal-footer p .lorg {
  color: #FBFCFA;
  font-weight: 700;
}

/* A pill "back home" CTA at the very bottom of legal content */
.backhome {
  margin: 28px 0 8px;
}

.backhome a {
  display: inline-block;
  background: #2E6E8E;
  color: #FBFCFA;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 6px;
}
.backhome a:hover { background: #245a74; text-decoration: none; }
