/* =====================================================================
   Crop Planning — Meadow Green design system
   Light, elegant, professional. Lime → deep teal gradients.
   ===================================================================== */

:root {
  /* Meadow Green palette */
  --lime-50:  #f3fbe6;
  --lime-100: #e6f7c6;
  --lime-200: #d2ef8e;
  --lime-300: #b6e85a;
  --lime-400: #9bd83a;
  --lime-500: #7fc12a;

  --green-300: #7ad0a0;
  --green-400: #4cc28a;
  --green-500: #3eb489;
  --green-600: #2f8f6f;
  --green-700: #1f6d57;

  --teal-500: #167a73;
  --teal-600: #0e6e6e;
  --teal-700: #0b5757;

  --sun-300: #fff4b8;
  --sun-400: #f0c84a;

  /* Neutrals */
  --bg:       #f4faf6;
  --bg-soft:  #ecf5ef;
  --surface:  #ffffff;
  --surface-2:#f8fbf9;
  --border:   #d9e9df;
  --border-strong: #b9d5c5;

  --ink:      #102a23;
  --ink-2:    #234a40;
  --ink-3:    #406b5f;
  --ink-mute: #6c8a80;

  --link:     #167a73;
  --link-h:   #0b5757;

  /* Code */
  --code-bg:      #f1f7f0;
  --code-border:  #d6e8da;
  --code-ink:     #1a3d34;
  --inline-bg:    #e8f3ec;
  --inline-ink:   #1f6d57;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15,60,45,.06), 0 1px 1px rgba(15,60,45,.04);
  --shadow-md: 0 6px 18px rgba(15,60,45,.08), 0 2px 6px rgba(15,60,45,.05);
  --shadow-lg: 0 20px 40px rgba(15,60,45,.12), 0 6px 14px rgba(15,60,45,.06);

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  --header-h: 72px;

  --grad-leaf: linear-gradient(135deg, #b6e85a 0%, #3eb489 55%, #0e6e6e 100%);
  --grad-leaf-soft: linear-gradient(135deg, rgba(182,232,90,.18) 0%, rgba(62,180,137,.16) 55%, rgba(14,110,110,.14) 100%);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(to right, var(--link), var(--link));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: color .18s ease, background-size .25s ease;
}
a:hover, a:focus-visible {
  color: var(--link-h);
  background-size: 100% 1.5px;
}
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* In-page anchor offset for sticky header */
:target {
  scroll-margin-top: calc(var(--header-h) + 16px);
}
h1, h2, h3, h4 {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.container--wide {
  max-width: 1320px;
}
@media (min-width: 1600px) {
  .container--wide { max-width: 1480px; }
}

/* ---------- Skip link ---------- */
.site-header__skip {
  position: absolute;
  left: -9999px;
}
.site-header__skip:focus {
  left: 16px;
  top: 12px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 100;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  flex-wrap: nowrap;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  text-decoration: none !important;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.site-header__brand:hover { color: var(--teal-600); }
.site-header__logo { width: 38px; height: 38px; display: block; flex-shrink: 0; }
.site-header__logo .logo-mark { width: 100%; height: 100%; }
.site-header__brand-text {
  display: flex; flex-direction: column; line-height: 1.05;
}
.site-header__brand-name {
  font-weight: 700; font-size: 1.02rem; letter-spacing: .2px;
}
.site-header__brand-tag {
  font-size: .7rem; color: var(--ink-3); margin-top: 3px; letter-spacing: .6px;
  text-transform: uppercase;
}

.site-nav { margin-left: auto; min-width: 0; }
.site-nav__list {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  flex-wrap: nowrap;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: .92rem;
  color: var(--ink-2);
  border-radius: 999px;
  background: transparent !important;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.site-nav__link:hover {
  color: var(--teal-600);
  background-color: var(--bg-soft) !important;
}
.site-nav__link.is-current {
  color: var(--teal-700);
  background: linear-gradient(135deg, rgba(182,232,90,.35), rgba(62,180,137,.28)) !important;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.site-nav__icon { width: 18px; height: 18px; flex: 0 0 18px; }

.site-header__menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
}
.site-header__menu-bar {
  display: block;
  width: 18px; height: 2px;
  margin: 4px auto;
  background: var(--ink-2);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 760px) {
  .site-header__brand-tag { display: none; }
}
@media (max-width: 680px) {
  .site-header__menu-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
  .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px clamp(16px, 4vw, 32px);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-nav.is-open { max-height: 60vh; }
  .site-nav__list { flex-direction: column; gap: 2px; }
  .site-nav__link { padding: 12px 14px; font-size: 1rem; border-radius: 12px; }
}

/* ---------- Main / hero ---------- */
.site-main { min-height: 60vh; }
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(182,232,90,.35), transparent 60%),
    radial-gradient(900px 400px at 10% 0%, rgba(62,180,137,.18), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
}
.hero__eyebrow {
  display: inline-block;
  font-size: .78rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--teal-600);
  background: var(--lime-100);
  padding: 6px 10px; border-radius: 999px;
  margin: 0 0 18px 0;
}
.hero__title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 18px 0;
  letter-spacing: -.02em;
  color: var(--ink);
  font-weight: 800;
}
.hero__title-grad {
  background: var(--grad-leaf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 28px 0;
}
.hero__ctas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 760px;
}
.cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  color: var(--teal-700);
}
.cta__icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--grad-leaf-soft);
  flex: 0 0 40px;
}
.cta__icon svg { width: 22px; height: 22px; }
.cta__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cta__title { font-weight: 600; font-size: .98rem; }
.cta__sub { font-size: .82rem; color: var(--ink-3); margin-top: 2px; }

