@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: Karla;
  src: url('fonts/karla-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --em-display-face: 'Cormorant Garamond', Georgia, serif;
  --em-reading-face: Karla, system-ui, sans-serif;
}

.em-top, .em-footer, .em-author-page {
  --em-serif: Georgia, Cambria, 'Times New Roman', serif;
  --em-sans: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

.em-article {
  --paper: #fffefe;
  --ink: #312329;
  --muted: #614452;
  --deep: #73384c;
  --accent: var(--deep);
  --wine: #4d2938;
  --brand: #8e4860;
  --wash: #faf0f3;
  --blush: #f0dce3;
  --rule: #cfacb9;
  --white: #fff;
  --serif: var(--em-display-face);
  --sans: var(--em-reading-face);
  --xs: .5rem;
  --sm: .75rem;
  --md: 1rem;
  --lg: 1.5rem;
  --xl: 2rem;
  --xxl: 3rem;
  --section: 4rem;
  --hit: 2.75rem;
  --gutter: clamp(var(--md), 4vw, var(--xl));
  --body: clamp(1.0625rem, 1.01rem + .27vw, 1.25rem);
  --h1: clamp(2.125rem, 1.45rem + 3vw, 4.125rem);
  --h2: clamp(1.625rem, 1.25rem + 1.3vw, 2.375rem);
  --h3: clamp(1.375rem, 1.15rem + .75vw, 1.75rem);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

.em-article .story,
.em-article .story *,
.em-article .story *::before,
.em-article .story *::after { box-sizing: border-box; }

.em-article .story {
  inline-size: calc(100% - 2 * var(--gutter));
  max-inline-size: 68ch;
  margin-inline: auto;
  padding-block: clamp(var(--xl), 5vw, var(--section)) var(--section);
  font: 400 var(--body)/1.65 var(--sans);
  overflow-wrap: break-word;
}

.em-article .story :where(h1, h2, h3, p, figure) { margin: 0; }
.em-article .story h1 {
  color: var(--ink);
  font: 600 var(--h1)/1.04 var(--serif);
  letter-spacing: -.028em;
  text-wrap: balance;
}
.em-article .story h2 {
  color: var(--deep);
  font: 700 var(--h2)/1.13 var(--serif);
  letter-spacing: -.018em;
}
.em-article .story :where(h3) { color: var(--deep); font: 700 var(--h3)/1.18 var(--serif); }
.em-article .story :where(p + p, h2 + p, h3 + p, p + ul, p + ol) { margin-block-start: var(--md); }
.em-article .story :where(p + h2, p + h3, .vis + h2, .vis + h3, section + section, .prelude + section) {
  margin-block-start: clamp(var(--xl), 5vw, var(--xxl));
}

.em-article .story a { color: var(--deep); text-underline-offset: .18em; }
.em-article .story a:visited { color: var(--wine); }
.em-article .story a:hover, .em-article .story a:active { text-decoration-thickness: .13em; }
.em-article :is(a, [tabindex="0"]):focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }
.em-article .skip {
  position: absolute;
  inset-block-start: var(--xs);
  inset-inline-start: var(--md);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-block-size: var(--hit);
  padding-inline: var(--md);
  transform: translateY(-200%);
  background: var(--paper);
  color: var(--deep);
  font: 600 1rem/1.4 var(--sans);
}
.em-article .skip:focus { transform: none; }
.em-article ::selection { background: var(--deep); color: var(--paper); }

.em-article .story .section-label {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--hit);
  margin-block-end: var(--xs);
  font: 600 1rem/1.4 var(--sans);
}
.em-article .story :where(.opening, .hero + .reading) { margin-block-start: var(--lg); }
.em-article .story :where(.opening + .reading) { margin-block-start: clamp(var(--xl), 5vw, var(--xxl)); }
.em-article .story :where(.lede, .direct > p) { font-size: var(--body); font-weight: 600; }
.em-article .story .direct-label { color: var(--deep); font-weight: 600; margin-block-end: var(--xs); }
.em-article .story .byline { margin-block: var(--sm) var(--md); color: var(--muted); font: 400 1rem/1.5 var(--sans); }
.em-article .story .byline time { white-space: nowrap; }
.em-article .story :where(.photo, .post-figure) { margin-block: var(--lg); }
.em-article .story :where(.photo, .post-figure) img { display: block; inline-size: 100%; block-size: auto; }
.em-article .story .post-figure figcaption { margin-block-start: var(--sm); color: var(--muted); font-size: 1rem; }

