:root {
  --bg: #f3eee4;
  --bg-alt: #e8e0d0;
  --paper: #faf7f1;
  --ink: #1c241e;
  --muted: #5c635c;
  --forest: #2a4636;
  --forest-dark: #1c3226;
  --copper: #8a6736;
  --line: #d3c9b6;
  --shadow: 0 1px 2px rgba(28, 36, 30, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  width: min(760px, calc(100% - 2.5rem));
  margin: 0 auto;
  flex: 1;
}

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

.brand {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--forest-dark);
  text-decoration: none;
}

.brand:hover {
  color: var(--forest);
}

nav {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

main {
  padding: 2.4rem 0 3rem;
}

h1 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--forest-dark);
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 0.85rem;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40rem;
}

.rule {
  width: 3.5rem;
  height: 2px;
  background: var(--copper);
  border: 0;
  margin: 1.75rem 0 2.1rem;
}

section {
  margin-bottom: 2.4rem;
}

h2 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--forest-dark);
  margin: 1.2rem 0 0.4rem;
}

p,
ul {
  margin-bottom: 0.9rem;
  color: var(--ink);
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--forest);
}

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

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.35rem 1.45rem 1.2rem;
  box-shadow: var(--shadow);
}

.panel p:last-child,
.panel ul:last-child {
  margin-bottom: 0;
}

.keyword {
  font-variant: all-small-caps;
  letter-spacing: 0.06em;
  font-weight: 650;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
}

footer a {
  color: var(--forest);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 540px) {
  .page {
    width: calc(100% - 2rem);
  }

  header {
    padding-top: 1.5rem;
  }

  main {
    padding-top: 1.8rem;
  }
}
