@import url("/forma.css");

/* The research front's one stylesheet: the house tokens, the shelf, a paper's
   cover, and the in-browser reader. Every research page links this file and
   nothing else — the edge's CSP refuses inline style on this path
   (see _headers), so a rule that lives here is a rule the browser can see.

   The palette is the report's own: black board, paper ink, lime foil, named
   once in Forma (/forma.css) and aliased here. A paper's cover is a rendered
   image in these same tokens, so the cover and the page cannot drift apart. */

@font-face{font-family:'OF Inter Tight';font-style:normal;font-weight:800;font-display:swap;src:url("/fonts/of-inter-tight-800.woff2") format("woff2")}
@font-face{font-family:'OF Inter';font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/of-inter-400.woff2") format("woff2")}
@font-face{font-family:'Source Serif';font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/SourceSerif4-var.woff2") format("woff2")}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/JetBrainsMono-var.woff2") format("woff2")}

:root{color-scheme:dark;
  --of-ink:var(--forma-ink);--of-ink-2:var(--forma-panel);--of-paper:var(--forma-paper);
  --of-paper-2:var(--forma-paper-2);--of-paper-3:var(--forma-paper-3);
  --of-lime:var(--forma-lime);
  --of-line:var(--forma-line);--of-line-2:var(--forma-line-soft);
  --of-disp:var(--forma-display);--of-text:var(--forma-text);--of-mono:var(--forma-mono)}

*{box-sizing:border-box}
html{background:var(--of-ink);-webkit-text-size-adjust:100%}
body{margin:0;color:var(--of-paper);font-family:var(--of-text);font-size:1.0625rem;line-height:1.62;background:var(--of-ink);overflow-x:clip}
a{color:var(--of-lime);text-decoration:none;border-bottom:1px solid rgba(250,255,105,.5)}
a:hover{color:var(--of-paper)}
:focus-visible{outline:2px solid var(--of-lime);outline-offset:3px}
/* the site's one content grid: 1200, the front's measure and the shelf's */
.wrap{width:min(1200px,92vw);margin-inline:auto}
.skip{position:absolute;left:-9999px;top:0;z-index:90;padding:10px 16px;background:var(--of-lime);color:var(--of-ink);font-family:var(--of-mono);font-size:0.6875rem;border:0}
.skip:focus{left:12px;top:12px}

/* The header is the foundation mark and nothing else (functional requirement
   R3): the same mark on every page, a link home everywhere but the landing. */
.top{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0 12px;border-bottom:1px solid var(--of-line);position:sticky;top:0;z-index:40}
.top::before{content:"";position:absolute;left:50%;transform:translateX(-50%);top:0;bottom:0;width:100vw;background:rgba(21,21,19,.94);background-clip:padding-box;backdrop-filter:blur(12px);z-index:-1}
.mark{display:inline-flex;align-items:center;gap:11px;border:0;color:var(--of-paper)}
.mark img,.mark svg{width:27px;height:27px;flex:none;display:block}
.mark b{font-family:var(--of-disp);font-weight:800;font-size:1.1875rem;letter-spacing:-.02em;line-height:1}

main{padding:clamp(20px,3vh,34px) 0 0}
.kick{font-family:var(--of-mono);font-size:0.5938rem;letter-spacing:.24em;text-transform:uppercase;color:var(--of-paper-3);margin:0 0 16px}
h1{font-family:var(--of-disp);font-weight:800;letter-spacing:-.035em;line-height:1.02;margin:0}
.dek{font-family:var(--of-text);font-size:clamp(1.0312rem,1.25vw,1.1562rem);line-height:1.55;color:var(--of-paper-2);margin:14px 0 0;max-width:62ch;text-wrap:pretty}
.flag{display:inline-block;margin-left:10px;padding:2px 7px;border:1px solid var(--of-line);font-family:var(--of-mono);font-size:0.5625rem;letter-spacing:.22em;color:var(--of-paper-2);vertical-align:1px}

/* ---- the shelf -------------------------------------------------------- */

