:root {
  --bg: #EFE7DA;
  --bg-alt: #fbf8f2;
  --surface: rgba(255, 252, 247, 0.94);
  --surface-strong: #fffaf2;
  --text: #221A17;
  --muted: #6e6158;
  --primary: #4A1F1D;
  --primary-strong: #3a1715;
  --accent: #C7A15A;
  --accent-2: #7F8C6A;
  --border: rgba(74, 31, 29, 0.12);
  --shadow: 0 24px 60px rgba(53, 27, 23, 0.12);
  --radius: 28px;
  --container: 1260px;
  --space-base: 24px;
  --space-section: 40px;
  --space-mobile: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  color: var(--text);
  font-family: "Source Sans 3", Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(199, 161, 90, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(127, 140, 106, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f3ea 0%, var(--bg) 42%, #efe5d4 100%);
}

body.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 74%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  color: var(--primary);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.05;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

p:last-child {
  margin-bottom: 0;
}

.shell {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.btn,
.btn-secondary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 0;
}

.btn-primary {
  background: linear-gradient(135deg, #d1ae69, #b88d4d);
  color: #2f1b13;
  box-shadow: 0 12px 22px rgba(150, 112, 49, 0.26);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff7ec;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.text-link {
  font-weight: 700;
  color: var(--primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(52, 22, 22, 0.9);
  color: #f7f1e7;
  border-bottom: 1px solid rgba(199, 161, 90, 0.35);
  box-shadow: 0 12px 38px rgba(25, 10, 10, 0.22);
}

.topbar,
.navrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
}

.topbar {
  padding: 10px 0 8px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #f7f1e7;
  min-width: 0;
}

.brand img {
  width: clamp(78px, 8vw, 108px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.brand-copy strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 0.95;
}

.brand-copy span span,
.brand-copy > span:last-child {
  color: rgba(247, 241, 231, 0.78);
  font-size: 0.8rem;
  line-height: 1.2;
  max-width: 38rem;
}

.search-pill {
  min-width: min(240px, 28vw);
  max-width: 25rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(247, 241, 231, 0.82);
  text-align: right;
  font-size: 0.82rem;
  line-height: 1.2;
  flex: 0 1 auto;
}

.navrow {
  padding: 7px 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 14px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.nav-list > li {
  position: relative;
  flex: 0 0 auto;
}

.nav-list > li > a,
.nav-dropdown summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  color: #f7f1e7;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-list > li > a:hover,
.nav-dropdown summary:hover,
.nav-dropdown[open] summary {
  color: #fff7e8;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-list > li > a:hover::after,
.nav-dropdown summary:hover::after,
.nav-dropdown[open] summary::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  max-height: min(60vh, 28rem);
  overflow: auto;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(52, 22, 22, 0.97);
  border: 1px solid rgba(199, 161, 90, 0.24);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.dropdown-parent-link {
  display: block;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.dropdown-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.dropdown-panel a {
  color: #f7f1e7;
}

.page-shell {
  position: relative;
  padding: 36px 0 52px;
}

.breadcrumbs-wrap {
  margin: 0 0 1rem;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.8);
  border: 1px solid var(--border);
}

.breadcrumbs-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.breadcrumbs-list li:not(:last-child)::after {
  content: "/";
  color: rgba(74, 31, 29, 0.35);
}

.hero {
  padding: 0 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: var(--space-base);
}

.hero-main {
  min-height: 490px;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background-position: center;
  background-size: cover;
}

.hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(199, 161, 90, 0.18), transparent 34%),
    linear-gradient(180deg, transparent 10%, rgba(24, 12, 12, 0.78) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 34px;
  color: #fff8ee;
}

.hero-content h1,
.hero-content p {
  color: #fff8ee;
}

.hero-content p {
  max-width: 70%;
  font-size: 1.06rem;
  color: rgba(255, 248, 238, 0.88);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.hero-side {
  display: grid;
  gap: 20px;
}

.feature-card,
.sidebar-card,
.story-shell,
.directory,
.message-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.feature-card {
  padding: var(--space-base);
  min-height: 235px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-meta,
.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.home-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: var(--space-base);
  align-items: start;
}

.left-rail,
.right-rail,
.content-side,
.toc-side {
  display: grid;
  gap: 18px;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 132px;
}

.content-col {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-head p {
  max-width: 420px;
  color: var(--muted);
}

.feed-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), rgba(255, 248, 239, 0.86));
  box-shadow: 0 20px 44px rgba(72, 38, 29, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feed-card:hover,
.feature-card:hover,
.directory:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 46px rgba(72, 38, 29, 0.16);
}

.feed-card img {
  height: 182px;
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(127, 140, 106, 0.12);
  color: #516245;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-stack {
  display: grid;
  gap: 18px;
}

.panel-head {
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(74, 31, 29, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48));
}

.panel-head h3 {
  margin-bottom: 0;
}

.notice-list,
.mini-links,
.resource-list,
.footer-links {
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
}

.notice-list {
  display: grid;
  gap: 14px;
}

.notice-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.notice-index {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(199, 161, 90, 0.18);
  color: var(--primary);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-banner {
  margin: 0 1.1rem 1.1rem;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(58, 32, 22, 0.16);
}

.mini-links {
  display: grid;
  gap: 0.8rem;
}

.mini-links li + li,
.footer-links li + li {
  border-top: 1px solid rgba(74, 31, 29, 0.08);
  padding-top: 0.65rem;
}

.calendar-box {
  margin: 1rem;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(74, 31, 29, 0.96), rgba(74, 31, 29, 0.86));
  color: #fdf6ea;
}

.calendar-box strong,
.calendar-box p {
  color: #fdf6ea;
}

.archive-library {
  margin: 0 1rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(74, 31, 29, 0.1);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.archive-library summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 700;
  color: var(--primary);
}

.archive-library-grid {
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.archive-library-grid a {
  font-size: 0.92rem;
}

.page-outlinks-grid a {
  word-break: break-all;
  font-size: 0.8rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.directory {
  padding: 1.1rem 1.2rem;
}

.resource-list {
  display: grid;
  gap: 0.7rem;
  padding-left: 0;
}

.resource-list li {
  position: relative;
  padding-left: 1rem;
}

.resource-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 320px;
  gap: var(--space-base);
  align-items: start;
}

.content-grid-compact {
  grid-template-columns: minmax(0, 1.55fr) 320px;
}

.content-grid-with-toc.content-grid-left {
  grid-template-columns: 260px minmax(0, 1fr);
}

.content-grid-with-toc.content-grid-right {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.story-shell,
.message-card {
  padding: clamp(1.3rem, 2vw, 1.85rem);
}

.story-shell-compact {
  padding: 1.35rem;
}

.story-header {
  margin-bottom: 1.15rem;
}

.story-lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 58ch;
}

.story-hero,
.story-hero-compact,
.media-hero {
  margin: 0 0 1.25rem;
  overflow: hidden;
  border-radius: 24px;
}

.story-hero img,
.story-hero-compact img,
.media-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.story-hero-compact img {
  max-height: 280px;
}

.story-body > * + * {
  margin-top: 1rem;
}

.story-body p,
.story-body li {
  font-size: 1.02rem;
}

.story-body ul,
.story-body ol {
  padding-left: 1.25rem;
}

.story-body blockquote {
  margin: 1.25rem 0;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.6);
}

.content-figure figcaption,
.gallery-item figcaption {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item img {
  border-radius: 18px;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.story-snippet,
.category-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 1rem;
}

.category-shell {
  padding: 1.45rem;
}

.cards-grid {
  display: grid;
  gap: 1rem;
}

.cards-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1rem;
}

.category-card-horizontal {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.category-card-horizontal img {
  height: 100%;
  min-height: 160px;
  margin-bottom: 0;
}

.category-card-minimal {
  border-left: 4px solid var(--accent);
  box-shadow: none;
}

.message-shell {
  display: grid;
  place-items: center;
  min-height: 46vh;
}

.message-card {
  max-width: 720px;
  text-align: center;
}

.toc-panel {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  padding: 1rem 1.1rem;
}

.toc-panel ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
}

.toc-panel li + li {
  margin-top: 0.5rem;
}

.toc-level-3,
.toc-level-4,
.toc-level-5,
.toc-level-6 {
  margin-left: 0.7rem;
}

.article-main-image {
  float: right;
  width: min(34%, 320px);
  margin: 0 0 1rem 1.25rem;
  border-radius: 20px;
  overflow: hidden;
}

.article-main-image img {
  width: 100%;
  height: auto;
}

.article-summary {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

.cta-inline a,
.story-body .cta-inline a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d1ae69, #b88d4d);
  color: #2f1b13;
  border-radius: 999px;
  padding: 0.82rem 1.25rem;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(150, 112, 49, 0.26);
}

.site-footer {
  margin-top: 32px;
  padding: 2.2rem 0;
  background: linear-gradient(180deg, rgba(60, 24, 23, 0.98), rgba(42, 16, 16, 0.98));
  color: #f7f1e7;
  border-top: 1px solid rgba(199, 161, 90, 0.25);
}

.site-footer h3,
.site-footer p,
.site-footer a,
.site-footer small {
  color: #f7f1e7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 1.25rem;
  align-items: start;
}

.footer-links {
  padding: 0;
}

.footer-links-compact a {
  font-size: 0.92rem;
}

.site-footer small {
  display: block;
  margin-top: 1.4rem;
  color: rgba(247, 241, 231, 0.72);
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 1180px) {
  .home-layout,
  .content-grid,
  .content-grid-compact,
  .content-grid-with-toc.content-grid-left,
  .content-grid-with-toc.content-grid-right,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .left-rail,
  .right-rail,
  .content-side,
  .toc-side {
    position: static;
  }

  .directory-grid,
  .cards-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

@media (max-width: 920px) {
  .topbar,
  .navrow,
  .hero-grid,
  .feed-card,
  .directory-grid,
  .cards-grid.cols-2,
  .cards-grid.cols-3,
  .category-card-horizontal {
    grid-template-columns: 1fr;
  }

  .topbar,
  .navrow {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list {
    flex-wrap: wrap;
    overflow: visible;
  }

  .search-pill {
    min-width: 0;
    text-align: left;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content p,
  .section-head p {
    max-width: none;
  }

  .archive-library-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 24px), var(--container));
  }

  .page-shell {
    padding: var(--space-mobile) 0 32px;
  }

  .hero-content {
    padding: 24px;
  }

  .brand img {
    width: 132px;
  }

  .brand-copy strong {
    font-size: 1.55rem;
  }

  .article-main-image {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
}

@media print {
  body.site-body {
    background: #fff;
  }

  body.site-body::before,
  .site-header,
  .site-footer,
  .left-rail,
  .right-rail,
  .content-side,
  .toc-side {
    display: none !important;
  }

  .story-shell,
  .message-card {
    box-shadow: none;
    border: 0;
  }
}
