:root {
  --bg: #f4efe4;
  --paper: #fffaf2;
  --ink: #1c2a2d;
  --muted: #58676a;
  --line: #d5c7ab;
  --accent: #b6542e;
  --accent-dark: #7f3315;
  --accent-soft: #ead7be;
  --panel: #e7ddca;
  --shadow: 0 18px 40px rgba(49, 38, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(182, 84, 46, 0.1), transparent 28rem),
    linear-gradient(180deg, #f7f2e8 0%, var(--bg) 100%);
}

a {
  color: var(--accent-dark);
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid rgba(129, 102, 51, 0.18);
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(247, 242, 232, 0.88);
  z-index: 10;
}

.header-grid,
.footer-grid,
.hero-grid,
.two-column {
  display: grid;
  gap: 1.5rem;
}

.header-grid {
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  font-size: clamp(1.6rem, 2vw, 2rem);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tagline,
.article-meta,
.eyebrow {
  color: var(--muted);
}

.site-nav {
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
}

.hero,
.section-block,
.page-head,
.article-layout {
  padding: 2.5rem 0;
}

.hero-grid {
  grid-template-columns: 1.3fr 0.8fr;
  align-items: start;
}

.hero h1,
.page-head h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.95;
  margin: 0 0 1rem;
}

.lead {
  max-width: 60ch;
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero-panel,
.card,
.article-card,
.faq-card,
.glossary-card,
.aside-card,
.search-results,
.search-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-panel,
.card,
.faq-card,
.glossary-card,
.aside-card,
.article-card {
  padding: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
}

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

.button.secondary {
  background: transparent;
  border: 1px solid var(--accent);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2,
.hero-panel h2,
.card h2,
.faq-card h2,
.glossary-card h2,
.article-card h2,
.article-card h3 {
  margin-top: 0;
}

.card-grid,
.faq-list,
.glossary-list,
.article-list {
  display: grid;
  gap: 1rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.article-list,
.faq-list,
.glossary-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.compact-list {
  padding-left: 1rem;
  margin: 0;
}

.stat-list {
  margin: 0;
  padding-left: 1rem;
  line-height: 1.8;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 1rem;
  background: rgba(255, 250, 242, 0.92);
}

.search-results {
  margin-top: 1rem;
  padding: 0.5rem;
}

.search-result {
  padding: 0.9rem 1rem;
  margin: 0.5rem 0;
}

.search-result a {
  font-weight: 700;
  text-decoration: none;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 1.5rem;
}

.article-body {
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(129, 102, 51, 0.18);
  border-radius: 1.6rem;
  padding: 1.75rem;
  line-height: 1.75;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  line-height: 1.15;
}

.article-body code,
code {
  background: #efe2cc;
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
  font-family: Consolas, monospace;
}

.page-head.narrow {
  max-width: 80ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 700;
}

.metric {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0.25rem 0 0;
}

.site-footer {
  border-top: 1px solid rgba(129, 102, 51, 0.18);
  margin-top: 3rem;
}

.footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 1.5rem 0 2rem;
}

@media (max-width: 900px) {
  .header-grid,
  .hero-grid,
  .article-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: start;
  }
}
