/* Cornerstone Preprints
   ---------------------
   Design brief, written down so the next person can argue with it.

   A repository is a publication, not a database front end. SSRN and bioRxiv
   look like the latter and read like it; eLife and PLOS look like the former.
   The target is the former, and the way there is not "more white space" — the
   first attempt at this file was pale, uniform and forgettable, which is what
   happens when a page has type and nothing else.

   So: a masthead with real weight, a warm paper ground rather than clinical
   white, one colour per subject used as a spine so the eye can navigate by
   hue, and a contents page rather than a list of divs.

   Two families. A serif carries anything anybody actually reads. A sans
   carries anything anybody scans. No framework, no webfont, one request. */

:root {
  /* brand: the university's own navy and gold */
  --navy:       #10203a;
  --navy-deep:  #0a1628;
  --navy-soft:  #33456b;
  --gold:       #c8901f;
  --gold-lift:  #e2ab44;
  --gold-wash:  #fdf4e3;

  /* grounds: white to read on, grey to separate */
  --paper:      #ffffff;
  --paper-deep: #f2f5f9;
  --card:       #ffffff;

  /* ink: near-black, not black. eLife sets its body at #212121 and is right. */
  --ink:        #212121;
  --ink-soft:   #5b6470;
  --ink-faint:  #8b929c;
  --rule:       #e1e6ec;
  --rule-soft:  #eef1f5;

  /* one strong colour for anything you can act on */
  --link:       #0a5ca8;
  --link-lift:  #0a72d0;

  --measure:    66ch;
  --serif: 'Source Serif 4', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* one hue per subject, used as a spine so a reader can navigate by colour */
  --s1: #1f7a6f;  --s2: #8a3f76;  --s3: #a8601b;  --s4: #2455a0;
  --s5: #5f6f22;  --s6: #99332f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-lift); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; }

/* ── the notice ───────────────────────────────────────────────────────────
   The most important sentence on the site. It gets the top of the page and a
   dark ground so it reads as a statement of what this is, not as a cookie
   banner somebody will learn to skip. */
.notice { background: var(--navy-deep); color: #d9c79a; font-size: 13.5px;
  letter-spacing: .01em; }
.notice .wrap { display: flex; gap: 10px; align-items: baseline;
  padding-top: 9px; padding-bottom: 9px; }
.notice b { color: var(--gold-lift); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; font-size: 11.5px; }
.notice span { color: #a9b4c8; }

/* ── masthead ─────────────────────────────────────────────────────────── */
.masthead { background: var(--navy); color: #f2f4f8; }

.masthead .bar { display: flex; align-items: center; gap: 30px;
  padding: 22px 0 20px; }
.brand { text-decoration: none; line-height: 1; display: block; }
.brand .name { font-family: var(--serif); font-size: 25px; letter-spacing: -.01em;
  color: #fff; }
.brand .name b { font-weight: 600; }
.brand .name span { color: var(--gold-lift); font-style: italic; }
.brand .sub { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: #8fa0bd; }
.masthead nav { display: flex; gap: 24px; font-size: 14.5px; }
.masthead nav a { color: #c3cee1; text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent; }
.masthead nav a:hover { color: #fff; border-bottom-color: var(--gold); }
.masthead .right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.masthead input {
  font: inherit; font-size: 14px; padding: 9px 16px; width: 16rem;
  border: 1px solid #2a3d5f; border-radius: 999px;
  background: rgba(255,255,255,.06); color: #eef2f8;
}
.masthead input::placeholder { color: #8091ad; }
.masthead input:focus { outline: 2px solid var(--gold); outline-offset: 1px;
  background: rgba(255,255,255,.12); }
.masthead .cta { background: var(--gold); color: #1a1204; font-weight: 650;
  font-size: 14px; padding: 10px 18px; border-radius: 6px; text-decoration: none;
  white-space: nowrap; }
.masthead .cta:hover { background: var(--gold-lift); }

/* ── hero ─────────────────────────────────────────────────────────────────
   Two columns on a wide screen. The first version put a 40ch measure under a
   62px headline, which broke it across four lines and stacked the buttons, and
   left half the page empty with a decorative circle in it. The right column
   now carries the three steps an author actually needs, which is a better use
   of the space than an ornament. */
.hero { background: var(--paper-deep); border-bottom: 1px solid var(--rule);
  padding: 68px 0 0; }
.hero .split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: 64px; align-items: start; }
.hero .eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 18px; }
.hero h1 { font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -.025em;
  margin: 0 0 22px; max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--link); }
.hero p.lede { font-size: 18.5px; line-height: 1.62; color: var(--ink-soft);
  max-width: 46ch; margin: 0 0 30px; }
.hero .buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* the three steps, in the space the ornament was wasting */
.steps { background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 26px 28px; box-shadow: 0 14px 40px rgba(16,32,58,.07); }
.steps h2 { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; margin: 0 0 18px; }
.steps ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr;
  gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--rule-soft); }
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 15px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--link);
  color: #fff; display: grid; place-items: center; font-weight: 600; }
.steps b { display: block; font-size: 15px; margin-bottom: 2px; }
.steps span { font-size: 13.5px; color: var(--ink-faint); line-height: 1.5; }
.steps .foot { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--rule-soft);
  font-size: 13px; color: var(--ink-faint); }

.stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 58px;
  border-top: 1px solid var(--rule); }
