
/* PAPER PAGE — layout only, tokens only.
   The page has two left edges from 1280px up: the outer edge (title, figures, the note on sources)
   and the reading edge (the 640px column). Below 1280px there is one edge and one column. */

/* Anything scrolled to (a heading, a focused link) lands below the header and the reading bar. */
html{scroll-padding-top:calc(var(--header-h) + 5.25rem)}

/* Front matter */
.paper-head{padding-block:clamp(1rem,.7rem + 1.7vw,2.25rem) clamp(1.5rem,1.1rem + 2.1vw,3rem)}
.paper-head .crumbs{align-items:center}
.paper-labels{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .9rem;margin-top:clamp(1.1rem,.5rem + 2.6vw,3rem)}
.paper-title{max-width:21em;margin-top:.9rem;font-size:clamp(1.75rem,1.24rem + 2.2vw,3rem);line-height:1.1;letter-spacing:-.008em}
.paper-title__sub{display:block;margin-top:.4em;font-size:.66em;line-height:1.2}
.paper-title .nb{white-space:nowrap}
.paper-meta{margin-top:clamp(1rem,.8rem + 1vw,1.6rem);max-width:var(--measure)}
.authors>summary{display:block;padding-block:.55rem;cursor:pointer;list-style:none;font-weight:500;line-height:1.45}
.authors>summary::-webkit-details-marker{display:none}
.authors__toggle{white-space:nowrap;color:var(--link);font-weight:600}
.authors__toggle .i{display:inline-block;width:1em;height:1em;vertical-align:-.15em;margin-left:.15em;transition:transform var(--dur-2) var(--ease)}
.authors[open] .authors__toggle .i{transform:rotate(180deg)}
.authors>summary:hover .authors__toggle{text-decoration:underline;text-underline-offset:.2em}
.authors__rest{padding-bottom:.6rem;color:var(--fg-2);line-height:1.5}
.paper-src{color:var(--fg-2);line-height:1.45}
.paper-src cite{color:var(--fg)}
.paper-src__part{white-space:nowrap}
.paper-src .sep{display:inline-block;margin-inline:.45em;opacity:.6}
@media (max-width:519px){.paper-src .sep{display:none}.paper-src__part{display:block}.paper-head .crumbs li[aria-current]{display:none}}
.paper-actions{margin-top:clamp(1.25rem,1rem + 1.2vw,2rem)}
@media (max-width:559px){.paper-actions .btn{width:100%}}

/* The reading bar: the register switch, kept within reach. It rides under the header and
   takes its place when the header slides away. */
.readbar{position:sticky;top:var(--header-h);z-index:35;background:var(--bg);box-shadow:0 -1px 0 var(--rule),0 1px 0 var(--rule);transition:top var(--dur-3) var(--ease)}
.header[data-hidden="true"]~main .readbar{top:0}
/* Below the rail breakpoint the bar leaves with the header and returns with it: nothing sits over the text while reading down. */
@media (max-width:999px){.header[data-hidden="true"]~main .readbar:not(:focus-within){top:-5rem}}
.readbar__in{display:flex;align-items:center;gap:.5rem 1.25rem;min-height:3.75rem;padding-block:.4rem}
.readbar__note{margin-left:auto;font-size:var(--t-cap);color:var(--fg-3);text-align:right}
@media (max-width:899px){.readbar__note{display:none}}
@media (max-width:559px){.readbar__label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.readbar .seg{display:flex;width:100%}.readbar .seg__opt{flex:1;padding-inline:.5rem}}

/* Body grid */
.paper-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(3rem,2.4rem + 2.4vw,4.5rem) clamp(2.5rem,1rem + 3vw,4.5rem);padding-block:clamp(1.75rem,1.2rem + 2.2vw,3.25rem) var(--section-tight)}
@media (min-width:1000px){.paper-grid{grid-template-columns:minmax(0,40rem) 19rem;justify-content:space-between}}
@media (min-width:1280px){
  .paper-grid{--aux:clamp(8.5rem,8.5rem + (100vw - 1280px)*.25,11rem);--auxgap:clamp(2rem,2rem + (100vw - 1280px)*.1,3rem);grid-template-columns:minmax(0,calc(var(--aux) + var(--auxgap) + 40rem)) minmax(19rem,20rem)}
  .paper-main{position:relative;padding-left:calc(var(--aux) + var(--auxgap))}
}
.paper-main>*+*{margin-top:clamp(2.25rem,1.8rem + 1.8vw,3.25rem)}
.paper-brief{max-width:var(--measure)}
.paper-brief .brief__title{margin-bottom:.9rem}