.shelf-head{padding-bottom:clamp(18px,3vh,26px);border-bottom:1px solid var(--of-line)}
.shelf-head h1{font-size:clamp(2.125rem,4.6vw,3.5rem)}
.papers{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--of-line);border:1px solid var(--of-line);border-top:0}
.paper{background:var(--of-ink);padding:clamp(22px,3vw,34px);display:flex;flex-direction:column;gap:12px}
.paper__tag{font-family:var(--of-mono);font-size:0.5625rem;letter-spacing:.24em;text-transform:uppercase;color:var(--of-paper-3);margin:0}
.paper__title{font-family:var(--of-disp);font-weight:800;font-size:clamp(1.5rem,2.4vw,1.9375rem);line-height:1.05;letter-spacing:-.025em;margin:0}
.paper__title a{border:0;color:var(--of-paper)}
.paper__title a:hover{color:var(--of-lime)}
.paper__finding{font-size:0.9688rem;line-height:1.55;color:var(--of-paper-2);margin:0;max-width:58ch}
.paper__finding b{font-family:var(--of-disp);font-weight:800;font-size:1.3125rem;letter-spacing:-.02em;color:var(--of-paper);margin-right:3px}
.paper__meta{font-family:var(--of-mono);font-size:0.5625rem;letter-spacing:.17em;text-transform:uppercase;color:var(--of-paper-3);margin:0}
.paper__doors{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:auto;padding-top:6px}
.door{display:inline-flex;align-items:center;justify-content:space-between;gap:26px;min-height:44px;padding:0 14px 0 18px;background:var(--of-paper);color:var(--of-ink);border:0;font-family:var(--of-mono);font-size:0.5938rem;letter-spacing:.2em;text-transform:uppercase;transition:background .18s ease}
.door:hover{background:var(--of-lime);color:var(--of-ink)}
.door span{font-family:var(--of-ui,"OF Inter"),system-ui,sans-serif;font-size:0.9375rem;line-height:1}
.web{font-family:var(--of-mono);font-size:0.5938rem;letter-spacing:.16em;text-transform:uppercase;color:var(--of-paper-3);border-bottom:1px solid var(--of-line);padding-bottom:3px;transition:color .16s ease,border-color .16s ease}
.web:hover{color:var(--of-paper);border-bottom-color:var(--of-paper)}
@media (max-width:700px){.papers{grid-template-columns:minmax(0,1fr)}}

/* The three volumes the shelf leads with. They take the full measure and the
   display line steps up a size: the card vocabulary, one grade louder. */
.paper--lead{grid-column:1/-1}
.paper--lead .paper__title{font-size:clamp(1.75rem,3.2vw,2.625rem);max-width:26ch}
.paper--lead .paper__finding{max-width:var(--forma-measure-wide);font-size:1.0312rem}
.paper--lead .paper__tag{color:var(--of-lime)}

/* ---- a paper's cover -------------------------------------------------- */