.stats div { flex: 1 1 0; min-width: 150px; padding: 20px 26px 22px;
  border-right: 1px solid var(--rule); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--serif); font-size: 30px;
  font-weight: 600; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums; }
.stats span { display: block; margin-top: 7px; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn { font: inherit; font-size: 15px; font-weight: 620; padding: 13px 26px;
  border-radius: 7px; text-decoration: none; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease; }
.btn.primary { background: var(--link); color: #fff;
  box-shadow: 0 6px 18px rgba(10,92,168,.24); }

.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(16,32,58,.28); }
.btn.gold { background: var(--gold); color: #1a1204;
  box-shadow: 0 6px 18px rgba(200,144,31,.28); }
.btn.gold:hover { background: var(--gold-lift); transform: translateY(-1px); }
.btn.quiet { border-color: var(--rule); color: var(--ink-soft); background: var(--card); }
.btn.quiet:hover { border-color: var(--link); color: var(--link); }

/* ── subject shelf ────────────────────────────────────────────────────── */
.shelf-head { display: flex; align-items: baseline; justify-content: space-between;
  padding: 54px 0 18px; }
.shelf-head h2, .section-head h2 { font-family: var(--serif); font-weight: 600;
  font-size: 27px; letter-spacing: -.015em; margin: 0; }
.shelf-head a, .section-head a { font-size: 14px; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.shelf-head a:hover, .section-head a:hover { color: var(--link-lift); border-color: var(--link); }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px; padding-bottom: 20px; }
.shelf a { background: var(--card); border: 1px solid var(--rule);
  border-radius: 10px; padding: 22px 22px 20px; text-decoration: none;
  display: block; position: relative; overflow: hidden;
  transition: transform .14s ease, box-shadow .2s ease, border-color .2s ease; }
.shelf a::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--spine, var(--gold)); }
.shelf a:hover { transform: translateY(-2px); border-color: var(--link);
  box-shadow: 0 12px 30px rgba(16,32,58,.10); }
.shelf b { font-family: var(--serif); font-size: 19px; font-weight: 600;
  display: block; margin-bottom: 6px; letter-spacing: -.01em; color: var(--ink); }
.shelf span { font-size: 13.5px; color: var(--ink-faint); line-height: 1.5;
  display: block; }
.shelf .n { margin-top: 12px; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700; color: var(--spine, var(--gold)); }

/* ── the contents page ────────────────────────────────────────────────────
   A journal's table of contents, not a stack of cards. Three columns: the
   number, the paper, and the facts about it. The first version ran the row to
   the full width but capped the text at a reading measure, which left a third
   of every row empty and made the page look unfinished. The facts now live in
   that space, where they can be scanned down the page in a straight line. */
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  padding: 52px 0 8px; border-bottom: 2px solid var(--navy); margin-bottom: 4px; }

