:root {
  --bg: #fdfcfa;
  --fg: #1a1a18;
  --muted: #6b6b64;
  --rule: #e4e1da;
  --accent: #8a4b2a;
  --accent-bg: #f6efe9;
  --max: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #eceae5;
    --muted: #9a978f;
    --rule: #2e2e34;
    --accent: #d59872;
    --accent-bg: #262029;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem 4rem; }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--fg);
}

.site-header nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.hero { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.75rem; }

.button {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}
.button:hover { background: var(--accent-bg); }

.prose { padding-top: 2.5rem; }
.prose h1 { font-size: 2rem; margin: 0 0 0.35rem; letter-spacing: -0.015em; }
.prose h2 { font-size: 1.2rem; margin: 2.25rem 0 0.5rem; }
.prose p, .prose li { max-width: 38rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }

.meta { color: var(--muted); font-size: 0.9rem; margin-top: 0; }

.callout {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  border-radius: 0 4px 4px 0;
}

.inbox {
  width: 100%;
  border-collapse: collapse;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-top: 1.5rem;
}
.inbox th, .inbox td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.inbox th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.inbox .body { word-break: break-word; }
.inbox .when, .inbox .from { white-space: nowrap; color: var(--muted); }

.badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  user-select: all;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0.25rem 0; }

/* Wide content scrolls inside its own container rather than the page. */
@media (max-width: 40rem) {
  .prose { overflow-x: auto; }
  .inbox { display: block; overflow-x: auto; white-space: nowrap; }
}
