:root {
  --bg: #f3eee4;
  --paper: #fffaf3;
  --ink: #1c1915;
  --muted: #5c5348;
  --line: #ddd4c4;
  --wine: #6f2432;
  --pine: #1e4638;
  --gold: #8a5a22;
  --soft: #efe6d6;
  --max: 42rem;
  --wide: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.55;
  padding-bottom: 4.5rem;
}

body.bar-closed { padding-bottom: 0; }

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

a:hover { color: #4e1520; }

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip:focus { top: 0.5rem; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.85rem 1rem 0.7rem;
  border-top: 6px solid var(--pine);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mark {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.top nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top nav a[aria-current="page"] { color: var(--wine); }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.wrap.wide { width: min(var(--wide), calc(100% - 2rem)); }

.kicker {
  margin: 0 0 0.35rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); margin: 0 0 0.6rem; }

h2 { font-size: 1.55rem; margin: 2rem 0 0.6rem; }

h3 { font-size: 1.2rem; margin: 0 0 0.25rem; }

.dek, .lede {
  font-size: 1.2rem;
  margin: 0 0 1.25rem;
}

.muted { color: var(--muted); }

.shelf {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shelf a {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.shelf li:last-child a { border-bottom: 1px solid var(--line); }

.shelf .num {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  padding-top: 0.35rem;
}

.shelf strong { display: block; font-size: 1.18rem; }

.shelf .by, .shelf .why { display: block; }

.shelf .by {
  color: var(--muted);
  font-style: italic;
  font-size: 0.98rem;
}

.shelf .why { margin-top: 0.2rem; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem;
  margin: 1.25rem 0;
}

.stack { display: grid; gap: 0.75rem; }

label { display: grid; gap: 0.3rem; font-size: 1rem; }

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid #c9beab;
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  min-height: 44px;
}

textarea { min-height: 8rem; resize: vertical; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  background: var(--pine);
  color: #f6f1e7;
  border: 0;
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

.form-status { min-height: 1.4em; margin: 0; }

.links { list-style: none; margin: 0; padding: 0; }

.links li { margin: 0.4rem 0; }

.note {
  font-size: 0.98rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.8rem;
}

.stat b {
  display: block;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.paths { list-style: none; padding: 0; margin: 0; }

.paths a {
  display: block;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.paths li:last-child a { border-bottom: 1px solid var(--line); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0.5rem 0 0; list-style: none; }

.chips a {
  text-decoration: none;
  background: var(--soft);
  color: var(--ink);
  padding: 0.35rem 0.6rem;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.site-footer .wrap { padding-bottom: 0; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; }

.sponsor-bar {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom));
  background: var(--pine);
  color: #f6f1e7;
}

.sponsor-bar p { margin: 0; font-size: 0.98rem; }

.sponsor-bar a { color: #f6f1e7; }

.sponsor-bar button {
  background: transparent;
  color: #f6f1e7;
  border: 1px solid rgba(246, 241, 231, 0.5);
  min-width: 44px;
}

.search-box { margin: 0.5rem 0 1rem; }

.result-list { list-style: none; padding: 0; margin: 0; }

.result-list a {
  display: block;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.callout {
  border-left: 3px solid var(--gold);
  padding-left: 0.8rem;
  margin: 1rem 0;
}

@media (min-width: 800px) {
  .wrap { padding-top: 2rem; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .home-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 2rem;
    align-items: start;
  }
  .home-grid .letter { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .sponsor-bar, .top nav, .site-footer { display: none; }
  body { padding-bottom: 0; background: white; }
}
