:root {
  --bg: #f5f1e8;
  --bg-soft: #fffaf0;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #fffdf8;
  --text: #16211f;
  --muted: #52615c;
  --line: rgba(16, 46, 39, 0.12);
  --accent: #0d3b36;
  --accent-2: #d66a2f;
  --accent-3: #3f7f6f;
  --warning: #fff2d9;
  --shadow: 0 18px 60px rgba(20, 38, 34, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 106, 47, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(63, 127, 111, 0.14), transparent 24%),
    linear-gradient(180deg, #f8f5ee 0%, #f2eee5 100%);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(245, 241, 232, 0.8);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-copy strong,
.hero h1,
.content-section h2,
.cta-card h2,
.toc-card h2,
.site-footer h2 {
  font-family: "Space Grotesk", sans-serif;
}

.brand-copy {
  display: grid;
}

.brand-copy small {
  color: var(--muted);
}

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

.site-nav a {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(13, 59, 54, 0.1);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  color: var(--accent);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.toc-card,
.trust-bar article,
.fact-card,
.cta-card,
.content-section,
.related-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 34px;
  padding: 2rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 4.25rem);
  line-height: 1.03;
  margin: 0.35rem 0 1rem;
  max-width: 14ch;
}

.hero-intro p,
.content-section p,
.cta-card p,
.sources-list span,
.related-card span {
  color: var(--muted);
}

.eyebrow,
.breadcrumbs,
.trust-bar span,
.fact-card span,
.cta-context {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.83rem;
  color: var(--accent-3);
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.crumb-sep {
  color: var(--muted);
}

.fact-grid,
.trust-bar,
.related-grid,
.footer-grid {
  display: grid;
  gap: 1rem;
}

.fact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.fact-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.fact-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

.toc-card {
  position: sticky;
  top: 6rem;
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.hero-side,
.hero-side-stack {
  height: 100%;
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side-cta {
  margin-top: auto;
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  background: linear-gradient(140deg, rgba(214, 106, 47, 0.96), rgba(243, 154, 74, 0.95));
  color: #1d1a17;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.hero-side-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(29, 26, 23, 0.72);
}

.hero-side-cta h2 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
}

.hero-side-cta p {
  color: rgba(29, 26, 23, 0.82);
  margin-bottom: 0;
}

.hero-side-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: #102e27;
  color: #fff8f0;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(16, 46, 39, 0.18);
}

.hero-side-button:hover {
  text-decoration: none;
  background: #163a32;
}

.toc-card a {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.toc-card a:last-child {
  border-bottom: 0;
}

.trust-bar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.trust-bar article,
.cta-card,
.content-section,
.related-card {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.callout {
  margin: 1rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(13, 59, 54, 0.08);
  border: 1px solid rgba(13, 59, 54, 0.12);
}

.callout.warning {
  background: var(--warning);
  border-color: rgba(214, 106, 47, 0.18);
}

.compact {
  margin-top: 1rem;
}

.cta-card {
  margin: 1rem 0 1.3rem;
  background: linear-gradient(135deg, rgba(13, 59, 54, 0.95), rgba(32, 92, 84, 0.96));
  color: #fff;
}

.cta-card .cta-context,
.cta-card p {
  color: rgba(255, 255, 255, 0.82);
}

.cta-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.2rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  background: #fff4e7;
  color: #1f312d;
  font-weight: 700;
}

.cta-button:hover {
  text-decoration: none;
  background: #fff;
}

.content-grid {
  padding-bottom: 3rem;
}

.main-column {
  min-width: 0;
}

.content-section {
  margin-bottom: 1rem;
}

.content-section h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.content-section ul,
.content-section ol {
  padding-left: 1.2rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

th,
td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--accent);
  background: rgba(13, 59, 54, 0.05);
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  margin-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.66);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

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

.related-card {
  display: block;
  color: inherit;
}

.related-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.sources-list {
  padding-left: 1.1rem;
}

.sources-list li + li {
  margin-top: 0.8rem;
}

.sources-list a {
  font-weight: 700;
}

.glossary {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 0.9rem 1rem;
}

.glossary dt {
  font-weight: 700;
  color: var(--accent);
}

.glossary dd {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 2.4rem 0 3rem;
  border-top: 1px solid var(--line);
  background: rgba(13, 59, 54, 0.04);
}

.mobile-sticky-cta {
  display: none;
}

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

.footer-grid section {
  display: grid;
  gap: 0.55rem;
}

.footer-meta {
  margin-top: 1.5rem;
  color: var(--muted);
}

.hero-copy,
.toc-card,
.trust-bar article,
.cta-card,
.content-section,
.related-card {
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .trust-bar,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc-card {
    position: static;
  }

  .hero-side-cta {
    margin-top: 0;
  }

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

@media (max-width: 760px) {
  body {
    padding-bottom: 6.3rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 0.75rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-shell {
    flex-wrap: wrap;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .toc-card,
  .trust-bar article,
  .cta-card,
  .content-section,
  .related-card {
    border-radius: 22px;
  }

  .glossary {
    grid-template-columns: 1fr;
  }

  .mobile-sticky-cta {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(16, 46, 39, 0.96);
    box-shadow: 0 18px 40px rgba(10, 24, 21, 0.28);
  }

  .mobile-sticky-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
  }

  .mobile-sticky-copy strong {
    color: #fff8ef;
    font-size: 0.98rem;
    line-height: 1.1;
  }

  .mobile-sticky-copy span {
    color: rgba(255, 248, 239, 0.76);
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .mobile-sticky-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f4a85d, #ffd3a5);
    color: #17211f;
    font-weight: 700;
    text-align: center;
  }

  .mobile-sticky-button:hover {
    text-decoration: none;
  }
}
