/* Legal pages. Owner: legal. Shared by privacy-policy, terms-of-service, acceptable-use, non-custodial-disclosure and
   risk-disclosure. The <main> of each is generated by scratchpad/legal/build2.py from the live site's legal text, word for
   word, so never edit the wording here or in the HTML.
   Plain reading layout: one column of comfortable text on phones (title, the other documents, the intro, a contents list,
   the sections); from 1000px the contents list sits in a sticky column on the left. A small "Top" button appears once you
   are past the contents. */

.lg{--lg-dim:var(--ink-2);--lg-rule:var(--line-soft)}
.lg-w{max-width:1120px;margin:0 auto}

/* ================================================================ header */
.lg-head{padding-bottom:clamp(28px,4vw,44px)}
.lg-kick{font-family:var(--sans);font-weight:500;font-size:14px;line-height:20px;color:var(--blue)}
.lg-h1{margin-top:10px;font-size:clamp(34px,5vw,60px);line-height:1.05;letter-spacing:-.03em;overflow-wrap:break-word}
.lg-upd{margin-top:14px;font-family:var(--sans);font-size:15px;line-height:22px;color:var(--lg-dim)}

/* the five documents: plain links, the open one marked */
.lg-docs{margin-top:clamp(24px,3vw,36px);padding-top:16px;border-top:1px solid var(--lg-rule)}
.lg-docs ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.lg-docs a{display:inline-flex;align-items:center;min-height:38px;padding:7px 13px;border:1px solid var(--line-strong);border-radius:999px;
  font-family:var(--sans);font-size:14px;line-height:20px;color:var(--ink);background:var(--white);-webkit-tap-highlight-color:transparent;
  transition:border-color .15s linear,background-color .15s linear}
.lg-docs a[aria-current=page]{background:var(--ink);border-color:var(--ink);color:var(--paper)}
@media (hover:hover){ .lg-docs a:not([aria-current]):hover{border-color:var(--ink)} }

