:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --surface: #fbfaf6;
  --text: #202822;
  --muted: #4e5b51;
  --green: #174a36;
  --rule: #c6cec2;
  --serif: 'PT Serif', Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--paper); font: 1rem/1.55 var(--sans); }
[hidden] { display: none !important; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
img { display: block; width: 100%; }
button, select, input { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #416eaa; outline-offset: 4px; }
.skip { position: fixed; z-index: 2; left: 1rem; top: 1rem; padding: .7rem 1rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }
.layout { width: min(100% - 3rem, 72rem); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--rule); }
.masthead-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.7rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; color: var(--green); text-decoration: none; font-size: 1.07rem; font-weight: 700; }
.brand-mark { position: relative; display: inline-block; width: 1.2rem; height: 1.2rem; border: 1.5px solid currentColor; border-radius: 50%; }
.brand-mark::after { content: ''; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 50%; background: linear-gradient(135deg, transparent 43%, currentColor 44% 55%, transparent 56%); }
.about-link { color: var(--green); font-size: .9rem; text-decoration: none; font-weight: 600; }
.about-link:hover { text-decoration: underline; }

.intro { display: grid; justify-items: start; gap: .55rem; padding: clamp(2rem, 5vw, 4.3rem) 0 2rem; border-bottom: 2px solid var(--green); }
.intro > p:first-child { color: var(--green); font-weight: 700; font-size: .86rem; letter-spacing: .07em; text-transform: uppercase; }
.intro h1 { font: 700 clamp(3rem, 8vw, 6.4rem)/1.02 var(--serif); letter-spacing: -.062em; }
.archive-dates { color: var(--muted); font-size: .95rem; padding-top: .55rem; }
.front { display: grid; grid-template-columns: minmax(0, 2.13fr) minmax(15rem, 1fr); gap: clamp(1.3rem, 4vw, 3rem); padding: 1.8rem 0 2.5rem; }
.lead-story figure { overflow: hidden; }
.lead-story img { height: clamp(14rem, 29vw, 24rem); object-fit: cover; object-position: center 52%; background: #dce4d9; color: var(--green); }
.lead-story figcaption { margin-top: .45rem; font-size: .78rem; color: var(--muted); }
.lead-story figcaption a { text-underline-offset: .15em; }
.lead-copy { padding-top: 1.4rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .85rem; color: var(--muted); font-size: .84rem; }
.topic { color: var(--green); font-weight: 700; }
.lead-copy h2 { margin: .45rem 0 .65rem; font: 700 clamp(1.85rem, 4.1vw, 3.15rem)/1.12 var(--serif); letter-spacing: -.035em; }
.lead-copy h2 a, .story-card a, .recent a { text-decoration: none; }
.lead-copy h2 a:hover, .story-card a:hover, .recent a:hover { color: var(--green); text-decoration: underline; text-underline-offset: .14em; text-decoration-thickness: .055em; }
.lead-copy > p { color: var(--muted); max-width: 53ch; }
.recent { border-left: 1px solid var(--rule); padding-left: clamp(1.25rem, 3vw, 2.15rem); }
.recent h2 { padding-bottom: .7rem; border-bottom: 1px solid var(--rule); font: 700 1.35rem/1.2 var(--serif); }
.recent ol { list-style: none; padding: 0; }
.recent li { padding: .9rem 0 1rem; border-bottom: 1px solid var(--rule); }
.recent a { display: block; margin-top: .32rem; font: 700 1.13rem/1.34 var(--serif); }

.archive { border-top: 2px solid var(--green); padding: 1.8rem 0 3rem; }
.archive > h2, .editorial h2 { font: 700 clamp(1.8rem, 3vw, 2.4rem)/1.15 var(--serif); letter-spacing: -.035em; }
.filters { display: grid; grid-template-columns: 1.6fr 1fr .82fr; gap: .8rem; margin-top: 1.2rem; }
.filters label, .manual-link { display: flex; flex-direction: column; gap: .35rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.filters input, .filters select, .manual-link input { min-width: 0; width: 100%; min-height: 2.75rem; padding: .55rem .7rem; color: var(--text); background: var(--surface); border: 1px solid #87958b; border-radius: .25rem; font-size: 1rem; font-weight: 400; }
.filter-status { min-height: 1.6rem; margin: .65rem 0; font-size: .875rem; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.6rem; border-top: 1px solid var(--rule); }
.story-card { display: flex; flex-direction: column; gap: .58rem; padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--rule); }
.story-card h3 { font: 700 1.35rem/1.23 var(--serif); letter-spacing: -.018em; }
.story-card p { font-size: .95rem; color: var(--muted); }
.origin { margin-top: auto; padding-top: .18rem; color: var(--muted); font-size: .82rem; }
.empty-state { padding: 1rem 0; color: var(--muted); }
.empty-state button { padding: 0; background: none; border: 0; color: var(--green); text-decoration: underline; cursor: pointer; }

.editorial { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; border-top: 1px solid var(--rule); padding: 1.7rem 0 2.4rem; }
.editorial p + p { margin-top: .7rem; }
.editorial p { max-width: 61ch; color: var(--muted); }
.site-footer { border-top: 1px solid #d9e0d6; background: #e7eae1; }
.footer-inner { font-size: .88rem; color: var(--muted); }

.reading-layout { width: min(100% - 3rem, 48rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; color: var(--muted); font-size: .875rem; margin: 1.6rem 0 2rem; }
.crumbs a { color: var(--green); text-underline-offset: .18em; }
.article-header { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; }
.article-header h1 { font: 700 clamp(2.15rem, 5.5vw, 3.8rem)/1.085 var(--serif); letter-spacing: -.045em; margin: .75rem 0 1rem; overflow-wrap: break-word; }
.deck { color: var(--muted); font-size: clamp(1.08rem, 2.8vw, 1.3rem); line-height: 1.5; }
.article-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-top: 1.3rem; }
.article-actions button { padding: .62rem 1rem; color: white; background: var(--green); border: 1px solid var(--green); border-radius: .28rem; font-weight: 600; cursor: pointer; }
.article-actions button:hover { background: #113a2a; }
.copy-status, .date-added { font-size: .875rem; color: var(--muted); }
.date-added, .manual-link { margin-top: .8rem; }
.prose { max-width: 65ch; margin-top: 1.6rem; font-size: 1.075rem; line-height: 1.72; }
.prose p + p { margin-top: 1rem; }
.prose h2 { font: 700 1.65rem/1.22 var(--serif); margin: 1.65rem 0 .7rem; }
.source-box { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; margin-top: 1.8rem; padding: .85rem 1rem; border-left: 3px solid var(--green); background: #e9ede4; font-size: .95rem; }
.source-box span { color: var(--muted); }
.source-box a, .related a { color: var(--green); font-weight: 600; text-underline-offset: .19em; }
.related { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.related h2 { font: 700 1.4rem/1.25 var(--serif); margin-bottom: .65rem; }
.related ul { padding-left: 1.15rem; }
.related li + li { margin-top: .35rem; }

@media (max-width: 52rem) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front { grid-template-columns: minmax(0, 1.6fr) minmax(13rem, 1fr); }
}
@media (max-width: 39rem) {
  .layout { width: calc(100% - 2rem); }
  .masthead-inner, .footer-inner { min-height: 4rem; }
  .intro { padding: 2.25rem 0 1.4rem; }
  .front { grid-template-columns: 1fr; gap: 1.6rem; }
  .recent { border-left: 0; padding-left: 0; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters label:first-child { grid-column: 1 / -1; }
  .story-grid { grid-template-columns: 1fr; }
  .editorial { grid-template-columns: 1fr; }
  .crumbs { margin-bottom: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