.hero__art {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 240px;
}
.hero__logo {
  width: clamp(180px, 22vw, 280px);
  height: clamp(180px, 22vw, 280px);
  filter: drop-shadow(0 20px 30px rgba(14,110,110,.18));
  position: relative; z-index: 2;
  transition: transform .4s ease;
}
.hero__logo:hover { transform: rotate(-3deg) scale(1.03); }
.hero__halo {
  position: absolute; inset: 0; margin: auto;
  width: clamp(260px, 32vw, 420px); height: clamp(260px, 32vw, 420px);
  background: radial-gradient(circle, rgba(182,232,90,.45) 0%, rgba(62,180,137,.18) 45%, transparent 70%);
  filter: blur(20px);
  border-radius: 50%;
}

/* ---------- Intro paragraphs ---------- */
.intro {
  padding: clamp(48px, 6vw, 88px) 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.intro__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.intro__inner p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink-2);
}
.intro__inner p:first-child {
  font-size: 1.12rem;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Pillars ---------- */
.pillars { padding: clamp(56px, 7vw, 96px) 0; }
.section-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  margin: 0 0 36px;
  letter-spacing: -.01em;
  color: var(--ink);
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: "";
  position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 5px; border-radius: 4px;
  background: var(--grad-leaf);
}
.pillars__grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: var(--grad-leaf);
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.pillar-card__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-leaf-soft);
}
.pillar-card__icon svg { width: 28px; height: 28px; }
.pillar-card__title {
  margin: 4px 0 0 0;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.25;
}
.pillar-card__summary {
  margin: 0;
  color: var(--ink-2);
  font-size: .98rem;
}
.pillar-card__cta {
  margin-top: auto;
  font-weight: 600;
  color: var(--teal-600);
}

/* ---------- Topics grid ---------- */
.topics { padding: clamp(32px, 5vw, 72px) 0 clamp(72px, 10vw, 128px); }
.topics__grid {
  display: grid;
  gap: clamp(24px, 2.4vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.topics__group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.topics__group-title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px 0;
  font-size: 1.08rem;
}
.topics__group-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-leaf-soft);
}
.topics__group-icon svg { width: 18px; height: 18px; }
.topics__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.topics__list a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent !important;
  color: var(--ink-2);
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
.topics__list a:hover {
  background: var(--bg-soft) !important;
  color: var(--teal-700);
  transform: translateX(2px);
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  padding: clamp(32px, 4vw, 48px) clamp(16px, 4vw, 32px);
}
.site-footer__brand {
  display: flex; align-items: center; gap: 14px;
}
.site-footer__logo { width: 44px; height: 44px; }
.site-footer__name { margin: 0; font-weight: 700; }
.site-footer__tag { margin: 4px 0 0; color: var(--ink-3); font-size: .92rem; }
.site-footer__heading {
  margin: 0 0 8px; font-weight: 600; color: var(--ink-2);
  font-size: .78rem; letter-spacing: 1px; text-transform: uppercase;
}
.site-footer__nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.site-footer__legal {
  padding: 16px clamp(16px, 4vw, 32px) 24px;
  font-size: .85rem;
  color: var(--ink-3);
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* Make body sticky-footer-ish */
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* =====================================================================
   Prose / content pages
   ===================================================================== */
.prose-page {
  padding: clamp(32px, 4.5vw, 72px) 0 clamp(56px, 7vw, 112px);
}
.breadcrumbs {
  margin: 0 0 28px 0;
  font-size: .9rem;
  color: var(--ink-3);
}
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--ink-mute);
}
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs [aria-current="page"] span { color: var(--ink); font-weight: 600; }

