/* ============================================================
   QUILL & COMPASS — THE PLAIN PAGES
   /privacy, /terms, /refunds, /contact

   These are the four documents the site is obliged to carry. They are
   deliberately the quietest thing on the whole site: one sheet of cut
   paper, one column, no ornament competing with the text. Somebody
   reading these wants an answer, not a performance.

   Built on tokens.css (the shared palette/type firewall) and decor.css
   (.qc-frame, .qc-frame--cut, .qc-divider). Declares NO colour of its
   own — every value below is a token or an alpha of one. The footer is
   the shared .qc-foot from site-foot.css.

   Load order, on every one of these pages:
     tokens.css -> nav.css -> decor.css -> legal.css -> site-foot.css

   Type rule inherited from tokens.css: --font-display is a heavy
   condensed face with a 1.6rem floor. Only .legal-h1 is above it.
   Every other heading here is --font-body worked hard.
   ============================================================ */

/* The page ground — the same parchment recipe as .lp-hero in landing.css
   and body in styles.css. Deliberately identical values, not an
   approximation: a legal page on a subtly different paper reads as a
   page somebody else wrote. */
body.legal-page{
  margin:0;
  min-height:100%;
  font-family:var(--font-body);
  color:var(--ink-700);
  background-color:var(--paper-300);
  background-image:
    url("./assets/parchment-grain.svg"),
    url("./assets/parchment-grid.svg"),
    radial-gradient(120% 80% at 50% -10%, rgba(216,184,120,0) 40%, rgba(74,51,32,.10) 100%);
  background-size:220px 220px, 128px 128px, cover;
  background-repeat:repeat,repeat,no-repeat;
  background-blend-mode:soft-light,multiply,normal;
}

/* --qnav-space is declared in nav.css: the floating plaque reserves no
   layout space, so a page whose first element is in flow must reserve
   it here or the title slides under the masthead. */
.legal-wrap{
  width:min(52rem,92vw);
  margin-inline:auto;
  padding-top:calc(var(--qnav-space) + clamp(1rem,4vh,2.5rem));
  padding-bottom:clamp(2.5rem,8vh,4.5rem);
}

/* ── The masthead of the document itself ──────────────────────────── */
.legal-head{ margin:0 0 clamp(1.4rem,4vh,2.2rem); }
.legal-eyebrow{
  /* far under the display floor — body at 700, tracked */
  font-family:var(--font-body);font-weight:700;text-transform:uppercase;
  letter-spacing:.42em;font-size:.7rem;color:var(--rubric-deep);
  margin:0 0 .8rem;
}
.legal-h1{
  font-family:var(--font-display);font-weight:600;
  font-size:clamp(2rem,5vw,3.1rem);line-height:1.04;
  color:var(--ink-900);margin:0 0 .7rem;max-width:20ch;
}
.legal-dateline{
  font-size:.86rem;line-height:1.6;color:var(--ink-soft);margin:0;
}
.legal-dateline strong{color:var(--ink-700);font-weight:700}

/* ── The sheet ────────────────────────────────────────────────────── */
.legal-sheet{
  /* .qc-frame + .qc-frame--cut in the markup supply the cut edge, the
     double rule and the press grain. This only sets the measure and
     restarts the clause counter for each document. */
  counter-reset:clause;
  padding:clamp(1.6rem,4vw,2.8rem) clamp(1.3rem,4.5vw,3rem);
}
.legal-sheet > :first-child{ margin-top:0; }
.legal-sheet > :last-child{ margin-bottom:0; }

/* The lede that sits above the numbered clauses — the human summary.
   Every one of these documents opens with one, because a wall of
   clauses with no summary is a document nobody reads. */
.legal-lede{
  font-size:clamp(1rem,1.5vw,1.12rem);line-height:1.62;
  color:var(--ink-900);max-width:var(--measure);
  margin:0 0 1.6rem;
  border-left:2px solid var(--rubric-deep);
  padding-left:clamp(.8rem,2vw,1.15rem);
}
.legal-lede p{margin:0 0 .7rem}
.legal-lede p:last-child{margin-bottom:0}

/* Numbered clauses. */
.legal-h2{
  counter-increment:clause;
  display:grid;grid-template-columns:2.4rem 1fr;gap:.85rem;align-items:baseline;
  /* ~1.24rem — under the display floor, so body at 700 with tracking */
  font-family:var(--font-body);font-weight:700;
  font-size:clamp(1.1rem,2.1vw,1.28rem);line-height:1.25;
  letter-spacing:.012em;color:var(--ink-900);
  margin:2.2rem 0 .75rem;
  padding-top:1.1rem;
  border-top:1px solid rgba(74,51,32,.22);
}
.legal-sheet > .legal-h2:first-of-type{ border-top:0; padding-top:0; }
.legal-h2::before{
  content:counter(clause);
  font-family:var(--font-rubric);font-weight:400;
  font-size:1.5rem;line-height:1;color:var(--rubric-deep);
  text-align:right;
}
/* an unnumbered heading, for the pages that are not a list of clauses */
.legal-h2--plain{ display:block; }
.legal-h2--plain::before{ content:none; }

.legal-h3{
  font-family:var(--font-body);font-weight:700;
  font-size:1.02rem;line-height:1.35;color:var(--ink-900);
  letter-spacing:.01em;margin:1.5rem 0 .45rem;
}

