:root {
  --paper: #f7f2e7;
  --paper-deep: #ede2cf;
  --ink: #201c16;
  --muted: #6b6257;
  --line: #c8b89d;
  --line-soft: rgba(113, 94, 65, 0.22);
  --accent: #6c5533;
  --panel: rgba(255, 252, 246, 0.96);
  --shadow: rgba(49, 36, 19, 0.08);
  --serif: Baskerville, "Baskerville Old Face", Garamond, "Palatino Linotype", Georgia, serif;
  --ui: "Trebuchet MS", "Gill Sans", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(180deg, #e8dcc7 0%, var(--paper) 18%, #fbf8f2 100%);
  font-family: var(--serif);
  line-height: 1.82;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.site-header {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px var(--shadow);
  padding: 1.4rem 1.6rem 1.35rem;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #8a6d42 0%, #c7ae7d 38%, #8a6d42 100%);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  top: 1.2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(198, 168, 116, 0.18) 0%, rgba(198, 168, 116, 0.08) 42%, transparent 72%);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-mark,
.page-kicker,
.nav-group h3 {
  font-family: var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgba(108, 85, 51, 0.4);
  background: linear-gradient(180deg, #faf5ea 0%, #efe1c8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #5f4826;
  font-family: var(--ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}

.brand-mark {
  font-size: 1.18rem;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.brand-rule {
  display: block;
  width: min(16rem, 42vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(108, 85, 51, 0.7) 0%, rgba(108, 85, 51, 0.22) 100%);
}

.site-companion-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(108, 85, 51, 0.26);
  background: rgba(255, 252, 246, 0.82);
  color: #5f4826;
  text-decoration: none;
  font-family: var(--ui);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 8px 16px rgba(49, 36, 19, 0.04);
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.site-companion-link::after {
  content: ">";
  font-size: 0.9rem;
  line-height: 1;
}

.site-companion-link:hover,
.site-companion-link:focus-visible {
  background: rgba(255, 248, 235, 0.96);
  border-color: rgba(108, 85, 51, 0.42);
  transform: translateY(-1px);
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

.site-nav,
.page-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px var(--shadow);
}

.site-nav {
  position: sticky;
  top: 1rem;
  padding: 1.1rem 1rem 1.25rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.nav-group + .nav-group {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

.nav-group h3 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.nav-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-group li + li {
  margin-top: 0.45rem;
}

.nav-group a {
  display: block;
  padding: 0.15rem 0;
  text-decoration: none;
  color: #352c22;
  font-size: 0.96rem;
}

.nav-group a.is-current {
  font-weight: 700;
  color: #4d3717;
}

.page-panel {
  min-width: 0;
}

.page-header {
  padding: 2.5rem clamp(1.4rem, 4vw, 3rem) 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96) 0%, rgba(247, 239, 224, 0.9) 100%);
  position: relative;
}

.page-header-ornament {
  width: 5rem;
  height: 0.7rem;
  margin-bottom: 1rem;
  border-top: 1px solid rgba(108, 85, 51, 0.55);
  border-bottom: 1px solid rgba(108, 85, 51, 0.22);
  position: relative;
}

.page-header-ornament::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

.page-kicker {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4vw, 3.85rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.page-content {
  padding: 2rem clamp(1.4rem, 4vw, 3rem) 3rem;
  max-width: 52rem;
}

.page-content p,
.home-directory p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.page-subhead {
  margin: 2.3rem 0 1rem;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

blockquote {
  margin: 2rem 0;
  padding: 0.1rem 0 0.1rem 1.2rem;
  border-left: 3px solid var(--line);
  color: #3a3127;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.directory-intro {
  margin-bottom: 2.4rem;
}

.directory-group + .directory-group {
  margin-top: 2.2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line-soft);
}

.directory-group h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.directory-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.directory-list li + li {
  margin-top: 0.9rem;
}

.directory-list a {
  font-size: 1.02rem;
}

.page-summary {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--ui);
  font-size: 0.9rem;
}

.pager a {
  text-decoration: none;
}

@media (max-width: 920px) {
  .site-layout {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: static;
    max-height: none;
  }

  .site-header::after {
    width: 5rem;
    height: 5rem;
    top: 1.6rem;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    align-items: flex-start;
    gap: 0.85rem;
  }

  .brand-seal {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.74rem;
  }

  .brand-mark {
    font-size: 1rem;
  }

  .brand-rule {
    width: 10rem;
  }

  .site-companion-link {
    padding: 0.55rem 0.8rem;
    font-size: 0.72rem;
  }
}