/* Prose container — takes full container width on desktop */
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.5vw, 64px) clamp(24px, 4vw, 72px);
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}
.prose > * + * { margin-top: 1.45em; }
.prose > h2 + *, .prose > h3 + * { margin-top: 1em; }

/* H1 — big, colorful gradient */
.prose h1 {
  font-size: clamp(2rem, 3.6vw, 2.95rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .8em 0;
  background: var(--grad-leaf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.prose h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  margin-top: 2.4em;
  color: var(--teal-700);
  letter-spacing: -.01em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.prose h3 {
  font-size: clamp(1.12rem, 1.55vw, 1.32rem);
  line-height: 1.35;
  margin-top: 2em;
  color: var(--green-700);
  font-weight: 700;
}
.prose h4 {
  font-size: 1.08rem;
  color: var(--ink-2);
  margin-top: 1.6em;
  font-weight: 700;
}

.heading-permalink {
  background: none !important;
  text-decoration: none !important;
  color: inherit;
}
.heading-permalink:hover { color: inherit; }

.prose p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.8;
}
.prose strong { color: var(--ink); }
.prose em { color: var(--ink-2); }

.prose ul, .prose ol {
  padding-left: 1.4em;
  margin: 0;
  color: var(--ink-2);
}
.prose li { line-height: 1.75; }
.prose li + li { margin-top: 10px; }
.prose ul li::marker { color: var(--green-500); }

.prose a {
  color: var(--link);
  font-weight: 500;
  background-image: linear-gradient(to right, var(--green-500), var(--teal-600));
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 100%;
  transition: color .18s ease, background-size .2s ease;
}
.prose a:hover {
  color: var(--link-h);
  background-size: 100% 2.5px;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--green-500);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
}

/* Inline code */
.prose :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--inline-bg);
  color: var(--inline-ink);
  padding: 1px 6px;
  border-radius: 6px;
  border: 0;
  white-space: break-spaces;
}

/* Task lists: render checkbox, remove the bullet dot */
.prose ul li.task-list-item,
.prose ul li:has(> input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.25em;
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.prose ul li.task-list-item input[type="checkbox"],
.prose ul li > input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  margin: 6px 0 0 0;
  flex: 0 0 18px;
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.prose ul li.task-list-item input[type="checkbox"]:hover,
.prose ul li > input[type="checkbox"]:hover {
  border-color: var(--green-500);
}
.prose ul li.task-list-item input[type="checkbox"]:checked,
.prose ul li > input[type="checkbox"]:checked {
  background: var(--grad-leaf);
  border-color: var(--green-600);
}
.prose ul li.task-list-item input[type="checkbox"]:checked::after,
.prose ul li > input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.prose ul li.task-list-item input[type="checkbox"]:checked ~ *,
.prose ul li > input[type="checkbox"]:checked ~ * {
  text-decoration: line-through;
  color: var(--ink-mute);
}
/* Some renderers put the text in a label/span; the rule above covers siblings.
   For the markdown-it-task-lists output, structure is: <input> text. */
.prose ul li.task-list-item.checked,
.prose ul li.task-list-item input[type="checkbox"]:checked + * {
  text-decoration: line-through;
  color: var(--ink-mute);
}

/* Tables */
.prose .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.2em 0;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: .96rem;
}
.prose thead th {
  text-align: left;
  background: var(--bg-soft);
  color: var(--teal-700);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.prose tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: var(--surface-2); }

/* Horizontal rule */
.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 2em 0;
}

