/* Legal utilities follow the existing Evergreen / Mist system.
   Keep disclosures readable and navigation quiet; no additional brand assets. */

/* ---------- Footer and supporting notices ---------- */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  padding: 16px 0;
}

.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.footer-legal a:hover,
.footer-legal a[aria-current="page"] { text-decoration: underline; }

.footer-disclaimer {
  max-width: 95ch;
  padding: 24px 0;
  border-top: 1px solid var(--rule-dark);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-disclaimer p + p { margin-top: 12px; }
.footer-disclaimer a { text-underline-offset: 3px; }
.footer-bottom { border-top: 1px solid var(--rule-dark); }
.footer-bottom > * { min-width: 0; overflow-wrap: anywhere; }

.fund-disclaimer {
  max-width: 95ch;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-light);
  color: var(--muted-light);
  font-size: var(--fs-small);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.fund-disclaimer p + p { margin-top: 12px; }
.fund-disclaimer a,
.form-privacy-note a { text-underline-offset: 3px; }

.form-privacy-note {
  max-width: 74ch;
  color: var(--muted-light);
  font-size: var(--fs-small);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* ---------- Public legal pages ---------- */
body.legal-page {
  background: var(--mist);
  color: var(--evergreen);
}

.legal-header {
  background: var(--evergreen);
  color: var(--mist);
  border-bottom: 1px solid var(--rule-dark);
}

.legal-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  min-height: var(--header-h);
  padding-top: 8px;
  padding-bottom: 8px;
}

.legal-header .logo { min-height: 44px; align-items: center; }
.legal-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.legal-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.legal-header nav a:hover,
.legal-header nav a[aria-current="page"] { text-decoration: underline; }
.legal-language { display: flex; align-items: center; gap: 16px; }
.legal-language a { min-width: 28px; justify-content: center; }

.legal-main {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.legal-heading { max-width: 960px; margin-bottom: clamp(40px, 5vw, 64px); }
.legal-heading .label { margin-bottom: 16px; color: var(--muted-light); }
.legal-heading h1 {
  max-width: 21ch;
  font-size: clamp(2rem, 1.5rem + 2.3vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.028em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.legal-draft-note {
  max-width: 80ch;
  margin-top: 28px;
  padding: 14px 18px;
  border-left: 2px solid var(--fern-shade);
  background: var(--paper);
  color: var(--muted-light);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.legal-layout { display: grid; gap: 36px; align-items: start; }
.legal-layout > * { min-width: 0; }
.legal-toc { border-top: 1px solid var(--rule-light); }
.legal-toc .label { padding-top: 16px; color: var(--muted-light); }
.legal-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: var(--fs-small);
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-toc a:hover { text-decoration: underline; }
.legal-copy { max-width: 74ch; overflow-wrap: anywhere; }
.legal-copy section { scroll-margin-top: 28px; }
.legal-copy section + section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--rule-light); }
.legal-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(1.375rem, 1.2rem + .5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.015em;
  hyphens: auto;
}

.legal-copy h3 { margin: 24px 0 10px; font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.legal-copy p + p { margin-top: 16px; }
.legal-copy a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-copy ul,
.legal-copy ol { margin: 16px 0 16px 1.25em; padding-left: .25em; }
.legal-copy ul { list-style: disc; }
.legal-copy ol { list-style: decimal; }
.legal-copy li + li { margin-top: 8px; }
.legal-copy address { font-style: normal; }
.legal-copy strong { font-weight: 600; }
.legal-copy dl { display: grid; gap: 6px; }
.legal-copy dt { font-weight: 500; }
.legal-copy dd + dt { margin-top: 12px; }
.legal-copy .legal-language-clause {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-light);
  color: var(--muted-light);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.legal-cookie-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 24px; }
.legal-cookie-actions .button { max-width: 100%; padding-top: 12px; padding-bottom: 12px; line-height: 1.5; }
.legal-form-status { margin-top: 16px; color: var(--muted-light); font-size: var(--fs-small); line-height: 1.6; }
.legal-form-status:empty { display: none; }
body.legal-page :focus-visible { outline-color: var(--fern-shade); }
body.legal-page .legal-header :focus-visible,
body.legal-page .site-footer :focus-visible { outline-color: var(--fern-light); }

@media (min-width: 960px) {
  .legal-layout { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }
  .legal-toc { position: sticky; top: 28px; }
}

/* ---------- Professional-investor access ---------- */
html.access-pending { overflow: hidden; }
html.access-pending .site-header,
html.access-pending body > main,
html.access-pending body > .site-footer,
html.access-pending #contact-dialog { visibility: hidden; }
body.access-open { overflow: hidden; }

.access-dialog {
  width: min(900px, calc(100% - 48px));
  max-width: 900px;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--mist);
  color: var(--evergreen);
  overflow: auto;
  overscroll-behavior: contain;
}

.access-dialog::backdrop {
  background: rgba(15, 42, 31, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.access-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 12px clamp(20px, 4vw, 48px);
  background: var(--evergreen);
  color: var(--mist);
}

.access-bar img { width: 116px; height: auto; filter: brightness(0) invert(1); }
.access-bar .logo { min-width: 0; align-items: center; }
.access-language { display: flex; flex-shrink: 0; align-items: center; gap: 4px; }
.access-language button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}

.access-language button:hover { border-color: var(--rule-dark); }
.access-language button[aria-pressed="true"] { border-color: var(--mist); }
.access-body {
  display: grid;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
}

.access-body[hidden] { display: none; }
.access-body .label { color: var(--muted-light); }
.access-body h2 {
  max-width: 25ch;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.access-intro { max-width: 66ch; color: var(--muted-light); }
.access-copy { border-top: 1px solid var(--rule-light); font-size: var(--fs-small); line-height: 1.6; }
.access-copy details { border-bottom: 1px solid var(--rule-light); }
.access-copy summary {
  position: relative;
  min-height: 52px;
  padding: 15px 30px 15px 0;
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.access-copy summary::-webkit-details-marker { display: none; }
.access-copy summary::after { content: "+"; position: absolute; top: 15px; right: 2px; font-size: 1.25rem; font-weight: 400; }
.access-copy details[open] > summary::after { content: "−"; }
.access-copy details > :not(summary) { margin-bottom: 18px; }
.access-copy p + p { margin-top: 12px; }
.access-copy ul,
.access-copy ol { margin-left: 1.25em; padding-left: .25em; }
.access-copy ul { list-style: disc; }
.access-copy ol { list-style: decimal; }
.access-copy li + li { margin-top: 8px; }
.access-copy a { text-underline-offset: 3px; }

.access-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  cursor: pointer;
}

.access-confirmation input[type="checkbox"] {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--evergreen);
  cursor: pointer;
}

.access-confirmation > span { min-width: 0; overflow-wrap: anywhere; }
.access-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.access-actions .button { justify-content: center; max-width: 100%; padding-top: 12px; padding-bottom: 12px; line-height: 1.5; text-align: center; }
.access-actions .button:disabled { border-color: var(--gray-60); background: var(--gray-20); color: var(--muted-light); cursor: not-allowed; }
.access-links { display: flex; flex-wrap: wrap; gap: 0 24px; border-top: 1px solid var(--rule-light); padding-top: 12px; }
.access-links a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 0; font-size: var(--fs-small); line-height: 1.5; text-underline-offset: 3px; overflow-wrap: anywhere; }
.access-error { padding: 12px 16px; border-left: 2px solid var(--evergreen); background: var(--fern-tint); color: var(--evergreen-deep); font-size: var(--fs-small); line-height: 1.6; }
.access-error:empty { display: none; }
.access-dialog :focus-visible,
.access-fallback :focus-visible { outline-color: var(--fern-shade); }
.access-bar :focus-visible { outline-color: var(--fern-light); }

.access-fallback {
  position: fixed;
  inset: 16px 0;
  z-index: 100;
  width: min(900px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px);
  border-top: 2px solid var(--evergreen);
  background: var(--mist);
  color: var(--evergreen);
  overflow: auto;
  overflow-wrap: anywhere;
}

.access-fallback h2 { margin-bottom: 16px; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.access-fallback p + p { margin-top: 16px; }
.access-fallback .access-links { margin-top: 24px; }

@media (max-width: 599px) {
  .legal-header-bar { align-items: flex-start; gap: 4px 16px; }
  .legal-header nav { gap: 0 16px; }
  .legal-header .logo { min-height: 44px; }
  .legal-heading h1 { max-width: 100%; }
  .footer-legal { gap: 0 20px; }
  .footer-bottom { flex-direction: column; }
  .access-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; }
  .access-actions { flex-direction: column; }
  .access-actions .button { width: 100%; }
  .access-links { column-gap: 20px; }
}

@media print {
  .legal-header,
  .legal-toc,
  .legal-page .site-footer,
  .legal-cookie-actions,
  .access-dialog,
  .access-fallback { display: none !important; }
  .legal-main { max-width: none; padding: 0; }
  .legal-heading { margin-bottom: 28px; }
  .legal-layout { display: block; }
  .legal-copy { max-width: none; }
  .legal-copy section { break-inside: avoid; }
}
