/* Essay layout. Serif text, Asap headings (site face), figures as plates. */

:root {
  --ink: #16141a;
  --muted: #5f6673;
  --faint: #9aa1ab;
  --rule: #e6e8eb;
  --plate: #f4f5f6;
  --accent: rgb(20, 110, 190);
}

#body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  font-feature-settings: "onum" 0;
}

#article {
  width: 882px; /* same column as before (42em @ 21px); type is now 18px */
  max-width: 100%;
  margin: 0 auto;
  padding: 4em 1.2em 7em;
  box-sizing: border-box;
}

/* ----- header ----- */
.crumb, .byline, .dek, #article h1, #article h2, figcaption, blockquote cite, .foot, #sources, .tweet blockquote.twitter-tweet {
  font-family: 'Asap', system-ui, sans-serif;
}
.crumb { font-size: 0.8em; color: var(--faint); }
.crumb a { color: var(--faint); }
.crumb a:hover { color: var(--accent); border-bottom-color: var(--accent); }

#article h1 {
  font-size: 2.5em;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 1em 0 0.5em;
}
.dek {
  font-size: 1.15em;
  line-height: 1.45;
  font-weight: 300;
  color: var(--muted);
  margin: 0 0 1.4em;
}
.byline { font-size: 0.8em; color: var(--faint); margin: 0 0 3.5em; }

/* ----- text ----- */
#article p { margin: 0 0 1.25em; }
#article p.lead { font-size: 1.08em; }
#article em { font-style: italic; }
#article strong { font-weight: 600; }
#article ol { margin: 0 0 1.4em 1.2em; list-style: decimal; }
#article li { margin-bottom: 0.9em; padding-left: 0.2em; }
#article li::marker { color: var(--accent); font-family: 'Asap', sans-serif; font-weight: 600; }

#article h2 {
  color: var(--ink);
  font-size: 1.55em;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 3.4em 0 1em;
}

blockquote {
  margin: 1.6em 0 1.8em 1.6em;
  padding: 0;
  font-style: italic;
  color: #2c2a33;
}
blockquote p { margin-bottom: 0.45em; }
blockquote cite { display: block; font-style: normal; font-size: 0.72em; color: var(--faint); margin-top: 0.3em; }

.thesis {
  font-size: 1.22em;
  line-height: 1.45;
  margin: 2.4em 0 2.6em;
  padding-top: 1.1em;
  position: relative;
}
.thesis::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 2.2em; height: 3px;
  background: var(--accent);
}

hr.sep { border: 0; border-top: 1px solid var(--rule); margin: 3.5em 0; }

/* ----- figures as plates ----- */
figure, .video-wrap, .tweet {
  width: 50%;
  margin: 2.2em auto 2.4em;
}
figure.wide { width: 75%; }
figure.full { width: 86.7%; }
figure.x17 { width: 85%; }

.plate {
  background: var(--plate);
  border-radius: 6px;
  padding: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
}
.plate img { display: block; max-width: 100%; height: auto; }
.plate.tall img { max-height: 15em; width: auto; }
.plate.pair img { width: calc(50% - 0.5em); max-height: 12em; object-fit: contain; }
.plate.mono img { filter: grayscale(1) contrast(1.05); }

figcaption {
  font-size: 0.72em;
  line-height: 1.5;
  color: var(--muted);
  margin: 0.9em 0.2em 0;
}
figcaption .src { display: block; color: var(--faint); margin-top: 0.2em; }
figcaption .src a { color: var(--faint); border-bottom: 1px solid var(--rule); }
figcaption .src a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.video { position: relative; width: 100%; padding-top: 56.25%; background: #111; border-radius: 6px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.tweet { display: flex; justify-content: center; }
.tweet blockquote.twitter-tweet {
  font-style: normal; font-size: 0.85em; line-height: 1.5;
  margin: 0; padding: 1.2em 1.4em;
  background: var(--plate); border-radius: 6px; color: #2c2a33;
  max-width: 30em;
}
.tweet blockquote.twitter-tweet p { margin-bottom: 0.6em; }

/* ----- sources ----- */
#sources { font-size: 0.72em; line-height: 1.55; color: var(--muted); }
#sources h2 { font-size: 1.15em; margin: 0 0 0.8em; color: var(--ink); }
#sources ol { margin-left: 1.3em; }
#sources li { margin-bottom: 0.5em; }
#sources li::marker { color: var(--faint); font-weight: 400; }
.foot { font-size: 0.72em; color: var(--faint); margin-top: 3em; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .plate.pair video { width: 100%; }
  #body { font-size: 17.5px; line-height: 1.6; }
  #article { padding: 2.2em 1em 4em; }
  #article h1 { font-size: 1.9em; }
  figure, .video-wrap, .tweet, figure.wide, figure.full, figure.x17 { width: 100%; }
  .plate { padding: 1em; gap: 1em; }
  .plate.pair { flex-direction: column; }
  .plate.pair img { width: 100%; }
  blockquote { margin-left: 0.8em; }
}

/* ----- video plates ----- */
.plate video { display: block; max-width: 100%; height: auto; border-radius: 4px; background: #fff; }
.plate.pair video { width: calc(50% - 0.5em); height: auto; }
