@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf9f7;
  --ink: #1b191b;
  --muted: #645c5e;
  --rule: #ded8d8;
  --accent: #84283e;
  --sans: system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --shell: 1240px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.shell { width: min(var(--shell), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.icon { flex: none; width: 17px; height: 17px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 8px 12px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.utility { border-bottom: 1px solid var(--rule); }
.utility-inner { display: flex; align-items: center; justify-content: flex-end; min-height: 37px; font-size: 12px; }
.tool-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 2px; border: 0; background: transparent; }
.tool-button:hover, .arrow-link:hover { color: var(--accent); }
.icon-button { width: 36px; }

.masthead { display: grid; justify-items: center; gap: 7px; padding: 14px 0 18px; }
.wordmark { display: inline-block; font: 400 76px/.98 'Instrument Serif', Georgia, serif; white-space: nowrap; }
.wordmark-period { color: var(--accent); }
.masthead-caption { font-size: 12px; color: var(--muted); }
.site-nav { display: flex; justify-content: center; gap: 42px; border-block: 1px solid var(--rule); }
.site-nav a { display: grid; place-items: center; position: relative; min-width: 42px; min-height: 46px; padding-inline: 4px; font-size: 14px; font-weight: 500; }
.site-nav a:hover, .site-nav [aria-current] { color: var(--accent); }
.site-nav [aria-current]::after { content: ''; position: absolute; bottom: -1px; inset-inline: 3px; height: 2px; background: var(--accent); }

.home { padding-top: 30px; }
.cover { display: grid; align-items: end; position: relative; isolation: isolate; min-height: 490px; background: #5a5049; color: #fff; overflow: hidden; }
.cover > img, .cover::after { position: absolute; inset: 0; z-index: -1; }
.cover > img { object-position: 50% 38%; }
.cover::after { content: ''; background: rgb(27 22 24 / 35%); }
.editorial-image { width: 100%; height: 100%; object-fit: cover; object-position: var(--position, center); }
.cover-content { width: min(52%, 540px); margin: 0 0 43px 48px; }
.cover-kicker { display: inline-flex; gap: 9px; align-items: center; font-size: 13px; }
.cover-kicker > span { width: 22px; height: 2px; background: #eeb2b9; }
.cover h1, .reading h1 { font-family: var(--serif); font-weight: 400; }
.cover h1 { margin-top: 12px; font-size: 76px; line-height: .98; }
.cover p { max-width: 350px; margin-top: 16px; color: #fffaf8; font-size: 15px; line-height: 1.8; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 13px; font-weight: 600; }
.cover-link { margin-top: 23px; padding: 0 0 6px; border-bottom: 1px solid rgb(255 255 255 / 65%); }
.cover-link .icon { filter: invert(1); }
.cover-link:hover { color: #fff; border-bottom-color: #fff; }
.cover-link:focus-visible { outline-color: white; }

.latest { margin-top: 39px; scroll-margin-top: 16px; }
.cover[hidden] + .latest { margin-top: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 0 13px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.section-heading h2 { font: 400 38px/1.15 var(--serif); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 25px; }
.story-link { display: block; height: 100%; padding-bottom: 21px; border-bottom: 1px solid var(--rule); }
.story-image { aspect-ratio: 1.4; overflow: hidden; background: #dfd9d4; }
.story-image img { transition: transform .28s ease; }
.story-link:hover img { transform: scale(1.035); }
.story-link:hover h3 { color: var(--accent); }
.story-meta { margin-top: 13px; }
.category-label { color: var(--accent); font-size: 13px; font-weight: 600; }
.story-card h3 { margin-top: 6px; font: 400 29px/1.15 var(--serif); }
.story-card p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.reading { padding-top: 42px; }
.reading-header { max-width: 880px; margin: 0 auto 29px; text-align: center; }
.reading-header h1 { margin: 9px 0 13px; font-size: 60px; line-height: 1.1; text-wrap: balance; }
.reading-deck { margin: 0 auto 12px; max-width: 640px; color: var(--muted); font-size: 16px; }
.reading-figure { max-width: 780px; margin-inline: auto; }
.reading-figure-wide { max-width: 930px; }
.reading-figure img { aspect-ratio: 4 / 3; background: #dfd9d4; }
.reading-figure-wide img { aspect-ratio: 1.65; }
.reading-figure figcaption { padding-top: 7px; text-align: right; color: var(--muted); font-size: 12px; }
.reading-figure figcaption a:hover, .reading-header a:hover { text-decoration: underline; text-underline-offset: 3px; }
.reading-body { max-width: 670px; margin: 37px auto 0; }
.reading-body .reading-intro { margin-bottom: 31px; color: var(--muted); font-size: 18px; }
.reading-body section + section { margin-top: 27px; }
.reading-body h2 { margin-bottom: 8px; font: 400 32px/1.15 var(--serif); }
.reading-body p { font-size: 16px; line-height: 1.95; }
.back-link { margin-top: 28px; }
.related { margin-top: 63px; }

.site-footer { margin-top: 61px; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 119px; padding-block: 22px; }
.footer-mark { font-size: 34px; }
.footer-inner p { margin-top: 4px; color: var(--muted); font-size: 12px; }

.search-dialog { width: min(540px, calc(100% - 32px)); max-height: min(72vh, 660px); padding: 25px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.search-dialog::backdrop { background: rgb(23 18 20 / 57%); }
.search-heading, .search-field { display: flex; align-items: center; gap: 12px; }
.search-heading { justify-content: space-between; margin-bottom: 14px; }
.search-heading h2 { font: 400 32px/1.15 var(--serif); }
.search-field { min-height: 44px; padding-inline: 12px; border: 1px solid #b8aeb1; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-field input { flex: 1; width: 100%; min-width: 0; min-height: 42px; padding: 0; border: 0; outline: 0; background: transparent; }
.search-results { max-height: 48vh; overflow: auto; overscroll-behavior: contain; margin: 12px 0 0; padding: 2px 5px; list-style: none; }
.search-results li + li { border-top: 1px solid var(--rule); }
.search-results a { display: grid; grid-template-columns: 6em 1fr; align-items: baseline; gap: 6px; padding: 11px 4px; }
.search-results a:focus-visible { outline-offset: -2px; }
.search-results a:hover { color: var(--accent); }
#search-empty { margin-top: 15px; color: var(--muted); }

@media (max-width: 1000px) {
  :root { --gutter: 28px; }
  .cover { min-height: 415px; }
  .cover-content { margin-left: 34px; }
  .cover h1 { font-size: 62px; }
  .story-grid { gap: 28px 19px; }
  .story-card h3 { font-size: 25px; }
}

@media (max-width: 720px) {
  :root { --gutter: 19px; }
  .masthead { gap: 5px; padding: 12px 0 14px; }
  .wordmark { font-size: 55px; }
  .site-nav { column-gap: 10px; flex-wrap: wrap; }
  .site-nav a { display: flex; flex: none; align-items: center; justify-content: center; min-height: 43px; white-space: nowrap; }
  .home { padding-top: 20px; }
  .cover { min-height: 385px; }
  .cover > img { object-position: 63% 55%; }
  .cover-content { width: min(65%, 350px); margin: 0 0 27px 25px; }
  .cover h1 { font-size: 51px; }
  .cover p { margin-top: 12px; font-size: 14px; }
  .cover-link { margin-top: 16px; }
  .latest { margin-top: 25px; }
  .section-heading { padding-bottom: 10px; margin-bottom: 16px; }
  .section-heading h2 { font-size: 31px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 15px; }
  .story-image { aspect-ratio: 1.08; }
  .story-card h3 { font-size: 23px; }
  .story-card p { font-size: 13px; }
  .reading { padding-top: 31px; }
  .reading-header { margin-bottom: 20px; }
  .reading-header h1 { font-size: 45px; }
  .reading-body h2 { font-size: 27px; }
  .related { margin-top: 42px; }
  .footer-mark { font-size: 32px; }
}

@media (max-width: 430px) {
  .site-nav { column-gap: 3px; }
  .site-nav a { min-width: 0; padding-inline: 2px; font-size: 12px; }
  .cover { min-height: 360px; }
  .cover > img { object-position: 23% 54%; }
  .cover::after { background: rgb(27 22 24 / 44%); }
  .cover-content { width: calc(100% - 40px); margin: 0 20px 23px; }
  .cover h1 { font-size: 47px; }
  .cover p { max-width: 245px; }
  .reading-header h1 { font-size: 40px; }
}

@media (max-width: 355px) {
  :root { --gutter: 14px; }
  .site-nav { column-gap: 0; }
  .site-nav a { font-size: 11px; }
  .cover { min-height: 326px; }
  .cover h1 { font-size: 42px; }
  .story-card h3 { font-size: 21px; }
}

@media (max-height: 760px) and (min-width: 721px) {
  .cover { min-height: 380px; }
  .cover > img { object-position: 50% 34%; }
}

@media (max-height: 740px) and (max-width: 720px) {
  .cover { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-image img { transition: none; }
}
