:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #66625a;
  --line: #d8d0c6;
  --line-strong: #c4bab0;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #a63d2c;
  --accent-2: #126b63;
  --table-head: #1a1a1a;
  --table-head-text: #f5f1ea;
  --table-stripe: #f6f2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
}

.brand {
  text-decoration: none;
}

.logo {
  display: block;
  height: 38px;
  width: auto;
}

nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

main {
  margin: 0 auto;
  max-width: 1120px;
  padding: 44px clamp(20px, 5vw, 72px) 72px;
}

.lead,
.page-title {
  max-width: 820px;
  padding: 18px 0 38px;
}

.eyebrow,
.date,
time {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  max-width: 12ch;
}

.lead p:last-child,
.featured p,
.list p {
  color: var(--muted);
  max-width: 72ch;
}

.featured {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 24px;
  margin: 12px 0 34px;
  padding: 34px 0;
}

.featured h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  max-width: 15ch;
}

.list {
  display: grid;
  gap: 0;
}

.list > h2 {
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.list article,
.archive-list article {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.list h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.archive-list {
  border-bottom: 1px solid var(--line);
}

.archive-list article {
  align-items: baseline;
  display: grid;
  gap: 16px;
  grid-template-columns: 110px minmax(0, 1fr) minmax(180px, 260px);
}

.archive-list a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.archive-list span {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

/* Pagination */

.pagination {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 28px;
}

.pagination a {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pagination .page-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.article-nav {
  justify-content: space-between;
  margin-top: 48px;
}

/* Article */

.note {
  max-width: 900px;
}

.note > header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  padding-bottom: 30px;
}

.note h1 {
  max-width: 14ch;
}

.prose {
  font-size: 1.02rem;
}

.prose h1 {
  display: none;
}

.prose h2 {
  border-top: 1px solid var(--line);
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  margin-top: 42px;
  padding-top: 28px;
}

.prose h3 {
  font-size: 1.35rem;
  margin-top: 30px;
}

.prose p,
.prose li {
  max-width: 74ch;
}

/* Markdown tables */

.prose table {
  border-collapse: collapse;
  border-radius: 6px;
  display: block;
  margin: 28px 0;
  overflow-x: auto;
  width: 100%;
}

.prose thead {
  background: var(--table-head);
}

.prose th {
  color: var(--table-head-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 12px 14px;
  text-align: left;
  text-transform: uppercase;
  vertical-align: top;
  white-space: nowrap;
}

.prose td {
  border-bottom: 1px solid var(--line);
  min-width: 130px;
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background: var(--table-stripe);
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose tbody tr:hover {
  background: #ede7df;
}

.prose code {
  background: #f0ebe4;
  border-radius: 4px;
  padding: 0.1em 0.28em;
}

@media (max-width: 720px) {
  .topbar {
    padding: 15px 20px;
  }

  .logo {
    height: 30px;
  }

  main {
    padding: 30px 20px 56px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .archive-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .archive-list span {
    text-align: left;
  }

  .pagination {
    flex-direction: column;
    gap: 12px;
  }
}
