@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4/source-serif-4-latin-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Keep the purchasable edition in the same place when the reader changes pages. */
:root {
  --masthead-row-top: max(clamp(8px, 2.1svh, 26px), env(safe-area-inset-top, 0px));
  --masthead-right: max(clamp(16px, 2vw, 32px), env(safe-area-inset-right, 0px));
  --masthead-row-height: 50px;
  --preorder-height: 46px;
}
html { scrollbar-gutter: stable; }

.pill-nav {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px;
  border: 1px solid #ded6c8;
  border-radius: 999px;
  background: #f4efe5;
  font: 500 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
}
.pill-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 20px;
  border-radius: inherit;
  color: #5b5449;
  text-decoration: none;
}
.pill-nav a:is([aria-current="page"], [aria-current="location"]) {
  color: #242019;
  background: #fffdf8;
  box-shadow: 0 1px 3px rgb(69 52 25 / 12%);
  font-weight: 600;
}
.pill-nav a:is(:hover, :focus-visible) { color: #242019; background: #fffdf8; }
.pill-nav a:focus-visible { outline: 2px solid #926322; outline-offset: 2px; }
@media (max-width: 719px) {
  .pill-nav { font-size: 14px; }
  .pill-nav a { padding-inline: clamp(7px, 2.1vw, 14px); }
}

.preorder-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--preorder-height);
  padding: 10px 20px;
  border: 1px solid #996625;
  border-radius: 6px;
  color: #2c2113;
  background: linear-gradient(135deg, #dfbd78 0%, #c69543 55%, #b7802c 100%);
  box-shadow: inset 0 1px 0 rgb(255 244 212 / 40%), 0 3px 9px rgb(87 55 15 / 15%);
  font: 600 14px/1.4 var(--sans);
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
}
.preorder-button:hover {
  background: linear-gradient(135deg, #e7c98d, #d2a456 55%, #c08d3b);
  box-shadow: inset 0 1px 0 rgb(255 244 212 / 50%), 0 4px 12px rgb(87 55 15 / 20%);
  text-decoration: none;
}
.preorder-button:active { box-shadow: inset 0 1px 3px rgb(87 55 15 / 20%); }

@media (min-width: 720px) {
  :is(.cover-toolbar, .header-controls) > .preorder-button {
    position: absolute;
    /* Centre the gold control on the 50px row occupied by the home navigation. */
    top: calc(var(--masthead-row-top) + (var(--masthead-row-height) - var(--preorder-height)) / 2);
    right: var(--masthead-right);
  }
}
@media (max-width: 719px) {
  :is(.cover-toolbar, .header-controls) > .preorder-button {
    min-height: 44px;
    padding-inline: clamp(9px, 2.8vw, 16px);
    font-size: 13px;
  }
}

[hidden] { display: none !important; }

.site-footer {
  --footer-gutter: 48px;
  margin: 0;
  padding-block: 20px;
  padding-inline: max(var(--footer-gutter), calc((100% - 1360px) / 2));
  border-top: 1px solid #ded6c8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "title links" "credits links" "copyright preferences";
  align-items: baseline;
  gap: 0 32px;
  color: #263b42;
}
.footer-identity { display: contents; }
.footer-title { grid-area: title; font: 400 20px/1.3 var(--serif); }
.footer-credits {
  grid-area: credits;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font: 13px/1.6 var(--sans);
  color: #566267;
}
.footer-credits span + span::before { content: "·"; margin-right: 14px; }
.site-footer .copyright { grid-area: copyright; margin: 0; padding-top: 16px; color: #566267; font: 12px/1.5 var(--sans); }
.site-footer nav {
  grid-area: links;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 8px 24px;
  max-width: 600px;
  margin-left: auto;
  padding-top: 6px;
  font: 13px/1.5 var(--sans);
}
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

.reader-page main { width: min(720px, calc(100% - 40px)); margin: 24px auto 0; }
.reader-page .reading-bar { margin-bottom: 18px; }
.reader-page .reading-leaf,
.reading-dialog {
  background: #f8f3e7;
  color: #263b42;
  border: 1px solid #b9a16f;
  border-radius: 24px;
}
.reading-dialog { width: min(720px, calc(100% - 24px)); }
.reading-dialog .reading-bar { background: #f8f3e7; }
.reading-leaf { padding: clamp(24px, 4vw, 48px); }
.reading-leaf h1 {
  margin: 12px 0 10px;
  color: #926322;
  font: 400 clamp(36px, 4.6vw, 56px)/1.06 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.reading-kicker { color: #926322; font: 600 13px/1.5 var(--sans); }
.reading-byline { color: #566267; font: 500 14px/1.5 var(--sans); }
.reading-prose {
  margin-top: 24px;
  font: 400 21px/1.65 "Source Serif 4", Baskerville, "Iowan Old Style", Georgia, serif;
  font-synthesis: none;
}
.reading-prose p + p { margin-top: 1em; }
.reading-prose a[href^="mailto:"] { overflow-wrap: anywhere; }
.reading-leaf figure.reading-prose { margin-inline: 0; }
.reading-leaf .reading-prose blockquote {
  margin: 0 0 .55em;
  padding-inline-start: .8em;
  border-inline-start: 2px solid #b9a16f;
}
.reading-leaf .reading-prose figcaption { padding-inline-start: 1.25em; }
.reading-leaf .reader-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  padding-block-start: .65rem;
  border-block-start: 1px solid #ded6c8;
}
.reader-page .reader-permalink { display: none; }
.reading-dialog .reader-permalink { margin-top: .4rem; }
.reader-page .reading-extra { margin-top: 20px; }
.reader-page .text-action,
.reader-page .reader-jacket summary {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 44px;
  color: #926322;
  font: 600 14px/1.45 var(--sans);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.reading-bar .text-action,
.article-opening .back-link { text-decoration-line: none; }
.article-opening .back-link { column-gap: .25em; }
.reading-back-label {
  text-decoration-line: underline;
  text-decoration-thickness: inherit;
}
.reader-page .reader-jacket summary { display: list-item; align-content: center; }
.reader-jacket[open] > a { display: block; width: min(200px, 65%); margin-top: 12px; }
.reader-jacket img { width: 100%; height: auto; }

@media (max-width: 1000px) {
  .site-footer { --footer-gutter: 32px; }
}
@media (max-width: 719px) {
  .site-footer {
    --footer-gutter: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "title title" "credits credits" "links links" "copyright preferences";
    column-gap: 12px;
    padding-block: 16px;
  }
  .site-footer nav { justify-self: start; justify-content: flex-start; margin: 12px 0 0; gap: 0 20px; }
  .footer-title { font-size: 19px; white-space: normal; }
  .footer-credits { flex-direction: column; }
  .footer-credits span + span::before { content: none; }
  .reader-page .reading-leaf, .reading-dialog { border-radius: 22px; }
  .reading-prose { font-size: 20px; line-height: 1.6; }
}

.updates .form-status:empty { display: none; }
.updates .form-status:not(:empty) { padding: 12px 0 0; }
.analytics-choice { grid-area: preferences; justify-self: end; max-width: 100%; padding-top: 16px; text-align: right; color: var(--quiet, #566267); font: 13px/1.5 var(--sans, sans-serif); }
.analytics-choice summary { display: list-item; width: fit-content; margin-left: auto; min-height: 24px; cursor: pointer; text-decoration: underline; }
.analytics-choice label { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; text-align: left; }
