/* GPT Marlon — guides section.
   Tokens come from theme.css (imported by site.css).
   Reading structure follows the long-form guide pattern: prominent PDF CTA,
   a table of contents, numbered sections, and copyable prompt blocks.

   v2 (Block 1, 2026-09): adds the sticky/mobile-sheet TOC, the numbered-step
   wrapper, four callout variants, and install-steps — see the block at the
   bottom of this file. This is a NEW FILENAME, not an in-place edit of
   guides.css, specifically so the old immutable-cached file (vercel.json:
   /assets/(.*) -> max-age=31536000) is simply never requested again instead
   of risking a stale-cache/new-markup mismatch window. guides.css stays in
   the repo unmodified until every guide is migrated to blocks (see
   ../TODO.md), then gets deleted. */

.crumbs { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; line-height: 1; }
.crumbs a { display: inline-flex; align-items: center; gap: .3rem; color: var(--text2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs-back { width: 14px; height: 14px; flex: none; }

.guide-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* PDF button while the download is being prepared (see assets/guides.js) */
a.btn-primary.is-loading { cursor: progress; pointer-events: none; opacity: .78; position: relative; overflow: hidden; }
a.btn-primary.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(17,17,17,.14) 6px 12px);
  animation: pdf-stripes .5s linear infinite;
}
@keyframes pdf-stripes { to { background-position: 17px 0; } }
@media (prefers-reduced-motion: reduce) { a.btn-primary.is-loading::after { animation: none; } }

/* ------------------------------------------------- guide detail page ---- */
.guide-page { max-width: 780px; }
.guide-page .page-sub { font-size: var(--fs-lg); color: var(--text2); }

/* table of contents — desktop rail is an active-chapter accordion (steps show
   only for the chapter in view, toggled by .is-open from guides-toc.js); the
   mobile sheet keeps every step visible. Base styles here, viewport split
   further down (near ".guide-toc-rail"). */
.guide-toc {
  background: var(--bg3); border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow);
  border-radius: var(--r-lg); padding: 1rem 1.15rem; margin: 2.4rem 0;
}
.guide-toc-label {
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .5rem;
}
.guide-toc ol { list-style: none; counter-reset: none; margin: 0; padding: 0; }
.guide-toc .toc-chap + .toc-chap,
.guide-toc .toc-list > .toc-l2 + .toc-l2 { border-top: 1px solid rgba(3,3,3,.1); }
.guide-toc a {
  display: flex; gap: .55rem; align-items: baseline;
  padding: .42rem 0; color: var(--text2); text-decoration: none;
  font-size: var(--fs-xs); line-height: 1.4; transition: color .15s;
}
.guide-toc a:hover { color: var(--text); }
.guide-toc .toc-label { flex: 1; min-width: 0; }
/* chapter row: slightly heavier, not bigger */
.guide-toc .toc-chap > a { font-weight: 600; color: var(--text); }
.toc-n {
  color: var(--lavender); font-weight: 700; font-size: var(--fs-3xs);
  min-width: 1.25rem; font-variant-numeric: tabular-nums; flex: none;
}
/* per-chapter step list */
.guide-toc .toc-steps { padding-left: 1.25rem; }
.guide-toc .toc-l2 a { font-size: var(--fs-2xs); color: var(--muted); padding: .32rem 0; }
.guide-toc .toc-l2 a:hover { color: var(--text2); }
.toc-sn {
  color: var(--faint); font-weight: 600; font-size: var(--fs-3xs);
  min-width: .9rem; font-variant-numeric: tabular-nums; flex: none;
}

