:root {
  color-scheme: light;
  --paper: #f8f4ee;
  --ink: #281d28;
  --accent: #6e3757;
  --muted: #64565f;
  --rule: #d8ccd1;
  --surface: #fff9f4;
  --highlight: #eee4e7;
  --image: #e6dbdb;
  --selected-text: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1b161c;
    --ink: #f5eaf0;
    --accent: #e0a6c6;
    --muted: #ccb6c5;
    --rule: #534252;
    --surface: #2c232e;
    --highlight: #302431;
    --image: #392a3a;
    --selected-text: #281d28;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b161c;
  --ink: #f5eaf0;
  --accent: #e0a6c6;
  --muted: #ccb6c5;
  --rule: #534252;
  --surface: #2c232e;
  --highlight: #302431;
  --image: #392a3a;
  --selected-text: #281d28;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
.masthead, .footer { padding: 1.3rem max(1.4rem, calc((100vw - 74rem) / 2)); }
.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .65rem; text-align: center; border-bottom: 1px solid var(--rule); }
.wordmark { display: inline-block; font-size: clamp(2rem, 6vw, 4rem); font-weight: bold; letter-spacing: -.07em; line-height: 1; text-decoration: none; }
.masthead .wordmark { grid-column: 2; }
.site-menu { position: relative; justify-self: start; text-align: left; }
.masthead-control { display: inline-grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; padding: .25rem .5rem; border: 1px solid var(--rule); border-radius: .25rem; color: var(--ink); background: var(--surface); font: 600 .75rem/1 system-ui, sans-serif; cursor: pointer; }
.masthead-control:hover { color: var(--accent); }
.site-menu summary { list-style: none; font-size: 1.2rem; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu nav { position: absolute; z-index: 1; top: calc(100% + .55rem); left: 0; display: grid; min-width: max-content; padding: .35rem; border: 1px solid var(--rule); border-radius: .25rem; background: var(--surface); box-shadow: 0 .5rem 1rem #14081126; }
.site-menu nav a { padding: .52rem .68rem; }
#theme { justify-self: end; padding: .25rem; }
#theme svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#theme .sun, :root[data-theme="dark"] #theme .moon { display: none; }
:root[data-theme="dark"] #theme .sun { display: block; }
.footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem 1.3rem; margin-top: 1.25rem; }
nav a, .category, time { font: 600 .78rem/1.4 system-ui, sans-serif; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.listing { max-width: 74rem; padding: 0 1.4rem; margin: 2.5rem auto 4rem; }
h1, h2 { line-height: 1.03; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); margin: 0 0 1.4rem; }
h2 { font-size: clamp(1.45rem, 2.7vw, 2rem); margin: .45rem 0 .7rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.35rem; }
.card a { display: block; text-decoration: none; }
.card-image { overflow: hidden; background: var(--image); aspect-ratio: 4 / 3; }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: .85rem 0 1.15rem; border-bottom: 1px solid var(--rule); }
.category { color: var(--accent); text-transform: uppercase; letter-spacing: .075em; }
time { color: var(--muted); }
.featured { margin-bottom: 2rem; background: var(--highlight); }
.featured a:has(.card-image) { display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; }
.featured .card-image { aspect-ratio: 16 / 10; }
.featured .card-copy { display: grid; align-content: center; padding: 1.45rem 2rem; border: 0; }
.featured h2 { font-size: clamp(1.85rem, 4vw, 3.35rem); }
.story { margin: 3rem auto 4rem; padding: 0 1.4rem; max-width: 57rem; }
.story-header, .story-body { max-width: 43rem; margin: 0 auto; }
.story-header h1 { margin: .7rem 0 1rem; }
.story-cover:empty { display: none; }
.story-cover { margin: 2rem auto; }
.story-cover img { display: block; width: 100%; max-height: 680px; object-fit: contain; background: var(--highlight); }
.story-body { font-size: 1.16rem; line-height: 1.67; overflow-wrap: anywhere; }
.story-body h2 { margin-top: 1.6em; }
.story-body figure { margin: 1.35rem 0; }
.story-body img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.story-body figcaption { color: var(--muted); font-size: .9rem; }
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; }
.pagination a { display: grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; border: 1px solid var(--rule); }
.pagination a[aria-current] { background: var(--ink); color: var(--selected-text); }
.footer { border-top: 1px solid var(--rule); text-align: center; }
.footer .wordmark { font-size: 1.6rem; }
@media (max-width: 700px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .featured a:has(.card-image) { grid-template-columns: 1fr; }
  .featured .card-copy { padding: 1rem 1.2rem; }
}
@media (max-width: 380px) {
  .masthead { padding-inline: .75rem; }
  .masthead .wordmark { font-size: 1.78rem; }
  .grid { grid-template-columns: 1fr; }
}