.legal-sheet p,
.legal-sheet li{
  font-size:clamp(.95rem,1.4vw,1.02rem);line-height:1.66;
  color:var(--ink-700);max-width:var(--measure);
}
.legal-sheet p{ margin:0 0 .9rem; }
.legal-sheet strong{ color:var(--ink-900);font-weight:700; }
.legal-sheet em{ font-style:italic; }

/* Lists get the rubricated tick the footer nav uses, not a bullet glyph. */
.legal-list{ list-style:none;margin:0 0 1.1rem;padding:0; }
.legal-list li{
  position:relative;padding-left:1.35rem;margin:0 0 .5rem;
}
.legal-list li::before{
  content:"\203A";position:absolute;left:0;top:-.02em;
  color:var(--rubric-deep);font-weight:700;
}
.legal-list li:last-child{ margin-bottom:0; }

/* Links inside prose: an inked underline, reddening on hover. */
.legal-sheet a{
  color:var(--ink-900);text-decoration:none;
  border-bottom:1px solid rgba(74,51,32,.5);
  transition:color .18s var(--calm),border-color .18s var(--calm);
}
.legal-sheet a:hover{ color:var(--rubric-deep);border-bottom-color:var(--rubric-deep); }
.legal-sheet a:focus-visible{ outline:2px solid var(--rubric-deep);outline-offset:3px; }

/* The contact address, wherever it appears, is set as a struck plate so
   it is the one thing on the page you cannot miss. */
.legal-address{
  display:inline-block;
  font-family:var(--font-body);font-weight:700;
  font-size:clamp(1rem,1.9vw,1.16rem);letter-spacing:.01em;
  background:var(--ink-900);color:var(--paper-100);
  border:1px solid var(--ink-900);border-radius:2px;
  padding:.7rem 1.05rem;margin:.2rem 0 1.1rem;
  text-decoration:none;
  box-shadow:4px 4px 0 rgba(28,19,10,.16);
  transition:background-color .16s var(--snap),border-color .16s var(--snap),
             transform .16s var(--snap),box-shadow .16s var(--snap);
}
/* `.legal-sheet a` above is (0,1,1) and `.legal-address` is only (0,1,0), so the
   prose link colour won and the plate rendered ink-on-ink — a solid black brick
   with the address invisible inside it. Caught on the first screenshot. The
   qualified selector below is (0,2,1) and takes the colour back. */
.legal-sheet a.legal-address{
  color:var(--paper-100);
  border-bottom:1px solid var(--ink-900);
}
.legal-address:hover{
  background:var(--rubric-deep);border-color:var(--rubric-deep);
  transform:translate(-1px,-1px);box-shadow:6px 6px 0 rgba(28,19,10,.16);
}
.legal-sheet a.legal-address:hover{
  color:var(--paper-100);
  border-bottom-color:var(--rubric-deep);
}
.legal-address:focus-visible{ outline:2px solid var(--rubric-deep);outline-offset:3px; }

/* A plain data table — used for "what we hold, and why". Ledger manners,
   borrowed from .lp-compare in landing.css. */
.legal-table-wrap{ overflow-x:auto;margin:0 0 1.2rem;-webkit-overflow-scrolling:touch; }
.legal-table{ width:100%;border-collapse:collapse;min-width:30rem;font-size:.94rem; }
.legal-table th{
  font-family:var(--font-body);text-transform:uppercase;letter-spacing:.14em;
  font-size:.7rem;font-weight:700;color:var(--ink-700);text-align:left;
  padding:.65rem .85rem;border-bottom:1px solid rgba(74,51,32,.35);
}
.legal-table td{
  padding:.8rem .85rem;border-bottom:1px solid rgba(74,51,32,.12);
  color:var(--ink-700);vertical-align:top;line-height:1.5;
}
.legal-table td:first-child{ color:var(--ink-900);font-weight:600; }
.legal-table tr:last-child td{ border-bottom:0; }

/* The sibling documents, listed at the foot of each one. */
.legal-siblings{
  margin:clamp(1.8rem,5vh,2.6rem) 0 0;
  display:flex;flex-wrap:wrap;gap:.5rem .9rem;align-items:center;
  font-size:.86rem;color:var(--ink-soft);
}
.legal-siblings a{
  font-weight:700;color:var(--ink-700);text-decoration:none;
  border-bottom:1px solid rgba(74,51,32,.35);padding-bottom:.1rem;
  transition:color .18s var(--calm),border-color .18s var(--calm);
}
.legal-siblings a:hover{ color:var(--rubric-deep);border-color:var(--rubric-deep); }
.legal-siblings a:focus-visible{ outline:2px solid var(--rubric-deep);outline-offset:3px; }

/* screen-reader-only utility (kin of .qc-vis-hidden in landing.css) */
.qc-vis-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:0}
.skip:focus{left:.6rem;top:.6rem;z-index:99;background:var(--paper-100);color:var(--ink-900);
  border:1px solid var(--ink-500);padding:.5rem .8rem;font-weight:700}

@media (max-width:640px){
  .legal-h2{grid-template-columns:1.8rem 1fr;gap:.6rem}
}
@media (prefers-reduced-motion:reduce){
  .legal-address,.legal-sheet a,.legal-siblings a{transition:none}
}