/* ================================================================ body */
.lg-body{padding-top:clamp(28px,4vw,48px);padding-bottom:clamp(64px,8vw,112px)}
.lg-doc{font-family:var(--sans);font-weight:400;font-size:17px;line-height:1.7;color:var(--ink);overflow-wrap:break-word}
.lg-doc p,.lg-doc ul,.lg-doc address{max-width:68ch}
.lg-doc p+p,.lg-doc p+ul,.lg-doc ul+p,.lg-doc ul+ul,.lg-doc p+address{margin-top:1em}
.lg-doc a{color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

/* contents */
.lg-toc{margin:36px 0 8px}
.lg-toc-in{padding:20px 20px 12px;border:1px solid var(--lg-rule);border-radius:12px;background:var(--white)}
.lg-toc-h{font-family:var(--sans);font-weight:600;font-size:13px;line-height:20px;letter-spacing:.08em;color:var(--lg-dim)}
.lg-toc ol{list-style:none;margin:8px 0 0;padding:0}
.lg-toc li+li{border-top:1px solid var(--lg-rule)}
.lg-toc a{display:flex;gap:12px;align-items:baseline;padding:10px 0;font-size:15px;line-height:22px;color:var(--ink);text-decoration:none;
  -webkit-tap-highlight-color:transparent}
.lg-tn{flex:0 0 1.6em;font-variant-numeric:tabular-nums;color:var(--lg-dim)}
.lg-toc a[aria-current=true] .lg-tt{color:var(--blue)}
.lg-toc a[aria-current=true] .lg-tn{color:var(--blue)}
@media (hover:hover){ .lg-toc a:hover .lg-tt{text-decoration:underline;text-underline-offset:3px} }

/* sections */
.lg-sec{padding-top:40px;scroll-margin-top:calc(var(--bar-h) + var(--nav-h) + 16px)}
.lg-sec+.lg-sec{margin-top:40px;border-top:1px solid var(--lg-rule)}
.lg-sec h2{display:flex;gap:10px;align-items:baseline;margin-bottom:14px;font-family:var(--sans);font-weight:500;font-size:clamp(21px,2vw,24px);
  line-height:1.3;letter-spacing:-.01em;max-width:40ch}
.lg-n{flex:0 0 auto;min-width:1.1em;font-variant-numeric:tabular-nums;color:var(--lg-dim);font-weight:400}
.lg-sec h3{margin:1.8em 0 .5em;font-family:var(--sans);font-weight:600;font-size:17px;line-height:1.4;max-width:68ch}
.lg-sec ul{list-style:none;margin-left:0;padding:0}
.lg-sec ul li{position:relative;padding-left:22px}
.lg-sec ul li+li{margin-top:.35em}
.lg-sec ul li::before{content:"";position:absolute;left:4px;top:.72em;width:6px;height:6px;border-radius:50%;background:var(--lg-dim)}
.lg-sec address{font-style:normal}
.lg-q{margin-top:48px;padding-top:24px;border-top:1px solid var(--lg-rule);color:var(--lg-dim)}
#contents,.lg-sec h2{scroll-margin-top:calc(var(--bar-h) + var(--nav-h) + 16px)}

/* phones: a little tighter so a paragraph is not a wall of air */
@media (max-width:599px){
  .lg-doc{font-size:16.5px;line-height:1.62}
  .lg-docs ul{gap:6px}
  .lg-docs a{font-size:13.5px;min-height:36px;padding:6px 11px}
  .lg-toc{margin-top:28px}
  .lg-toc-in{padding:16px 16px 8px}
  .lg-sec{padding-top:32px}
  .lg-sec+.lg-sec{margin-top:32px}
}

/* wide screens: contents on the left, sticky; the text on the right */
@media (min-width:1000px){
  .lg-doc{display:grid;grid-template-columns:280px minmax(0,1fr);column-gap:clamp(48px,6vw,96px);align-items:start}
  .lg-intro,.lg-text{grid-column:2}
  .lg-toc{grid-column:1;grid-row:1/3;position:sticky;top:calc(var(--bar-h) + var(--nav-h) + 24px);margin:0;
    max-height:calc(100vh - var(--bar-h) - var(--nav-h) - 48px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
  .lg-toc-in{padding:0;border:0;background:none;border-radius:0}
  .lg-toc a{font-size:14px;line-height:20px;padding:7px 0}
  .lg-toc li+li{border-top:0}
  .lg-text>.lg-sec:first-child{margin-top:16px;border-top:1px solid var(--lg-rule)}
}

/* ================================================================ back to top */
.lg-top{position:fixed;z-index:40;right:calc(16px + var(--safe-r));bottom:calc(16px + var(--safe-b));display:inline-flex;align-items:center;gap:6px;
  height:44px;padding:0 16px 0 14px;border-radius:999px;background:var(--ink);color:var(--paper);font-family:var(--sans);font-size:14px;
  font-weight:500;box-shadow:0 4px 16px rgba(14,23,38,.18);opacity:0;visibility:hidden;transform:translateY(8px);
  transition:opacity .2s linear,transform .2s var(--out),visibility 0s .2s;-webkit-tap-highlight-color:transparent}
.lg-top svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.lg-top.on{opacity:1;visibility:visible;transform:none;transition:opacity .2s linear,transform .2s var(--out)}
html:not(.js) .lg-top{display:none}
@media (prefers-reduced-motion:reduce){ .lg-top{transition:none} }

/* ================================================================ print: the document only */
@media print{
  .lg-docs,.lg-toc,.lg-top{display:none!important}
  .lg-doc{display:block;font-size:11pt;line-height:1.5}
  .lg-sec{break-inside:auto;padding-top:16px}
  .lg-sec+.lg-sec{margin-top:16px}
  .lg-sec h2{break-after:avoid}
  .lg-doc a{color:inherit;text-decoration:none}
}

/* ================================================================ legal.html: the hub that lists the five documents */
.lg-hub{list-style:none;margin:0;padding:0;max-width:820px;border-top:1px solid var(--ink)}
.lg-hub li{border-bottom:1px solid var(--lg-rule)}
.lg-hub-a{display:grid;grid-template-columns:minmax(0,1fr) 16px;column-gap:20px;align-items:center;padding:22px 0;color:var(--ink);
  -webkit-tap-highlight-color:transparent}
.lg-hub-t{grid-column:1;font-family:var(--sans);font-weight:400;font-size:clamp(21px,2vw,26px);line-height:1.2;letter-spacing:-.015em}
.lg-hub-d{grid-column:1;margin-top:6px;font-size:16px;line-height:1.5;color:var(--ink-2);text-wrap:pretty}
.lg-hub-u{grid-column:1;margin-top:4px;font-size:14px;line-height:1.4;color:var(--ink-3)}
.lg-hub-x{grid-column:2;grid-row:1/4;width:14px;height:12px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.3;transition:transform .38s var(--out)}
@media (hover:hover){ .lg-hub-a:hover .lg-hub-t{color:var(--blue)} .lg-hub-a:hover .lg-hub-x{color:var(--blue);transform:translateX(3px)} }
.lg-hub-a:focus-visible{outline-offset:2px}
.lg-hub-q{margin-top:28px;max-width:60ch;font-size:15px;line-height:1.55;color:var(--ink-2)}
.lg-hub-q a{color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
@media (max-width:599px){
  .lg-hub-a{padding:18px 0;column-gap:14px}
  .lg-hub-d{font-size:15px}
}
html.reduce .lg-hub-x{transition:none}
