:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6862;
  --rule: #e3e0da;
  --accent: #9a4f1b;
  --tag-bg: #f0ece4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a;
    --surface: #201f24;
    --text: #ececec;
    --muted: #9b968f;
    --rule: #34323a;
    --accent: #e0a06a;
    --tag-bg: #2b2930;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 3rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 44rem; margin: 0 auto; }

header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

h1 { margin: 0 0 .25rem; font-size: 2rem; letter-spacing: -.02em; line-height: 1.15; }
.tagline { margin: 0; color: var(--muted); }

.backlink {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
}
.backlink:hover { text-decoration: underline; }

h2.section {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.story {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .55rem;
  border-radius: 999px;
  margin-bottom: .6rem;
}

.story h2 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.story p { margin: 0 0 .6rem; }
.story .source { margin: 0; font-size: .85rem; }
.story .source a { color: var(--accent); }

ul.archive { list-style: none; margin: 0; padding: 0; }
ul.archive li { border-bottom: 1px solid var(--rule); }
ul.archive li:first-child a { font-weight: 600; }

ul.archive a {
  display: block;
  padding: .9rem .75rem;
  margin: 0 -.75rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
ul.archive a:hover, ul.archive a:focus-visible {
  background: var(--surface);
  color: var(--accent);
}
ul.archive .date { display: block; }
ul.archive .teaser { display: block; font-size: .9rem; color: var(--muted); }

li.empty { padding: .9rem 0; color: var(--muted); }

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .85rem;
  color: var(--muted);
}

@media (max-width: 30rem) {
  body { padding: 2rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  .story { padding: 1rem; }
  .story h2 { font-size: 1.05rem; }
}
