.legal {
  padding: clamp(7rem, 10vw, 10rem) var(--space-section-x) 5rem;
  background: var(--color-cream);
}

.legal__inner {
  max-width: 48rem;
  margin-inline: auto;
}

.legal--centered {
  text-align: center;
}

.legal--centered .legal__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.legal h1 {
  margin-top: 1rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.2;
}

.legal__updated {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--stone-500);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
}

.legal p {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--stone-700);
}

.legal ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--stone-700);
}

.legal a {
  color: var(--stone-900);
  text-decoration: underline;
}

.legal__table {
  margin-top: 1.5rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal__table th,
.legal__table td {
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--stone-300);
  vertical-align: top;
}

.legal__table th {
  background: var(--stone-100);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

@media (max-width: 40rem) {
  .legal__table {
    display: block;
    overflow-x: auto;
  }
}

/* Evening theme: the base rules above hard-code light-theme text colors,
   which stay dim against the dark navy background unless overridden here. */
[data-theme="evening"] .legal__updated {
  color: rgba(229, 224, 216, 0.7);
}

[data-theme="evening"] .legal p,
[data-theme="evening"] .legal li {
  color: var(--color-navy-text);
}

[data-theme="evening"] .legal a {
  color: var(--color-gold);
}

[data-theme="evening"] .legal__table th,
[data-theme="evening"] .legal__table td {
  border-color: rgba(229, 224, 216, 0.25);
  color: var(--color-navy-text);
}

[data-theme="evening"] .legal__table th {
  background: rgba(229, 224, 216, 0.08);
}
