:root {
  --legal-ink: #2f241e;
  --legal-muted: #6f6259;
  --legal-saffron: #bd5424;
  --legal-saffron-dark: #843516;
  --legal-gold: #e8b85a;
  --legal-cream: #fbf6ed;
  --legal-line: #e2d5c5;
  --legal-focus: #155f91;
}

.legal-page {
  overflow-x: hidden;
  color: var(--legal-ink);
  background: var(--legal-cream);
  font-family: var(--temple-font-ui, "Inter", "Roboto", Arial, sans-serif);
}

.legal-page main {
  background:
    radial-gradient(circle at 9% 18%, rgba(232, 184, 90, .12), transparent 26rem),
    var(--legal-cream);
}

.legal-page main a:focus-visible {
  outline: 3px solid var(--legal-focus);
  outline-offset: 3px;
}

.legal-breadcrumb {
  padding: 18px 0;
  border-bottom: 1px solid var(--legal-line);
  background: #fff;
}

.legal-breadcrumb .breadcrumb {
  margin: 0;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 8vw, 92px) 0;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(51, 19, 7, .96), rgba(130, 50, 18, .88)),
    url("../images/backgrounds/header-temple-mist-bg.png") center / cover no-repeat;
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -8rem;
  bottom: -14rem;
  width: 31rem;
  height: 31rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255, 255, 255, .035), 0 0 0 8rem rgba(255, 255, 255, .025);
}

.legal-hero .container {
  position: relative;
  z-index: 1;
}

.legal-kicker {
  margin: 0 0 12px;
  color: var(--legal-gold);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0 0 18px;
  color: #fff;
  font-family: var(--temple-font-heading, "Playfair Display", Georgia, serif);
  font-size: clamp(2.45rem, 6vw, 4.7rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.legal-hero__summary {
  max-width: 790px;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.75;
}

.legal-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: .85rem;
}

.legal-review-notice {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid #e6c879;
  color: #5f3b0e;
  background: #fff1c8;
}

.legal-review-notice i {
  margin-top: 4px;
  color: #9a5a0c;
}

.legal-review-notice p {
  margin: 0;
}

.legal-content {
  padding: clamp(42px, 7vw, 82px) 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--dm-site-header-height, 132px) + 24px);
  padding: 24px;
  border: 1px solid var(--legal-line);
  border-radius: 18px;
  background: #fffaf2;
  box-shadow: 0 12px 32px rgba(76, 47, 27, .07);
}

.legal-toc h2 {
  margin: 0 0 14px;
  color: var(--legal-ink);
  font-family: var(--temple-font-heading, "Playfair Display", Georgia, serif);
  font-size: 1.25rem;
}

.legal-toc ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.2rem;
}

.legal-toc a,
.legal-card a {
  color: var(--legal-saffron-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card {
  min-width: 0;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--legal-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(76, 47, 27, .09);
}

.legal-card section + section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid #eee4d8;
}

.legal-card h2 {
  margin: 0 0 13px;
  color: var(--legal-ink);
  font-family: var(--temple-font-heading, "Playfair Display", Georgia, serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.legal-card h3 {
  margin: 22px 0 8px;
  color: var(--legal-ink);
  font-size: 1rem;
}

.legal-card p,
.legal-card li {
  color: var(--legal-muted);
  line-height: 1.75;
}

.legal-card p {
  margin: 0 0 14px;
}

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

.legal-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 15px;
  padding-left: 1.25rem;
}

.legal-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.legal-related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d9a35d;
  border-radius: 999px;
  color: var(--legal-saffron-dark);
  background: #fff8eb;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-related-links a:hover {
  background: #fff0d3;
}

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

  .legal-toc {
    position: static;
  }

  .legal-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 24px;
  }
}

@media (max-width: 575px) {
  .legal-breadcrumb {
    padding: 13px 0;
  }

  .legal-hero {
    padding: 46px 0 50px;
  }

  .legal-hero__meta {
    display: grid;
    gap: 5px;
  }

  .legal-review-notice {
    padding: 13px 15px;
  }

  .legal-card,
  .legal-toc {
    border-radius: 15px;
  }

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