/* ==========================================================================
   Barbell Pocket — the legal pages (Privacy Policy, Consumer Health Data Notice, Terms of Use)
   Concept 01's iron, ivory and editorial type, set for long reading: a
   restrained text column, a quiet contents rail, the rail line as a divider.
   Loaded after concept.css (tokens, nav, footer).
   ========================================================================== */
.legal-page { --reading: #dcd8d0; }
.legal { padding-top: clamp(40px, 7vh, 88px); padding-bottom: clamp(72px, 10vw, 128px); }

.legal-head { max-width: 900px; }
.legal-kicker { margin: 0 0 18px; font-size: 14px; letter-spacing: 0.01em; color: var(--pewter-2); }
.legal-head h1 { font-size: clamp(34px, 4.8vw, 66px); max-width: 13.5em; }
.legal-dates { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 28px 0 0; }
.legal-dates div { display: grid; gap: 2px; }
.legal-dates dt { font-size: 13px; color: var(--pewter-2); }
.legal-dates dd { margin: 0; font-size: 16px; color: var(--ivory); font-variant-numeric: tabular-nums; }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 680px);
  gap: clamp(40px, 6vw, 96px);
  margin-top: clamp(40px, 6vh, 64px);
  padding-top: clamp(32px, 5vh, 48px);
  border-top: 1px solid var(--rail);
  align-items: start;
}

/* contents */
.toc { position: sticky; top: calc(68px + 28px); max-height: calc(100vh - 120px); overflow: auto; font-size: 14px; }
.toc summary { list-style: none; cursor: default; margin-bottom: 14px; font-size: 13px; color: var(--pewter-2); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 0; color: var(--pewter); line-height: 1.35; }
.toc a::before { content: counter(toc) "."; color: var(--pewter-2); font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a[aria-current="true"] { color: var(--ivory); }
.toc a[aria-current="true"]::before { color: var(--blue); }

/* the text */
.legal-body { font-size: 17px; line-height: 1.65; color: var(--reading); min-width: 0; }
.legal-body p { margin: 0 0 16px; }
.legal-intro { padding-bottom: 8px; }
.legal-intro p:first-child { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; color: var(--ivory); }
.legal-body section { scroll-margin-top: 96px; }
.legal-body h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.025em; color: var(--ivory); margin: clamp(56px, 7vw, 80px) 0 20px; padding-top: 24px; border-top: 1px solid var(--iron-3); }
.legal-body h2 .num { color: var(--pewter-2); font-variant-numeric: tabular-nums; margin-right: 6px; }
.legal-body h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.012em; color: var(--ivory); margin: 32px 0 10px; }
.legal-body h2 + h3 { margin-top: 8px; }
.legal-body ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.legal-body li { position: relative; padding-left: 26px; }
.legal-body li::before { content: ""; position: absolute; left: 2px; top: 0.82em; width: 12px; height: 1px; background: var(--pewter-2); }
.legal-body a { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--rail); text-underline-offset: 4px; }
.legal-body a:hover { text-decoration-color: var(--pewter); }
.legal-email { font-weight: 600; }
.legal-email a { text-decoration-color: var(--blue); }
.legal-address { font-style: normal; color: var(--ivory); line-height: 1.6; }
.legal-top { margin-top: clamp(48px, 6vw, 72px) !important; font-size: 14px; }
.legal-top a { color: var(--pewter); display: inline-block; padding: 12px 0; }

/* a single-column legal page (Terms) */
.legal-layout-single { grid-template-columns: minmax(0, 680px); }
.legal-body h2:first-of-type, .legal-body .legal-intro + section h2 { margin-top: clamp(36px, 5vw, 56px); }

@media (max-width: 1023px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--iron-3); border-radius: 14px; background: var(--iron-2); }
  .toc details { padding: 0 18px; }
  .toc summary { cursor: pointer; margin: 0; padding: 16px 0; font-size: 15px; color: var(--ivory); display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
  .toc summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--pewter); border-bottom: 1.5px solid var(--pewter); transform: rotate(45deg) translateY(-3px); transition: transform 200ms ease; }
  .toc details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
  .toc ol { padding-bottom: 14px; }
  .toc a { padding: 10px 0; }
  .legal-body { max-width: 680px; }
}
@media (max-width: 767px) {
  .legal-body { font-size: 16.5px; }
  .legal-body h2 { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .toc summary::after { transition: none; }
}
