/*
 * diet.chat
 *
 * Hand-written CSS, served directly by Propshaft. There is no build step: edit
 * this file and reload. Kept as a single file so the cascade order is explicit
 * rather than depending on how Propshaft happens to sort a directory.
 *
 * Contents
 *   1.  Tokens
 *   2.  Reset & base
 *   3.  Layout primitives
 *   4.  Typography
 *   5.  Buttons
 *   6.  Forms
 *   7.  Header & navigation
 *   8.  Hero & page headers
 *   8b. Log illustration
 *   8c. Chat exchange
 *   9.  Cards, features & lists
 *   10. FAQ
 *   11. CTA band
 *   12. Footer
 *   13. Utilities
 *   14. Admin
 */


/* ------------------------------------------------------------------ 1. Tokens
 *
 * Warm, quiet neutrals with a single olive accent reserved for actions and for
 * anything that means "recorded". Two accents at most — everything else is
 * neutral, so a filled cell in the log reads as information rather than as
 * decoration competing with six other colours.
 *
 * Deliberately warm rather than clinical, and deliberately not the red/amber/
 * green vocabulary the rest of this category uses: nothing on this site scores
 * a meal, so nothing should be coloured as though it had.
 */
:root {
  --ink-50:  #f8f7f4;
  --ink-100: #eeece6;
  --ink-200: #ddd9d0;
  --ink-300: #b9b3a6;
  --ink-400: #8c8578;
  --ink-500: #6b655a;
  --ink-600: #524d45;
  --ink-700: #3e3a34;
  --ink-800: #292622;
  --ink-900: #16140f;

  --olive-50:  #f2f7ef;
  --olive-100: #e0ecd9;
  --olive-200: #c3dbb6;
  --olive-300: #97c184;
  --olive-500: #5b8f45;
  --olive-600: #4a7a37;
  --olive-700: #3c632d;
  --olive-800: #2f4d24;

  /* Reserved exclusively for the safety block. Not an accent to reach for
     elsewhere — its whole value is that it appears nowhere else, and on this
     site it appears on every landing page. */
  --amber-50:  #fffbeb;
  --amber-200: #fde68a;
  --amber-900: #713f12;

  --red-50:  #fef2f2;
  --red-200: #fecaca;
  --red-400: #f87171;
  --red-800: #991b1b;
  --red-900: #7f1d1d;

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

  --measure: 72rem;          /* page max width */
  --measure-text: 42rem;     /* comfortable reading width */

  --radius-sm: 0.5rem;
  --radius:    0.75rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px rgb(22 20 15 / 0.05);
  --shadow:    0 4px 16px rgb(22 20 15 / 0.06);
  --shadow-lg: 0 12px 32px rgb(22 20 15 / 0.10);
}


/* ---------------------------------------------------------- 2. Reset & base */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-800);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
svg { flex: none; }

input, button, textarea, select { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--olive-600);
  outline-offset: 2px;
  border-radius: 2px;
}

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


/* ----------------------------------------------------- 3. Layout primitives */
.container {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container--narrow { max-width: 44rem; }
.container--text { max-width: calc(var(--measure-text) + 2.5rem); }

main { flex: 1; }

.section { padding-block: 5rem; }
.section--tight { padding-block: 4rem; }
.section--muted { background: var(--ink-50); }
.section--border-t { border-top: 1px solid var(--ink-100); }
.section--border-b { border-bottom: 1px solid var(--ink-100); }
.section--border-y {
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}

@media (min-width: 640px) {
  .section { padding-block: 6rem; }
  .section--tight { padding-block: 4.5rem; }
}

.grid { display: grid; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Two-column split used by the hero and the join sections. */
.split {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.split--top { align-items: start; }

@media (min-width: 960px) {
  .split { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .split--even { grid-template-columns: 1fr 1.1fr; }
}


/* ----------------------------------------------------------- 4. Typography */
h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.125rem; line-height: 1.35; }
h4 { font-size: 1rem; }

p { text-wrap: pretty; }

/* Small uppercase label. */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--olive-700);
}
.eyebrow--light { color: var(--olive-300); }

.lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-600);
}
.lede--lg { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem); }
.lede--light { color: var(--ink-300); }

