/* Neutral academic styling. System fonts only: nothing is fetched. */

:root {
  --ink: #1a1a19;
  --ink-soft: #55534e;
  --paper: #fcfbf8;
  --rule: #cfcac0;
  --link: #16457a;
  --link-visited: #4a3a73;
  --measure: 34rem;

  --serif: ui-serif, "Iowan Old Style", Palatino, "Palatino Linotype",
           "Book Antiqua", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e6df;
    --ink-soft: #b0aca3;
    --paper: #15161a;
    --rule: #3c3e43;
    --link: #9cc4f0;
    --link-visited: #c6b6e8;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 3.5rem 1.25rem 4.5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.58;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
}

p { margin: 0 0 1.1rem; }

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}
a:visited { color: var(--link-visited); }
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Title block ------------------------------------------------------------- */

.letter-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 auto 1.1rem;
  max-width: 28rem;
  text-wrap: balance;
}

.letter-head::after {
  content: "";
  display: block;
  width: 5rem;
  height: 1px;
  margin: 1.6rem auto 0;
  background: var(--rule);
}

.dates {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

/* Section headings -------------------------------------------------------- */

h2 {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 400;
  font-variant-caps: small-caps;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  margin: 1.9rem 0 0.7rem;
}
h3:first-of-type { margin-top: 0; }

/* The letter -------------------------------------------------------------- */

.letter {
  text-align: justify;
  hyphens: auto;
  margin-bottom: 3rem;
}

/* The lead-in lines that introduce the two lists. */
.lead-in { margin-top: 1.9rem; }

/* The bulleted list of rejected claims. */
.claims {
  padding-left: 1.4rem;
  margin: 0 0 1.1rem;
}
.claims li { margin-bottom: 0.85rem; }
.claims li::marker { color: var(--ink-soft); }

/* The numbered reasons, set as "1)" to match the source. */
.reasons {
  list-style: none;
  counter-reset: reason;
  padding-left: 0;
  margin: 0 0 1.1rem;
}
.reasons > li {
  counter-increment: reason;
  margin-bottom: 1.1rem;
}
.reasons > li::before {
  content: counter(reason) ") ";
  font-weight: 700;
}

/* Justification goes ragged on narrow screens, where it leaves rivers. */
@media (max-width: 30rem) {
  .letter { text-align: left; }
}

/* Footnotes --------------------------------------------------------------- */

.fn-ref {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
}
.fn-ref a { padding: 0 0.15em; }

section {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  margin-top: 2.75rem;
}

.notes-list {
  font-size: 0.9rem;
  line-height: 1.5;
  padding-left: 1.6rem;
  margin: 0;
}
.notes-list li { margin-bottom: 0.65rem; }
.notes-list li::marker { color: var(--ink-soft); }
.notes-list a { word-break: break-word; }

.fn-back { text-decoration: none; }
.fn-back:hover, .fn-back:focus-visible { text-decoration: underline; }

/* Signatories ------------------------------------------------------------- */

/* The signatories are the point of the page, so this section is given more
   weight than the Notes and changelog that follow it: a double rule, more
   space around it, and a full-size heading rather than a small-caps label. */
.signatories {
  border-top: 3px double var(--rule);
  padding-top: 2.5rem;
  margin-top: 3.5rem;
}

.signatories h2 {
  font-size: 1.35rem;
  font-variant-caps: normal;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.signatories .names li { font-size: 1rem; }

.capacity {
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 auto 1.9rem;
  max-width: 28rem;
  text-align: center;
}

/* Holding line shown while the list of names is still empty. Italic and
   muted so it does not read as somebody's name. */
.pending {
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin: 0;
}

.names {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2.25rem;
}
.names li {
  break-inside: avoid;
  margin-bottom: 0.3rem;
  font-size: 0.9375rem;
}

@media (max-width: 30rem) {
  .names { columns: 1; }
}

/* Changelog --------------------------------------------------------------- */

.changelog {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.changes { margin: 0; }
.changes dt {
  font-style: italic;
  color: var(--ink);
  margin-top: 0.9rem;
}
.changes dt:first-of-type { margin-top: 0; }
.changes dd { margin: 0.15rem 0 0; }

/* Print ------------------------------------------------------------------- */

@media print {
  :root {
    --ink: #000;
    --ink-soft: #333;
    --paper: #fff;
    --rule: #999;
    --link: #000;
    --link-visited: #000;
  }

  body {
    padding: 0;
    font-size: 11pt;
    line-height: 1.45;
    background: #fff;
    color: #000;
  }

  main { max-width: none; }

  a { text-decoration: underline; }

  /* Print the URL after external links, so a paper copy keeps the citations. */
  .notes-list a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }

  .fn-back { display: none; }

  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
  p, li { orphans: 2; widows: 2; }
}
