/* ==========================================================================
   Organizer guide: the contents (/guide/) and a chapter (/guide/<slug>/).
   templates/guide/*.html, through {% block extra_css %}. Prose, steps,
   facts, chips, cards, notices and buttons are site.css components as they
   are (DESIGN.md); only how they sit together here, plus the guide's own
   pieces: GuidePick (the businesses under a step), the checklist and the
   next-chapter link. Nothing here is used outside the guide.

   One reading column (--measure) with the guide's chapters beside it from
   56rem (.layout-split); on a phone the chapter list follows the text. Each
   step starts under a hairline, as the sections of the text pages do.
   ========================================================================== */

main > .container > :last-child { padding-bottom: var(--space-8); }

/* 1. Contents ------------------------------------------------------------------
   The chapters as numbered steps (a real reading order): the title is the
   link, the summary under it. */
.guide-contents { margin-top: 0; }
.guide-contents > li + li { margin-top: var(--space-6); }
.guide-contents__title { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.guide-contents__title a { color: var(--color-ink); text-decoration: none; }
.guide-contents__title a:hover { color: var(--color-action); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.guide-contents p { max-width: var(--measure); color: var(--color-muted); }
.guide-about h2 { margin-bottom: var(--space-3); }
.guide-about ul { margin: 0; padding-left: 1.25rem; }
.guide-about li + li { margin-top: var(--space-2); }
.guide-about .actions { margin: var(--space-5) 0 0; }

/* 2. A chapter ------------------------------------------------------------------ */
.guide-chapter { max-width: var(--measure); }
.guide-chapter :where(ul, ol) { padding-left: 1.25rem; }
.guide-chapter li + li { margin-top: var(--space-2); }

.guide-step { padding-top: var(--space-4); border-top: 1px solid var(--color-line); scroll-margin-top: var(--space-5); }
.guide-step + .guide-step,
.guide-step + .guide-checklist { margin-top: var(--space-7); }
.guide-notice + .guide-step { margin-top: var(--space-6); }
.guide-step > h2 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); }
.guide-step > :last-child { margin-bottom: 0; }

/* The countdown in "Start here": label/value rows, stacked on a phone. */
.guide-countdown dt { font-size: var(--text-base); color: var(--color-ink); }
@media (max-width: 35.99rem) {
  .guide-countdown { grid-template-columns: 1fr; gap: 0; }
  .guide-countdown dd + dt { margin-top: var(--space-4); }
}

/* The sponsor letter's outline: quoted, with a quiet rule. */
.guide-example {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--color-teal-wash);
}
.guide-example > :last-child { margin-bottom: 0; }

/* The chooser of whose businesses a chapter shows (more than one open state). */
.guide-states { margin-top: var(--space-5); }
.guide-states__label { margin: 0 0 var(--space-2); color: var(--color-muted); font: 600 var(--text-sm)/1.4 var(--font-body); }
.guide-states .chips { margin: 0; }

/* 3. GuidePick: the directory's businesses under a step ------------------------
   A quiet panel in the reading column: a hairline box, the heading, up to
   three rows (name and home city, 44px each), "See all" on the filtered
   directory. Empty: the same box on teal-wash with the invitation to list
   a business. No photos, badges or shadows: it sits inside the text. */
.guide-pick {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.guide-pick--empty { border-color: transparent; background: var(--color-teal-wash); }
.guide-pick__title { margin: 0 0 var(--space-1); font-size: var(--text-md); }
.guide-pick__from { margin: 0 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
.guide-pick--empty .guide-pick__from { margin-bottom: var(--space-2); }
.guide-pick__list { margin: 0; padding: 0; list-style: none; }
.guide-chapter .guide-pick__list > li + li { margin-top: 0; }
.guide-pick__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-3);
  padding-block: var(--space-2);
  border-top: 1px solid var(--color-line);
}
.guide-pick__name { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; overflow-wrap: anywhere; }
.guide-pick__place { color: var(--color-muted); font-size: var(--text-sm); }
.guide-pick__more,
.guide-pick__invite { margin: 0; }
.guide-pick__more { padding-top: var(--space-1); border-top: 1px solid var(--color-line); }
.guide-pick__more a,
.guide-pick__invite a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

/* 4. Checklist, sources, next chapter ---------------------------------------------- */
.guide-checklist {
  padding: var(--space-5);
  border-radius: var(--radius);
  background: var(--color-teal-wash);
}
.guide-checklist h2 { margin-bottom: var(--space-3); font-size: var(--text-lg); }
.guide-checklist ul { margin: 0; padding: 0; list-style: none; }
.guide-checklist li { display: flex; gap: var(--space-3); align-items: flex-start; }
.guide-checklist .icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.2em; color: var(--color-teal); }

.guide-sources { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
.guide-sources h2 { font-size: var(--text-lg); }
.guide-sources p { color: var(--color-muted); font-size: var(--text-sm); }
.guide-sources a { overflow-wrap: anywhere; }

.guide-next { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--color-ink); }
.guide-next p { margin: 0; }
.guide-next__label { color: var(--color-muted); font: 600 var(--text-sm)/1.4 var(--font-body); }
.guide-next__title { font: 800 var(--text-lg)/1.2 var(--font-display); letter-spacing: -0.01em; }
.guide-next__title a { display: inline-flex; align-items: center; min-height: var(--tap); }
.guide-next__summary { color: var(--color-muted); }
.guide-next__actions { margin: var(--space-4) 0 0; }
.guide-next .guide-next__previous { margin-top: var(--space-4); color: var(--color-muted); font-size: var(--text-sm); }
.guide-next__previous a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

/* 5. The chapters beside the text (from 56rem it stays in view while reading). */
.guide-toc__title { margin: 0 0 var(--space-2); font-size: var(--text-md); }
.guide-toc__title a { color: var(--color-ink); text-decoration: none; }
.guide-toc__title a:hover { color: var(--color-action); text-decoration: underline; }
.guide-toc__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-line); }
.guide-toc__list li { border-bottom: 1px solid var(--color-line); }
.guide-toc__list a { display: flex; align-items: center; min-height: var(--tap); padding-block: var(--space-1); color: var(--color-ink); text-decoration: none; }
.guide-toc__list a:hover { color: var(--color-action); text-decoration: underline; }
.guide-toc__list a[aria-current="page"] { color: var(--color-action); font-weight: 600; }
@media (min-width: 56rem) {
  .guide-toc { position: sticky; top: var(--space-5); }
}