/* ---------- Code blocks ---------- */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  margin: 2em 0;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.code-block__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  background: linear-gradient(180deg, #eaf5ee 0%, #e2efe6 100%);
  border-bottom: 1px solid var(--code-border);
}
.code-block__lang {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green-700);
  font-weight: 700;
}
.code-block__copy {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--teal-700);
  padding: 4px 10px;
  font-size: .78rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
  font-weight: 600;
}
.code-block__copy:hover {
  background: var(--grad-leaf);
  color: #fff;
  border-color: transparent;
}
.code-block__copy.is-copied {
  background: var(--green-500);
  color: #fff;
  border-color: transparent;
}
.code-block__pre {
  margin: 0;
  padding: 18px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .92rem;
  line-height: 1.65;
  color: var(--code-ink);
  background: transparent;
  -webkit-overflow-scrolling: touch;
}
.code-block__pre code {
  font-family: inherit;
  background: transparent;
  padding: 0;
  border: 0;
  color: inherit;
  white-space: pre;
}

/* ---- Prism syntax highlighting — Meadow Green theme (light) ---- */
.code-block__pre code .token.comment,
.code-block__pre code .token.prolog,
.code-block__pre code .token.doctype,
.code-block__pre code .token.cdata {
  color: #7a978c;
  font-style: italic;
}
.code-block__pre code .token.punctuation {
  color: #4d6b60;
}
.code-block__pre code .token.namespace { opacity: .8; }

.code-block__pre code .token.property,
.code-block__pre code .token.tag,
.code-block__pre code .token.constant,
.code-block__pre code .token.symbol,
.code-block__pre code .token.deleted {
  color: #b06a17;
}
.code-block__pre code .token.boolean,
.code-block__pre code .token.number {
  color: #2a7e63;
}
.code-block__pre code .token.selector,
.code-block__pre code .token.attr-name,
.code-block__pre code .token.string,
.code-block__pre code .token.char,
.code-block__pre code .token.builtin,
.code-block__pre code .token.inserted {
  color: #167a73;
}
.code-block__pre code .token.operator,
.code-block__pre code .token.entity,
.code-block__pre code .token.url,
.code-block__pre code .token.variable {
  color: #2f8f6f;
}
.code-block__pre code .token.atrule,
.code-block__pre code .token.attr-value,
.code-block__pre code .token.keyword {
  color: #0e6e6e;
  font-weight: 600;
}
.code-block__pre code .token.function,
.code-block__pre code .token.class-name {
  color: #1f6d57;
  font-weight: 600;
}
.code-block__pre code .token.regex,
.code-block__pre code .token.important {
  color: #c0671a;
}
.code-block__pre code .token.important,
.code-block__pre code .token.bold { font-weight: bold; }
.code-block__pre code .token.italic { font-style: italic; }
.code-block__pre code .token.decorator,
.code-block__pre code .token.annotation {
  color: #7fc12a;
  font-weight: 600;
}

/* Mermaid blocks */
.mermaid-wrapper {
  margin: 1.4em 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.mermaid-wrapper .mermaid {
  font-family: var(--font-mono);
  font-size: .92rem;
  color: var(--code-ink);
  margin: 0;
  background: transparent;
  text-align: center;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin: 1em 0;
}
.accordion__item + .accordion__item {
  border-top: 1px solid var(--border);
}
.accordion__btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 14px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--teal-700);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  transition: background-color .2s ease;
}
.accordion__btn:hover { background: var(--bg-soft); }
.accordion__btn[aria-expanded="true"] {
  background: var(--bg-soft);
  color: var(--teal-700);
}
.accordion__btn::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform .2s ease;
}
.accordion__btn[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}
.accordion__panel {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .25s ease;
  color: var(--ink-2);
}
.accordion__panel.is-open {
  padding: 0 18px 16px 18px;
  max-height: 4000px;
}

/* ---------- Related ---------- */
.related {
  margin-top: clamp(28px, 4vw, 56px);
}
.related__title {
  font-size: 1.15rem;
  margin: 0 0 14px 0;
  color: var(--teal-700);
  font-weight: 700;
}
.related__list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.related__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface) !important;
  color: var(--ink-2);
  text-decoration: none;
  transition: transform .15s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}
.related__link:hover {
  transform: translateX(2px);
  border-color: var(--border-strong);
  background: var(--bg-soft) !important;
  color: var(--teal-700);
}
.related__arrow {
  color: var(--green-500);
  font-weight: 700;
}

/* ---------- Misc / utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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