/* Launch (my pick). An editorial launch: quiet white reading, and at each Part
   a full-width deep twine panel with very large type and a lilac cord across
   it. Archivo at its widest for the cover and the Parts, Schibsted Grotesk
   for reading. Crisp corners. */

:root{
  --bg:#FFFFFF; --bg-2:#F7F6FA; --bg-3:#ECEAF3; --cover:#FFFFFF;
  --ink:#15131C; --text:#2A2733; --muted:#625E6E; --faint:#8A8697;
  --edge:#E4E2EC; --hair:#EEEDF3; --line:rgba(21,19,28,.15); --dim:rgba(21,19,28,.2);
  --accent:#4B2BD1; --accent-text:#4B2BD1; --accent-soft:rgba(75,43,209,.08); --accent-line:rgba(75,43,209,.45); --on-accent:#FFFFFF;
  --moss:#2E7446; --ochre:#9E5F00; --plum:#9A3A7E; --good:var(--moss); --warn:var(--ochre); --bad:var(--plum);
  --panel:#2B1B78; --panel-ink:#FFFFFF; --panel-cord:#C9BEFF;
  --f-body:'Schibsted Grotesk',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif; --f-ui:var(--f-body);
  --f-display:'Archivo','Schibsted Grotesk',ui-sans-serif,system-ui,sans-serif;
  /* reading type grows with the window: 18px at 1440, 21px at 2560. The
     column reads wide, like a document page (Justin, 4 Oct): about 52em, roughly
     95 to 100 characters a line. */
  --fs:clamp(17px,calc(11.5px + .45vw),21px); --lh:1.72; --measure:52em; --w-head:700; --w-display:800; --wm-weight:800; --wm-track:-.01em;
  --r:6px; --r-sm:4px; --r-pill:6px;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#121019; --bg-2:#1A1724; --bg-3:#242031; --cover:#121019;
  --ink:#F1EFF7; --text:#D9D6E3; --muted:#A29EB2; --faint:#7D798D;
  --edge:rgba(241,239,247,.13); --hair:rgba(241,239,247,.07); --line:rgba(241,239,247,.17); --dim:rgba(241,239,247,.22);
  --accent:#B3A3FF; --accent-text:#C1B4FF; --accent-soft:rgba(179,163,255,.14); --accent-line:rgba(179,163,255,.5); --on-accent:#121019;
  --moss:#7FCB9E; --ochre:#E6B066; --plum:#E39BCF;
  --panel:#2A1A7A;
  --pop-shadow:0 16px 40px -16px rgba(0,0,0,.65);
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#121019; --bg-2:#1A1724; --bg-3:#242031; --cover:#121019;
    --ink:#F1EFF7; --text:#D9D6E3; --muted:#A29EB2; --faint:#7D798D;
    --edge:rgba(241,239,247,.13); --hair:rgba(241,239,247,.07); --line:rgba(241,239,247,.17); --dim:rgba(241,239,247,.22);
    --accent:#B3A3FF; --accent-text:#C1B4FF; --accent-soft:rgba(179,163,255,.14); --accent-line:rgba(179,163,255,.5); --on-accent:#121019;
    --moss:#7FCB9E; --ochre:#E6B066; --plum:#E39BCF;
    --panel:#2A1A7A;
    --pop-shadow:0 16px 40px -16px rgba(0,0,0,.65);
    color-scheme:dark;
  }
}

/* display type: extra wide Archivo. Rules below that use the font shorthand
   reset font-stretch, so they set it again after the shorthand. */
.wm-text,.part-kicker,#paper .part-open h2,.cover-lines p:first-child{font-stretch:125%}
/* the wordmark scales with the cover and always keeps a margin (about 8.2em wide with its mark) */
.wordmark{--wm-em:8.2;font-size:min(200px,9.4cqw,(100cqw - 2 * clamp(18px,4.5cqw,112px) - 24px) / var(--wm-em))}
.wordmark .wm-mark{width:1em}
.cover-lines p:first-child{font-weight:600;letter-spacing:-.01em}
.cover-main{max-width:min(1100px,calc(100% - 40px))}
#paper h2,#paper h3,.endnotes h2,.cite h2{font-stretch:112%;letter-spacing:-.01em}

/* Part openers: plain and in the text column (Justin, 4 Oct). A large
   violet number, the Part title, and its cord. */
.part-open{margin:0 0 2.2em;padding:clamp(56px,12vh,120px) 0 0;min-height:0;justify-content:flex-start;gap:0;background:none;color:inherit}
.part-kicker{order:0;font:var(--w-display) clamp(56px,7vw,120px)/.86 var(--f-display);font-stretch:125%;color:var(--accent);letter-spacing:-.03em}
.part-kicker span{display:none}
#paper .part-open h2{order:1;margin-top:.3em;max-width:22ch;color:var(--ink);font:var(--w-display) clamp(28px,3.6vw,56px)/1.02 var(--f-display);font-stretch:125%;letter-spacing:-.02em;overflow-wrap:break-word}
.part-cord{order:2;height:clamp(48px,7vh,90px);margin-top:clamp(20px,3.5vh,40px)}
#paper > section > .part-open{grid-column:text}
.part{margin-bottom:5em}

/* quiet between the panels: figures sit in the prose (see reader.css) */
.pull p{font-stretch:112%}
.btn.primary:hover{background:var(--accent);border-color:var(--accent)}
@media print{
  .part-open,.part-open .part-cord{--braid-gap:#fff;--accent:#4B2BD1;--dim:rgba(22,24,29,.22)}
  .part-kicker{font-size:40pt!important;color:#4B2BD1!important}
}
