/* ============================================================
   The Chapel at Gruene — Bride Guide stylesheet (guide pages only)
   Loaded by layouts/base.njk when frontmatter has `guidePage: true`
   (hub, topic pages, role bundles). Content is generated from
   chapel-ops-kb by scripts/build-guide.mjs; keep these pages noindex.

   Type: headings use Playfair Display instead of Italiana (Michael
   2026-10-30: easier to read; same heading face as the TCW guide).
   Marketing pages keep Italiana.

   Dark mode: the guide flips main.css's own tokens (--ink, --paper,
   --white, …) so every component follows without per-rule overrides.
   Applies via prefers-color-scheme, or html[data-theme] from the
   toggle (partials/guide-head.njk sets it before first paint, stored in
   localStorage "guide-theme"). Pieces that must stay light-on-dark in
   both modes (hero, footer, overlay nav) are pinned below.
   ============================================================ */

:root { --guide-heading: "Playfair Display", Georgia, serif; }

/* ---------- Dark tokens ---------- */
html[data-theme="dark"] {
  --ink: #ece6da;
  --ink-soft: #b8af9d;
  --paper: #1a1916;
  --paper-2: #221f1b;
  --white: #2a2620;
  --accent: #c2a97f;
  --accent-dark: #d8c49d;
  --line: #3d382f;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --ink: #ece6da;
    --ink-soft: #b8af9d;
    --paper: #1a1916;
    --paper-2: #221f1b;
    --white: #2a2620;
    --accent: #c2a97f;
    --accent-dark: #d8c49d;
    --line: #3d382f;
    --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
    color-scheme: dark;
  }
}
/* light-on-dark in both modes */
.page-hero { color: #fff; background: #26241f; }
.page-hero .hero-content .eyebrow { color: #f1ecdf; } /* main.css uses --paper-2, which goes dark in dark mode */
.site-nav--overlay:not(.is-scrolled):not(.is-open) .nav-links a:not(.btn),
.site-nav--overlay:not(.is-scrolled):not(.is-open) .guide-logo__name { color: #fff; }
.site-nav--overlay:not(.is-scrolled):not(.is-open) .nav-toggle span { background: #fff; }
.site-footer { background: #26241f; }
.footer-col a:hover, .footer-bottom a:hover { color: #fff; }
html[data-theme="dark"] .site-nav { background: rgba(26, 25, 22, 0.94); }
html[data-theme="dark"] .site-footer { background: #12110f; }
html[data-theme="dark"] .nav-logo-dark { display: none; }
html[data-theme="dark"] .nav-logo-light { display: block; }
html[data-theme="dark"] .guide-prose img { background: #fff; }

/* ---------- Headings ---------- */
h1, h2, h3, .display { font-family: var(--guide-heading); font-weight: 500; letter-spacing: 0; line-height: 1.18; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.guide-prose h2, .guide-prose h3, .guide-card h3 { font-weight: 600; }
.footer-col h3 { font-family: var(--body); }

/* ---------- Guide header (partials/guide-header.njk) ---------- */
.guide-logo { display: flex; align-items: center; gap: 0.9rem; color: var(--ink); }
.guide-logo img { width: clamp(118px, 12vw, 160px); }
.guide-logo__divider { width: 1px; height: 30px; background: currentColor; opacity: 0.35; }
.guide-logo__name {
  font-family: var(--guide-heading); font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500; color: var(--ink); white-space: nowrap;
}
.nav-links .guide-nav-sub { display: none; }
@media (max-width: 860px) {
  .guide-logo { gap: 0.6rem; }
  .guide-logo__divider { height: 24px; }
  .site-nav--guide .nav-links a.guide-nav-sub { display: block; margin-top: -0.5rem; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--ink-soft); }
  .site-nav--guide .nav-links a.guide-nav-sub + a.guide-nav-top { margin-top: 0.4rem; }
  .site-nav--guide .nav-links { gap: 1.1rem; overflow-y: auto; padding: calc(var(--nav-h) + 1rem) 0 2rem; justify-content: flex-start; }
  .site-nav--guide .nav-links .guide-nav-top { font-size: 0.95rem; }
}

/* ---------- Theme toggle (partials/guide-theme-toggle.njk) ---------- */
.guide-theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-soft);
  cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease;
}
.guide-theme[hidden] { display: none; }
.guide-theme:hover, .guide-theme:focus-visible { color: var(--accent-dark); border-color: var(--accent); }
.guide-theme svg { width: 18px; height: 18px; }
.guide-theme__sun { display: none; }
html[data-theme="dark"] .guide-theme__moon { display: none; }
html[data-theme="dark"] .guide-theme__sun { display: block; }
.guide-hero .guide-theme { position: absolute; z-index: 3; right: max(4vw, 1rem); bottom: 1.2rem; background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.guide-topic-head__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.guide-topic-head__bar .guide-back { margin-bottom: 0; }

/* ---------- Ask an AI band (hub) ---------- */
.guide-ai { padding: clamp(1.6rem, 3.5vw, 2.4rem) 0; border-bottom: 1px solid var(--line); text-align: center; scroll-margin-top: var(--nav-h); }
.guide-ai__sub { max-width: 60ch; margin: 0 auto 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.guide-ai-chip { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--body); cursor: pointer; }
.guide-ai-chip svg { width: 15px; height: 15px; }

/* ---------- Figures, clips, inline TL;DR markdown ---------- */
.guide-figure { margin: 1rem 0 1.4rem; }
.guide-figure img { margin: 0; width: 100%; }
.guide-figure figcaption { margin-top: 0.55rem; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
.guide-figure--tall { max-width: 400px; margin-inline: auto; }
.guide-clip { margin: 1rem auto 1.4rem; max-width: 480px; }
.guide-clip video { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.guide-clip figcaption { margin-top: 0.55rem; font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
.guide-tldr__text a, .guide-card p a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }

[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }

/* ---------- Hub, topic pages, role bundles ---------- */
.guide-hero { min-height: clamp(300px, 42vh, 440px); }
.guide-hero .hero-content h1 { max-width: none; }
.guide-hero::after { background: linear-gradient(180deg, rgba(24,22,18,0.7) 0%, rgba(24,22,18,0.62) 40%, rgba(24,22,18,0.86) 100%); }
.guide-hero .hero-content .hero-sub { max-width: 58ch; margin-bottom: 0.4rem; }

.guide-search { padding: clamp(2rem, 5vw, 3rem) 0 clamp(1.4rem, 3vw, 2rem); }
.guide-search__inner { text-align: center; }
.guide-search__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.guide-search__box { position: relative; }
.guide-search__box svg {
  position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none;
}
.guide-search__box input {
  width: 100%;
  padding: 0.95rem 1.2rem 0.95rem 3rem;
  font-family: var(--body);
  font-size: 16px; /* prevents iOS zoom */
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.guide-search__box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(141, 122, 91, 0.16); }
.guide-search__count { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

.guide-roles { padding: clamp(1.4rem, 3vw, 2rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.guide-roles__label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.9rem;
}
.guide-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.guide-chips--left { justify-content: flex-start; }
.guide-chip {
  display: inline-block;
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.guide-chip:hover, .guide-chip:focus-visible { border-color: var(--accent); color: var(--accent-dark); }

.guide-topics { padding-top: clamp(2.5rem, 6vw, 4rem); }
.guide-cat { margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.guide-cat__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.guide-cat__grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .guide-cat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-card {
  position: relative;
  display: block;
  padding: 1.5rem 3.2rem 1.5rem 1.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.guide-card:hover, .guide-card:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.guide-card h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.guide-card p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--ink-soft); }
.guide-card__arrow {
  position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%);
  font-size: 1.1rem; color: var(--accent); transition: transform 0.25s ease;
}
.guide-card:hover .guide-card__arrow { transform: translateY(-50%) translateX(3px); }
.guide-no-results { text-align: center; padding: 2rem 0; }
.guide-no-results p { margin-bottom: 0.4rem; }
.guide-no-results a { font-weight: 500; }

/* topic + role pages */
.guide-topic-head { padding: calc(var(--nav-h) + clamp(2rem, 5vw, 3.5rem)) 0 clamp(1.5rem, 3vw, 2.2rem); }
.guide-topic-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.guide-topic-head .lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 60ch; }
.guide-back {
  display: inline-block;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 1.6rem;
}
.guide-back:hover { color: var(--accent-dark); }
.guide-tldr {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-top: 0.8rem;
}
.guide-tldr__label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.4rem; }
.guide-tldr__text { margin: 0; font-size: 1.02rem; line-height: 1.65; }

.guide-body { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem); }
.guide-prose { font-size: 0.98rem; line-height: 1.75; }
.guide-prose h2 {
  position: relative;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  margin: 2.2rem 0 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.guide-prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.guide-prose h3 { font-size: 1.25rem; margin: 1.6rem 0 0.5rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.guide-anchor { margin-left: 0.4em; font-family: var(--body); font-size: 0.8em; color: var(--line); text-decoration: none; opacity: 0; transition: opacity 0.2s; }
.guide-prose h2:hover .guide-anchor, .guide-prose h3:hover .guide-anchor, .guide-anchor:focus-visible { opacity: 1; color: var(--accent); }
.guide-prose p { margin: 0 0 0.9rem; }
.guide-prose ul, .guide-prose ol { margin: 0 0 0.9rem; padding-left: 1.35rem; }
.guide-prose li { margin-bottom: 0.45rem; }
.guide-prose li > ul, .guide-prose li > ol { margin-top: 0.4rem; }
.guide-prose li > p { margin-bottom: 0.5rem; }
.guide-prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); overflow-wrap: anywhere; }
.guide-prose a:hover { color: var(--ink); text-decoration-color: var(--accent); }
.guide-prose strong { font-weight: 600; }
.guide-prose img { max-width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin: 0.8rem 0 1.2rem; }
.guide-prose blockquote {
  margin: 0 0 1.2rem;
  padding: 0.9rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink);
}
.guide-prose blockquote p { margin: 0; }
.guide-prose hr { border: none; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.guide-prose u { text-decoration-color: var(--accent); }
.guide-prose table {
  width: 100%; max-width: 40rem; margin: 0.4rem 0 1.4rem; border-collapse: separate; border-spacing: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.guide-prose th, .guide-prose td { text-align: left; vertical-align: top; padding: 0.75rem 1.1rem; }
.guide-prose td + td, .guide-prose th + th { border-left: 1px solid var(--line); }
.guide-prose tbody td { border-top: 1px solid var(--line); }
.guide-prose th { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 480px) { .guide-prose th, .guide-prose td { padding: 0.65rem 0.8rem; } }
.guide-check {
  display: inline-block; width: 0.9em; height: 0.9em; margin: 0 0.45em -0.1em 0;
  border: 1px solid var(--accent); border-radius: 2px; background: var(--white); vertical-align: baseline;
}

.guide-share {
  margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
}
.guide-share__btn { padding: 0.9em 1.8em; }
.guide-share__hint { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.guide-related { margin-top: 2.4rem; }
.guide-related .guide-roles__label { text-align: left; }

.guide-toc { text-align: left; border-top: none; }
.guide-role-section { padding-top: 0.5rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }
.guide-role-section .eyebrow { margin-bottom: 0.4rem; }
.guide-role-section h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 0.5rem; }
.guide-role-section__tldr { font-size: 1.02rem; font-style: italic; color: var(--ink-soft); margin-bottom: 1.2rem; line-height: 1.6; }
.guide-role-section__link { font-size: 0.85rem; letter-spacing: 0.06em; margin-top: 1.4rem; }
.guide-role-section__link a { font-weight: 500; }
.guide-divider { border: none; border-top: 1px solid var(--line); margin: clamp(2rem, 5vw, 3.2rem) 0; }

.guide-cta { text-align: center; }
.guide-cta h2 { margin-bottom: 0.8rem; }
.guide-cta p { color: var(--ink-soft); max-width: 50ch; margin: 0 auto 1.8rem; }
.guide-cta .cta-actions { justify-content: center; }
.guide-cta .btn { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .guide-card, .guide-card__arrow, .guide-chip { transition: none; }
  .guide-card:hover { transform: none; }
}

/* /vendors: room between the TL;DR and the jump chips, and between categories */
.vendors-jump { margin-top: 2rem; gap: 0.75rem; }
.vendors-section + .vendors-section { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.vendors-section h2 { margin-top: 0; scroll-margin-top: 6rem; }

/* ---------- Vendor tiles ("Recommended: …" pages, lib/vendor-tiles.js) ---------- */
.vendor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem; margin: 0.4rem 0 1.6rem;
}
.vendor-tile {
  display: flex; flex-direction: column; gap: 0.35rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.15rem; scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.vendor-tile:target { border-color: var(--accent); }
.guide-prose .vendor-tile__name { font-size: 1.2rem; line-height: 1.3; margin: 0; }
.vendor-tile__sub { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }
.guide-prose .vendor-tile__notes { list-style: none; padding: 0; margin: 0.25rem 0 0; font-size: 0.92rem; line-height: 1.55; }
.guide-prose .vendor-tile__notes li { margin: 0 0 0.3rem; padding-left: 0.9rem; position: relative; }
.guide-prose .vendor-tile__notes li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.32rem; height: 1px; background: var(--accent); }
.vendor-tile__links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.6rem; }
.guide-prose a.vendor-btn {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.04em; line-height: 1.2;
  padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; overflow-wrap: normal; transition: border-color 0.2s, color 0.2s;
}
.guide-prose a.vendor-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.guide-prose a.vendor-btn--web { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .guide-prose a.vendor-btn--web { color: #1a1916; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .guide-prose a.vendor-btn--web { color: #1a1916; } }
.guide-prose a.vendor-btn--web:hover { background: var(--accent-dark); color: #fff; }
.guide-prose a.vendor-btn--doc::after { content: " · PDF"; color: var(--ink-soft); }
.vendor-group { margin: 0.4rem 0 1.6rem; padding: 1.1rem 1.1rem 0.1rem; background: var(--paper-2); border-radius: var(--radius); }
.guide-prose .vendor-group__name { font-size: 1.05rem; margin: 0 0 0.9rem; }
.vendor-group .vendor-grid { margin-bottom: 1rem; }

/* ---------- /guide/all: every page on one scroll (src/guide-all.njk) ----------
   Wide screens: sticky contents sidebar that follows the scroll. Phones: a
   floating "Contents" pill opens the same list as a bottom sheet. */
.guide-all-head .lead { margin-bottom: 0; }
.guide-all-progress { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 2px; z-index: 89; pointer-events: none; }
.guide-all-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.guide-all { padding-top: clamp(1rem, 2vw, 1.5rem); }
.guide-all__layout { display: block; }
.guide-all__content { max-width: 780px; min-width: 0; }

.guide-all__cat {
  margin: clamp(3rem, 7vw, 4.5rem) 0 0; padding-top: 1.1rem; border-top: 2px solid var(--accent);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent);
}
.guide-all__cat:first-child { margin-top: 0; }
.guide-all__topic { padding-top: clamp(1.4rem, 3vw, 2rem); }
.guide-all__topic + .guide-all__topic { margin-top: clamp(2.2rem, 5vw, 3rem); border-top: 1px solid var(--line); }
.guide-all__title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 0.4rem; }
.guide-all__topic > .guide-prose { margin-top: 1.6rem; }
.guide-all__own { margin: 1.4rem 0 0; font-size: 0.8rem; letter-spacing: 0.04em; }
.guide-all__own a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.guide-all__own a:hover { color: var(--accent-dark); }

/* contents list (shared by sidebar + sheet) */
.guide-all__toc ul { list-style: none; margin: 0; padding: 0; }
.guide-all__toc-title { margin: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-soft); }
.guide-all__filter { margin: 0.8rem 0 0.4rem; }
.guide-all__filter input {
  width: 100%; padding: 0.55rem 0.8rem; font-family: var(--body); font-size: 16px; font-weight: 300; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.guide-all__filter input:focus { outline: none; border-color: var(--accent); }
.guide-all__toc-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0.2rem 0.2rem 1rem 0; }
.guide-all__toc-group + .guide-all__toc-group { margin-top: 1rem; }
.guide-all__toc-cat { margin: 0.6rem 0 0.35rem; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.guide-all__toc li > a {
  display: block; padding: 0.32rem 0.75rem; font-size: 0.86rem; line-height: 1.4; color: var(--ink-soft);
  border-left: 2px solid var(--line); transition: color 0.15s ease, border-color 0.15s ease;
}
.guide-all__toc li > a:hover { color: var(--ink); }
.guide-all__toc li.is-active > a { color: var(--ink); font-weight: 500; border-left-color: var(--accent); }
.guide-all__toc-sub { margin: 0.1rem 0 0.4rem; }
.guide-all__toc .guide-all__toc-sub a { padding: 0.22rem 0.75rem 0.22rem 1.5rem; font-size: 0.76rem; font-weight: 400; border-left-color: var(--line); }
.guide-all__toc .guide-all__toc-sub a.is-active { color: var(--accent-dark); border-left-color: var(--accent); }
.guide-all__sheet-head { display: flex; align-items: center; justify-content: space-between; }
.guide-all__close {
  display: none; width: 36px; height: 36px; padding: 0; font-size: 1.5rem; line-height: 1; color: var(--ink-soft);
  background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
}

/* wide: sticky sidebar */
@media (min-width: 1024px) {
  .guide-all__layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
  .guide-all__toc {
    position: sticky; top: calc(var(--nav-h) + 1.5rem); display: flex; flex-direction: column;
    max-height: calc(100vh - var(--nav-h) - 3rem);
  }
  .guide-all__pill, .guide-all__backdrop { display: none !important; }
}

/* phones + tablets: floating pill + bottom sheet */
@media (max-width: 1023.98px) {
  .guide-all__toc {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 210; display: flex; flex-direction: column;
    max-height: min(80vh, 680px); padding: 1rem 1.2rem 0; padding-bottom: env(safe-area-inset-bottom);
    background: var(--paper); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    box-shadow: 0 -18px 50px -18px rgba(0, 0, 0, 0.45);
    transform: translateY(105%); visibility: hidden; transition: transform 0.28s ease, visibility 0s linear 0.28s;
  }
  .guide-all__toc.is-open { transform: none; visibility: visible; transition: transform 0.28s ease; }
  .guide-all__close { display: inline-flex; align-items: center; justify-content: center; }
  .guide-all__toc li > a { padding-top: 0.5rem; padding-bottom: 0.5rem; font-size: 0.95rem; }
  .guide-all__backdrop { position: fixed; inset: 0; z-index: 205; background: rgba(0, 0, 0, 0.42); }
  .guide-all__pill {
    position: fixed; z-index: 95; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: 0.55rem; max-width: calc(100vw - 2rem);
    padding: 0.7rem 1.1rem; font-family: var(--body); font-size: 0.82rem; color: var(--paper);
    background: var(--ink); border: none; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    cursor: pointer; transform: translate(-50%, 160%); transition: transform 0.25s ease;
  }
  .guide-all__pill.is-shown { transform: translate(-50%, 0); }
  .guide-all__pill svg { flex: none; width: 17px; height: 17px; }
  .guide-all__pill-label { flex: none; font-weight: 600; letter-spacing: 0.06em; }
  .guide-all__pill-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.75; }
  .guide-all__pill-current:not(:empty)::before { content: "· "; }
  .guide-all__content { padding-bottom: 3rem; }
  html.guide-all-locked { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-all__toc, .guide-all__pill { transition: none; }
}
@media print {
  .site-nav, .guide-all__toc, .guide-all__pill, .guide-all__backdrop, .guide-all-progress, .guide-cta, .guide-theme, .guide-all__own, .guide-anchor { display: none !important; }
  .guide-all__layout { display: block; }
  .guide-all__topic { break-inside: auto; }
}

/* "Read it all on one page" links (hub + bottom of each topic page) */
.guide-onepage { margin: 1.2rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.guide-onepage a { color: var(--accent-dark); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.guide-onepage a:hover { color: var(--ink); text-decoration-color: var(--accent); }
.guide-onepage--topic { margin-top: 2rem; font-size: 0.82rem; text-align: center; }
