:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --panel: #fbf9f4;
  --panel-strong: #f1ece2;
  --ink: #1e2522;
  --muted: #58635c;
  --line: #d8d2c5;
  --accent: #245b53;
  --accent-strong: #163f39;
  --accent-soft: #d9ebe8;
  --warm: #8a5a2b;
  --shadow: 0 20px 40px rgba(33, 35, 31, 0.06);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --measure: 760px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(217, 235, 232, 0.55), transparent 32%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 22%, #f6f2ea 100%);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Baskerville", Georgia, serif;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration-color: rgba(36, 91, 83, 0.35);
  text-underline-offset: 0.18em;
  transition: color 150ms ease, text-decoration-color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: rgba(22, 63, 57, 0.65);
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 1.25rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.4rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.button,
.eyebrow,
.meta-pill,
.menu,
.footer-heading,
.page-card-type,
.feature-kicker,
.panel-label {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", "Trebuchet MS", sans-serif;
}

h1,
h2,
h3 {
  color: #16201d;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  max-width: 13ch;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin-top: 3rem;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  margin-top: 2rem;
}

small {
  font-size: 0.9rem;
}

blockquote {
  border-left: 4px solid rgba(36, 91, 83, 0.35);
  padding: 0.35rem 0 0.35rem 1rem;
  color: #33403a;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(216, 210, 197, 0.8);
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(216, 210, 197, 0.8);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(36, 91, 83, 0.08);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.wrap {
  width: min(var(--wrap), calc(100vw - 2rem));
  margin: 0 auto;
}

.site-main {
  padding: 1.25rem 0 5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(248, 244, 236, 0.88);
  border-bottom: 1px solid rgba(216, 210, 197, 0.9);
}

.site-header-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 0;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand {
  color: #16201d;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.primary-nav .menu,
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: #22302a;
  font-size: 0.95rem;
}

.primary-nav a:hover {
  background: rgba(36, 91, 83, 0.08);
}

.site-footer {
  border-top: 1px solid rgba(216, 210, 197, 0.95);
  background: rgba(255, 251, 245, 0.86);
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 2rem;
  padding: 2.4rem 0 3rem;
}

.footer-intro p:last-child {
  color: var(--muted);
  max-width: 36rem;
}

.footer-heading {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

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

.footer-menu li + li {
  margin-top: 0.65rem;
}

.footer-menu a {
  text-decoration: none;
}

.page-shell {
  display: grid;
  gap: 2.5rem;
}

.home-hero,
.page-hero {
  padding-top: 2rem;
}

.home-hero-grid,
.section-hero-grid,
.split-section,
.two-column-panels {
  display: grid;
  gap: 2rem;
}

.home-hero-grid,
.section-hero-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  align-items: start;
}

.home-hero-copy,
.home-hero-panel,
.section-hero-copy,
.section-hero-panel,
.info-panel,
.reading-layout,
.feature-card,
.page-card,
.utility-panel,
.related-panel {
  border: 1px solid rgba(216, 210, 197, 0.95);
  background: rgba(251, 249, 244, 0.88);
  box-shadow: var(--shadow);
}

.home-hero-copy,
.section-hero-copy,
.reading-layout {
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 3rem);
}

.home-hero-panel,
.section-hero-panel,
.info-panel,
.utility-panel,
.related-panel {
  border-radius: var(--radius-md);
  padding: 1.4rem 1.35rem;
}

.hero-summary {
  font-size: clamp(1.12rem, 1.6vw, 1.34rem);
  line-height: 1.6;
  color: #2d3732;
  max-width: 42rem;
}

.hero-support,
.section-heading p,
.section-hero-panel p,
.home-hero-panel p,
.page-card p,
.feature-card p,
.footer-intro p,
.article-meta,
.prose-lead,
.utility-panel p,
.related-panel p {
  color: var(--muted);
}

.eyebrow,
.panel-label,
.page-card-type,
.feature-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.button-primary {
  background: var(--accent);
  color: #f6f8f7;
}

.button-primary:hover {
  color: #fff;
  background: var(--accent-strong);
}

.button-secondary {
  border-color: rgba(36, 91, 83, 0.22);
  background: rgba(255, 255, 255, 0.52);
  color: var(--accent-strong);
}

.button-secondary:hover {
  background: rgba(36, 91, 83, 0.08);
}

.path-list {
  margin: 0;
  padding-left: 1.2rem;
}

.path-list li + li {
  margin-top: 0.9rem;
}

.home-section,
.page-section {
  padding-top: 0.3rem;
}

.home-section-tint {
  padding: 0.3rem 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  margin-top: 0;
}

.feature-grid,
.card-grid {
  display: grid;
  gap: 1.2rem;
}

.feature-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.feature-card,
.page-card {
  border-radius: var(--radius-md);
  padding: 1.3rem 1.25rem;
}

.feature-card {
  text-decoration: none;
  display: block;
}

.feature-card h3,
.page-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.page-card h3 a,
.feature-card h3,
.feature-card h3 a {
  text-decoration: none;
  color: #16201d;
}

.page-card-compact {
  padding: 1rem 1.05rem;
}

.stack-list {
  display: grid;
  gap: 0.85rem;
}

.split-section {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.two-column-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-panel h3 {
  margin-top: 0;
}

.reading-layout {
  width: min(100%, 980px);
}

.article-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(216, 210, 197, 0.8);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose {
  max-width: var(--measure);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3 {
  scroll-margin-top: 5rem;
}

.prose h2:not(:first-child) {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(216, 210, 197, 0.6);
}

.prose ul li::marker,
.prose ol li::marker {
  color: var(--accent);
}

.utility-panel,
.related-panel {
  margin-top: 2rem;
}

.utility-panel h2,
.related-panel h2 {
  margin-top: 0;
}

@media (max-width: 1080px) {
  .feature-grid-4,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero-grid,
  .section-hero-grid,
  .split-section,
  .two-column-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .site-main {
    padding-top: 0.6rem;
  }

  .site-header-inner {
    align-items: start;
    flex-direction: column;
    padding: 0.95rem 0;
  }

  .primary-nav .menu {
    justify-content: flex-start;
  }

  .card-grid,
  .feature-grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-copy,
  .section-hero-copy,
  .reading-layout {
    padding: 1.35rem;
  }

  .home-hero-panel,
  .section-hero-panel,
  .info-panel,
  .utility-panel,
  .related-panel,
  .feature-card,
  .page-card {
    padding: 1.05rem;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .wrap {
    width: min(var(--wrap), calc(100vw - 1.25rem));
  }
}
