:root {
  --measure: 768px;
  --accent-muted: #7d6544;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-muted: #a89073;
  }
}

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

body {
  font-family: "Vollkorn", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.25rem;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-weight: 600;
}

/* Masthead */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 3.25rem 0 3rem;
}

header h1 {
  margin: 0;
  font-size: 2em;
}

header h1 a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

header img {
  flex: none;
  width: 66px;
  border-radius: 0;
}

nav {
  display: flex;
  gap: 1.15rem;
  font-size: 1.15rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

/* The panel styling comes from wisdom.css's aside rule; figure has no
   background of its own, so it is restated here. */
figure.float-right {
  float: right;
  width: 38%;
  margin: 0.3rem 0 1rem 1.75rem;
  padding: 0.84rem;
  background: var(--background-main);
  border-radius: var(--border-radius);
}

figure.float-right img {
  display: block;
  width: 100%;
  border-radius: 6px;
}

figure.float-right figcaption {
  padding-top: 0.6rem;
  font-size: 0.9rem;
  text-align: center;
  text-wrap: balance;
}

/* Below a full-width measure the remaining text column gets too narrow to set
   type in, so the figure stops floating well before the mobile breakpoint. */
@media (max-width: 48rem) {
  figure.float-right {
    float: none;
    width: auto;
    margin: 1.5rem 0;
  }

  article:has(> figure.float-right),
  .posts:has(> figure.float-right) {
    display: flex;
    flex-direction: column;
  }

  figure.float-right {
    order: 1;
  }

  article:has(> figure.float-right) > p,
  .posts:has(> figure.float-right) > p {
    margin-block: 0.5em;
  }
}

/* A float taller than its text would otherwise spill into the next post on the
   index, where full post bodies sit next to each other. */
.posts,
article {
  display: flow-root;
}

/* Index */
.posts {
  margin-bottom: 2.75rem;
}

.posts + .posts::before {
  content: "* * *";
  display: block;
  margin-bottom: 2.75rem;
  color: var(--accent);
  font-size: 1.15rem;
  letter-spacing: 0.7em;
  text-indent: 0.7em;
  text-align: center;
}

.post-title {
  margin: 0;
  font-size: 1.5em;
  text-wrap: balance;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-date {
  margin: 0.3rem 0 1.1rem;
  color: var(--accent);
  font-size: 1.05rem;
}

.page-title {
  margin: 0 0 1rem;
  font-size: 2.2rem;
}

/* Archive */
.archive-year {
  color: var(--accent);
  font-size: 1.35rem;
}

.archive-list {
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: flex;
  gap: 0.75rem;
}

.archive-date {
  flex: none;
  width: 4.5rem;
  color: var(--accent-muted);
  font-size: 1rem;
  font-style: italic;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
}

.pagination-button {
  color: var(--border);
  text-decoration: none;
}

.pagination-active {
  color: var(--accent);
}

.mt-3 {
  margin-top: 3rem;
}

@media (max-width: 34rem) {
  body {
    font-size: 1.1rem;
  }

  header {
    padding: 2.25rem 0 2rem;
  }

  header h1 {
    font-size: 2rem;
  }

  header img {
    width: 48px;
  }

  .post-title,
  .page-title {
    font-size: 1.65rem;
  }
}
