/* ==========================================================================
   LEGAL PAGES (/legal/*.html): terms, privacy, refunds, risk.
   The site's own recipes, built for reading: the frosted bar from .nav.scrolled,
   the brand lockup, a policy switcher in the .seg selected style, one column of
   about 70 characters, hairline section breaks, and gold only on the money
   promise (the refund window).
   ========================================================================== */
.legal { min-height: 100dvh; background: var(--bg); color: var(--text); }

/* the bar */
.legal__bar { position: sticky; top: 0; z-index: var(--z-nav); background: rgba(5, 6, 15, .72); backdrop-filter: blur(18px) saturate(140%); box-shadow: inset 0 -1px 0 var(--edge-soft); }
.legal__bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.legal .logo { gap: 10px; }
.legal .logo__mark { width: auto; height: 40px; margin: -6px 0 -4px; filter: drop-shadow(0 0 10px rgba(242, 199, 92, .22)); }
.legal .logo__word { width: auto; height: 20px; }

/* page */
.legal__main { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: 96px; }
.legal__nav { position: sticky; top: 100px; align-self: start; display: grid; gap: 2px; }
.legal__nav a { display: block; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--text-3); transition: color .2s, background-color .2s; }
.legal__nav a[aria-current="page"] { color: var(--white); background: var(--glass-3); box-shadow: inset 0 1px 1px rgba(216, 236, 248, .2), var(--sh-hair); }
@media (hover: hover) { .legal__nav a:not([aria-current]):hover { color: var(--text-hi); background: var(--glass-2); } }

.legal__doc { max-width: 70ch; }
.legal__doc h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.04; text-wrap: balance; }
.legal__meta { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }
.legal__lede { margin-top: 22px; font-size: 18px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }
.legal__doc h2 { margin-top: 48px; padding-top: 28px; font-size: 22px; font-weight: 500; line-height: 1.25; color: var(--text-hi); box-shadow: inset 0 1px 0 var(--edge-soft); }
.legal__doc h3 { margin-top: 22px; font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--text-hi); }
.legal__doc p, .legal__doc li { font-size: 16px; line-height: 1.72; color: var(--text-2); text-wrap: pretty; }
.legal__doc p { margin-top: 14px; }
.legal__doc ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.legal__doc li { position: relative; padding-left: 24px; }
.legal__doc li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--blueprint); box-shadow: 0 0 0 3px rgba(182, 217, 252, .1); }
.legal__doc strong, .legal__doc b { font-weight: 500; color: var(--text-hi); }
.legal__doc a { color: var(--text-hi); text-decoration: underline; text-decoration-color: var(--edge-strong); text-underline-offset: 3px; }
@media (hover: hover) { .legal__doc a:hover { text-decoration-color: var(--text-hi); } }

/* the promise on the refund page: the one place gold appears, because it is money */
.legal__key { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; margin-top: 32px; padding: 22px 24px; border-radius: var(--r-card); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-edge); }
.legal__key b { grid-row: span 2; font-family: var(--font-dot); font-size: 52px; font-weight: 800; line-height: .9; color: var(--gold-hi); }
.legal__key b small { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .14em; color: var(--text-3); }
.legal__key span { font-size: 17px; font-weight: 500; color: var(--text-hi); }
.legal__key p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.legal__note { margin-top: 32px; padding: 16px 18px; border-radius: var(--r-card); font-size: 14px; line-height: 1.6; color: var(--text-3); background: var(--glass); box-shadow: var(--sh-hair); }

.legal__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 40px; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); box-shadow: inset 0 1px 0 var(--edge-soft); }
.legal__foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legal__foot a { color: var(--text-3); }
@media (hover: hover) { .legal__foot a:hover { color: var(--text-hi); } }

@media (max-width: 860px) {
  .legal__main { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* phones: the policies become a row of pills that scrolls sideways */
  .legal__nav { position: static; display: flex; gap: 6px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; }
  .legal__nav::-webkit-scrollbar { display: none; }
  .legal__nav a { flex: none; padding: 10px 14px; border-radius: var(--r-pill); white-space: nowrap; box-shadow: var(--sh-hair); }
  .legal__bar .btn span { display: none; }
}
@media (max-width: 520px) {
  .legal__doc p, .legal__doc li { font-size: 15.5px; }
  .legal__lede { font-size: 17px; }
  .legal__key { grid-template-columns: minmax(0, 1fr); }
  .legal__key b { grid-row: auto; }
}