.prose { color: var(--ink-600); line-height: 1.65; }
.prose--sm { font-size: 0.9375rem; }
.prose a {
  color: var(--olive-700);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose a:hover { color: var(--olive-800); }

.muted { color: var(--ink-500); font-size: 0.875rem; }
.muted--light { color: var(--ink-400); }

/* Standard section intro: eyebrow + heading + supporting line. */
.section-heading { max-width: var(--measure-text); }
.section-heading--center { margin-inline: auto; text-align: center; }
.section-heading h2 { margin-top: 0.75rem; }
.section-heading .lede { margin-top: 1rem; }
.section-heading--dark h2 { color: #fff; }

/* Sub-heading that labels a group of cards ("Building" / "Breaking"). */
.group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-400);
}


/* -------------------------------------------------------------- 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary { background: var(--olive-600); color: #fff; }
.btn--primary:hover { background: var(--olive-700); }

.btn--secondary { background: var(--ink-900); color: #fff; }
.btn--secondary:hover { background: var(--ink-800); }

.btn--ghost {
  background: #fff;
  color: var(--ink-800);
  border-color: var(--ink-200);
}
.btn--ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }

/* For use on the dark CTA band. */
.btn--outline-light {
  background: transparent;
  color: var(--ink-200);
  border-color: var(--ink-700);
}
.btn--outline-light:hover { background: var(--ink-800); color: #fff; }

.btn--block { width: 100%; }

.btn-row { display: flex; flex-direction: column; gap: 0.75rem; }
.btn-row--center { align-items: center; justify-content: center; }

@media (min-width: 640px) {
  .btn-row { flex-direction: row; }
  .btn--block { width: auto; }
}


/* ---------------------------------------------------------------- 6. Forms */
.form { display: grid; gap: 1.25rem; }

.field__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-800);
}

.field__input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-900);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__input::placeholder { color: var(--ink-400); }
.field__input:focus {
  outline: none;
  border-color: var(--olive-600);
  box-shadow: 0 0 0 3px rgb(13 138 90 / 0.15);
}
.field__input--error { border-color: var(--red-400); }
.field__input--error:focus {
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgb(248 113 113 / 0.18);
}

textarea.field__input { resize: vertical; min-height: 5.5rem; }

select.field__input {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235f6f73'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.form__grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form__submit-row { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) {
  .form__submit-row { flex-direction: row; align-items: center; }
}

.form-errors {
  padding: 1rem;
  border: 1px solid var(--red-200);
  border-radius: var(--radius-sm);
  background: var(--red-50);
}
.form-errors__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red-900);
}
.form-errors ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
  font-size: 0.875rem;
  color: var(--red-800);
}
.form-errors li + li { margin-top: 0.25rem; }

/* The form card in the join sections. */
.form-card {
  padding: 1.5rem;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) { .form-card { padding: 2rem; } }


/* -------------------------------------------------- 7. Header & navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--ink-100);
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.875rem;
}

.brand { display: flex; align-items: center; gap: 0.625rem; flex: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: #fff;
}
.brand__mark svg { width: 1.125rem; height: 1.125rem; }
.brand__name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.brand__name span { color: var(--olive-600); }

.site-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 900px) { .site-nav { display: flex; } }

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-600);
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--ink-900); }
.nav-link--current { color: var(--ink-900); }

.site-header__actions { display: flex; align-items: center; gap: 0.75rem; }
.site-header__cta { display: none; }
@media (min-width: 560px) { .site-header__cta { display: inline-flex; } }

/* "Habits" dropdown */
.dropdown { position: relative; }
.dropdown__button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-600);
  cursor: pointer;
  transition: color 0.15s ease;
}
.dropdown__button:hover { color: var(--ink-900); }
.dropdown__button svg { width: 1rem; height: 1rem; transition: transform 0.15s ease; }
.dropdown__button[aria-expanded="true"] svg { transform: rotate(180deg); }

