/*
  Reference: proofreader's marks on a galley proof.
  Cream stock, black type, one red pencil for insertions and deletions.
  Type: a system text serif stack led by Charter, so the page makes no font requests.
*/

:root {
  --ground: #f4f0e6;
  --ink: #1d1b17;
  --ink-quiet: #5b554a;
  --pencil: #b4231a;
  --rule: rgba(29, 27, 23, 0.22);

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", serif;
  --measure: 36rem;
  --gutter: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1814;
    --ink: #ebe5d6;
    --ink-quiet: #a8a191;
    --pencil: #ee6b5a;
    --rule: rgba(235, 229, 214, 0.2);
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

.masthead,
main,
.colophon {
  width: min(64rem, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}

/* Masthead */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
}

.status {
  color: var(--ink-quiet);
  font-size: 0.95rem;
  font-style: italic;
}

/* Intro */

.intro {
  padding: clamp(3rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
}

.title {
  margin: 0 0 2rem;
  font-weight: 700;
  font-size: clamp(3.25rem, 12vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.title-insert {
  display: block;
  margin-left: 0.18em;
  color: var(--pencil);
  font-style: italic;
  font-weight: 400;
  font-size: 0.5em;
  line-height: 1.1;
}

.title-line {
  display: block;
  position: relative;
  padding-left: 0.42em;
}

.caret {
  position: absolute;
  left: 0;
  bottom: -0.04em;
  width: 0.34em;
  height: 0.3em;
  fill: none;
  stroke: var(--pencil);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lead {
  max-width: 30ch;
  margin: 0 0 1.5rem;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.3;
}

.note {
  max-width: var(--measure);
  margin: 0;
  color: var(--ink-quiet);
}

/* Entries: heading in the left column, text on the right */

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 2rem 0 2.25rem;
  border-top: 1px solid var(--rule);
}

.entry h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
}

.body {
  max-width: var(--measure);
}

.body p {
  margin: 0 0 1rem;
}

.body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 46rem) {
  .entry {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 2rem;
    padding: 2.5rem 0 2.75rem;
  }
}

/* Framework list: plain set type, two or three columns */

.frameworks {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
  font-size: 1.3rem;
  line-height: 1.7;
}

@media (min-width: 30rem) {
  .frameworks {
    columns: 3;
  }
}

.frameworks li {
  break-inside: avoid;
  white-space: nowrap;
}

/* Deletions marked in pencil */

.struck {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.struck li {
  margin: 0 0 0.9rem;
}

.struck del {
  display: block;
  font-size: 1.3rem;
  text-decoration-line: line-through;
  text-decoration-color: var(--pencil);
  text-decoration-thickness: 2px;
}

.struck span {
  display: block;
  color: var(--ink-quiet);
}

/* Colophon */

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 2px solid var(--ink);
  color: var(--ink-quiet);
  font-size: 0.95rem;
}

.colophon p {
  margin: 0;
}

::selection {
  background: var(--pencil);
  color: var(--ground);
}
