/* Public trust surfaces: legal pages, registration acknowledgement, and compact legal footers. */
.public-legal-footer {
  width: min(calc(100% - 1.25rem), 74rem);
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
  color: rgba(66, 45, 30, 0.66);
  font-family: var(--font-body, Inter, system-ui, sans-serif);
  font-size: 0.76rem;
}

.public-legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(137, 95, 50, 0.2);
}

.public-legal-footer__copyright {
  margin: 0;
}

.public-legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem 0.9rem;
}

.public-legal-footer__links a,
.site-footer__legal-links a,
.auth-legal-consent a,
.legal-document a {
  color: #8d5b18;
  font-weight: 750;
  text-underline-offset: 0.18em;
}

.public-legal-footer__links a:hover,
.public-legal-footer__links a:focus-visible,
.site-footer__legal-links a:hover,
.site-footer__legal-links a:focus-visible,
.auth-legal-consent a:hover,
.auth-legal-consent a:focus-visible,
.legal-document a:hover,
.legal-document a:focus-visible {
  color: #5a3518;
}

.site-footer__legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.85rem;
}

.site-footer__legal-links a {
  color: inherit;
  font-size: inherit;
}

.auth-page .auth-legal-consent {
  max-width: 42rem;
  margin: 0.72rem auto 0;
  color: rgba(68, 46, 29, 0.68);
  font-size: clamp(0.7rem, 1.7vw, 0.78rem);
  line-height: 1.5;
  text-align: center;
}

.auth-page .auth-legal-consent a {
  white-space: nowrap;
}

.legal-page .page-shell {
  min-height: calc(100vh - 5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 50% 4%, rgba(213, 170, 83, 0.11), transparent 28rem),
    var(--kinvella-cream, #fbf5e8);
}

.legal-shell {
  width: min(calc(100% - 1.1rem), 70rem);
  margin: clamp(1rem, 2.8vw, 2rem) auto 0;
  color: #432d20;
}

.legal-hero {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  max-width: 50rem;
  margin-inline: auto;
  padding: clamp(1.3rem, 3.5vw, 2.2rem) clamp(0.85rem, 3vw, 1.7rem) clamp(1.15rem, 3vw, 1.8rem);
  text-align: center;
}

.legal-kicker {
  margin: 0;
  color: #9c681c;
  font: 800 clamp(0.68rem, 1.7vw, 0.8rem)/1.15 var(--font-body, Inter, system-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-kicker span {
  display: inline-block;
  margin-inline: 0.32rem;
  color: #d0a043;
  font-size: 0.58em;
  transform: translateY(-0.08em) rotate(45deg);
}

.legal-hero h1 {
  max-width: 47rem;
  margin: 0;
  color: #352216;
  font-family: "Cormorant Garamond", var(--font-display, Georgia, serif);
  font-size: clamp(2.35rem, 6.8vw, 4.35rem);
  font-weight: 650;
  letter-spacing: -0.038em;
  line-height: 0.98;
}

.legal-lead {
  max-width: 43rem;
  margin: 0.25rem 0 0;
  color: rgba(67, 45, 32, 0.76);
  font-size: clamp(0.85rem, 2vw, 1rem);
  line-height: 1.62;
}

.legal-updated {
  margin: 0.28rem 0 0;
  color: rgba(77, 52, 35, 0.55);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(11.5rem, 14rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
}

.legal-toc {
  position: sticky;
  top: 6.4rem;
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border: 1px solid rgba(130, 87, 44, 0.2);
  border-radius: 1rem;
  background: rgba(255, 252, 244, 0.72);
  box-shadow: 0 0.55rem 1.4rem rgba(75, 46, 24, 0.06);
}

.legal-toc strong {
  margin-bottom: 0.42rem;
  color: #5b3a20;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  padding: 0.4rem 0.48rem;
  border-radius: 0.55rem;
  color: rgba(71, 47, 31, 0.76);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: #5b3518;
  background: rgba(196, 145, 54, 0.1);
  outline: none;
}

.legal-document {
  overflow: hidden;
  border: 1px solid rgba(131, 89, 47, 0.22);
  border-radius: clamp(1rem, 2vw, 1.35rem);
  background:
    radial-gradient(circle at 94% 0%, rgba(214, 174, 92, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(250, 242, 226, 0.88));
  box-shadow: 0 1rem 2.8rem rgba(73, 44, 22, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.legal-section {
  scroll-margin-top: 6.5rem;
  padding: clamp(1.15rem, 3vw, 1.8rem) clamp(1rem, 3.5vw, 2.2rem);
}

.legal-section + .legal-section {
  border-top: 1px solid rgba(137, 94, 48, 0.15);
}

.legal-section h2,
.legal-section h3,
.legal-section p,
.legal-section ul {
  max-width: 52rem;
}

.legal-section h2 {
  margin: 0 0 0.72rem;
  color: #3b2518;
  font-family: "Cormorant Garamond", var(--font-display, Georgia, serif);
  font-size: clamp(1.45rem, 3.3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.05;
}

.legal-section h3 {
  margin: 1rem 0 0.28rem;
  color: #5d3a1e;
  font-size: 0.86rem;
  font-weight: 800;
}

.legal-section p,
.legal-section li {
  color: rgba(64, 43, 29, 0.82);
  font-size: clamp(0.8rem, 1.8vw, 0.92rem);
  line-height: 1.72;
}

.legal-section p {
  margin: 0.55rem 0 0;
}

.legal-section ul:not(.legal-check-list) {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
}

.legal-section li + li {
  margin-top: 0.38rem;
}

.legal-section--callout {
  background:
    radial-gradient(circle at 8% 0%, rgba(228, 194, 120, 0.18), transparent 15rem),
    rgba(250, 239, 216, 0.6);
}

.legal-check-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-check-list li {
  position: relative;
  padding-left: 1.55rem;
}

.legal-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.18rem;
  border: 1px solid rgba(160, 109, 27, 0.3);
  border-radius: 50%;
  color: #9c681c;
  background: rgba(255, 251, 241, 0.82);
  font-size: 0.66rem;
  font-weight: 900;
}

.legal-note {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.9rem;
  padding: 0.82rem 0.95rem;
  border: 1px solid rgba(179, 125, 38, 0.26);
  border-radius: 0.8rem;
  background: rgba(247, 232, 202, 0.48);
}

.legal-note strong {
  color: #5a371c;
  font-size: 0.82rem;
}

.legal-note span {
  color: rgba(67, 45, 29, 0.78);
  font-size: 0.79rem;
  line-height: 1.55;
}

.legal-section--contact {
  background: rgba(249, 239, 218, 0.55);
}

@media (max-width: 760px) {
  .public-legal-footer__inner,
  .public-legal-footer__links {
    justify-content: center;
    text-align: center;
  }

  .public-legal-footer__inner {
    flex-direction: column;
  }

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.7rem;
    scrollbar-width: none;
  }

  .legal-toc::-webkit-scrollbar {
    display: none;
  }

  .legal-toc strong {
    display: none;
  }

  .legal-toc a {
    flex: 0 0 auto;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(141, 94, 45, 0.15);
    background: rgba(255, 252, 244, 0.7);
  }
}

@media (max-width: 430px) {
  .legal-shell {
    width: min(calc(100% - 0.7rem), 70rem);
  }

  .legal-hero {
    padding-inline: 0.55rem;
  }

  .legal-section {
    padding-inline: 0.9rem;
  }
}