.dropdown__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 0.75rem;
  width: 46rem;
}
.dropdown__panel {
  padding: 0.75rem;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
}
/* Thirty-two entries in one column would run off the bottom of a laptop screen,
   so the menu splits into the four sections that already mean something. */
.dropdown__panel--split {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.dropdown__label {
  padding: 0.25rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  white-space: nowrap;
}
.dropdown__item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--ink-700);
}
.dropdown__item:hover { background: var(--ink-50); color: var(--ink-900); }

/* The group label doubles as the link to that section's hub page. */
.dropdown__label--link { display: block; color: var(--olive-700); }
.dropdown__label--link:hover { color: var(--olive-800); text-decoration: underline; }

/* Mobile menu */
.menu-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-700);
  cursor: pointer;
}
.menu-toggle svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-menu {
  border-top: 1px solid var(--ink-100);
  background: #fff;
}
@media (min-width: 900px) { .mobile-menu { display: none !important; } }
.mobile-menu__list { padding-block: 1rem; }
.mobile-menu__link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
}
.mobile-menu__link:hover { background: var(--ink-50); }
.mobile-menu__link--sub { font-weight: 400; color: var(--ink-600); }
.mobile-menu__group-label {
  padding: 1rem 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}
/* The mobile menu can be open at tablet widths, where .btn--block would
   otherwise have collapsed back to auto width. */
.mobile-menu .btn { margin-top: 0.75rem; width: 100%; }


/* -------------------------------------------------- 8. Hero & page headers */
.hero {
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
  overflow: hidden;
}
.hero__inner { padding-block: 5rem; }
@media (min-width: 640px) { .hero__inner { padding-block: 7rem; } }
.hero h1 { margin-top: 1rem; }
.hero .lede { margin-top: 1.5rem; max-width: 36rem; }
.hero .btn-row { margin-top: 2rem; }
.hero__note { margin-top: 1.5rem; }

/* Page header used on interior pages. */
.page-header {
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
  text-align: center;
}
.page-header__inner { padding-block: 4rem; }
@media (min-width: 640px) { .page-header__inner { padding-block: 5rem; } }
.page-header h1 { margin-top: 0.75rem; }
.page-header .lede { margin-top: 1rem; margin-inline: auto; max-width: 38rem; }
.page-header--left { text-align: left; }
.page-header--left .lede { margin-inline: 0; }


/* ---------------------------------------------------- 8b. Log illustration
 *
 * The product drawn in HTML rather than screenshotted: crisp at any size,
 * readable by crawlers and screen readers, no download, and it can't drift out
 * of date the way an exported mockup does.
 *
 * A filled cell means an entry exists and an empty one means nothing was
 * written down. There is deliberately no third colour for a "bad" day — the
 * whole point of this drawing is that the log records rather than grades.
 */
.board {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.board__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.board__title { font-size: 0.9375rem; font-weight: 600; color: var(--ink-900); }
.board__tag {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--olive-100);
  color: var(--olive-800);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.board__rows { padding: 0.25rem 1.25rem; }
.board__row { padding-block: 1rem; }
.board__row + .board__row { border-top: 1px solid var(--ink-100); }
.board__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.board__name { font-size: 0.875rem; font-weight: 500; color: var(--ink-800); }
.board__metric {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--olive-700);
  white-space: nowrap;
}
.board__grid {
  margin-top: 0.625rem;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.25rem;
}
.board__day {
  aspect-ratio: 1;
  border-radius: 0.1875rem;
  background: var(--ink-100);
}
.board__day--done   { background: var(--olive-500); }
.board__day--missed { background: var(--ink-200); }
/* A rest day is deliberately not a miss — it reads as intentionally empty. */
.board__day--rest {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink-200);
}
.board__day--today {
  background: var(--olive-100);
  box-shadow: inset 0 0 0 2px var(--olive-500);
}
.board__kind {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-400);
}
.board__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--ink-100);
  background: var(--olive-50);
}
.board__footer-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--olive-800);
}
.board__footer-quote {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-800);
}
.board__footer-note { margin-top: 0.375rem; font-size: 0.75rem; color: var(--ink-500); }