.em-article .story :where(.prose ul, .prose ol, .reading > ul, .reading > ol, .sources ul) { padding-inline-start: var(--lg); }
.em-article .story .faq-item { border-block-start: 1px solid var(--rule); padding-block: var(--md); }
.em-article .story .faq > h2 { margin-block-end: var(--md); }
.em-article .story .author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--md);
  margin-block: var(--xxl);
  padding-block: var(--lg);
  border-block: 1px solid var(--rule);
}
.em-article .story .author .avatar { display: block; inline-size: 3.5rem; block-size: auto; border-radius: 50%; }
.em-article .story .author strong { color: var(--deep); }
.em-article .story .author a { display: inline-flex; align-items: center; min-block-size: var(--hit); }
.em-article .story .bottom-line { margin-block-start: var(--xxl); padding-block: var(--lg); border-block-start: 1px solid var(--rule); }
.em-article .story .bottom-line strong { display: block; color: var(--deep); }

/* Figure and graphic frames align with the prose; their cells and cards keep their own padding. */
.em-article .story .vis { margin: var(--lg) 0 var(--xl); }
.em-article .story .graphic { padding-inline: 0; border-inline: 0; }
.em-article .story .table-scroll { border-inline: 0; border-radius: 0; }
.em-article .story .vis-table { border-inline: 0; }

.em-article .story :is(.table-scroll, .vis-table) {
  container: em-table / inline-size;
  overflow-x: auto;
}

.em-article .story :is(.table-scroll, .vis-table) > table {
  inline-size: 100%;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  table-layout: var(--em-scrolling-layout, auto);
  border-collapse: var(--em-scrolling-borders, collapse);
  border-spacing: 0;
}

/* Keep these minima and the queries below paired: the cue describes actual overflow. */
.em-article .story :is(.table-scroll, .vis-table) > table:has(> thead > tr > :nth-child(3)) {
  min-inline-size: 26rem;
}
.em-article .story :is(.table-scroll, .vis-table) > table:has(> thead > tr > :nth-child(4)) {
  min-inline-size: 34rem;
}

.em-article .story :is(.table-scroll, .vis-table)::before {
  content: var(--em-table-cue, none);
  display: block;
  position: sticky;
  inset-inline-start: 0;
  block-size: var(--lg);
  background: var(--wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cpath d='M3 8h34M9 3 3 8l6 5M31 3l6 5-6 5' fill='none' stroke='%2373384c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 2.5rem 1rem no-repeat;
  border-block-start: 1px solid var(--rule);
}

.em-article .story :is(.table-scroll, .vis-table) > table > :is(thead, tbody) > tr > :first-child {
  position: var(--em-sticky-cell, static);
  inset-inline-start: 0;
  z-index: 1;
  inline-size: var(--em-sticky-width, auto);
  background-color: var(--em-sticky-fill, transparent);
}
.em-article .story :is(.table-scroll, .vis-table) > table > thead { --em-sticky-fill: var(--em-sticky-head, transparent); }
.em-article .story :is(.table-scroll, .vis-table) > table > tbody > tr { --em-sticky-fill: var(--em-sticky-paper, transparent); }
.em-article .story :is(.table-scroll, .vis-table) > table > tbody > tr:nth-child(even) { --em-sticky-fill: var(--em-sticky-stripe, transparent); }

@container em-table (inline-size < 26rem) {
  .em-article .story :is(.table-scroll, .vis-table):has(> table > thead > tr > :nth-child(3))::before {
    --em-table-cue: "";
  }
  .em-article .story :is(.table-scroll, .vis-table) > table:has(> thead > tr > :nth-child(3)) {
    --em-scrolling-layout: fixed;
    --em-scrolling-borders: separate;
    --em-sticky-cell: sticky;
    --em-sticky-width: min(7.5rem, 32vw);
    --em-sticky-head: var(--deep);
    --em-sticky-paper: var(--paper);
    --em-sticky-stripe: var(--blush);
  }
}

@container em-table (26rem <= inline-size < 34rem) {
  .em-article .story :is(.table-scroll, .vis-table):has(> table > thead > tr > :nth-child(4))::before {
    --em-table-cue: "";
  }
  .em-article .story :is(.table-scroll, .vis-table) > table:has(> thead > tr > :nth-child(4)) {
    --em-scrolling-layout: fixed;
    --em-scrolling-borders: separate;
    --em-sticky-cell: sticky;
    --em-sticky-width: min(7.5rem, 32vw);
    --em-sticky-head: var(--deep);
    --em-sticky-paper: var(--paper);
    --em-sticky-stripe: var(--blush);
  }
}
