@font-face {
  font-family: "DM Serif Text";
  src: url("/assets/fonts/dm-serif-text.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf6ed;
  --surface: #fffdf7;
  --ink: #251820;
  --plum: #36172c;
  --berry: #7c3f51;
  --olive: #dce88d;
  --muted: #625459;
  --line: #dcd1c3;
  --serif: "DM Serif Text", Georgia, serif;
  --sans: system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 3px solid var(--berry); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.038em; line-height: 1.08; }
.wrap { width: min(100% - 5rem, 1260px); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 3; padding: .7rem; background: var(--surface); transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 5.4rem; }
.brand { flex: 0 0 auto; }
.brand img { width: 164px; height: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem clamp(.8rem, 2vw, 2rem); }
.nav a { padding-block: .5rem; font-weight: 650; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--berry); text-decoration: underline; }
.category-menu { display: none; }
.feature { display: grid; grid-template-columns: .88fr 1.12fr; min-height: clamp(375px, 44vw, 540px); margin-block: 2rem 3.4rem; background: var(--plum); color: var(--surface); }
.feature-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.35rem; padding: clamp(1.7rem, 4vw, 4.2rem); }
.feature-copy h1 { font-size: clamp(2.65rem, 5.35vw, 5.6rem); }
.feature-copy > p:not(.tag) { max-width: 33ch; color: #f1e6e6; font-size: clamp(.98rem, 1.5vw, 1.2rem); }
.feature .tag { color: var(--olive); }
.tag { color: var(--berry); font-size: .71rem; font-weight: 750; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: fit-content; max-width: 100%; padding: .8rem 1.05rem; background: var(--olive); color: var(--plum); font-weight: 750; font-size: .88rem; text-decoration: none; }
.button:hover { background: #eaf3ad; }
.feature a:focus-visible { outline-color: var(--olive); outline-offset: -4px; }
.feature-copy .button:focus-visible { outline-offset: 5px; }
.feature-story { position: relative; display: flex; align-items: flex-end; min-width: 0; min-height: 17rem; background: #644953; text-decoration: none; }
.feature-story img { position: absolute; width: 100%; height: 100%; object-fit: cover; inset: 0; }
.feature-caption { position: relative; display: grid; grid-template-columns: 1fr auto; width: 100%; gap: .1rem 1rem; align-items: center; padding: 3rem clamp(1.15rem, 3vw, 2.1rem) 1.3rem; background: linear-gradient(transparent, #1b0b18e8 69%); }
.feature-caption span { font-weight: 750; font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--olive); }
.feature-caption strong { grid-column: 1; font: 400 clamp(1.3rem, 2.3vw, 2rem)/1.13 var(--serif); }
.feature-caption b { grid-column: 2; grid-row: 1 / span 2; padding: .25rem .5rem; border: 1px solid #ffffff75; font-weight: 400; }
.feature-story:hover strong { text-decoration: underline; }
.template-ad-slot:empty { display: none; }
.shelf { padding-block: 1.25rem 3.25rem; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem 1.5rem; margin-bottom: 1.25rem; padding-top: .95rem; border-top: 1px solid var(--line); }
.shelf-head h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.shelf-head a { flex: 0 0 auto; color: var(--berry); font-weight: 750; font-size: .83rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.9rem, 2vw, 1.65rem); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
.card-link { display: block; height: 100%; text-decoration: none; }
.card img { width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; background: #ebe0d6; }
.card-copy { padding: 1.12rem clamp(.9rem, 2vw, 1.45rem) 1.5rem; }
.card-copy :is(h2, h3) { margin-top: .4rem; font-size: clamp(1.45rem, 2.55vw, 2.05rem); overflow-wrap: anywhere; }
.card-copy p { margin-top: .65rem; color: var(--muted); font-size: .91rem; }
.card-link:hover :is(h2, h3) { color: var(--berry); text-decoration: underline; }
.lower-shelves { padding-block: 1.2rem .65rem; background: #f1e9ec; }
.lower-shelves .shelf-head { border-color: #d4c1cc; }
.index-heading, .plain-page { padding-block: clamp(2.5rem, 7vw, 5.5rem) 2.7rem; }
.index-heading h1, .plain-page h1 { max-width: 16ch; font-size: clamp(2.8rem, 7vw, 5.8rem); }
.index-heading p { margin-top: 1rem; max-width: 46ch; color: var(--muted); font-size: 1.12rem; }
.index-heading .button { margin-top: 1.4rem; }
.archive { padding-bottom: 4.5rem; }
.story-heading, .story-cover, .story-layout { max-width: 920px; }
.story-heading { padding-block: clamp(2.1rem, 6vw, 4.6rem) 2.1rem; }
.crumb { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; color: var(--berry); font-size: .84rem; font-weight: 650; margin-bottom: 1.35rem; }
.story-heading h1 { font-size: clamp(2.65rem, 6.15vw, 5.3rem); overflow-wrap: anywhere; }
.dek { max-width: 55ch; margin-top: 1rem; color: var(--muted); font-size: clamp(1.04rem, 2.3vw, 1.37rem); }
.reading-time { margin-top: 1.3rem; font-weight: 700; font-size: .82rem; }
.story-cover img { width: 100%; height: auto; aspect-ratio: 2.05; object-fit: cover; background: #ebe0d6; }
.story-layout { display: grid; grid-template-columns: minmax(10rem, 190px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; padding-block: 2.5rem 4rem; }
.story-layout > .prose:first-child { grid-column: 2; }
.contents { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; border-top: 1px solid var(--line); padding: .95rem .25rem .75rem; }
.contents h2 { font: 750 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.contents ol { margin: .75rem 0 0; padding: 0; list-style: none; }
.contents li + li { margin-top: .58rem; }
.contents a { display: inline-block; color: var(--muted); font-size: .83rem; line-height: 1.4; }
.prose { min-width: 0; color: #31272d; font: 1.13rem/1.75 Georgia, serif; overflow-wrap: anywhere; }
.prose h2 { color: var(--ink); margin: 1.65em 0 .55em; font-size: clamp(1.75rem, 4vw, 2.65rem); }
.prose h3 { margin: 1.55em 0 .5em; font-size: 1.55rem; }
.prose p, .prose ul, .prose dl { margin-bottom: 1.1em; }
.prose a { color: var(--berry); }
.prose dt { font-weight: 700; }
.prose dd { margin: .25rem 0 .9rem; }
.plain-page { max-width: 790px; }
.plain-page header { border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; margin-bottom: 1.65rem; }
.updated { color: var(--muted); font: 650 .82rem var(--sans); }
.footer { background: var(--plum); color: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 2.3rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 400 1.8rem/1 var(--serif); }
.footer nav { display: flex; flex-wrap: wrap; gap: .65rem 1.3rem; font-size: .88rem; }
.footer a:focus-visible { outline-color: var(--olive); }
.footer small { color: #e4cdd9; }
@media (max-width: 850px) {
  .wrap { width: min(100% - 2.5rem, 1260px); }
  .masthead-inner { gap: 1rem; }
  .brand img { width: 140px; }
  .nav { gap: .15rem .8rem; }
  .nav a { font-size: .8rem; }
  .story-heading, .story-cover, .story-layout { max-width: 68ch; }
  .story-layout { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  .story-layout > .prose:first-child { grid-column: 1; }
  .contents { position: static; max-height: none; border: 1px solid var(--line); padding: .9rem 1rem; }
  .contents ol { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
  .contents li + li { margin-top: 0; }
}
@media (max-width: 625px) {
  .wrap { width: calc(100% - 2rem); }
  .masthead-inner { position: relative; min-height: 4.25rem; gap: .75rem; }
  .masthead-inner > .nav { display: none; }
  .category-menu { display: block; }
  .category-menu summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: .5rem .75rem;
    background: var(--olive);
    color: var(--plum);
    font-size: .85rem;
    font-weight: 750;
    list-style: none;
    cursor: pointer;
  }
  .category-menu summary::-webkit-details-marker { display: none; }
  .category-menu summary::after {
    content: "";
    width: .45rem;
    height: .45rem;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-.12rem) rotate(45deg);
  }
  .category-menu[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
  .category-menu summary:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; }
  .category-menu:not([open]) > .nav { display: none; }
  .category-menu .nav {
    position: absolute;
    z-index: 2;
    inset: 100% 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 .65rem;
    padding: .5rem;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 .5rem 1rem #2518201a;
  }
  .category-menu .nav a { display: flex; align-items: center; min-height: 44px; padding: .5rem; white-space: normal; }
  .feature { grid-template-columns: minmax(0, 1fr); margin-block: 1rem 2.2rem; }
  .feature-copy { gap: 1rem; }
  .wide-break { display: none; }
  .feature-story { min-height: 16rem; }
  .shelf { padding-block: .75rem 2.5rem; }
  .shelf-head { flex-wrap: wrap; gap: .4rem 1rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card img { aspect-ratio: 1.75; }
  .story-cover img { aspect-ratio: 1.45; }
  .story-layout { padding-top: 1.6rem; }
  .prose { font-size: 1.07rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
