/* =========================================================================
   Food4Life review site — shared chrome
   Built on the Food4Life design system tokens. No framework, no build step.
   ========================================================================= */

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; background: var(--cream); color: var(--ink-2);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* ---------- Top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,247,240,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__in {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav__tile {
  width: 32px; height: 32px; border-radius: 9px; background: var(--garden-700);
  color: var(--sprout-400); font-family: var(--font-display); font-weight: 800;
  font-size: 18px; display: grid; place-items: center;
}
.nav__wm {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: var(--ls-wordmark); color: var(--garden-700); line-height: 1;
}
.nav__wm i { color: var(--harvest-500); font-style: normal; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__a {
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  color: var(--ink-2); text-decoration: none; padding: 8px 14px;
  border-radius: var(--r-pill);
}
.nav__a:hover { background: var(--garden-50); color: var(--garden-700); }
.nav__a.on { background: var(--garden-50); color: var(--garden-700); font-weight: 700; }
.nav__tag {
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--sand); color: var(--ink-3);
  padding: 3px 9px; border-radius: var(--r-pill); margin-left: 8px;
}
.nav__burger {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 7px 13px; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 14px; color: var(--garden-700);
}

/* ---------- Page furniture ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 44px 28px 96px; }
.page--doc { max-width: 1180px; }
.eb {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--garden-600);
}
.h1 {
  font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1.06;
  letter-spacing: var(--ls-display); color: var(--ink); margin: 12px 0 14px;
}
.lede { font-size: 18.5px; line-height: 1.6; max-width: 680px; margin: 0; color: var(--ink-2); }
.h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  letter-spacing: var(--ls-heading); color: var(--ink); margin: 52px 0 6px;
}
.h2sub { font-size: 15px; color: var(--ink-3); margin: 0 0 20px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 22px;
  text-decoration: none; color: inherit; transition: box-shadow .12s ease;
}
a.card:hover { box-shadow: var(--shadow-md); }
.card__n {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink);
  letter-spacing: var(--ls-heading); margin-bottom: 5px;
}
.card__d { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.card__m { font-size: 12.5px; color: var(--ink-3); margin-top: 11px; font-weight: 600; }
.card__thumb {
  display: block; width: 100%; height: 158px; object-fit: cover; object-position: top center;
  border-radius: var(--r-md); border: 1px solid var(--line);
  margin-bottom: 14px; background: var(--sand);
}

.pillrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  display: inline-flex; align-items: center; border-radius: var(--r-pill);
  font-family: var(--font-body); font-weight: 600; font-size: 12.5px; padding: 4px 10px;
  background: var(--garden-50); color: var(--garden-700); text-decoration: none;
}
a.pill:hover { background: var(--garden-100); }
.pill--sand { background: var(--sand); color: var(--ink-2); }
.pill--amber { background: var(--harvest-200); color: var(--harvest-600); }

.note {
  background: var(--sand); border-radius: var(--r-md); padding: 16px 18px;
  font-size: 14.5px; line-height: 1.6; margin-top: 20px;
}
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  border-radius: var(--r-pill); padding: 10px 20px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
}
.btn--primary { background: var(--garden-600); color: #fff; }
.btn--primary:hover { background: var(--garden-700); }
.btn--ghost { background: transparent; color: var(--garden-600); border-color: var(--garden-200); }
.btn--ghost:hover { background: var(--garden-50); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--sand); padding: 2px 6px; border-radius: 5px;
  color: var(--garden-700);
}
.foot {
  margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}

/* =========================================================================
   Markdown document rendering
   ========================================================================= */
.doc { display: grid; grid-template-columns: 1fr 250px; gap: 48px; align-items: start; }
.md { min-width: 0; max-width: 780px; }

.md h1 {
  font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.08;
  letter-spacing: var(--ls-display); color: var(--ink); margin: 0 0 20px;
}
.md h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15;
  letter-spacing: var(--ls-heading); color: var(--ink);
  margin: 52px 0 14px; padding-top: 22px; border-top: 1px solid var(--line);
}
.md h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 21px;
  letter-spacing: var(--ls-heading); color: var(--ink); margin: 34px 0 10px;
}
.md h4 {
  font-family: var(--font-body); font-weight: 700; font-size: 17px;
  color: var(--ink); margin: 26px 0 8px;
}
.md p { margin: 0 0 18px; }
.md a { color: var(--garden-600); text-decoration: none; border-bottom: 1px solid var(--garden-200); }
.md a:hover { border-bottom-color: var(--garden-600); }
.md strong { color: var(--ink); font-weight: 700; }
.md em { font-style: italic; }
.md ul, .md ol { margin: 0 0 18px; padding-left: 26px; }
.md li { margin-bottom: 7px; }
.md li::marker { color: var(--garden-500); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

.md blockquote {
  margin: 0 0 20px; padding: 16px 20px; background: var(--sand);
  border-left: 3px solid var(--harvest-500); border-radius: 0 var(--r-md) var(--r-md) 0;
}
.md blockquote p:last-child { margin-bottom: 0; }

.md img {
  display: block; max-width: 100%; height: auto; margin: 26px 0;
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  background: var(--card);
}

/* fenced blocks — ASCII diagrams live here, so allow horizontal scroll */
.md pre {
  background: #FCFAF5; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; overflow-x: auto; margin: 0 0 20px;
}
.md pre code {
  background: none; padding: 0; border-radius: 0; color: var(--ink-2);
  font-size: 12.5px; line-height: 1.55; white-space: pre;
}

.md table {
  width: 100%; border-collapse: collapse; margin: 0 0 24px;
  font-size: 14.5px; display: block; overflow-x: auto;
}
.md thead { background: var(--sand); }
.md th {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-3);
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.md td {
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top; font-variant-numeric: tabular-nums;
}
.md tbody tr:last-child td { border-bottom: none; }

/* ---------- Table of contents ---------- */
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc__t {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--garden-600);
  margin-bottom: 12px;
}
.toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc__list a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px;
  color: var(--ink-3); text-decoration: none; border-left: 2px solid transparent;
  line-height: 1.4;
}
.toc__list a:hover { color: var(--garden-700); }
.toc__list a.on { color: var(--garden-700); font-weight: 700; border-left-color: var(--garden-500); }
.toc__list a.lvl3 { padding-left: 26px; font-size: 13px; }

.docbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.docbar__which { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Frame viewer (kits & demos) ---------- */
.frame {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--card);
}
.frame__bar {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  background: var(--sand); border-bottom: 1px solid var(--line);
}
.frame__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.frame__t { font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.frame iframe { display: block; width: 100%; border: 0; background: var(--cream); }
.frame--phone { max-width: 412px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; margin-bottom: 32px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__in { padding: 0 18px; }
  .nav__links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 18px 16px; gap: 2px;
  }
  .nav__links.open { display: flex; }
  .nav__burger { display: block; }
  .page { padding: 30px 18px 64px; }
  .h1 { font-size: 32px; }
  .md h1 { font-size: 30px; }
  .md h2 { font-size: 23px; }
  .grid, .grid--2, .grid--3 { grid-template-columns: 1fr; }
}
