/* ==========================================================================
   HEXIAOLI — shared legal stylesheet (privacy.html and terms-of-service.html)
   Light soft paper theme, deep ink text, olive accents
   ========================================================================== */

:root {
  --paper: #F7F6EF;
  --ink: #2A2B23;
  --olive: #6A6F3C;
  --olive-deep: #555A30;
  --olive-line: #B6B98D;
  --pale: #D9DBB8;
  --mist: #F0F0E2;
  --white: #FFFFFF;
  --line: #D8D8C2;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: var(--olive);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Scope isolation — legal content sections never take a background. */

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

/* ==========================================================================
   LEGAL HEADER — solid olive band, white title (strong contrast)
   ========================================================================== */

.legal-header {
  background: var(--olive);
  border-bottom: 4px solid var(--olive-deep);
}

.legal-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 24px 38px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legal-brand__square {
  width: 18px;
  height: 18px;
  background: var(--white);
}

.legal-brand__word {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--white);
}

.legal-home {
  display: inline-block;
  margin-left: 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pale);
}

.legal-home:hover {
  color: var(--white);
  text-decoration: underline;
}

.legal-header__title {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--white);
  margin-top: 26px;
}

.legal-header__date {
  font-size: 14px;
  font-weight: 600;
  color: var(--pale);
  margin-top: 8px;
}

/* ==========================================================================
   LEGAL RULE — thin divider band with a small olive motif
   ========================================================================== */

.legal-rule {
  border-top: 1px solid var(--olive-line);
  border-bottom: 1px solid var(--olive-line);
}

.legal-rule__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-rule__motif {
  width: 14px;
  height: 12px;
  background: var(--olive);
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
  flex-shrink: 0;
}

.legal-rule__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive);
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.legal-toc {
  background: var(--mist);
  border-bottom: 1px solid var(--olive-line);
}

.legal-toc__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 26px;
}

.legal-toc__title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 6px;
}

.legal-toc a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  padding: 4px 0;
}

.legal-toc a:hover {
  color: var(--olive);
  text-decoration: underline;
}

/* ==========================================================================
   LEGAL CONTENT
   ========================================================================== */

.legal-content {
  background: var(--paper);
}

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

.legal-content section {
  padding: 34px 0;
  border-bottom: 1px solid var(--olive-line);
}

.legal-content section:first-of-type {
  padding-top: 44px;
}

.legal-content h2 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--olive);
  margin-bottom: 16px;
}

.legal-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 14px;
}

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

.legal-backtop {
  padding: 28px 0 44px;
  text-align: center;
}

.legal-backtop a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--olive);
  border-bottom: 2px solid var(--olive-line);
  padding-bottom: 4px;
}

.legal-backtop a:hover {
  border-bottom-color: var(--olive);
  text-decoration: none;
}

/* ==========================================================================
   LEGAL FOOTER — links back to the homepage
   ========================================================================== */

.legal-footer {
  background: var(--paper);
  border-top: 1px solid var(--olive);
}

.legal-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 34px 24px 40px;
  text-align: center;
}

.legal-footer__brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--olive);
  margin-bottom: 8px;
}

.legal-footer__text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 12px;
}

.legal-footer__links {
  font-size: 13px;
}

.legal-footer__links a {
  font-weight: 700;
  color: var(--olive);
}

.legal-footer__links span {
  margin: 0 10px;
  color: var(--olive-line);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 760px) {
  .legal-toc__inner {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .legal-home {
    display: block;
    margin-left: 0;
    margin-top: 14px;
  }
}

@media (max-width: 480px) {
  .legal-toc__inner {
    grid-template-columns: 1fr;
  }

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