/* The sources of the summary: a margin note beside it on wide screens, a line under it elsewhere. */
.paper-main>.paper-stamp{margin-top:1.25rem}
.paper-stamp{max-width:var(--measure);font-size:var(--t-cap);line-height:1.45;color:var(--fg-3)}
@media (min-width:1280px){
  .paper-main>.paper-stamp{position:absolute;left:0;top:0;width:var(--aux);margin:0;padding-top:.6rem;border-top:1px solid var(--rule)}
}

/* Reading column */
.paper-prose h2{margin-top:2.1em;text-wrap:balance}
.paper-prose>h2:first-child{margin-top:0}
.paper-prose>.reg,.paper-prose>.note{margin-top:.85em}
.paper-prose .reg>*+*{margin-top:1.05em}
.paper-prose .note{font-family:var(--sans)}
.paper-prose .table-scroll{font-family:var(--sans);margin-top:1.4em}
.paper-prose .table caption{caption-side:top;text-align:left;padding-bottom:.6rem;font-size:var(--t-cap);color:var(--fg-2)}
.paper-prose .table caption b{display:block;font-size:var(--t-label);font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--fg);margin-bottom:.2rem}
.paper-prose .table th[scope="row"]{font-weight:500;color:var(--fg-2);width:38%}
.paper-prose .table td{font-weight:500}
.paper-prose .table .is-absent{font-weight:400;color:var(--fg-3)}
/* The glossary underline follows the baseline (the system draws it as a border on an inline-block button, which sits a line-gap below the word). */
.paper .term{border-bottom:0;text-decoration:underline dotted;text-decoration-color:var(--mark);text-decoration-thickness:1.5px;text-underline-offset:.22em}
.reg__switch{font:inherit;font-weight:500;color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em;cursor:pointer}
.reg__switch:hover{text-decoration-thickness:2px}
/* With scripts off both registers show, the second one labelled. */
.no-js .paper [data-register] .reg[data-reg="science"],.no-js .paper[data-register] .reg[data-reg="science"]{display:block;margin-top:1.4em;padding-top:1.1em;border-top:1px solid var(--rule)}
.no-js .paper .reg[data-reg="science"]::before{content:"The science";display:block;margin-bottom:.8em;font-family:var(--sans);font-size:var(--t-label);font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--fg-3)}

