/* =====================================================================================================================
   ICEMOON v2 INNER PAGES, GROUP "legal": terms, privacy, refund (body.pg-legal) and the 404 page (body.pg-404)
   ---------------------------------------------------------------------------------------------------------------------
   * Loaded after inner.css by these four pages only; every rule below is scoped to one of the two body classes.
   * Legal: the blog post's reading column, type and rhythm exactly as inner.css sets them. The top is calm: the big
     title (one ice word) and the live "Last updated" line, closed by one quiet line in the tools panel's language: a
     hairline between two corner marks. The same marks close the text above the page's own links, so the clauses sit
     inside one open frame. On wide screens the clause numbers hang in the left margin and every heading starts on the
     text's edge.
   * 404: the live message, big; its two links; one small line drawing in the tools panel (a phone; a swipe leaves its
     screen and ends at an empty ring, nowhere). Every URL on the page is root-relative: it is served for any unknown path.
   ===================================================================================================================== */

/* ---------- legal: the top ---------- */
.pg-legal .doc>.pg-top{padding-bottom:clamp(30px,4.4vh,46px)}
/* this top is short (no picture), so its pool of light is fitted to it: it fades out at the top's lower edge instead of
   being cut there */
.pg-legal .doc>.pg-top::before{top:-14%;height:114%}
/* the quiet line: a hairline between two corner marks (the panel's: 26px long, 2px thick, white .88) */
.pg-legal .lg-rule{--c:rgba(255,255,255,.88);--hl:rgba(255,255,255,.13);--l:26px;--t:2px;
  position:relative;width:min(var(--colw),100%);height:var(--l);margin-top:clamp(44px,6.6vh,72px)}
.pg-legal .lg-rule::before,.pg-legal .doc>.doc-foot::before{content:"";position:absolute;left:0;right:0;height:var(--l);pointer-events:none;background-repeat:no-repeat}
.pg-legal .lg-rule::before{top:0;                                   /* the two marks */
  background-image:linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c));
  background-position:0 0,0 0,100% 0,100% 0;
  background-size:var(--l) var(--t),var(--t) var(--l),var(--l) var(--t),var(--t) var(--l)}
.pg-legal .lg-rule::after{content:"";position:absolute;left:0;right:0;top:.5px;height:1px;background:var(--hl);pointer-events:none}   /* the hairline */
/* once, on load (motion only; the default is the finished line): the hairline runs out from the middle, then the marks settle */
@keyframes lg-line{from{transform:scaleX(0)}to{transform:none}}
@keyframes lg-marks{from{opacity:0}to{opacity:1}}
html.cine .pg-legal .lg-rule{animation:none}
html.cine .pg-legal .lg-rule::after{animation:lg-line 1.05s cubic-bezier(.45,.05,.25,1) .2s both}
html.cine .pg-legal .lg-rule::before{animation:lg-marks .6s ease 1s both}

/* ---------- legal: the end of the text, the same two marks turned up, on the page's own links ---------- */
.pg-legal .doc>.doc-foot{--c:rgba(255,255,255,.88);--hl:rgba(255,255,255,.13);--l:26px;--t:2px;position:relative;border-top:0;padding-top:30px}
.pg-legal .doc>.doc-foot::before{top:calc(var(--t) - var(--l));
  background-image:linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--c),var(--c)),linear-gradient(var(--hl),var(--hl));
  background-position:0 100%,0 100%,100% 100%,100% 100%,0 calc(100% - .5px);
  background-size:var(--l) var(--t),var(--t) var(--l),var(--l) var(--t),var(--t) var(--l),100% 1px}
@media (max-width:599px){ .pg-legal .lg-rule,.pg-legal .doc>.doc-foot{--l:18px} }

/* ---------- legal: the clause numbers (ice); on wide screens they hang in the margin ---------- */
.pg-legal .doc h2 .n{margin-right:.12em;color:var(--ice);font-variant-numeric:tabular-nums}
@media (min-width:1100px){
  .pg-legal .doc h2{position:relative}
  .pg-legal .doc h2 .n{position:absolute;right:calc(100% + .5em);top:0;white-space:nowrap;color:rgba(169,210,255,.62)}
}
/* the meta line keeps to one row on small phones (it is the longest of the inner pages) */
@media (max-width:440px){ .pg-legal .pg-meta{font-size:16px} .pg-legal .pg-meta>*+*::before{margin:0 11px} }
/* below 370px it no longer fits (from 368px on terms and refund, from 358px on privacy) and wrapped with its separator
   dot at the start of the second line: there its two parts stack without the dot, as on /mcp, /devices and the
   comparison pages (final fixes 24.11) */
@media (max-width:369.98px){ .pg-legal .pg-meta{flex-direction:column;gap:2px} .pg-legal .pg-meta>*+*::before{display:none} }

/* =================================================== 404 =================================================== */
/* room under the panel for its glow (it reaches 90px down) to fade out inside the top, which clips; the page is only
   this top, so main adds no padding of its own before the footer */
.pg-404 .doc{padding-bottom:0}
.pg-404 .doc>.pg-top{padding-bottom:clamp(96px,12vh,120px)}
/* phones, and tablets or windows held upright up to 1199px wide (the 12.9-inch iPad is 1024): that room (12vh) and the
   footer's own empty top (20vh, at most 220px) made a third of the screen of dark between the drawing and "Build it
   once."; here the footer's empty top slides 14vh up under this page (never more than 170px, so it stays inside that
   empty top on any tall window), which is drawn over it (so the glow still fades out on the same dark, uncut). The
   footer itself is untouched */
@media (max-width:599px),(max-width:1199px) and (orientation:portrait){ .pg-404 .doc{z-index:3;margin-bottom:calc(-1*min(14vh,170px))} }
.pg-404 .pg-top h1{max-width:10.5em}
.pg-404 .nf-msg{max-width:27em;margin:clamp(16px,2.4vh,26px) auto 0;font-size:var(--fs-lead);line-height:1.45;letter-spacing:-.016em;color:var(--dim);text-wrap:balance}
.pg-404 .actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:clamp(24px,3.6vh,36px)}
/* the drawing: the tools panel, 2:1 (3:2 on phones, cut at the sides); it shrinks on short screens so it stays in view */
.pg-404 .nf-vis{width:min(560px,100%,max(340px,(100svh - 610px)*2))}
.pg-404 .nf-vis .pnl{aspect-ratio:2/1;box-shadow:inset 0 0 0 1px rgba(255,255,255,.075),0 40px 100px -50px rgba(95,157,255,.32)}
.pg-404 .nf-vis .light{left:-22%;right:-22%;top:-24%;bottom:-24%;opacity:.7}
@media (max-width:599px){ .pg-404 .nf-vis{width:100%} .pg-404 .nf-vis .pnl{aspect-ratio:3/2} }
/* a faint map around the phone (it fades out before the ring: the path ends off the map) */
.pg-404 .nf-grid{fill:none;stroke:rgba(233,238,243,.075);stroke-width:1}
.pg-404 .nf-c{fill:none;stroke:var(--lice);stroke-width:1.4;stroke-linecap:round;opacity:.4}
.pg-404 .nf-dots circle{fill:var(--lice)}
.pg-404 .nf-ring{fill:none;stroke:var(--lice);stroke-width:1.6;stroke-dasharray:3.2 5.4;stroke-linecap:round}
.pg-404 .nf-ring2{fill:none;stroke:rgba(233,238,243,.16);stroke-width:1.2;stroke-dasharray:2 7;stroke-linecap:round}
