/* Electrolyte Med, D: the legal pages (privacy, terms, refunds) and the 404. B3 (the company), 2026-11-05.
   The legal pages read like a printed document: a big title, then each heading in its own margin beside its text
   on a wide screen. The words, the privacy markers and <section class="legal"> are left exactly as they were. */

/* ---- legal pages ---- */
.lg{background:linear-gradient(180deg,var(--pale) 0,#fff clamp(320px,30vw,560px))}
.legal{width:100%;max-width:calc(1180px + 2 * var(--gut));margin:0 auto;padding:clamp(36px,4.6vw,88px) var(--gut) clamp(64px,7vw,128px);font-size:clamp(17px,1.1vw,18.5px);line-height:1.7;color:#22304F}
.legal>*+*{margin-top:1em}
.legal h1{font:800 clamp(44px,5.6vw,124px)/.92 var(--display);letter-spacing:-.045em;color:var(--navy);max-width:8.316em;text-wrap:balance;font-variation-settings:"opsz" 96}
.legal>h1+p,.legal__lede{margin-top:clamp(18px,2vw,32px);padding-bottom:clamp(28px,3vw,48px);border-bottom:2px solid var(--navy);font:500 clamp(19px,1.5vw,26px)/1.45 var(--text);color:var(--mute);max-width:none}
.legal>h1+p+*,.legal__lede+*{margin-top:clamp(28px,3vw,48px)}
.legal h2{margin-top:clamp(36px,3.4vw,56px);font:800 clamp(22px,1.65vw,30px)/1.12 var(--display);letter-spacing:-.02em;color:var(--navy);text-wrap:balance}
.legal h2+*{margin-top:.6em}
.legal h3{margin-top:1.6em;font:800 clamp(19px,1.3vw,22px)/1.2 var(--display);color:var(--navy)}
.legal__n{display:inline-block;min-width:1.5em;color:var(--blue)}
/* widths in em, not ch (= 68ch and 14ch in the real fonts): see the stand-in note at the top of option-d.css */
.legal p,.legal li{max-width:42.901em}
.legal ul,.legal ol{display:grid;gap:.55em}
.legal ul>li{position:relative;padding-left:1.6em}
.legal ul>li::before{content:"";position:absolute;left:.2em;top:.62em;width:.48em;height:.48em;border-radius:50%;background:var(--blue)}
.legal ol{counter-reset:lg}
.legal ol>li{counter-increment:lg;position:relative;padding-left:2em}
.legal ol>li::before{content:counter(lg) ".";position:absolute;left:0;font-weight:800;color:var(--blue-dk)}
.legal a{color:var(--blue-dk);font-weight:600;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px;overflow-wrap:anywhere}
.legal a:hover{color:var(--navy)}
.legal strong,.legal b{color:var(--navy)}
.legal__date{margin-top:clamp(40px,4vw,64px)!important;padding-top:18px;border-top:1px solid var(--line);font:600 14px/1.4 var(--text);color:var(--mute)}
/* the second section on the terms page (the medical disclaimer) sits on its own card */
.legal+.legal{width:calc(100% - 2 * var(--gut));max-width:1180px;margin-bottom:clamp(64px,7vw,128px);padding:clamp(28px,3vw,56px);border-radius:var(--r);background:var(--pale)}
.legal+.legal>h2:first-child{margin-top:0}
.lg>.legal:has(+.legal){padding-bottom:clamp(40px,4vw,72px)}

/* wide screens: each heading in the margin beside its own text */
@media (min-width:1100px){
  .legal{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,42.901em);column-gap:clamp(40px,5vw,96px);justify-content:start;align-items:start}
  .legal>*{grid-column:2}
  .legal>h1,.legal>h1+p,.legal>.legal__lede{grid-column:1/-1}
  .legal>h2{grid-column:1;position:relative;padding-top:8px;margin-top:clamp(36px,3.4vw,56px)}
  .legal>h2+*{margin-top:clamp(36px,3.4vw,56px)}
  .legal>h2::before{content:"";position:absolute;left:0;top:0;width:36px;height:3px;border-radius:3px;background:var(--sky)}
  .legal>h1+p+h2,.legal>.legal__lede+h2,.legal>h1+p+h2+*,.legal>.legal__lede+h2+*{margin-top:clamp(28px,3vw,48px)}
  .legal+.legal>h2:first-child,.legal+.legal>h2:first-child+*{margin-top:0}
  .legal__date{grid-column:2}
}

/* ---- 404 ---- */
.nf{position:relative;overflow:hidden;min-height:min(78svh,900px);background:var(--pale);display:flex;align-items:center}
.nf::before{content:"";position:absolute;right:-12vw;top:50%;width:min(70vw,980px);aspect-ratio:1;border-radius:50%;background:#fff;transform:translateY(-50%)}
.nf::after{content:"";position:absolute;right:calc(min(70vw,980px) - 12vw - 4vw);top:16%;width:clamp(40px,5vw,96px);aspect-ratio:1;border-radius:50%;background:var(--sky)}
.nf__in{position:relative;z-index:1;padding-top:clamp(48px,7vw,140px);padding-bottom:clamp(64px,8vw,160px)}
.nf h1{font:800 clamp(52px,7.4vw,176px)/.9 var(--display);letter-spacing:-.045em;color:var(--navy);max-width:6.534em;text-wrap:balance;font-variation-settings:"opsz" 96}
.nf__home{margin-top:clamp(20px,2vw,32px);font:700 clamp(19px,1.5vw,26px)/1.3 var(--text)}
.nf__home a{display:inline-flex;align-items:center;min-height:44px;color:var(--blue-dk);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.nf__home a:hover{color:var(--navy)}
.nf__go{display:flex;flex-wrap:wrap;gap:10px;margin-top:clamp(20px,2vw,32px);max-width:760px}
.nf__go a{display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 22px;border-radius:999px;border:2px solid var(--line);background:#fff;font:700 16px/1 var(--text);color:var(--navy);text-decoration:none;transition:border-color .2s ease,color .2s ease}
.nf__go a::after{content:"";width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.2 4.8 20.4 12l-7.2 7.2-1.7-1.7 4.3-4.3H3.6v-2.4h12.2l-4.3-4.3z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.2 4.8 20.4 12l-7.2 7.2-1.7-1.7 4.3-4.3H3.6v-2.4h12.2l-4.3-4.3z'/%3E%3C/svg%3E") center/contain no-repeat}
.nf__go a:hover{border-color:var(--blue);color:var(--blue-dk)}
.nf__stk{position:absolute;z-index:1;right:max(var(--gut),calc((100vw - var(--max))/2 + var(--gut)));top:50%;transform:translateY(-50%) rotate(-9deg)}
.nf__stk .nd-stk{--s:clamp(160px,17vw,340px)}
@media (max-width:899px){.nf__stk{display:none}.nf::before{right:-40vw;top:auto;bottom:-30vw;transform:none;width:90vw}.nf::after{display:none}}
@media (prefers-reduced-motion:reduce){.nf__go a{transition:none}}
