:root {
  color-scheme: dark;
  --bg: #05060a;
  --ink: #f8eedc;
  --muted: #bfae92;
  --quiet: #8e806a;
  --gold: #b8873b;
  --gold-soft: #e7c879;
  --line: rgba(184, 135, 59, 0.28);
  --panel: #0e0a0d;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 50% -120px, rgba(33, 16, 31, 0.55), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  line-height: 1.7;
}

.top,
.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.mark {
  color: var(--gold-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav a,
.foot a {
  color: var(--quiet);
  text-decoration: none;
}

nav a[aria-current="page"],
nav a:hover,
.foot a:hover {
  color: var(--gold-soft);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 88px;
}

.kicker {
  margin: 0;
  color: var(--gold);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 12px;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede,
.meta {
  color: var(--muted);
}

.meta {
  margin: 0 0 36px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

h2 {
  margin: 40px 0 10px;
  color: var(--gold-soft);
  font-weight: 500;
  font-size: 1.22rem;
}

p,
li {
  color: var(--muted);
  font-size: 1.05rem;
}

ul {
  padding-left: 1.15em;
}

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

main p a,
main li a {
  white-space: nowrap;
}

.toc {
  margin: 0 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--gold-soft);
}

.note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.95rem;
}

.door {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 48px;
}

.door h1 {
  margin-bottom: 8px;
}

.door .links {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.door .links a {
  color: var(--gold-soft);
  text-decoration: none;
}

@media (max-width: 640px) {
  .top,
  .foot {
    flex-direction: column;
    gap: 10px;
  }
}