/* sections */
.guide-section { margin: 2.8rem 0; scroll-margin-top: 90px; }
.gs-num {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xs);
  letter-spacing: .1em; color: var(--btn-fg); background: var(--yellow);
  border: 2px solid var(--border-strong); border-radius: var(--radius);
  padding: .15rem .6rem; margin-bottom: .7rem;
}
.guide-section h2 {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3);
  margin-bottom: .9rem; letter-spacing: -.02em; line-height: 1.25;
}
.guide-section p { color: var(--text2); line-height: 1.8; font-size: var(--fs-base); margin: .9rem 0; }
.guide-section li { color: var(--text2); line-height: 1.75; font-size: var(--fs-base); margin: .4rem 0 .4rem 1.2rem; }
.guide-section b, .guide-section strong { color: var(--text); font-weight: 600; }
.guide-section code {
  background: var(--ink); border: none; border-radius: var(--r-xs);
  padding: .14em .45em; font-size: .88em; color: var(--yellow);
}
.guide-section table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: var(--fs-xs); display: block; overflow-x: auto; }
.guide-section th, .guide-section td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--border); color: var(--text2); }
.guide-section th { color: var(--text); font-weight: 600; white-space: nowrap; }

.guide-note {
  background: var(--yellow); border: 2px solid var(--border-strong);
  box-shadow: var(--hard-shadow);
  border-radius: var(--r); padding: 1rem 1.2rem;
  font-size: var(--fs-sm); color: var(--btn-fg); line-height: 1.7; margin: 1.6rem 0;
}

/* ---------------------------------------------------- what's on the page ---- */
/* The walkthrough now lives only in the PDF, so the page opens by saying so
   rather than leaving the reader hunting for steps that aren't there. */
.guide-lead {
  margin: 2rem 0 .4rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border-strong);
  color: var(--text2); font-size: var(--fs-base); line-height: 1.75; max-width: 62ch;
}

/* ------------------------------------------------------- skill files ---- */
.skill-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.1rem; }
.skill-file {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.1rem;
  border: 2px solid var(--border-strong); border-radius: var(--r-sm);
  background: #fff; box-shadow: var(--hard-shadow);
  text-decoration: none; color: var(--text);
  transition: transform .12s cubic-bezier(.22,1,.36,1), box-shadow .12s;
}
.skill-file:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 0 rgba(0,0,0,.95); }
.skill-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-sm); font-weight: 600; }
.skill-hint { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(3,3,3,.55); white-space: nowrap; }

/* ------------------------------------------------------ prompt blocks ---- */
.prompt-card {
  background: var(--ink2); border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow);
  border-radius: var(--r-lg); margin: 1.2rem 0; overflow: hidden;
}
.prompt-head {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  flex-wrap: wrap; padding: .7rem 1rem; border-bottom: 2px solid rgba(255,255,255,.14);
  background: var(--ink3);
}
.prompt-label { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xs); color: #fff; }
.prompt-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.pbtn {
  border: 2px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  font-family: inherit; font-size: var(--fs-3xs); font-weight: 600;
  border-radius: var(--r-sm); padding: .4rem .7rem; cursor: pointer;
  transition: transform .12s, border-color .2s, background-color .2s;
}
.pbtn:hover { transform: translateY(-1px); border-color: #fff; background: rgba(255,255,255,.12); }
.pbtn-claude { background: var(--yellow); color: var(--btn-fg); border-color: var(--border-strong); }
.pbtn-claude:hover { background: var(--yellow-soft); }
.prompt-text {
  padding: 1rem 1.2rem; white-space: pre-wrap; word-break: break-word;
  font-family: 'Cascadia Code', Consolas, ui-monospace, monospace;
  font-size: var(--fs-2xs); line-height: 1.7; color: #e8e8e8;
  max-height: 380px; overflow: auto;
}

/* -------------------------------------------------------- guide CTAs ---- */
.guide-cta {
  margin-top: 1.2rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap; background: var(--bg3); border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow);
  border-radius: var(--r-lg); padding: 1.4rem 1.5rem;
}
.guide-cta-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); }
.guide-cta-sub { color: var(--muted); font-size: var(--fs-xs); margin-top: .25rem; }

