/* Long-form typography for a single note.

   engineering-lab.css dresses index pages: headings, rules, three-column system
   rows. A note is one column of prose that somebody reads to the end, which wants
   a measure, a baseline, and room around the things that interrupt it. */

.note-page {
  max-width: 44rem;
  padding: 72px 0 96px;
}

.note-head {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ink);
}

.note-head h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 600;
  text-wrap: balance;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0 0;
  color: var(--muted);
  font: 400 12px/1.4 var(--mono);
}

.note-body {
  font-size: 18px;
  line-height: 1.72;
}

.note-body > p,
.note-body > ul,
.note-body > ol {
  margin: 24px 0;
  color: #2f3237;
}

.note-body > p:first-child {
  margin-top: 36px;
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink);
}

.note-body h2 {
  margin: 56px 0 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.note-body h2 + p {
  margin-top: 16px;
}

.note-body code {
  padding: 1px 5px;
  background: #e7e6e1;
  font: 500 0.86em/1 var(--mono);
}

/* A block is something the reader stops on, so it gets air and a rule rather
   than a tinted box: the page is paper, and paper does not have panels. */
.note-body pre {
  margin: 28px 0;
  padding: 20px 0;
  background: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: 500 13px/1.7 var(--mono);
  white-space: pre;
  overflow-x: auto;
}

.note-body blockquote {
  margin: 28px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--blue);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: normal;
  color: #3e4146;
}

.note-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The one line of the piece that is the finding. */
.note-body .finding {
  margin: 36px 0;
  padding: 20px 24px;
  background: #e9e8e3;
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.note-foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font: 400 13px/1.7 var(--mono);
}

.note-foot a {
  color: var(--blue);
}

@media (max-width: 600px) {
  .note-page { padding: 48px 0 64px; }
  .note-body { font-size: 17px; }
  .note-body > p:first-child { font-size: 19px; }
  .note-body pre { font-size: 12px; }
}