.cover{display:grid;grid-template-columns:minmax(0,420px) minmax(0,560px);justify-content:space-between;align-items:center;gap:clamp(30px,5vw,72px);padding:clamp(8px,2.2vh,24px) 0 clamp(10px,1.6vh,20px)}
.cover__lede{max-width:420px}
.cover__lede .sub{font-family:var(--of-text);font-size:1.0625rem;line-height:1.45;color:var(--of-paper-3);margin:8px 0 0}
.cover__lede h1{font-size:clamp(2.0625rem,2.8vw,2.375rem);max-width:22ch;margin-top:clamp(16px,2.6vh,24px)}
.cover__lede .dek{max-width:38ch}
.finding{border-top:1px solid var(--of-line);margin-top:clamp(22px,3.2vh,30px);padding-top:14px;font-size:0.9688rem;line-height:1.55;color:var(--of-paper-2);max-width:42ch}
.finding b{font-family:var(--of-disp);font-weight:800;font-size:1.3125rem;letter-spacing:-.02em;color:var(--of-paper);margin-right:3px}
.doors{margin-top:clamp(22px,3.2vh,30px);display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.doors .door{width:min(100%,282px)}
.meta{margin-top:clamp(16px,2.4vh,22px);font-family:var(--of-mono);font-size:0.5625rem;letter-spacing:.17em;text-transform:uppercase;color:var(--of-paper-3);margin-bottom:0}
.object{margin:0;width:100%;max-width:560px;justify-self:end;align-self:start}
.board{width:100%}
.object img,.board img{display:block;width:100%;height:auto}

@media (max-width:1040px){
  .cover{grid-template-columns:minmax(0,1fr);justify-items:center;gap:clamp(24px,4vh,38px);padding-top:22px}
  .object{order:-1;max-width:640px;justify-self:center}
  /* the head keeps the reader's left edge: a centred 600px column sat 53 to
     160px off the column under it, a survivor of the retired cover grid */
  .cover__lede{max-width:100%;justify-self:stretch}
  .cover__lede h1{max-width:20ch}
}
@media (max-width:600px){
  .top{padding:17px 0 13px}
  .cover{gap:24px;padding:8px 0 26px}
  .board{width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
  .object{width:100vw;max-width:100vw}
  .cover__lede{max-width:100%}
  .cover__lede h1{font-size:clamp(1.8125rem,7.8vw,2.125rem);max-width:none}
  .cover__lede .dek{max-width:42ch}
  .door{width:100%}
}

/* ---- the reader ------------------------------------------------------- */

.layout{display:grid;grid-template-columns:minmax(320px,380px) minmax(0,1fr);gap:clamp(28px,4vw,56px);align-items:start}
.reader-head{padding-bottom:0;border-bottom:1px solid var(--of-line)}
.reader-head h1{font-size:clamp(1.875rem,3.4vw,2.75rem)}
.reader-head .kick{margin-bottom:12px}
.reader-head .meta{display:grid;gap:6px;justify-items:start}
.viewer-slot{margin-top:0}
pdf-viewer{
  --pv-bg:#101010;
  --pv-stage-bg:#0d0d0c;
  --pv-page-bg:#f4f4ef;
  --pv-ink:#f4f4ef;
  --pv-ink-dim:rgba(244,244,239,.72);
  --pv-accent:#faff69;
  --pv-accent-hi:#f4f4ef;
  --pv-focus:#faff69;
  --pv-line:rgba(244,244,239,.14);
  --pv-line-soft:rgba(244,244,239,.08);
  --pv-font-ui:"JetBrains Mono",ui-monospace,monospace;
  --pv-stage-h:min(calc(100dvh - 210px),820px);
  --pv-stage-h-mobile:calc(100dvh - 240px);
  --pv-stage-min-h:440px;
  --pv-stage-min-h-mobile:380px;
}
.about{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1px;background:var(--of-line);border:1px solid var(--of-line);margin-top:clamp(28px,4vh,40px)}
.about div{background:var(--of-ink-2);padding:clamp(18px,2.6vw,26px)}
.about h2{font-family:var(--of-mono);font-size:0.625rem;letter-spacing:.2em;text-transform:uppercase;color:var(--of-lime);font-weight:400;margin:0 0 8px}
.about p{font-size:0.9688rem;line-height:1.6;color:var(--of-paper-2);margin:0}
.noscript{padding:20px}
@media (max-width:1100px){
  .layout{display:flex;flex-direction:column}
  .layout .viewer-slot{order:-1;margin-top:0}
  .layout .reader-head{order:1;margin-top:clamp(22px,4vh,34px)}
  /* Stacked, the stage sits above the head, so its cap leaves the headline on
     the first screen of a tablet held upright: the reader's half of the
     viewport, never the whole of it. */
  pdf-viewer{--pv-stage-h:clamp(320px,50dvh,820px)}
}
@media (max-width:700px){.about{grid-template-columns:1fr}}
@media (max-width:700px){body{font-size:1rem}}

/* ---- a prose page ----------------------------------------------------- */

.prose{max-width:64ch;padding-top:clamp(22px,4vh,36px)}
.prose p{margin:0 0 1.15em;color:var(--of-paper-2)}
/* the kicker inside a prose page is a paragraph, so the prose rhythm must not
   eat the kicker's own 16px lead */
.prose p.kick{margin:0 0 16px;color:var(--of-paper-3)}
.prose p strong{color:var(--of-paper);font-weight:400}
.prose h2{font-family:var(--of-disp);font-weight:800;font-size:clamp(1.375rem,2.2vw,1.75rem);letter-spacing:-.025em;line-height:1.1;margin:clamp(30px,5vh,44px) 0 14px;color:var(--of-paper)}
.prose .prose__close{color:var(--of-paper);font-size:clamp(1.0625rem,1.4vw,1.1875rem);margin-top:clamp(26px,4vh,36px)}
.prose .prose__close strong{color:var(--of-paper)}

/* ---- the shared foot -------------------------------------------------- */

footer.foot{margin-top:clamp(34px,6vh,60px);padding:26px 0 34px}
.foot__meta{border-top:1px solid var(--of-line);padding-top:14px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 26px;font-family:var(--of-mono);font-size:0.5625rem;letter-spacing:.12em;text-transform:uppercase;color:var(--of-paper-3);margin:0}
.foot__meta a{border-bottom:1px solid var(--of-line)}.foot__meta .foot__brand,.foot__meta .foot__vol{white-space:nowrap}
/* The brand line repeats the page title two screens up, so it leaves at the
   width below which it can no longer sit on one row beside the volume and the
   record: without this the record orphans onto a second row from 621 to 760. */
@media (max-width:780px){.foot__meta .foot__brand{display:none}}

/* the door links and the meta row are touch targets, not captions */
.doors .web{display:inline-block;min-height:44px;padding:12px 0;box-sizing:border-box}
.meta a{display:inline-block;min-height:44px;padding:12px 0;box-sizing:border-box}

/* On a phone the foot keeps the volume and the way to the record and wraps
   them onto the rows they need; the brand line is the page's title three
   inches up, so it leaves at this width. */
@media (max-width:620px){
  .foot__meta{flex-wrap:wrap;gap:4px 14px;font-size:0.5rem;letter-spacing:.08em}
}

/* The production note: what a page costs to set. Sits above the foot, quiet. */
.production{border-top:1px solid var(--of-line);margin-top:clamp(30px,5vh,52px);padding:26px 0 6px}
.production h2{font-family:var(--of-mono);font-size:0.5938rem;font-weight:400;letter-spacing:.16em;text-transform:uppercase;color:var(--of-paper-3);margin:0 0 12px}
.production p{margin:0 0 10px;max-width:62ch;font-size:0.8438rem;line-height:1.62;color:var(--of-paper-2)}
.production strong{color:var(--of-paper);font-weight:400}
.production .production__close{color:var(--of-paper-3);font-size:0.7812rem}
.production a{color:var(--of-lime);border-bottom:1px solid var(--of-line);text-decoration:none}

/* The thin sticky footer: the site's terms, always in view. */
.trustbar{position:fixed;left:0;right:0;bottom:0;z-index:50;padding:9px max(16px,calc((100vw - min(1200px,92vw)) / 2));padding-left:max(16px,calc((100vw - min(1200px,92vw)) / 2),env(safe-area-inset-left,0px));padding-right:max(16px,calc((100vw - min(1200px,92vw)) / 2),env(safe-area-inset-right,0px));padding-bottom:calc(9px + env(safe-area-inset-bottom,0px));background:rgba(21,21,19,.94);border-top:1px solid var(--of-line);backdrop-filter:blur(12px)}
.trustbar p{margin:0;font-family:var(--of-mono);font-size:0.5938rem;letter-spacing:.13em;text-transform:uppercase;line-height:1.5;color:var(--of-paper-3);text-align:center}
.trustbar strong{color:var(--of-lime);font-weight:400}
.trustbar a{color:var(--of-paper-2);border-bottom:1px solid var(--of-line);text-transform:none;letter-spacing:.04em;margin-left:.6em}
html{scroll-padding-top:78px}
body{padding-bottom:2.0625rem}
@media (max-width:620px){.trustbar p{font-size:0.5312rem;letter-spacing:.09em}}

/* Print — white ground, ink text. The tokens are overridden once here; the
   translucent steps print 2.04:1 and 3.96:1 on white and the lime 1.07:1, so
   what a token cannot carry is set below. The sticky header and the fixed
   trust bar print once, at the head of the sheet. */
@media print {
  :root {
    color-scheme: light;
    --of-ink: #ffffff;
    --of-ink-2: #ffffff;
    --of-paper: #1a1a18;
    --of-paper-2: #333331;
    --of-paper-3: #4a4a46;
    --of-lime: #3f4400;
    --of-line: #9a9a94;
    --of-line-2: #c8c8c2;
  }
  html,body{background:#ffffff;color:#1a1a18;overflow-x:visible}
  body{padding-bottom:0;font-size:10.5pt}
  a{color:inherit;border-bottom-color:#b4b4ae}
  a[href^="http"]::after{content:" (" attr(href) ")";font-family:var(--of-mono);font-size:0.86em}
  .top,.trustbar,.skip{display:none}
  .top::before{display:none}
  main{padding-top:0}
  /* the reader is a control: its stage is a raster of the ink this sheet has
     just left, and its buttons are dead paper */
  .viewer-slot,.about{display:none}
  .layout{display:block}
  .reader-head{border-bottom-color:#9a9a94}
  .meta a,.doors .web{min-height:0;padding:0}
  /* a door on paper is the address it opens */
  .door{background:#ffffff;color:#1a1a18;border:1px solid #9a9a94;min-height:0}
  .door span{display:none}
  .door::after{content:" (" attr(href) ")"}
  .web{color:#3f4400;border-bottom-color:#9a9a94}
  .papers{border-top:1px solid #9a9a94;background:#c8c8c2}
  .paper{background:#ffffff;break-inside:avoid}
  .paper__title a{color:#1a1a18}
  .paper__tag{color:#3f4400}
  footer.foot{margin-top:16pt;padding:12pt 0 0}
  .foot__meta{border-top-color:#9a9a94}
  /* /news/: the screen's 64ch leaves two-fifths of the sheet empty; the prose
     takes the sheet's width and a headline never orphans onto the next */
  .prose--news{max-width:92ch}
  .prose--news h2{break-after:avoid;page-break-after:avoid}
  .prose--news p{orphans:3;widows:3}
}
/* The news prose measure. /news/ is a column of dated items rather than one
   essay, so its prose takes the wrap's reading column and its headlines
   balance their lines instead of ending on a single word. */
.prose--news{max-width:68ch}
.prose--news h2{text-wrap:balance}

.trustbar strong a { color: var(--of-lime); border-bottom: 1px solid var(--of-line); }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;scroll-behavior:auto !important}
}
