/* Shared layout for the standalone legal documents. */
.legal-page {
  display: flex;
  flex-direction: column;
}

.legal-header,
.legal-main,
.legal-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-brand img {
  border-radius: 8px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.legal-main {
  flex: 1;
  padding: 24px 24px 48px;
}

.legal-content {
  color: rgba(255,255,255,0.78);
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  color: var(--white);
  font-family: 'Bricolage Grotesque', sans-serif;
  line-height: 1.3;
}

.legal-content h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.legal-content h2 {
  margin: 36px 0 14px;
  font-size: 1.4rem;
  font-weight: 700;
}

.legal-content h3 {
  margin: 24px 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
  margin-bottom: 16px;
}

.legal-content .legal-updated {
  margin-bottom: 32px;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
}

.legal-content li + li {
  margin-top: 8px;
}

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

.legal-content a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.legal-content a:hover,
.legal-back:hover {
  color: var(--white);
}

.legal-page a:focus-visible,
.legal-table:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 3px;
}

.legal-table {
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
}

.legal-table table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.88rem;
  line-height: 1.6;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}

.legal-table p {
  margin: 0;
}

.legal-footer {
  padding: 0 24px 32px;
  color: rgba(255,255,255,0.25);
  font-size: 0.75rem;
  text-align: center;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.legal-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-underline-offset: 4px;
  transition: color 0.25s;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: rgba(255,255,255,0.4);
}

.legal-footer p {
  margin-top: 12px;
}

@media (max-width: 600px) {
  .legal-header {
    padding: 16px 20px;
  }

  .legal-main {
    padding: 20px 20px 32px;
  }

  .legal-content {
    font-size: 0.95rem;
  }

  .legal-footer {
    padding: 0 20px 24px;
  }
}
