:root {
  --green-900: #0B3D2A;
  --green-800: #12503A;
  --green-700: #1B5E45;
  --green-100: #DCEDE3;
  --green-50:  #EEF6F0;
  --gold-500:  #F2C84B;
  --gold-300:  #FAE19B;
  --gold-100:  #FEF3CE;
  --cream:     #FAF6EC;
  --cream-2:   #F4ECDB;
  --ink:       #14231C;
  --muted:     #5A6C63;
  --line:      rgba(11, 61, 42, 0.10);
  --line-2:    rgba(11, 61, 42, 0.18);
  --white:     #FFFFFF;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11,61,42,.05), 0 2px 6px rgba(11,61,42,.04);
  --shadow:    0 4px 14px rgba(11,61,42,.06), 0 20px 50px -20px rgba(11,61,42,.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Top bar ---- */
.docs-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,236,.85); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.docs-bar-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex; align-items: center; gap: 1rem;
  height: 72px;
}
.docs-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--green-900); }
.docs-brand svg { width: 30px; height: 30px; }
.docs-brand-mark { width: 30px; height: 30px; }
.docs-brand-word { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.docs-brand-word .accent { color: var(--green-700); }
.docs-brand-tag {
  font-family: 'Inter',sans-serif;
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-700);
  padding: .2rem .55rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-left: .65rem;
  background: rgba(255,255,255,.55);
}
.docs-bar-cta {
  margin-left: auto;
  display: inline-flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: center;
  font-family: 'Inter',sans-serif;
  font-size: .92rem;
  font-weight: 500;
}
.docs-bar-cta a {
  color: var(--green-900);
  opacity: .82;
  transition: opacity .15s ease, color .15s ease;
  white-space: nowrap;
}
.docs-bar-cta a:hover { opacity: 1; color: var(--green-700); text-decoration: none; }
.docs-bar-cta .btn {
  padding: .55rem 1.1rem;
  background: var(--gold-500); color: var(--green-900);
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 4px 14px -4px rgba(242,200,75,.6);
  opacity: 1;
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
}
.docs-bar-cta .btn:hover {
  background: var(--gold-300);
  color: var(--green-900);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -6px rgba(242,200,75,.7);
  text-decoration: none;
}

/* Hide non-essential nav text on narrow screens; keep brand + primary CTA */
@media (max-width: 640px) {
  .docs-bar-cta a:not(.btn) { display: none; }
  .docs-brand-tag { display: none; }
}

/* ---- Layout ---- */
.docs-layout {
  max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 880px) {
  .docs-layout { grid-template-columns: 240px 1fr; gap: 3rem; }
}

/* ---- Sidebar ---- */
.docs-side {
  padding: 2rem 0;
}
@media (min-width: 880px) {
  .docs-side {
    position: sticky; top: 80px; align-self: start;
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
}
.docs-side h3 {
  font-family: 'Inter',sans-serif; font-weight: 600;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-700);
  margin: 1.5rem 0 .6rem;
}
.docs-side h3:first-child { margin-top: 0; }
.docs-side ul { list-style: none; padding: 0; margin: 0; }
.docs-side li { margin: .15rem 0; }
.docs-side a {
  display: block; padding: .4rem .6rem; margin: 0 -.6rem;
  border-radius: 8px;
  color: var(--ink); font-size: .94rem; line-height: 1.4;
}
.docs-side a:hover { background: var(--cream-2); text-decoration: none; }
.docs-side a.active {
  background: var(--green-50); color: var(--green-900); font-weight: 500;
}