/* end-of-guide PDF card — cream block, deliberately loud against the black page */
.guide-download {
  margin-top: 3rem; text-align: center; background: var(--lavender); color: var(--btn-fg);
  border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow-lg);
  border-radius: var(--r-xl); padding: 2.2rem 1.5rem;
}
.guide-download-icon { font-size: 2rem; line-height: 1; margin-bottom: .7rem; }
.guide-download-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); letter-spacing: -.02em; }
.guide-download-sub { color: rgba(3,3,3,.68); font-size: var(--fs-sm); line-height: 1.65; margin: .6rem auto 1.4rem; max-width: 460px; }
.guide-download .btn-primary { display: inline-flex; background: var(--yellow); color: var(--btn-fg); }
.guide-download .btn-primary:hover { opacity: .88; }

/* ------------------------------------------------- ressourcen index ---- */
.res-controls { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin: 0 0 1.2rem; }
.res-search { position: relative; flex: 1 1 320px; min-width: 220px; }
.res-search-icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.res-search input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: var(--fs-sm);
  color: var(--text); background: #fff; border: 2px solid var(--border-strong);
  border-radius: var(--r-sm); padding: .75rem 1rem .75rem 2.8rem; outline: none;
  transition: box-shadow .12s;
}
.res-search input::placeholder { color: var(--faint); }
.res-search input:focus { box-shadow: var(--hard-shadow); }
.res-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.res-sort { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; }
.res-sort label { font-size: var(--fs-3xs); font-weight: 600; color: var(--muted); }
.res-sort select {
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--text);
  background-color: #fff; border: 2px solid var(--border-strong); border-radius: var(--r-sm);
  padding: .68rem 2.2rem .68rem .9rem; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23454545' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 15px;
}
.res-sort select:focus { border-color: var(--text); }
.res-empty { text-align: center; color: var(--muted); font-size: var(--fs-sm); padding: 2.5rem 1rem; }