/* ------------------------------------------------------ 8c. Chat exchange
 *
 * A worked chat transcript. The tool chips carry the argument — they show the
 * model selecting operations rather than inventing streaks — so they get real
 * visual weight instead of being decorative.
 */
.chat {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.chat__title { font-size: 0.9375rem; font-weight: 600; color: var(--ink-900); }
.chat__badge {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--olive-100);
  color: var(--olive-800);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chat__body { padding: 1.25rem; display: grid; gap: 1rem; }

/* Grid items default to min-width:auto, so a long single-line tool call would
   otherwise widen the whole column past the card and get clipped by the
   overflow:hidden above — taking the messages with it, since they size against
   the same column. Explicit zero lets the code block scroll itself instead. */
.chat__body > *,
.chat__run,
.chat__tools,
.chat__tool { min-width: 0; }

.chat__message { max-width: 90%; }
.chat__message p {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.chat__message--user { justify-self: end; }
.chat__message--user p {
  background: var(--ink-900);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}
.chat__message--assistant { justify-self: start; }
.chat__message--assistant p {
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  color: var(--ink-800);
  border-bottom-left-radius: 0.25rem;
}

/* The tool-call run, shown between the question and the answer. */
.chat__run {
  padding: 0.875rem 1rem;
  border: 1px dashed var(--ink-300);
  border-radius: var(--radius);
  background: var(--olive-50);
}
.chat__run-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--olive-800);
}
.chat__tools { margin-top: 0.625rem; display: grid; gap: 0.375rem; }
.chat__tool code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-700);
  overflow-x: auto;
  white-space: nowrap;
}
.chat__footnote {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--ink-100);
  background: #fff;
  color: var(--ink-500);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Two-interface comparison. */
.surfaces { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .surfaces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.surface {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
}
.surface__label {
  align-self: flex-start;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.surface h3 { margin-top: 1rem; }
.surface p { margin-top: 0.5rem; }
.surface .checklist { margin-top: 1.25rem; }

/* Composer mock, pinned to the bottom so the chat surface balances against the
   taller board beside it. Decorative — not a real input. */
.composer {
  margin-top: auto;
  padding-top: 1.5rem;
}
.composer__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  background: var(--ink-50);
  color: var(--ink-400);
  font-size: 0.9375rem;
}
.composer__send {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: var(--olive-600);
  color: #fff;
}
.composer__send svg { width: 0.875rem; height: 0.875rem; }
.composer__hint { margin-top: 0.625rem; font-size: 0.75rem; color: var(--ink-400); }

/* The shared-tools diagram. */
.tool-bus {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px dashed var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--ink-50);
  text-align: center;
}
.tool-bus__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}
.tool-bus__chips {
  margin-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.tool-bus__chip {
  padding: 0.3125rem 0.625rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-700);
}


/* ----------------------------------------------- 9. Cards, features & lists */
.card {
  padding: 1.5rem;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius);
  background: #fff;
}
.card--muted { background: var(--ink-50); }
.card h3 + p { margin-top: 0.75rem; }

/* Linked card, used for the habit index. */
.card--link { display: block; transition: border-color 0.15s ease, background-color 0.15s ease; }
.card--link:hover { border-color: var(--olive-300); background: var(--olive-50); }
.card--link h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.card__arrow { color: var(--ink-300); transition: transform 0.15s ease, color 0.15s ease; }
.card--link:hover .card__arrow { transform: translateX(2px); color: var(--olive-600); }

.feature__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--olive-50);
  color: var(--olive-700);
}
.feature__icon svg { width: 1.25rem; height: 1.25rem; }
.feature h3 { margin-top: 1.25rem; }
.feature p { margin-top: 0.5rem; }

