:root {
  --bg-canvas: #faf6ef;
  --bg-surface: #fffdf8;
  --bg-contrast: #f2ece0;
  --text-primary: #2b211a;
  --text-muted: #695e56;
  --accent-primary: #c2562e;
  --accent-secondary: #6b7a3a;
  --accent-deep: #475224;
  --border-subtle: #ded5c5;
  --border-strong: #2b211a;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1140px;
  --read-width: 70ch;
}

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

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif-display {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  max-width: var(--read-width);
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: #8c3616;
}

.site-header {
  position: relative;
  width: 100%;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-glyph {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--accent-secondary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  border-bottom: 2px solid var(--accent-primary);
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-dropdown {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--accent-primary);
  padding: 1rem 1.5rem 1.5rem;
}

.mobile-dropdown.open {
  display: block;
}

.mobile-dropdown ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-dropdown a {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  padding: 0.4rem 0;
}

.hero-plain {
  background-color: var(--bg-canvas);
  padding: 5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: var(--read-width);
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  padding: 0.85rem 1.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.btn:hover, .btn:focus-visible {
  background: var(--accent-primary);
  color: var(--bg-surface);
}

.btn-secondary {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.btn-secondary:hover {
  background: var(--accent-secondary);
  color: #ffffff;
}

.btn-inverted {
  border-color: #ffffff;
  color: #ffffff;
}

.btn-inverted:hover {
  background: #ffffff;
  color: var(--text-primary);
}

.section {
  padding: 4.5rem 1.5rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 820px) {
  .section-split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.reading-column {
  max-width: var(--read-width);
  margin: 0 auto;
}

.section-intro {
  margin-bottom: 2.5rem;
}

.panel-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  border-radius: 0;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0;
}

.card h3 {
  color: var(--text-primary);
}

.card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-contrast);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.theme-terracotta {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.theme-terracotta h2, .theme-terracotta h3, .theme-terracotta p, .theme-terracotta strong {
  color: #ffffff;
}

.theme-olive {
  background-color: var(--accent-secondary);
  color: #ffffff;
}

.theme-olive h2, .theme-olive h3, .theme-olive p, .theme-olive strong {
  color: #ffffff;
}

.quote-pull {
  font-family: Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.4;
  font-style: italic;
  border-left: 3px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  color: var(--text-primary);
}

.render-container {
  border: 1px solid var(--border-subtle);
  background: var(--bg-contrast);
  margin: 2rem 0;
  padding: 1rem;
}

.render-container img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.render-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  text-align: left;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

th {
  background: var(--bg-contrast);
  font-family: Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.timeline-list {
  list-style: none;
  margin: 2rem 0;
  position: relative;
}

.timeline-step {
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 2rem;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
}

.timeline-step::after {
  content: "";
  position: absolute;
  left: calc(0.5rem + 5px);
  top: 1.2rem;
  bottom: -2rem;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-step:last-child::after {
  display: none;
}

.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.anatomy-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.5rem;
}

.anatomy-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.faq-group {
  margin-top: 2rem;
}

details {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}

summary {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

summary::-webkit-details-marker {
  color: var(--accent-primary);
}

details p {
  margin-top: 1rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

.tool-box {
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  border-radius: 0;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-primary);
}

.tool-output {
  margin-top: 1.5rem;
  background: var(--bg-contrast);
  padding: 1.25rem;
  border: 1px solid var(--border-subtle);
  font-family: monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  min-height: 120px;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.site-footer {
  background-color: #211913;
  color: #dfd7cc;
  padding: 4.5rem 1.5rem 2.5rem;
  border-top: 4px solid var(--accent-primary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer a {
  color: #ecd5bc;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  font-size: 0.95rem;
}

.footer-legal-bar {
  max-width: var(--max-width);
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #a4978a;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .section {
    padding: 3rem 1.25rem;
  }
  .hero-plain {
    padding: 3.5rem 1.25rem 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