/* ---- Main content ---- */
.docs-main {
  padding: 2rem 0 4rem;
  max-width: 720px;
}
.docs-eyebrow {
  display: inline-block;
  font-family: 'Inter',sans-serif; font-weight: 600;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .65rem;
}
.docs-main h1 {
  font-family: 'Montserrat',sans-serif; font-weight: 800;
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  letter-spacing: -.022em; line-height: 1.08;
  color: var(--green-900);
  margin-bottom: .85rem;
}
.docs-main .lede {
  font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem;
  max-width: 56ch; line-height: 1.5;
}
.docs-main h2 {
  font-family: 'Montserrat',sans-serif; font-weight: 700;
  font-size: 1.4rem; letter-spacing: -.018em; line-height: 1.2;
  color: var(--green-900);
  margin: 2.5rem 0 .85rem;
}
.docs-main h3 {
  font-family: 'Montserrat',sans-serif; font-weight: 700;
  font-size: 1.1rem; letter-spacing: -.012em;
  color: var(--green-900);
  margin: 1.85rem 0 .55rem;
}
.docs-main p { margin: 0 0 1.1rem; }
.docs-main ul, .docs-main ol { margin: 0 0 1.25rem 1.5rem; }
.docs-main li { margin: .35rem 0; }
.docs-main li ul, .docs-main li ol { margin-top: .35rem; margin-bottom: .35rem; }
.docs-main strong { color: var(--green-900); font-weight: 600; }
.docs-main code {
  background: var(--cream-2); padding: .12rem .4rem; border-radius: 6px;
  font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: .9em;
  color: var(--green-900);
}
.docs-main blockquote {
  border-left: 3px solid var(--gold-500);
  padding: .25rem 0 .25rem 1.1rem;
  margin: 1.25rem 0;
  color: var(--ink);
  background: var(--gold-100);
  border-radius: 0 8px 8px 0;
}
.docs-main blockquote p:last-child { margin-bottom: 0; }
.docs-main .callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-700);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.docs-main .callout strong { color: var(--green-900); }
.docs-main .callout p:last-child { margin-bottom: 0; }
.docs-main hr {
  border: 0; border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
.docs-main img { border-radius: 12px; box-shadow: var(--shadow-sm); margin: 1.25rem 0; }

/* ---- Article footer / prev-next ---- */
.docs-footer {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: grid; gap: 1rem;
  grid-template-columns: 1fr 1fr;
}
.docs-footer a {
  display: block; padding: 1.1rem 1.25rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.docs-footer a:hover { transform: translateY(-2px); border-color: rgba(11,61,42,.25); box-shadow: 0 4px 14px rgba(11,61,42,.08); text-decoration: none; }
.docs-footer .label {
  font-family: 'Inter',sans-serif; font-weight: 600;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .35rem;
}
.docs-footer .title { color: var(--green-900); font-weight: 600; }
.docs-footer .next { text-align: right; }

/* ---- Landing page (docs/index.html) ---- */
.docs-hero {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  max-width: 720px; margin: 0 auto;
}
.docs-hero h1 {
  font-family: 'Montserrat',sans-serif; font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  letter-spacing: -.024em; line-height: 1.04;
  color: var(--green-900);
  margin-bottom: .85rem;
}
.docs-hero p { font-size: 1.15rem; color: var(--muted); line-height: 1.55; max-width: 52ch; margin: 0 auto; }
.cat-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
}
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.cat:hover { transform: translateY(-2px); border-color: rgba(11,61,42,.25); box-shadow: var(--shadow); }
.cat-eye {
  display: inline-block;
  font-family: 'Inter',sans-serif; font-weight: 600;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green-700); margin-bottom: .35rem;
}
.cat h2 {
  font-family: 'Montserrat',sans-serif; font-weight: 700;
  font-size: 1.2rem; letter-spacing: -.014em;
  color: var(--green-900);
  margin-bottom: .85rem;
}
.cat ul { list-style: none; padding: 0; margin: 0; }
.cat li { margin: .2rem 0; }
.cat a { color: var(--ink); font-size: .95rem; padding: .25rem 0; display: block; }
.cat a:hover { color: var(--green-700); text-decoration: none; }

/* ---- Brand mark (shared) ---- */
.docs-brand-mark { width: 28px; height: 28px; }
