/* ============================================================
   OwnSite — Legal Stylesheet
   Shared styles for privacy.html and terms-of-service.html
   Loaded by legal pages ONLY (not style.css).
   ============================================================ */

:root {
  --mist: #F5F8FB;
  --ink: #1E2A38;
  --slate: #5E7FA3;
  --deep: #2C4257;
  --pale: #DCE6EF;
  --sand: #EDE5D8;
  --line: #D8E2EC;
  --muted: #5A6B7D;
}

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

html {
  scroll-behavior: smooth;
}

/* Legal page body background — MUST be defined here. */
.legal-page {
  background-color: #F5F8FB;
  color: #1E2A38;
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

ol {
  list-style: none;
}

/* ============================================================
   Legal header (a header element with a solid background)
   ============================================================ */

.legal-header {
  background-color: var(--deep);
  border-bottom: 4px solid var(--slate);
  padding: 64px 0 56px;
}

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

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  grid-template-rows: repeat(2, 9px);
  gap: 3px;
}

.brand-mark span {
  width: 9px;
  height: 9px;
  background-color: var(--slate);
}

.brand-mark span:nth-child(1) { border-top-left-radius: 2px; }
.brand-mark span:nth-child(2) { border-top-right-radius: 2px; }
.brand-mark span:nth-child(3) { border-bottom-left-radius: 2px; }
.brand-mark span:nth-child(4) { border-bottom-right-radius: 2px; }

.brand-word {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
}

.legal-header h1 {
  font-size: 40px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.legal-header .header-meta {
  font-size: 15px;
  color: var(--pale);
}

/* ============================================================
   Legal content
   ============================================================ */

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

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

/* Scope isolation — legal content is never polluted by homepage styles. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

/* Table of contents */
.toc {
  background-color: #FFFFFF;
  border: 1px solid var(--line);
  border-left: 4px solid var(--slate);
  border-radius: 10px;
  padding: 26px 28px;
  margin-bottom: 44px;
}

.toc h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.toc ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.toc ol li a {
  font-size: 14px;
  color: var(--deep);
  transition: color 0.2s ease;
}

.toc ol li a:hover {
  color: var(--slate);
}

/* Section content */
.legal-content section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

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

.legal-content section h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  padding-left: 16px;
  border-left: 4px solid var(--slate);
}

.legal-content section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep);
  margin: 22px 0 10px;
}

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

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

.back-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--slate);
  border-bottom: 2px solid var(--slate);
  padding-bottom: 2px;
}

.back-link:hover {
  color: var(--deep);
  border-color: var(--deep);
}

/* ============================================================
   Legal footer
   ============================================================ */

.legal-footer {
  background-color: var(--ink);
  color: var(--pale);
  padding: 32px 0;
}

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

.legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
}

.legal-footer-links {
  display: flex;
  gap: 22px;
}

.legal-footer-links a {
  color: var(--pale);
  font-weight: 600;
  transition: color 0.2s ease;
}

.legal-footer-links a:hover {
  color: var(--slate);
}

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

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

  .toc ol {
    grid-template-columns: 1fr;
  }

  .legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