.cat-filter { display: flex; gap: .45rem; flex-wrap: wrap; margin: 0 0 1.8rem; }
.cat-chip {
  border: 2px solid var(--border-strong); background: #fff; color: var(--muted);
  font-family: inherit; font-size: var(--fs-2xs); font-weight: 600;
  border-radius: var(--r); padding: .5rem .95rem; cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.cat-chip:hover { color: var(--text); box-shadow: var(--hard-shadow); }
.cat-chip.active { background: var(--white); color: var(--btn-fg); border-color: transparent; }

.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
/* cream cards on the black page, matching the Framer guide grid */
.guide-card {
  display: flex; flex-direction: column; background: #fff; color: var(--btn-fg);
  border: 2px solid var(--btn-border); border-radius: var(--r-lg);
  padding: 1.3rem 1.3rem 1.15rem; text-decoration: none;
  box-shadow: var(--hard-shadow);
  transition: transform .14s var(--ease), box-shadow .14s;
}
.guide-card:hover { transform: translate(-2px,-2px); box-shadow: var(--hard-shadow-lg); }
.guide-card p { color: rgba(3,3,3,.62); }
.guide-card-meta { color: rgba(3,3,3,.55); border-top-color: rgba(3,3,3,.15); }
.guide-card .gc-date { color: rgba(3,3,3,.45); }
.guide-card .chip-row { margin: 0 0 .9rem; }
.guide-card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg);
  line-height: 1.32; margin-bottom: .5rem; letter-spacing: -.015em;
}
.guide-card p {
  color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-card-meta {
  margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  font-size: var(--fs-3xs); font-weight: 600; color: var(--muted);
}
.gc-date { color: var(--faint); font-weight: 500; }

/* copy toast */
.copy-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow);
  background: var(--yellow); color: var(--btn-fg); font-weight: 600; font-size: var(--fs-xs);
  padding: .7rem 1.3rem; border-radius: var(--r); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 300;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .guide-download { padding: 1.8rem 1.2rem; }
  .guide-cta { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════ Block 1 additions ══════════════════════ */

/* --- BUGFIX: .cat-chip.active was white-on-white (DEVELOPER-BRIEF.md) --- */
.cat-chip.active {
  background: var(--yellow); color: var(--btn-fg);
  border-color: var(--border-strong); box-shadow: var(--hard-shadow);
}

/* --- table of contents: sticky rail (desktop) + floating button + bottom
   sheet (mobile). guides-toc.js drives both: scroll-spy .is-current on the
   active link, .is-open on its ancestor .toc-chap (the accordion), and the
   open/close of the mobile sheet. --- */
.guide-toc-rail { display: none; }
.guide-toc a.is-current { color: var(--text); font-weight: 600; }
.guide-toc a.is-current .toc-n { color: var(--magenta); }
.guide-toc a.is-current .toc-sn { color: var(--magenta); }

/* accordion — rail only: a chapter's steps are hidden until it is .is-open */
.guide-toc-rail .toc-steps {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height .26s ease, opacity .2s ease;
}
.guide-toc-rail .toc-chap.is-open > a { color: var(--text); }
.guide-toc-rail .toc-chap.is-open .toc-steps { max-height: 44rem; opacity: 1; }

/* mobile: floating button */
.toc-fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 120;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem .95rem; border: 2px solid var(--border-strong);
  border-radius: var(--radius); background: var(--yellow); color: var(--btn-fg);
  box-shadow: var(--hard-shadow); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xs);
  letter-spacing: .06em; text-transform: uppercase;
}
.toc-fab svg { width: 18px; height: 18px; flex: none; }
.toc-fab:active { transform: translateY(1px); }
.toc-fab[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.toc-sheet-backdrop {
  position: fixed; inset: 0; z-index: 119;
  background: rgba(3,3,3,.45); opacity: 0; transition: opacity .2s ease;
}
.toc-sheet-backdrop.is-open { opacity: 1; }

.guide-toc-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 121;
  margin: 0; max-height: 74vh; overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border-width: 2px 0 0; padding: .5rem 1.15rem 1.4rem;
  transform: translateY(110%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}
.guide-toc-sheet[aria-hidden="false"] { transform: translateY(0); }
.toc-sheet-head {
  position: sticky; top: 0; background: var(--bg3);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 0 .6rem; margin-bottom: .2rem;
  border-bottom: 1px solid rgba(3,3,3,.1);
}
.toc-sheet-head .guide-toc-label { margin: 0; }
.toc-sheet-close {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; cursor: pointer;
  border: 2px solid var(--border-strong); border-radius: var(--radius);
  background: var(--white); color: var(--text);
}
.toc-sheet-close svg { width: 15px; height: 15px; }
/* the sheet shows every step, no accordion */
.guide-toc-sheet .toc-steps { max-height: none; }

body.toc-sheet-lock { overflow: hidden; }

@media (min-width: 1180px) {
  /* .guide-main wraps everything except the rail (crumbs, hero, content,
     download CTA) as ONE grid item — this is what lets the rail sit in a
     single row sized to that item's real height. The previous approach gave
     the rail `grid-row: 3 / span 99` directly on `.guide-page`'s own
     auto-placed rows (one per direct child); Grid still allocates every
     "extra" implicit row that hack asks for even when content doesn't reach
     it, and `.guide-page`'s `gap` applies between every one of them — ~85
     empty rows * 2.5rem is exactly where the huge trailing gap before the
     footer was coming from. */
  .guide-page {
    display: grid; grid-template-columns: 780px minmax(0, 1fr);
    gap: 3rem; max-width: 1216px; align-items: start;
  }
  .guide-main    { grid-column: 1; }
  .toc-fab,
  .toc-sheet-backdrop,
  .guide-toc-sheet { display: none; }
  .guide-toc-rail {
    display: block; grid-column: 2;
    position: sticky; top: 86px; margin: 0;
    max-height: calc(100vh - 110px); overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-toc-rail .toc-steps,
  .guide-toc-sheet,
  .toc-sheet-backdrop { transition: none; }
}

/* --- numbered step (Block 1's "Numbered structure" block type) --------- */
.guide-step { padding-left: 1.2rem; border-left: 2px solid var(--border); }
.guide-step-head { display: flex; flex-direction: column; align-items: flex-start; }
.guide-step-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h3); letter-spacing: -.02em;
  line-height: 1.25; margin-bottom: .9rem;
}
.guide-step-when {
  margin: 0 0 1rem; padding-left: .9rem; border-left: 2px solid var(--lavender);
  color: var(--text2); font-size: var(--fs-sm); line-height: 1.7;
}
.guide-step-when > span:first-child {
  display: block; font-size: var(--fs-3xs); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .25rem;
}
.guide-step-when p:last-child, .guide-step-body p:first-child { margin-top: 0; }