.feature-grid { display: grid; gap: 2.5rem 2rem; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .feature-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Checkmark list */
.checklist { display: grid; gap: 0.75rem; margin-top: 2.5rem; }
.checklist li { display: flex; align-items: flex-start; gap: 0.75rem; }
.checklist__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: var(--olive-100);
  color: var(--olive-700);
}
.checklist__mark svg { width: 0.75rem; height: 0.75rem; }
.checklist span:last-child { font-size: 0.9375rem; color: var(--ink-700); }

/* Bulleted list with a dash marker. */
.dash-list { display: grid; gap: 0.625rem; }
.dash-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink-600);
}
.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.625rem;
  height: 1px;
  background: var(--olive-600);
}

/* Care note.
 *
 * Sits directly under the header on every autism page rather than in a footer,
 * because on those pages it is the more important thing to have read. Styled to
 * be noticed and calm rather than to look like a legal warning — a red banner
 * would misrepresent what it says. */
.care-note {
  padding: 1.5rem;
  border: 1px solid var(--olive-200);
  border-left: 3px solid var(--olive-500);
  border-radius: var(--radius);
  background: var(--olive-50);
}
.care-note__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--olive-800);
}
.care-note__body {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-700);
}
.care-note__body--muted { color: var(--ink-600); font-size: 0.875rem; }

/* The hard safety line. Deliberately the one place on the site that raises its
   voice: amber rather than the calm olive of the note around it, because it is
   the sentence that has to survive being skimmed. Still not red — this is a
   "read this properly", not an error state. */
.care-note__safety {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--amber-200);
  border-radius: var(--radius-sm);
  background: var(--amber-50);
}
.care-note__safety-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-900);
}
.care-note__safety-label svg { width: 1rem; height: 1rem; }
.care-note__safety-body {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--amber-900);
}

/* The "talk to a clinician first" list on the diet pages. Inside the safety
   block rather than below it: a reader who only takes in one block on the page
   has to have taken in this one. Bulleted rather than dashed, because unlike
   the dash-lists elsewhere these are not features — they're people. */
.care-note__safety-subhead {
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--amber-900);
}
.care-note__not-for {
  margin-top: 0.375rem;
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--amber-900);
}
.care-note__not-for li {
  position: relative;
  padding-left: 1rem;
}
/* The escalation list on the GLP-1 pages. Slightly heavier than the not-for
   list above it because it asks for something immediate rather than something
   to raise at the next appointment — but still inside the amber block rather
   than red, since red on this site means a form went wrong. */
.care-note__not-for--urgent li { font-weight: 500; }

.care-note__not-for li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.6em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* A link inside body copy that shouldn't shout — used in the dash-lists. */
.plain-link { color: var(--ink-700); text-decoration: underline; text-underline-offset: 3px; }
.plain-link:hover { color: var(--olive-700); }

/* Pulled-out sample line — milestones on the habit pages. */
.formula {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--ink-300);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-700);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Pricing */
.plans { display: grid; gap: 1.5rem; align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
}
.plan--featured { border-color: var(--ink-900); box-shadow: var(--shadow-lg); }
.plan__badge {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--olive-100);
  color: var(--olive-800);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* Reserve the badge's space on unbadged plans so all three prices sit on the
   same baseline instead of the featured one dropping by a badge height. */
.plan:not(.plan--featured)::before {
  content: "";
  display: block;
  height: 1.35rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 899px) {
  /* Stacked on mobile there is no row to align to, so drop the spacer. */
  .plan:not(.plan--featured)::before { display: none; }
}

.plan__name { font-size: 1rem; font-weight: 600; color: var(--ink-900); }
.plan__price {
  margin-top: 1rem;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.plan__period { font-size: 0.875rem; font-weight: 400; color: var(--ink-500); }
.plan__summary { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--ink-600); }
.plan .checklist { margin-top: 1.5rem; }
.plan__spacer { flex: 1; min-height: 1.75rem; }

