/* HZN Wellness legal pages (Terms of Use, Privacy Policy, Medical Disclaimer, Accessibility),
   direction B, loaded by those pages only. The type-on-paper hero's breadcrumb and title size,
   then the document: a draft note, a rail (the document's dates as a ruled ledger and, on the
   longer pages, an "On this page" list that stays in view on desktop, js/pages/legal.js) beside
   the text, set for reading: a 66-character measure, hairlines between sections, plain callouts.
   The text ends on a horizon rule with the ember sun dot, a contact ledger and the other policies. */

/* ── Hero ── */
.breadcrumb { align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; color: var(--stone); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .2s ease; }
.breadcrumb a:hover { color: var(--ember-dark); }
.legal-hero .ph-title { font-size: clamp(42px, 5.2vw, 78px); line-height: 1.02; max-width: 15ch; }

/* ── Document frame ── */
.legal { padding-top: clamp(48px, 6vw, 88px); }
.legal > .note { max-width: 66ch; margin-bottom: clamp(36px, 4.5vw, 56px); }
.legal-grid { display: grid; gap: 40px; }
.legal-rail { display: grid; gap: 28px; align-content: start; min-width: 0; }

/* ── Document facts ledger ── */
.legal-meta { margin: 0; border-top: 1px solid var(--ink); }
.legal-meta div { display: grid; grid-template-columns: 124px 1fr; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.legal-meta dt { font-size: 14px; font-weight: 600; color: var(--stone); }
.legal-meta dd { margin: 0; font-size: 16.5px; line-height: 1.5; }

/* ── On this page: a vertical line with a dot per section, the one being read lit in ember ── */
.legal-toc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 52px; font-size: 16.5px; font-weight: 600; border-bottom: 1px solid var(--rule); transition: color .2s ease; }
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc summary:hover { color: var(--ember-dark); }
.legal-toc summary .faq-icon { width: 32px; height: 32px; }
.legal-toc ol { list-style: none; margin: 10px 0 0; padding: 0; }
.legal-toc a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 6px 0; font-size: 16px; line-height: 1.35;
  color: var(--stone); transition: color .2s ease; }
.legal-toc a:hover { color: var(--ink); }
.legal-toc a[aria-current] { color: var(--ink); font-weight: 500; }

/* ── The text, set for reading ── */
.legal-prose { min-width: 0; max-width: 66ch; }
.legal-prose p, .legal-prose ul, .legal-prose ol { font-size: 17.5px; line-height: 1.78; color: #363A41; margin: 0 0 20px; }
.legal-prose h2 { font-family: Newsreader, Georgia, serif; font-weight: 300; font-size: clamp(28px, 2.5vw, 35px); line-height: 1.15;
  letter-spacing: -0.02em; color: var(--ink); margin: 60px 0 18px; padding-top: 28px; border-top: 1px solid var(--rule); }
.legal-prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-prose h3 { font-size: 18px; font-weight: 600; margin: 32px 0 10px; }
.legal-prose h2, .legal-prose h3 { scroll-margin-top: calc(var(--hdr) + 28px); }
.legal-prose strong { color: var(--ink); font-weight: 600; }
.legal-prose a { overflow-wrap: anywhere; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(22, 26, 34, .45); transition: color .2s ease, text-decoration-color .2s ease; }
.legal-prose a:hover { color: var(--ember-dark); text-decoration-color: currentColor; }
.legal-prose ul { list-style: none; padding-left: 0; }
.legal-prose ul > li { position: relative; padding-left: 26px; }
.legal-prose ul > li::before { content: ""; position: absolute; left: 0; top: .85em; width: 12px; height: 2px; background: var(--ember-dark); }
.legal-prose ol { list-style: decimal; padding-left: 22px; }
.legal-prose li { margin: 8px 0; padding-left: 4px; }
.legal-prose li::marker { color: var(--ember-dark); }

/* A plain summary or warning set apart from the running text */
.legal-callout { margin: 0 0 44px; padding: 26px clamp(22px, 3vw, 34px) 26px; background: var(--cream);
  border-top: 1px solid var(--ink); border-radius: 0 0 var(--r) var(--r); }
.legal-prose .legal-callout h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: clamp(26px, 2.3vw, 32px); }
.legal-callout ul { margin-bottom: 14px; }
.legal-callout > :last-child { margin-bottom: 0; }
.legal-callout-alert { position: relative; border-top: 2px solid var(--ember); }

/* ── Sign-off: the horizon with the sun sitting on it ── */
.legal-sign { position: relative; margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--ink); }
.legal-prose .legal-sign h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-contact { margin: 0 0 28px; border-top: 1px solid var(--ink); }
.legal-contact div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.legal-contact dt { font-size: 14px; font-weight: 600; color: var(--stone); }
.legal-contact dd { margin: 0; color: var(--ink); }
.legal-prose .legal-others { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.legal-prose .legal-others li { margin: 0; padding: 0; }
.legal-prose .legal-others a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16.5px; font-weight: 500; color: var(--ink);
  text-underline-offset: 5px; text-decoration-color: currentColor; }
.legal-prose .legal-others a:hover { color: var(--ember-dark); }
.legal-prose .legal-others-label { font-size: 14px; font-weight: 600; color: var(--stone); margin-bottom: 4px; }

@media (min-width: 640px) {
  .legal-contact div { grid-template-columns: 170px 1fr; gap: 20px; align-items: baseline; }
}

/* ── Desktop: the rail sits beside the text and stays in view ── */
@media (min-width: 1024px) {
  .legal-grid { grid-template-columns: 250px minmax(0, 1fr); column-gap: clamp(56px, 7vw, 112px); }
  .legal > .note { margin-left: calc(250px + clamp(56px, 7vw, 112px)); }
  .legal-rail { display: block; }
  .legal-rail > * + * { margin-top: 36px; }
  .legal-rail > :last-child { position: sticky; top: calc(var(--hdr) + 32px);
    max-height: calc(100vh - var(--hdr) - 56px); overflow-y: auto; padding: 0 6px 8px 0; }
  .legal-meta div { grid-template-columns: 1fr; gap: 0; padding: 10px 0; }
  .legal-toc summary { cursor: default; min-height: 44px; }
  .legal-toc summary:hover { color: inherit; }
  .legal-toc summary .faq-icon { display: none; }
}
@media (min-width: 1024px) and (pointer: fine) {
  .legal-toc a { min-height: 34px; padding: 4px 0; }
  }
@media (max-width: 639px) { .legal-prose p, .legal-prose ul, .legal-prose ol { font-size: 17px; line-height: 1.72; } }
