/* Shared print-like composition for an essay with a story-specific engraving. */
.essay {
  padding-top: var(--nav-h);
  background: #fbfaf7;
  color: #17191d;
}

.essay-frame {
  width: min(100% - 104px, 1430px);
  margin-inline: auto;
}

.essay-cover {
  padding: 54px 0 62px;
  background: linear-gradient(180deg, #dcdfe4, #e6e8ec 55%, #edeef1);
  border-bottom: 1px solid #aeb3ba;
}

.essay-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #414951;
  font-size: 14px;
}

.essay-meta span {
  padding-left: 22px;
  border-left: 1px solid #939ba3;
}

.essay-meta a, .essay-meta time { white-space: nowrap; }
.essay-meta a, .essay-back { padding-block: 10px; }

.essay-spread {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  align-items: end;
  gap: 2vw;
  min-height: 330px;
  padding-top: 35px;
}

.essay h1 {
  max-width: 16ch;
  font: 350 clamp(55px, 5.85vw, 91px)/1.005 var(--font-display);
  letter-spacing: -.04em;
  text-wrap: balance;
}

.essay-engraving {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.essay-layout {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(0, 670px) minmax(0, .65fr);
  gap: 4vw;
  align-items: start;
  padding-block: 68px 76px;
}

.essay-index {
  position: sticky;
  top: calc(var(--nav-h) + 36px);
  max-width: 196px;
  padding-top: 4px;
  font-size: 14px;
  line-height: 1.45;
}

.essay-index span {
  display: block;
  border-top: 1px solid #74787c;
  padding-top: 15px;
  margin-bottom: 14px;
  font-weight: 600;
}

.essay-index a {
  display: block;
  padding-block: 8px;
  color: #555d63;
}

.essay a:hover, .essay a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.essay-copy > p {
  margin-bottom: 1em;
  font: 400 clamp(20px, 1.68vw, 24px)/1.5 var(--font-display);
  letter-spacing: -.012em;
}

.essay-copy > .essay-opening {
  font-size: clamp(25px, 2.25vw, 33px);
  line-height: 1.3;
  letter-spacing: -.018em;
}

.essay-copy h2 {
  margin: 1.4em 0 .55em;
  font: 400 clamp(33px, 3.1vw, 45px)/1.08 var(--font-display);
  letter-spacing: -.036em;
  text-wrap: balance;
}

.essay-copy > .essay-source, .essay-back {
  color: #4b535d;
  font: 14px/1.55 var(--font-body);
  letter-spacing: normal;
}

.essay-copy > p a { text-decoration: underline; text-underline-offset: 3px; }

.essay-back {
  display: inline-block;
  margin-top: 25px;
  padding-block: 16px;
  border-top: 1px solid #c3c8cc;
}

.essay-offers {
  margin: 28px 0 38px;
  padding: 31px 32px 34px;
  background: #1b2028;
  color: #fafafa;
}

.essay-offers figcaption {
  padding-bottom: 21px;
  border-bottom: 1px solid #59616b;
  font-size: 15px;
}

.essay-offer {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding-top: 24px;
  font-size: 15px;
}

.essay-offer + .essay-offer { margin-top: 19px; border-top: 1px solid #49515b; }
.essay-offer strong { font: 400 clamp(36px, 3.6vw, 59px)/1 var(--font-display); letter-spacing: -.04em; }
.essay-offer strong span { font-size: .65em; }
.essay-offer small { color: #e0e4e8; font: 13px/1.5 var(--font-body); }

@media (max-width: 950px) {
  .essay-frame { width: calc(100% - 64px); }
  .essay-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 36px; }
  .essay-spread { min-height: 260px; }
  .essay h1 { font-size: clamp(48px, 6.3vw, 60px); }
  .essay-offers { padding: 22px; }
  .essay-offer { font-size: 13px; }
}

@media (max-width: 690px) {
  .essay-frame { width: calc(100% - 40px); }
  .essay-cover { padding: 18px 0 22px; }
  .essay-spread { display: block; min-height: 0; padding-top: 15px; }
  .essay h1 { max-width: 18ch; font-size: clamp(40px, 10.7vw, 61px); text-wrap: pretty; }
  .essay-engraving { max-width: 390px; margin: 15px auto 0; }
  .essay-layout { display: block; padding-block: 33px 62px; }
  .essay-index { display: none; }
  .essay-meta { font-size: 13px; }
  .essay-offer { grid-template-columns: .95fr .9fr 1.15fr; gap: 9px; }
  .essay-offer strong { font-size: 37px; }
}

/* An essay with no parts (the manifesto): one reading column. */
.essay-layout--plain { grid-template-columns: minmax(0, 670px); justify-content: center; }
/* The signed close of a letter. */
.letter__sign { margin-top: 44px; font: 400 17px/1.6 var(--font-body); color: var(--ink); }
.letter__sign p { margin: 0; }
.letter__sign a { text-decoration: underline; text-underline-offset: 3px; }
.letter__signature { display: block; width: 185px; height: auto; margin: 0 0 10px -6px; }

/* Guides: lists and comparison tables in the reading column. */
.essay-copy > ul, .essay-copy > ol { margin: 0 0 1em; padding-left: 1.2em; font: 400 clamp(20px, 1.68vw, 24px)/1.5 var(--font-display); letter-spacing: -.012em; }
.essay-copy li { margin-bottom: .4em; }
.essay-copy li a { text-decoration: underline; text-underline-offset: 3px; }
.essay-table { margin: 8px 0 28px; overflow-x: auto; }
.essay-table table { width: 100%; border-collapse: collapse; font: 400 15px/1.5 var(--font-body); color: var(--ink); }
.essay-table th, .essay-table td { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.essay-table thead th { font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom-color: rgba(23, 24, 26, .28); }
.essay-table tbody th { font-weight: 500; white-space: nowrap; }
/* The loaded Newsreader faces stop at 500: a bolder weight would be faked by the browser. */
.essay-copy strong { font-weight: 500; }
.essay-table:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
/* On a phone a wide comparison keeps readable columns and scrolls sideways inside its own box. Soft shadows at the
   edges show there is more to the side; they are backgrounds, so they never cover text or the focus ring. */
@media (max-width: 809px) {
  .essay-table table:has(thead th:nth-child(3)) { min-width: 520px; }
  .essay-table table:has(thead th:nth-child(4)) { min-width: 660px; }
  .essay-table:has(thead th:nth-child(3)) {
    background:
      linear-gradient(90deg, #fbfaf7 30%, rgba(251, 250, 247, 0)) left center / 44px 100% no-repeat local,
      linear-gradient(270deg, #fbfaf7 30%, rgba(251, 250, 247, 0)) right center / 44px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(23, 24, 26, .22), rgba(23, 24, 26, 0)) left center / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(23, 24, 26, .22), rgba(23, 24, 26, 0)) right center / 14px 100% no-repeat scroll;
  }
}