/* Long-form legal and essay copy. */
.legal { max-width: var(--measure-text); }
.legal h2 { margin-top: 2.5rem; font-size: 1.375rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { margin-top: 1rem; color: var(--ink-600); line-height: 1.7; }
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal li + li { margin-top: 0.5rem; }
.legal a { color: var(--olive-700); text-decoration: underline; text-underline-offset: 4px; }
.legal strong { color: var(--ink-800); font-weight: 600; }


/* ------------------------------------------------------------------ 10. FAQ */
.faq { max-width: 48rem; margin-inline: auto; }
.faq__item {
  border-top: 1px solid var(--ink-100);
  padding-block: 1.25rem;
}
.faq__item:last-child { border-bottom: 1px solid var(--ink-100); }
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question h3 { font-size: 1rem; font-weight: 500; }
.faq__toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  color: var(--ink-500);
  transition: transform 0.15s ease;
}
.faq__toggle svg { width: 0.875rem; height: 0.875rem; }
.faq__item[open] .faq__toggle { transform: rotate(45deg); }
.faq__answer {
  margin-top: 0.75rem;
  padding-right: 2.75rem;
  color: var(--ink-600);
  line-height: 1.65;
}


/* ------------------------------------------------------------- 11. CTA band */
.cta-band { background: var(--ink-900); text-align: center; }
.cta-band__inner { padding-block: 5rem; }
@media (min-width: 640px) { .cta-band__inner { padding-block: 6rem; } }
.cta-band h2 { max-width: 38rem; margin-inline: auto; color: #fff; }
.cta-band__body {
  max-width: 34rem;
  margin: 1rem auto 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink-300);
}
.cta-band .btn-row { margin-top: 2rem; }
.cta-band__note { margin-top: 1.25rem; font-size: 0.875rem; color: var(--ink-400); }


/* --------------------------------------------------------------- 12. Footer */
.site-footer {
  border-top: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.site-footer__inner { padding-block: 3.5rem; }
.site-footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
}
.site-footer__about { margin-top: 1rem; max-width: 20rem; font-size: 0.875rem; color: var(--ink-600); }
.site-footer h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}
.site-footer ul { margin-top: 1rem; display: grid; gap: 0.625rem; }
.site-footer li a { font-size: 0.875rem; color: var(--ink-600); }
.site-footer li a:hover { color: var(--ink-900); }
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-200);
  font-size: 0.875rem;
  color: var(--ink-500);
}
@media (min-width: 640px) {
  .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}


/* ------------------------------------------------------------ 13. Utilities */
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 50;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: #fff;
  font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.divider-top { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ink-100); }

/* Large confirmation tick on the thank-you page. */
.success-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-inline: auto;
  border-radius: 999px;
  background: var(--olive-50);
  color: var(--olive-700);
}
.success-mark svg { width: 1.75rem; height: 1.75rem; }
.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }
.mt-xl { margin-top: 3.5rem; }
.scroll-target { scroll-margin-top: 5rem; }


/* -------------------------------------------------------------- 14. Admin
 *
 * The internal waitlist view. Same tokens as the marketing site so it doesn't
 * feel like a different application, but denser: this is a page for reading
 * rows, not for converting anyone.
 */
.admin-bar {
  border-bottom: 1px solid var(--ink-100);
  background: #fff;
}
.admin-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0.875rem 1.25rem;
}
.admin-bar__tag {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-600);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-page {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 2.5rem 1.25rem 4rem;
}
.admin-page__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-page__title { font-size: 1.75rem; letter-spacing: -0.02em; }
.admin-page__title + .muted { margin-top: 0.375rem; }

/* Twelve fields per signup will never fit a phone. Scroll the table rather
   than truncating columns away or reflowing into cards nobody can scan. */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  background: #fff;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}
.admin-table thead th {
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
  color: var(--ink-600);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table tbody tr + tr td { border-top: 1px solid var(--ink-100); }
.admin-table tbody tr:hover { background: var(--ink-50); }
.admin-table a { color: var(--olive-700); text-decoration: underline; }
.admin-table__nowrap { white-space: nowrap; }
.admin-table__note { min-width: 20rem; color: var(--ink-600); line-height: 1.5; }
.admin-table__sub {
  display: block;
  color: var(--ink-400);
  font-size: 0.75rem;
}
