/* Shared presentation for the six administrative pages. */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.legal-page h1 {
  margin-bottom: 8px;
  font-size: 32px;
  font-weight: 900;
}

.legal-page .date {
  margin-bottom: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}

.legal-page h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 22px;
  font-weight: 800;
}

.legal-page h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.legal-page p,
.legal-page li {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
}

.legal-page ul {
  padding-left: 20px;
}

.legal-page ul li {
  list-style: disc;
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-page table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}

.legal-page table th,
.legal-page table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 15px;
  text-align: left;
}

.legal-page table th {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
}

.legal-page table td {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
}

.legal-page .highlight-box {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--bg-warm);
}

.legal-page .highlight-box p {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 620px) {
  .legal-page {
    padding: 96px 16px 56px;
  }

  .legal-page h1 {
    font-size: 28px;
    line-height: 1.12;
  }

  .legal-page p,
  .legal-page li {
    font-size: 15px;
    line-height: 1.7;
  }

  .legal-page .highlight-box {
    padding: 14px 16px;
  }

  .legal-page table,
  .legal-page tbody,
  .legal-page tr,
  .legal-page th,
  .legal-page td {
    display: block;
    width: 100%;
  }

  .legal-page table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .legal-page tr {
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .legal-page table th,
  .legal-page table td {
    padding: 10px 12px;
    border: 0;
  }

  .legal-page table th {
    border-bottom: 1px solid var(--border);
  }

  .legal-page table td {
    font-size: 14px;
  }
}

/* These later declarations reproduce the current winning table cascade. */
.legal-page table {
  margin: 22px 0 42px;
  border-collapse: collapse;
  border-spacing: 0;
  border-top: 2px solid rgba(26, 26, 26, 0.18);
  border-bottom: 2px solid rgba(26, 26, 26, 0.18);
  background: transparent;
  box-shadow: none;
}

.legal-page table th,
.legal-page table td {
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  background: transparent;
  box-shadow: none;
  text-align: left;
  vertical-align: top;
}

.legal-page table tr:last-child th,
.legal-page table tr:last-child td {
  border-bottom: 0;
}

.legal-page table th {
  width: 28%;
  min-width: 180px;
  color: var(--text);
  font-weight: 800;
}

.legal-page table td {
  color: var(--text-secondary);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal-page .highlight-box {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  }

  :root:not([data-theme="light"]) .legal-page table {
    border-top-color: rgba(246, 232, 218, 0.22);
    border-bottom-color: rgba(246, 232, 218, 0.22);
  }

  :root:not([data-theme="light"]) .legal-page table th,
  :root:not([data-theme="light"]) .legal-page table td {
    border-bottom-color: rgba(246, 232, 218, 0.14);
    background: transparent;
    box-shadow: none;
  }
}

:root[data-theme="dark"] .legal-page table {
  border-top-color: rgba(246, 232, 218, 0.22);
  border-bottom-color: rgba(246, 232, 218, 0.22);
}

:root[data-theme="dark"] .legal-page table th,
:root[data-theme="dark"] .legal-page table td {
  border-bottom-color: rgba(246, 232, 218, 0.14);
  background: transparent;
  box-shadow: none;
}