.contents { list-style: none; margin: 0; padding: 0; }
.contents li { display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(150px, 200px);
  gap: 0 26px; padding: 28px 0 26px; border-bottom: 1px solid var(--rule-soft);
  position: relative; align-items: start; }
.contents li::before { content: ""; position: absolute; left: 0; top: 28px;
  bottom: 26px; width: 3px; background: var(--spine, var(--gold)); border-radius: 2px; }
.contents .idx { font-family: var(--serif); font-size: 15px; color: var(--ink-faint);
  padding-left: 16px; font-variant-numeric: tabular-nums; padding-top: 5px; }
.contents h3 { font-family: var(--serif); font-weight: 600; font-size: 22px;
  line-height: 1.3; letter-spacing: -.012em; margin: 0 0 9px; }
.contents h3 a { text-decoration: none; color: var(--ink); }
.contents h3 a:hover { color: var(--link); }
.contents .who { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 10px; }
.contents .abstract { font-family: var(--serif); font-size: 16.5px; line-height: 1.58;
  color: var(--ink-soft); margin: 0; }

/* the facts column, read down the page rather than across each row */
.contents .aside { display: flex; flex-direction: column; gap: 9px;
  padding-top: 4px; align-items: flex-start; }
.contents .aside .when { font-size: 13px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; }
.contents .aside .ref { font-size: 12.5px; color: var(--ink-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.contents .aside .vs { font-size: 12px; color: var(--ink-faint); }

.tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; padding: 4px 10px; border-radius: 4px; text-decoration: none;
  background: var(--spine, var(--gold)); color: #fff; }

.chip { display: inline-block; font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; font-weight: 700; padding: 4px 10px; border-radius: 4px;
  background: var(--paper-deep); color: var(--ink-soft); text-decoration: none; }
.chip.gold { background: var(--gold-wash); color: #8a6210; }
.chip.withdrawn { background: #fbe9e9; color: #9b2c2c; }


/* ── one paper ────────────────────────────────────────────────────────── */
.paper-head { background: var(--paper-deep); border-bottom: 1px solid var(--rule);
  padding: 42px 0 36px; }
.paper-head .kicker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.paper-head h1 { font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.9vw, 44px); line-height: 1.13; letter-spacing: -.02em;
  margin: 0 0 22px; }
.byline { font-size: 17px; line-height: 1.75; margin: 0 0 4px;
  max-width: var(--measure); }
.byline .sup { font-size: 10.5px; vertical-align: super; color: var(--gold);
  font-weight: 700; }
.affil { font-size: 13.5px; color: var(--ink-faint); margin: 3px 0 0;
  max-width: var(--measure); }

.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 26px 0 0;
  border-top: 1px solid var(--rule); }
.facts div { padding: 14px 28px 12px 0; margin-right: 28px;
  border-right: 1px solid var(--rule); }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font-size: 10.5px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 700;
  margin-bottom: 4px; }
.facts span { font-size: 14.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; margin: 26px 0 0; }

.abstract-block { padding: 40px 0 10px; }
.abstract-block h2, .section h2 { font-size: 11px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 700;
  margin: 0 0 16px; }
.abstract-block p { font-family: var(--serif); font-size: 19.5px; line-height: 1.68;
  max-width: var(--measure); margin: 0 0 1em; }
.abstract-block p:first-of-type::first-letter {
  /* One flourish, in the one place a reader always starts. */
  font-size: 3.1em; float: left; line-height: .84; padding: .06em .09em 0 0;
  color: var(--link); font-weight: 600;
}
.section { padding: 30px 0; border-top: 1px solid var(--rule-soft); }

.versions { list-style: none; margin: 0; padding: 0; }
.versions li { display: flex; gap: 14px; align-items: baseline; padding: 11px 0;
  font-size: 14.5px; border-bottom: 1px solid var(--rule-soft); }
.versions li:last-child { border-bottom: 0; }
.versions .n { font-family: var(--serif); font-weight: 600; min-width: 2.2em;
  font-variant-numeric: tabular-nums; }
.versions .now { color: var(--gold); font-weight: 700; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .09em; }

.cite { background: var(--paper-deep); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0; padding: 20px 24px; font-family: var(--serif);
  font-size: 16px; line-height: 1.62; max-width: var(--measure); }

.tomb { background: #fbe9e9; border: 1px solid #efc9c9; color: #7b2020;
  border-radius: 10px; padding: 22px 24px; margin: 28px 0; max-width: var(--measure); }

.tomb h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px;
  font-weight: 600; letter-spacing: 0; text-transform: none; color: inherit; }