/* Figures */
.paper-fig{font-family:var(--sans);max-width:var(--measure)}
.arms{display:grid;gap:1.1rem}
.arm{display:grid;gap:.45rem}
.arm__label{font-size:var(--t-small);line-height:1.3;color:var(--fg-2)}
.arm__label b{display:inline-block;min-width:1.4em;font-family:var(--serif);font-size:1.75rem;font-weight:var(--display-wt);line-height:1;letter-spacing:-.008em;color:var(--fg);font-variant-numeric:lining-nums tabular-nums}
.arm__units{display:grid;grid-template-columns:repeat(25,minmax(0,1fr));gap:clamp(3px,.9vw,8px)}
.arm__units .u{width:100%;height:auto;aspect-ratio:1}
@media (min-width:521px){.paper-fig .trials{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1280px){
  .paper-fig{max-width:none;margin-left:calc(-1*(var(--aux) + var(--auxgap)))}
  .paper-fig .fig__cap,.paper-fig .legend{margin-left:calc(var(--aux) + var(--auxgap))}
  .arm{grid-template-columns:var(--aux) minmax(0,1fr);column-gap:var(--auxgap);align-items:center}
  .arm__label b{display:block;margin-bottom:.2rem}
  .paper-fig .trials{grid-template-columns:calc(var(--aux) + var(--auxgap) - 1.5rem) repeat(4,minmax(0,1fr));column-gap:1.5rem}
}

/* Rail */
.paper-rail{display:grid;grid-template-columns:minmax(0,1fr);gap:2.25rem;align-content:start}
.paper-rail h2{margin-bottom:.7rem}
.paper-rail .facts{grid-template-columns:minmax(0,1fr)}
.paper-rail .facts div{display:grid;grid-template-columns:minmax(6.25rem,max-content) minmax(0,1fr);gap:.75rem;align-items:baseline;padding:.65rem 0}
.paper-rail .facts dd{margin:0;font-size:var(--t-small);font-weight:500;line-height:1.4}
.paper-rail .facts dd a{display:flex;align-items:center;gap:.3em;min-height:1.9rem;color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.paper-rail .facts dd a:hover{text-decoration-thickness:2px}
.paper-topics{border-top:1px solid var(--rule)}
.paper-topics a{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:2.75rem;padding:.45rem 0;border-bottom:1px solid var(--rule);font-size:var(--t-small);font-weight:600}
.paper-topics a span:last-child{font-weight:500;font-size:var(--t-cap);color:var(--fg-3);white-space:nowrap}
.paper-topics a:hover span:first-child{text-decoration:underline;text-underline-offset:.2em}
.paper-ids{display:grid;gap:.1rem;margin-top:.9rem;padding-top:.8rem;border-top:1px solid var(--rule)}
.paper-ids div{display:grid;grid-template-columns:3.75rem minmax(0,1fr);gap:.5rem;align-items:baseline}
.paper-ids dt{font-size:var(--t-label);font-weight:600;letter-spacing:.08em;color:var(--fg-3)}
.paper-ids dd{margin:0}
.paper-ids a{display:inline-flex;align-items:center;min-height:1.9rem;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.paper-rail .row{grid-template-columns:minmax(0,1fr);padding:.95rem 0}
.paper-rail .row>*{grid-column:1}
.paper-rail .row__title{font-size:1.125rem}
.paper-rail .row__aside{grid-row:auto;justify-content:flex-start;min-width:0}
.paper-rail .rows+.rows{border-top:0}
/* PROMOTE .feat (the same rules as on the home page), sized for the rail: one item with its facts and its action. */
.feat{display:grid;gap:var(--s3);padding:1.25rem;box-shadow:inset 0 4px 0 var(--rule-strong),inset 0 0 0 1px var(--rule)}
.feat__title{font-family:var(--serif);font-weight:var(--display-wt);font-size:var(--t-h3);line-height:1.16;letter-spacing:-.004em}
.feat__sum{font-size:var(--t-small);color:var(--fg-2)}
.feat__facts{font-size:var(--t-cap);color:var(--fg-2)}
.feat__facts .sep{margin-inline:.5em;color:var(--fg-3)}
.feat__buy{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s3) var(--s4);padding-top:var(--s3);border-top:1px solid var(--rule)}
.feat__price{font-family:var(--serif);font-size:1.75rem;line-height:1}
.paper-rail .feat+.rows{margin-top:var(--s3);border-top:0}
@media (max-width:999px){.paper-rail{border-top:2px solid var(--rule-strong);padding-top:1.5rem}}
@media (min-width:640px) and (max-width:999px){.paper-rail{grid-template-columns:repeat(2,minmax(0,1fr));gap:2.5rem var(--gap)}}
@media (min-width:1000px) and (min-height:860px){.paper-rail__pin{position:sticky;top:calc(var(--header-h) + 5.25rem);transition:top var(--dur-3) var(--ease)}.header[data-hidden="true"]~main .paper-rail__pin{top:5.25rem}}

.paper-more{padding-bottom:var(--section-tight)}
.paper-more h2{font-size:clamp(1.625rem,1.4rem + 1vw,2.125rem);font-weight:400;line-height:1.14}
.paper-more .sec-head{margin-bottom:clamp(1.5rem,1.2rem + 1.4vw,2.5rem)}

@media print{
  .readbar,.paper-actions,.paper-rail__pin,.paper-rail__shop,.paper-more,.reg__switch,.cite__row,.authors__toggle .i,.authors[open] .authors__toggle,#newsletter{display:none!important}
  .cite,.facts,.brief,.note,.table{break-inside:avoid}
  .paper-grid{display:block;padding-block:1rem}
  .paper-main{padding-left:0!important}
  .paper-main>.paper-stamp{position:static!important;width:auto!important;margin-top:1rem!important}
  .paper-fig{margin-left:0!important}
  .paper-fig .fig__cap,.paper-fig .legend{margin-left:0!important}
  .paper-rail{display:block;margin-top:2rem}
  .paper-rail>section{break-inside:avoid;margin-bottom:1.5rem}
  .paper-prose h2,.paper-rail h2{break-after:avoid}
}
