:root {
  color-scheme: light;
  --legal-paper: #f7f4ec;
  --legal-night: #03201a;
  --legal-emerald: #005c3c;
  --legal-ink: #17251f;
  --legal-muted: #52615a;
  --legal-rule: #d6d0c2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.legal-page {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--legal-paper);
  color: var(--legal-ink);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.legal-shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.legal-skip {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--legal-paper);
  color: var(--legal-night);
  font-size: 14px;
  font-weight: 600;
}

.legal-skip:focus { transform: translateY(0); }

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 14px 0;
  background: rgb(3 32 26 / 96%);
}

.legal-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 9px 12px 9px 24px;
  border: 1px solid rgb(233 222 201 / 22%);
  border-radius: 999px;
  background: rgb(3 32 26 / 82%);
  color: var(--legal-paper);
}

.legal-brand { display: inline-flex; flex: none; align-items: center; }
.legal-brand img { display: block; width: 178px; max-width: 100%; height: 36px; }

.legal-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
.legal-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.legal-nav a,
.legal-home-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #e9dec9;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  text-underline-offset: 4px;
}

.legal-nav a { padding: 8px 14px; }
.legal-home-link { gap: 7px; padding: 8px 12px; }
.legal-nav a:hover, .legal-home-link:hover { text-decoration: underline; }
.legal-nav a[aria-current="page"] { background: rgb(233 222 201 / 13%); color: #fff; }

.legal-main { flex: 1; padding: 64px 0 112px; }

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 720px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(48px, 8vw, 112px);
}

.legal-contents {
  position: sticky;
  top: 118px;
  min-width: 0;
  padding: 20px 0 0 20px;
  border-left: 1px solid var(--legal-rule);
}

.legal-contents h2 {
  margin: 0 0 14px;
  color: var(--legal-emerald);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.legal-contents nav { display: grid; gap: 2px; }
.legal-contents a { padding: 5px 0; color: var(--legal-muted); font-size: 14px; line-height: 1.45; text-decoration: none; text-underline-offset: 4px; }
.legal-contents a:hover { color: var(--legal-emerald); text-decoration: underline; }
.legal-mobile-contents { display: none; }

.legal-copy { min-width: 0; width: 100%; max-width: 720px; }
.legal-intro { margin: 0 0 56px; }
.legal-eyebrow { margin: 0 0 14px; color: var(--legal-emerald); font-size: 11px; font-weight: 600; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase; }
.legal-copy h1,
.legal-copy h2 { font-family: "Newsreader", Georgia, serif; font-weight: 400; text-wrap: balance; }
.legal-copy h1 { margin: 0; color: var(--legal-night); font-size: clamp(42px, 5.2vw, 64px); letter-spacing: -.035em; line-height: 1.02; }
.legal-deck { margin: 18px 0 0; color: var(--legal-emerald); font-family: "Newsreader", Georgia, serif; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
.legal-date { margin: 22px 0 0; color: var(--legal-muted); font-size: 13px; line-height: 1.5; }
.legal-lede { margin: 30px 0 0; font-size: 18px; line-height: 1.7; }
.legal-section { padding-top: 34px; scroll-margin-top: 112px; }
.legal-section h2[id] { scroll-margin-top: inherit; }
.legal-section + .legal-section { margin-top: 30px; border-top: 1px solid var(--legal-rule); }
.legal-copy h2 { margin: 0 0 18px; color: var(--legal-night); font-size: clamp(27px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.14; }
.legal-copy p { margin: 0 0 18px; color: #35443c; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-copy p:last-child { margin-bottom: 0; }
.legal-copy .legal-intro > .legal-eyebrow { margin: 0 0 14px; font-size: 11px; line-height: 1.5; }
.legal-copy .legal-intro > .legal-deck { margin: 18px 0 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; }
.legal-copy .legal-intro > .legal-date { margin: 22px 0 0; font-size: 13px; line-height: 1.5; }
.legal-copy .legal-intro > .legal-lede { margin: 30px 0 0; font-size: 18px; line-height: 1.7; }
.legal-copy a { color: var(--legal-emerald); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-copy a:hover { color: var(--legal-night); }

.legal-footer { margin-top: auto; background: var(--legal-night); color: var(--legal-paper); }
.legal-footer-main { display: grid; grid-template-columns: minmax(0, 1fr) 200px 220px; gap: 48px; padding: 64px 0 52px; }
.legal-footer-brand img { display: block; width: 190px; max-width: 100%; height: 42px; }
.legal-footer-brand p { margin: 16px 0 0; color: #e9dec9; font-family: "Newsreader", Georgia, serif; font-size: 21px; line-height: 1.35; }
.legal-footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.legal-footer nav h2 { margin: 0 0 8px; color: #e9dec9; font-size: 11px; font-weight: 600; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase; }
.legal-footer a { color: #e9dec9; font-size: 14px; line-height: 1.5; text-decoration: none; text-underline-offset: 4px; }
.legal-footer a:hover { color: #fff; text-decoration: underline; }
.legal-footer a[aria-current="page"] { color: #fff; text-decoration: underline; }
.legal-footer-bottom { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgb(233 222 201 / 20%); color: #e9dec9; font-size: 13px; }

:where(.legal-page a, .legal-mobile-contents summary):focus-visible { outline: 2px solid #00d66b; outline-offset: 4px; }

@media (max-width: 800px) {
  .legal-shell { width: min(100% - 40px, 720px); }
  .legal-header-inner { align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; }
  .legal-header-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; }
  .legal-nav a { padding-inline: 12px; }
  .legal-main { padding: 48px 0 80px; }
  .legal-section { scroll-margin-top: 210px; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .legal-contents { display: none; }
  .legal-mobile-contents { display: block; margin: 0 0 40px; border-block: 1px solid var(--legal-rule); }
  .legal-mobile-contents summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; color: var(--legal-emerald); font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; list-style: none; }
  .legal-mobile-contents summary::-webkit-details-marker { display: none; }
  .legal-mobile-contents summary::after { content: "+"; color: var(--legal-night); font-size: 20px; font-weight: 400; }
  .legal-mobile-contents[open] summary::after { content: "−"; }
  .legal-mobile-contents nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; padding: 0 0 18px; }
  .legal-mobile-contents nav a { padding: 4px 0; color: var(--legal-muted); font-size: 14px; line-height: 1.45; text-decoration: none; text-underline-offset: 4px; }
  .legal-mobile-contents nav a:hover { color: var(--legal-emerald); text-decoration: underline; }
  .legal-intro { margin-bottom: 40px; }
  .legal-footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .legal-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  body.legal-page { font-size: 16px; }
  .legal-shell { width: calc(100% - 32px); }
  .legal-header { padding: 10px 0; }
  .legal-header-inner { gap: 8px; padding: 14px; }
  .legal-brand img { width: 168px; height: 34px; }
  .legal-header-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .legal-nav { max-width: 100%; }
  .legal-nav a { min-height: 40px; padding-inline: 11px; }
  .legal-home-link { min-height: 40px; }
  .legal-main { padding-top: 38px; }
  .legal-layout { gap: 36px; }
  .legal-mobile-contents nav { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .legal-copy h1 { font-size: clamp(39px, 12vw, 48px); }
  .legal-lede, .legal-copy p { font-size: 16px; }
  .legal-copy .legal-intro > .legal-lede { font-size: 16px; }
  .legal-section { padding-top: 28px; }
  .legal-section + .legal-section { margin-top: 24px; }
  .legal-footer-main { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 48px 0 36px; }
  .legal-footer-brand { grid-column: auto; }
  .legal-footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; padding: 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
