/* ============================================================
   LOGICWISE — Legal stylesheet (privacy / terms)
   Loaded alone, without style.css
   ============================================================ */

.legal-page {
  background-color: #F7F9FC;
  color: #5A6478;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

.legal-page img {
  max-width: 100%;
}

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

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

/* ---------------- Legal header ---------------- */

.legal-header {
  background-color: #16213A;
  padding: 64px 0 60px;
  border-bottom: 6px solid #3B5BDB;
}

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

.legal-header .home-link {
  display: inline-block;
  color: #FFFFFF;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 26px;
}

.legal-header .home-link:hover {
  color: #B9C8F0;
}

.legal-header .legal-badge {
  display: inline-block;
  background-color: #3B5BDB;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 40px;
  margin-bottom: 20px;
}

.legal-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  color: #FFFFFF;
  margin: 0 0 14px;
  line-height: 1.2;
}

.legal-header .header-sub {
  color: #B9C8F0;
  font-size: 16px;
  margin: 0;
  max-width: 720px;
}

/* ---------------- Table of contents ---------------- */

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

.toc {
  margin: 40px 0 8px;
  padding: 34px 40px;
  background-color: #FFFFFF;
  border: 1px solid #DDE3EE;
  border-top: 5px solid #3B5BDB;
}

.toc h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: #16213A;
  margin: 0 0 18px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
}

.toc-list li {
  counter-increment: toc;
}

.toc-list a {
  display: inline-block;
  color: #3B5BDB;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.toc-list a:hover {
  border-bottom-color: #3B5BDB;
}

.toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  color: #3B5BDB;
  font-weight: 700;
  margin-right: 10px;
}

.toc {
  counter-reset: toc;
}

/* ---------------- Legal sections ---------------- */

.legal-content section {
  padding: 54px 0;
  border-bottom: 1px solid #DDE3EE;
}

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

.legal-content section h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  color: #16213A;
  margin: 0 0 18px;
  line-height: 1.25;
}

.legal-content section h2 .section-num {
  color: #3B5BDB;
  margin-right: 12px;
  font-weight: 700;
}

.legal-content section h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  color: #16213A;
  margin: 26px 0 12px;
}

.legal-content section p {
  color: #5A6478;
  margin: 0 0 16px;
  font-size: 16px;
}

.legal-content section ul,
.legal-content section ol {
  color: #5A6478;
  margin: 0 0 18px;
  padding-left: 26px;
}

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

.legal-content .back-to-top {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3B5BDB;
}

/* ---------------- Legal footer ---------------- */

.legal-footer {
  background-color: #16213A;
  padding: 46px 0 54px;
}

.legal-footer .container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.legal-footer .footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  display: inline-block;
  margin-bottom: 16px;
}

.legal-footer .footer-brand:hover {
  color: #B9C8F0;
}

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

.legal-footer .footer-links a {
  color: #B9C8F0;
  font-size: 14px;
  font-weight: 600;
}

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

.legal-footer .footer-note {
  color: #8A93A8;
  font-size: 13px;
  margin: 0 0 8px;
}

.legal-footer .footer-note a {
  color: #B9C8F0;
}

/* ---------------- Scope isolation ---------------- */

.legal-page .legal-content section {
  background-color: transparent !important;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 720px) {
  .toc-list {
    grid-template-columns: 1fr;
  }

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

  .legal-content section h2 {
    font-size: 24px;
  }

  .toc {
    padding: 26px 22px;
  }
}
