:root {
  --bg: #f7f3e8;
  --surface: #fffdf8;
  --surface-alt: #f0e8d8;
  --text: #2d261c;
  --muted: #675a49;
  --line: #dfd2bc;
  --accent: #7a6a3e;
  --accent-2: #6c7a3a;
  --accent-3: #5e4530;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: radial-gradient(circle at top, #fbf7ef 0%, var(--bg) 45%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--line);
  min-height: var(--header-height);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.6rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  transition: 160ms ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  background: var(--surface-alt);
  border-color: #ccb993;
}

.nav-icon,
.hero-icon {
  display: inline-flex;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.4rem;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #241d14;
}

.icon-wheat {
  background: linear-gradient(135deg, #f0cf7c, #c49d3f);
}

.icon-olive {
  background: linear-gradient(135deg, #9fb56b, #60783b);
}

.icon-cocoa {
  background: linear-gradient(135deg, #bc9175, #7b5439);
}

.hero {
  padding: 2.4rem 0 0.4rem;
}

.hero-copy h1 {
  margin: 0 0 0.9rem;
  line-height: 1.2;
  font-size: clamp(1.8rem, 2.5vw, 2.65rem);
}

.hero-copy p {
  color: #4b4134;
  margin: 0.7rem 0;
}

.hero-cta-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 0.9rem;
}

.hero-card {
  display: grid;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: 180ms ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(45, 38, 28, 0.09);
  border-color: #cbb790;
}

.hero-title {
  font-weight: 700;
}

.hero-summary {
  color: #544838;
  font-size: 0.95rem;
}

.home-section,
.related-content {
  margin: 1.5rem 0 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
}

.related-content {
  margin-top: 2.5rem;
}

.related-content h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  border-bottom: 1px solid #d4c4a8;
  padding-bottom: 0.5rem;
  font-size: 1.35rem;
}

.related-content ul {
  margin: 0.8rem 0;
  padding-left: 1.4rem;
  list-style: disc;
}

.related-content li {
  margin: 0.4rem 0;
  line-height: 1.5;
}

.related-content a {
  color: #3c5723;
  text-decoration: none;
}

.breadcrumbs {
  margin-top: 1rem;
  color: #6d5f4c;
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: #4d5f2c;
}

.breadcrumb-sep {
  margin: 0 0.35rem;
}

.doc-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem;
  margin-top: 0.8rem;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4,
.doc-content h5,
.doc-content h6 {
  line-height: 1.3;
  scroll-margin-top: 0;
  font-weight: 700;
  color: var(--text);
}

.doc-content h1 {
  margin-top: 0.2rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  border-bottom: 2px solid #c49d3f;
  padding-bottom: 0.6rem;
}

.doc-content h2 {
  margin-top: 1.95rem;
  margin-bottom: 0.85rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  border-top: 1px solid #ebdfcc;
  padding-top: 1.35rem;
  border-bottom: 1px solid #d4c4a8;
  padding-bottom: 0.5rem;
}

.doc-content h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.65rem;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: #3d5228;
}

.doc-content h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.doc-content h5,
.doc-content h6 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.doc-content a {
  color: #3c5723;
}

.doc-content pre {
  margin: 1.2rem 0;
  border-radius: 0.65rem;
  overflow-x: auto;
  border: 1px solid #2a2825;
  background: #232628;
  color: #e8ecef;
  padding: 1rem;
  line-height: 1.5;
  font-size: 0.92rem;
  position: relative;
}

.doc-content pre.hljs {
  background: #232628;
  color: #e8ecef;
}

.doc-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.doc-content pre.hljs code {
  color: #e8ecef;
}

/* Highlight.js color overrides for atom-one-dark theme */
.hljs-attr {
  color: #56b6f2;
}

.hljs-string {
  color: #98c379;
}

.hljs-number {
  color: #d19a66;
}

.hljs-literal {
  color: #56b6f2;
}

.hljs-function .hljs-title {
  color: #61afef;
}

.hljs-keyword {
  color: #c678dd;
}

.doc-content :not(pre) > code {
  background: #eee4d4;
  color: #443523;
  border-radius: 0.35rem;
  padding: 0.1rem 0.3rem;
}

pre {
  position: relative;
}

.code-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 1px solid #5a6065;
  background: #2d3237;
  color: #e7ecef;
  border-radius: 0.35rem;
  padding: 0.24rem 0.46rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.code-copy:hover {
  background: #3a4148;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

th,
td {
  border: 1px solid #d6c8b1;
  padding: 0.45rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #efe5d4;
}

input[type="checkbox"] {
  accent-color: #7b6a3d;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  background: #f3ecde;
}

.footer-inner {
  padding: 1rem 0 1.5rem;
}

.footer-title {
  margin: 0 0 0.45rem;
  color: #5a4e3d;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.footer-links a {
  color: #4f5f30;
}

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

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