/* --- callouts: tip / warning / requirements / named --------------------- */
.callout {
  margin: 1.6rem 0; padding: 1rem 1.2rem;
  border: 2px solid var(--border-strong); border-radius: var(--r);
  box-shadow: var(--hard-shadow);
  font-size: var(--fs-sm); line-height: 1.7; color: var(--btn-fg);
}
.callout-label {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xs);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .5rem;
}
.callout-body p:first-child { margin-top: 0; }
.callout-body p:last-child  { margin-bottom: 0; }
.callout-body code {
  background: var(--ink); color: var(--yellow);
  border-radius: var(--r-xs); padding: .14em .45em; font-size: .88em;
}
.callout-body li  { margin: .35rem 0 .35rem 1.1rem; }

.callout-tip          { background: var(--yellow-soft); }
.callout-tip     .callout-label { color: rgba(3,3,3,.62); }
.callout-warning      { background: var(--peach); }
.callout-warning .callout-label { color: rgba(3,3,3,.62); }
.callout-requirements { background: var(--lavender-soft); }
.callout-requirements .callout-label { color: rgba(3,3,3,.62); }
.callout-requirements ul { list-style: none; }
.callout-requirements li::before { content: "→ "; color: var(--magenta); font-weight: 700; }
.callout-named {
  background: var(--white); border-left-width: 5px; border-left-color: var(--magenta);
}
.callout-named .callout-label {
  color: var(--magenta); font-size: var(--fs-2xs); letter-spacing: .06em;
}

/* --- install steps ------------------------------------------------------- */
.install-steps { list-style: none; counter-reset: none; margin: 1.1rem 0; padding: 0; }
.install-step  {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .7rem 0; border-top: 1px solid var(--border); margin: 0;
}
.install-step:first-child { border-top: none; }
.install-n {
  flex: none; width: 22px; height: 22px; border-radius: var(--radius);
  background: var(--yellow); border: 2px solid var(--border-strong);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xs);
  color: var(--btn-fg); display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}
.install-text { color: var(--text2); font-size: var(--fs-sm); line-height: 1.6; }
.install-code {
  margin-top: .45rem; padding: .55rem .75rem; background: var(--ink2); color: #e8e8e8;
  border-radius: var(--r-xs); font-family: 'Cascadia Code', Consolas, ui-monospace, monospace;
  font-size: var(--fs-2xs); white-space: pre-wrap; word-break: break-word;
}

/* --- skill block spacing (was flush against the previous section) ------- */
.skill-block { margin-top: 2.2rem; }

/* --- Image block ----------------------------------------------------------
   No `wide` breakout variant: the image lives inside .guide-main, which is
   one grid ITEM in .guide-page's 2-column layout (content | sticky TOC
   rail) — a descendant nested inside a grid item can't span the parent
   grid's columns (grid-column only affects direct children), and the rail
   occupies column 2 for the page's full height regardless of its own
   content height, so a negative-margin bleed wide enough to matter would
   render underneath/through the sticky rail on any guide with a TOC (most
   of them). Every image is content-width, matching every other block. */
.guide-image { margin: 1.8rem 0; }
.guide-image img { width: 100%; height: auto; display: block; border-radius: var(--r-lg); border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow); }
.image-caption { margin-top: .6rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; }
.image-caption p { margin: 0; }

/* --- Video embed block ------------------------------------------------------
   `.video-embed`'s aspect-ratio box is what keeps a responsive iframe at a
   fixed 16:9 regardless of viewport width, without JS. */
.guide-video { margin: 1.8rem 0; }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; border: 2px solid var(--border-strong); box-shadow: var(--hard-shadow); background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-caption { margin-top: .6rem; font-size: var(--fs-xs); color: var(--muted); text-align: center; }