.tomb p { margin: 0; font-size: 15.5px; }

/* ── paging, empties, footer ──────────────────────────────────────────── */
.pager { display: flex; gap: 12px; justify-content: center; align-items: center;
  padding: 40px 0; font-size: 14.5px; }
.pager a, .pager span { padding: 10px 18px; border: 1px solid var(--rule);
  border-radius: 7px; text-decoration: none; color: var(--ink-soft);
  background: var(--card); }
.pager a:hover { border-color: var(--link); color: var(--link); }
.pager .current { background: var(--paper-deep); color: var(--ink); font-weight: 600; }

.empty { padding: 74px 0; text-align: center; }
.empty p { font-family: var(--serif); font-size: 21px; color: var(--ink-soft);
  margin: 0 0 8px; }
.empty .small { font-family: var(--sans); font-size: 15px; color: var(--ink-faint); }

footer.site { background: var(--navy-deep); color: #9fadc4; margin-top: 76px;
  padding: 54px 0 34px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 40px; }
footer.site .brand .name { font-size: 21px; }
footer.site h3 { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: #6d7d97; margin: 0 0 12px; font-weight: 700; }
footer.site p { max-width: 40ch; line-height: 1.65; margin: 14px 0 0; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { padding: 4px 0; }
footer.site a { color: #b9c6dd; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline;
  text-decoration-color: var(--gold); }
footer.site .fine { margin-top: 34px; padding-top: 20px;
  border-top: 1px solid #1b2740; font-size: 12.5px; color: #6d7d97; }

/* ── prose ────────────────────────────────────────────────────────────── */
.prose { max-width: var(--measure); padding: 46px 0 20px; }
.prose h1 { font-family: var(--serif); font-weight: 400; font-size: 42px;
  letter-spacing: -.025em; margin: 0 0 12px; line-height: 1.1; }
.prose .lede { font-family: var(--serif); font-size: 21px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 32px; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: 24px;
  margin: 38px 0 12px; letter-spacing: -.01em; }
.prose p, .prose li { font-size: 17px; line-height: 1.72; }
.prose ul { padding-left: 1.15em; }
.prose li { margin: 8px 0; }
.prose .meta { font-size: 13.5px; color: var(--ink-faint); }

@media (min-width: 901px) { .brand .sub { white-space: nowrap; } }
@media (max-width: 1040px) {
  .hero .split { grid-template-columns: 1fr; gap: 38px; }
}
@media (max-width: 1040px) {
  .contents li { grid-template-columns: 44px minmax(0, 1fr); }
  .contents .aside { grid-column: 2; flex-direction: row; flex-wrap: wrap;
    gap: 6px 16px; margin-top: 12px; align-items: center; }
}
@media (max-width: 900px) {
  .brand .sub { font-size: 9.5px; letter-spacing: .1em; }
  .masthead .bar { flex-wrap: wrap; gap: 16px; }
  .masthead .right { margin-left: 0; width: 100%; }
  .masthead input { flex: 1; width: auto; }
  .hero { padding-top: 52px; }
  .stats { margin-top: 42px; }
  .stats div { border-right: 0; border-bottom: 1px solid var(--rule);
    flex: 1 1 45%; padding: 16px 20px; }
  .contents li { grid-template-columns: 1fr; gap: 0; padding-left: 18px; }
  .contents .idx { display: none; }
  .contents li::before { top: 24px; bottom: 22px; }
  .facts div { border-right: 0; padding-right: 0; margin-right: 22px; }
  footer.site .cols { grid-template-columns: 1fr; gap: 28px; }
  body { font-size: 16px; }
}
