:root {
  --bg: #fbfaf7;
  --ink: #1c1b18;
  --muted: #6b675e;
  --rule: #ddd8cc;
  --accent: #7a3b1e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --ink: #e6e3da;
    --muted: #918c80;
    --rule: #2e2c25;
    --accent: #d99a6c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 4rem 1.5rem 6rem;
  background: var(--bg);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

header, main, footer {
  max-width: 34em;
  margin: 0 auto;
}

header { margin-bottom: 3.5rem; }

.mark {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.mark:hover { color: var(--ink); }

.hai {
  font-size: 1.6rem;
  margin: 0 0 1.6rem;
}

main > p {
  margin: 0 0 1.4rem;
}

main > p a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

main > p a:hover {
  border-bottom-color: var(--accent);
}

.index {
  list-style: none;
  margin: 3.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.index li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.index a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.index a:hover { border-bottom-color: var(--accent); }

.meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  white-space: nowrap;
}

article h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  font-weight: 600;
}

article .dateline {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0 0 2.5rem;
}

article p { margin: 0 0 1.4rem; }

article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule); }
article a:hover { border-bottom-color: var(--accent); }

article blockquote {
  margin: 2rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

article hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

footer {
  margin-top: 5rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

footer p { margin: 0; }

@media (max-width: 34em) {
  body { padding: 2.5rem 1.25rem 4rem; font-size: 18px; }
  .index li { flex-direction: column; gap: 0.2rem; }
}