/* --- Comparison table block ----------------------------------------------
   A distinct block from a plain markdown table (which text blocks already
   support): fixed 2-4 columns, one of which can be `highlight`ed (a
   recommended/emphasized column), plain-text cells only. Built with CSS grid
   (not <table>) specifically so a column can be visually pulled out via
   background/border without fighting table rendering, and so it can collapse
   to stacked label/value pairs on mobile instead of horizontal-scrolling. */
.comparison-table { margin-top: 1.2rem; border: 2px solid var(--border-strong); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--hard-shadow); }
.comparison-row { display: grid; grid-template-columns: minmax(120px, 1fr) repeat(var(--cols), minmax(100px, 1.2fr)); }
.comparison-row + .comparison-row { border-top: 1px solid var(--border); }
.comparison-cell { padding: .8rem 1rem; font-size: var(--fs-sm); color: var(--text2); }
.comparison-rowlabel { font-weight: 600; color: var(--text); background: var(--bg3); }
.comparison-head { background: var(--ink); }
.comparison-head .comparison-cell:not(.comparison-rowlabel) { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xs); }
.comparison-head .comparison-rowlabel { background: var(--ink); }
.comparison-cell.is-highlight { background: var(--lavender-soft); font-weight: 600; color: var(--text); }
.comparison-head .comparison-cell.is-highlight { background: var(--lavender); color: var(--btn-fg); }

@media (max-width: 640px) {
  /* The header row (column names) is hidden and stacked instead — each cell
     gets its own column name back via data-col-label + ::before, otherwise
     a stacked "Claude / ChatGPT" comparison loses which value belongs to
     which column entirely. */
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-row:not(.comparison-head) { padding: .6rem 0; }
  .comparison-row:not(.comparison-head) .comparison-rowlabel { background: none; padding: .2rem 1rem 0; font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .comparison-row:not(.comparison-head) .comparison-cell:not(.comparison-rowlabel) { padding: .2rem 1rem .5rem; }
  .comparison-row:not(.comparison-head) .comparison-cell:not(.comparison-rowlabel)::before {
    content: attr(data-col-label); display: block; font-size: var(--fs-3xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--lavender); margin-bottom: .2rem;
  }
  .comparison-head { display: none; }
}

/* --- FAQ / accordion block ----------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 1rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  cursor: pointer; list-style: none; padding: 1rem 1.8rem 1rem 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-base); color: var(--text);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.3em; font-weight: 400; color: var(--lavender); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.faq-item[open] > .faq-q::after { transform: translateY(-50%) rotate(45deg); }
/* Smooth open/close with zero JS: native <details> has no transition at all
   (content just snaps to display:none) and a height can't be animated
   to/from "auto" directly, so the answer is wrapped in a grid row that
   animates grid-template-rows 0fr -> 1fr instead — animating a fraction unit
   interpolates smoothly to the content's real intrinsic height. `display:
   grid` here is author CSS, which overrides the UA stylesheet's `details:not
   ([open]) > *:not(summary) { display: none }` — that's what keeps the
   collapsed row transitionable instead of being hard-hidden. */
.faq-a-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s cubic-bezier(.4,0,.2,1);
}
.faq-item[open] > .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a { overflow: hidden; min-height: 0; padding: 0 1.8rem 1.1rem 0; color: var(--text2); font-size: var(--fs-sm); line-height: 1.7; }
.faq-a p:first-child { margin-top: 0; }
.faq-a p:last-child { margin-bottom: 0; }
/* Canvas mode always shows both question and answer (no collapse) — see
   canvas-blocks-html.ts for why <details>/<summary> aren't used there. */
.cv-faq-item { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.cv-faq-item:first-child { border-top: 1px solid var(--border); }
.cv-faq-item .faq-q { padding: 0 0 .5rem; cursor: text; }
.cv-faq-item .faq-q::after { content: none; }
.cv-faq-item .faq-a { padding: 0; }

/* --- h3 inside sections/steps (was unstyled before Block 1) ------------- */
.guide-section h3, .guide-step-body h3 {
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg);
  letter-spacing: -.01em; line-height: 1.35; margin: 1.8rem 0 .6rem; color: var(--text);
}
.guide-section h3:first-child { margin-top: 0; }

/* --- Stats block (Block "diversification" 2, ported from the guide-generator
   SKILL.md "STATS" row) — 2-4 headline numbers right after the intro ----- */
.guide-stats {
  display: grid; gap: 0; margin: 1.4rem 0;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  border: 2px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--hard-shadow); overflow: hidden; background: var(--bg3);
}
.guide-stats[data-count="2"] { --n: 2; }
.guide-stats[data-count="3"] { --n: 3; }
.guide-stats[data-count="4"] { --n: 4; }
.stat-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.1rem 1.2rem; border-right: 1px solid var(--border);
}
.stat-card:last-child { border-right: none; }
.stat-value {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3);
  letter-spacing: -.02em; color: var(--text); line-height: 1.1;
}
.stat-label { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }

/* --- Cheatsheet block (SKILL.md "CHEATSHEET" device) — quick reference,
   bold leitsatz + short explanation per line ---------------------------- */
.guide-cheatsheet { list-style: none; margin: 1.2rem 0; padding: 0; }
.guide-cheatsheet li {
  display: block; padding: .8rem 0; margin: 0;
  border-bottom: 1px solid var(--border);
}
.guide-cheatsheet li:first-child { border-top: 1px solid var(--border); }
.cheat-lead {
  display: block; color: var(--text); font-weight: 600; font-size: var(--fs-base);
  margin-bottom: .2rem;
}
.cheat-detail { display: block; color: var(--text2); font-size: var(--fs-sm); line-height: 1.6; }

/* --- Views chip in the guide-detail hero chip-row --------------------- */
.chip-views { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .guide-step { padding-left: .9rem; }
  .callout    { padding: .85rem 1rem; }
  .guide-stats { grid-template-columns: 1fr 1fr; }
  .guide-stats[data-count="2"] { grid-template-columns: 1fr 1fr; }
  .stat-card:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-card:nth-child(2n) { border-right: none; }
  .stat-card { border-top: 1px solid var(--border); }
  .stat-card:nth-child(-n+2) { border-top: none; }
}

/* ═══════════════════════ Neo-brutalist redesign (2026-09) ═══════════════════
   Most of this file already re-skins through theme.css's retuned tokens
   (square radii, hard offset shadows, ink borders, Space Grotesk). These are
   the few spots the token swap doesn't fully cover. */

/* requirements list: swap the "→ " text bullet for a drawn ink square */
.callout-requirements ul { padding-left: 0; }
.callout-requirements li { position: relative; padding-left: 1.4rem; }
.callout-requirements li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .6rem; height: .6rem; background: var(--pink); border: 2px solid var(--ink);
}

/* number / marker badges: square, display face, hard shadow */
.gs-num, .install-n {
  border: var(--bd-2); box-shadow: var(--shadow-1);
  border-radius: var(--radius);
}
.install-n { width: 24px; height: 24px; }

/* mobile TOC button — a square sticker, not a pill */
.toc-fab {
  border: var(--bd-2); box-shadow: var(--shadow-2); border-radius: var(--radius);
  text-transform: uppercase;
}
.toc-fab:active { transform: translate(3px, 3px); box-shadow: var(--shadow-press); }
.toc-sheet-close { border: var(--bd-2); border-radius: var(--radius); }
.guide-toc-sheet { border-top: var(--bd-3); }

/* prompt block: keep the dark card, tighten the frame */
.prompt-card { border: var(--bd-2); box-shadow: var(--shadow-2); }
.pbtn { border-radius: var(--radius); }
.pbtn-claude { border: var(--bd-1); }

/* end-of-guide download block: one accent (blue), square, loud */
.guide-download { border: var(--bd-3); box-shadow: var(--shadow-3); border-radius: var(--radius); }

/* the copy toast is a sticker */
.copy-toast { border: var(--bd-2); box-shadow: var(--shadow-2); border-radius: var(--radius); }
