.mcp-guide { --guide-accent:var(--accent); padding-bottom:1rem; }
.guide-story { max-width:820px; }
.guide-chapter { min-height:85svh; display:flex; flex-direction:column; justify-content:center; padding:6rem 0; scroll-margin-top:90px; }
.guide-intro { min-height:calc(90svh - 140px); padding-top:1rem; }
.guide-chapter .eyebrow { font-size:13px; margin-bottom:1.75rem; }
.guide-chapter h1,.guide-chapter h2 { font-size:clamp(3.2rem,6.5vw,6rem); font-weight:720; line-height:1.02; letter-spacing:-.065em; margin:0 0 2rem; text-wrap:balance; }
.guide-title-accent { color:var(--accent); }
.guide-lead { max-width:34ch; font-size:clamp(1.25rem,2.2vw,1.7rem); line-height:1.6; color:var(--ink); margin:0 0 1.5rem; }
.guide-bridge,.guide-note { max-width:59ch; font-size:1.08rem; line-height:1.8; color:var(--muted); margin:0 0 1.5rem; }
/* The first screen shows no next chapter yet, so the cue must read as "scroll down". */
.guide-scroll { display:inline-flex; align-items:center; gap:.9rem; width:fit-content; min-height:48px; margin-top:2rem; padding:.45rem .5rem .45rem 1.3rem; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font-size:1rem; font-weight:600; text-decoration:none; transition:border-color .2s,color .2s; }
.guide-scroll:hover,.guide-scroll:focus-visible { border-color:var(--accent); color:var(--accent); }
.guide-scroll span { display:grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:50%; background:var(--soft); color:var(--accent); font-size:1.2rem; line-height:1; animation:guide-scroll-nudge 1.8s ease-in-out infinite; }
@keyframes guide-scroll-nudge { 0%,100% { transform:translateY(-2px); } 50% { transform:translateY(4px); } }
@media(prefers-reduced-motion:reduce) { .guide-scroll span { animation:none; } }
.guide-inline-link { width:fit-content; display:inline-flex; align-items:center; gap:.75rem; font-size:1rem; font-weight:600; text-decoration:none; }
.guide-inline-link:hover { text-decoration:underline; }
.guide-code-panel { width:100%; max-width:620px; margin:.5rem 0 1.5rem; background:var(--surface); border:1px solid var(--line); border-radius:20px; overflow:hidden; }
.guide-code-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:54px; padding:.5rem 1.3rem; font-size:.85rem; color:var(--muted); border-bottom:1px solid var(--line); }
.guide-code-heading button { min-height:36px; padding:6px 10px; font-size:.82rem; border:1px solid var(--line); background:var(--bg); color:var(--ink); border-radius:8px; }
.guide-code-heading button:hover { background:var(--soft); color:var(--accent); box-shadow:none; }
.guide-code-heading button[hidden] { display:none; }
.guide-code-panel code { display:block; padding:1.4rem; font: 1.02rem/1.9 ui-monospace,SFMono-Regular,Consolas,monospace; color:var(--accent); overflow-wrap:anywhere; user-select:text; }
.guide-flow { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; margin:1rem 0 2rem; }
.guide-flow span { border:1px solid var(--line); border-radius:10px; background:var(--surface); padding:.7rem 1rem; font-size:.95rem; }
.guide-flow b { font-weight:400; color:var(--accent); }
.guide-example { max-width:620px; padding:2rem; border-left:2px solid var(--accent); margin:.5rem 0 1.5rem; background:linear-gradient(110deg,var(--soft),transparent); border-radius:0 20px 20px 0; }
.guide-example .eyebrow { font-size:.75rem; margin-bottom:1rem; }
.guide-example h3 { font-size:1.5rem; letter-spacing:-.035em; margin-bottom:.8rem; }
.guide-example p:not(.eyebrow) { color:var(--muted); font-size:1.05rem; }
.guide-example code { font-size:.85rem; color:var(--accent); }
.guide-actions { display:flex; flex-wrap:wrap; align-items:center; gap:1.5rem; margin:1rem 0 3rem; }
.guide-actions .button { font-size:1rem; }
.guide-footnotes { max-width:620px; padding-top:1.5rem; border-top:1px solid var(--line); }
.guide-footnotes p { font-size:.9rem; line-height:1.8; color:var(--muted); }
.guide-footnotes strong { color:var(--ink); font-weight:600; }
@media(max-width:760px) {
  .guide-chapter { min-height:auto; padding:4.5rem 0; }
  .guide-intro { min-height:70svh; padding-top:0; }
  .guide-chapter h1,.guide-chapter h2 { font-size:clamp(2.7rem,9vw,4.5rem); }
  .guide-example { padding:1.5rem; }
  .guide-code-panel code { font-size:.88rem; }
}

.mcp-guide { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.85fr); gap:clamp(2rem,5vw,5rem); align-items:start; position:relative; }
.guide-story { min-width:0; }
.guide-chapter h1,.guide-chapter h2 { font-size:clamp(3.2rem,5.6vw,5.5rem); }
.guide-companion { position:sticky; top:130px; height:min(560px,72svh); display:flex; flex-direction:column; justify-content:center; margin:0; min-width:0; }
.guide-companion-eyebrow { color:var(--muted); font-size:.75rem; letter-spacing:.17em; text-transform:uppercase; text-align:center; margin:0; }
.guide-mascot-stage { position:relative; height:350px; width:100%; background:radial-gradient(ellipse at center,var(--soft),transparent 68%); }
.guide-mascot-scale { position:absolute; left:50%; top:48%; width:160px; height:188px; margin:-94px 0 0 -80px; transform:scale(1.9); transform-style:preserve-3d; }
.guide-mascot-scale .mcp-friend-travel { top:0; left:0; }
.guide-mascot-scale .mcp-friend-hop { will-change:transform; }
.guide-orbit { position:absolute; left:6%; right:6%; bottom:40px; height:55px; border:1px solid var(--line); border-radius:50%; transform:rotate(-12deg); }
.guide-orbit::after { content:""; position:absolute; inset:10px 22px; border:1px dashed var(--line); border-radius:50%; }
.guide-companion-caption { display:flex; justify-content:center; align-items:center; gap:1rem; min-height:45px; }
.guide-companion-count { font-size:.8rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.guide-companion-word { font-size:1.25rem; letter-spacing:-.025em; font-weight:650; color:var(--accent); }
.guide-chapter-marks { display:flex; justify-content:center; gap:6px; margin-top:.75rem; }
.guide-chapter-marks i { width:16px; height:3px; border-radius:2px; background:var(--line); transition:background .3s,width .3s; }
.guide-chapter-marks i.is-active { background:var(--accent); width:28px; }
@media(max-width:950px) {
  .mcp-guide { grid-template-columns:minmax(0,1fr) 240px; gap:1.5rem; }
  .guide-mascot-scale { transform:scale(1.45); }
  .guide-chapter h1,.guide-chapter h2 { font-size:clamp(2.8rem,5.8vw,4.5rem); }
}
@media(max-width:760px) {
  .mcp-guide { display:flex; flex-direction:column; gap:0; }
  .guide-story { width:100%; }
  .guide-companion { order:-1; position:relative; top:auto; width:100%; height:170px; margin-bottom:2rem; }
  .guide-companion-eyebrow,.guide-companion-caption,.guide-chapter-marks { display:none; }
  .guide-mascot-stage { height:170px; }
  .guide-mascot-scale { transform:scale(1); }
  .guide-orbit { left:calc(50% - 100px); right:auto; width:200px; bottom:10px; height:30px; }
  .guide-intro { min-height:auto; }
  .guide-chapter h1,.guide-chapter h2 { font-size:clamp(2.7rem,9vw,4.5rem); }
}

.guide-title-line { display:inline-block; }
.guide-copy-feedback { position:fixed; left:50%; bottom:1.5rem; transform:translate(-50%,10px); z-index:60; max-width:calc(100% - 2rem); width:max-content; padding:.85rem 1.2rem; border-radius:12px; background:var(--ink); color:var(--bg); font-size:.85rem; opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; margin:0; }
.guide-copy-feedback.is-visible { opacity:1; transform:translate(-50%,0); }
@media(prefers-reduced-motion:reduce) { .mcp-guide *, .mcp-guide *::after { transition:none !important; scroll-behavior:auto !important; } }

/* Keep the document geometry stable while its real content arrives. */
.guide-chapter { position:relative; }
.guide-chapter.is-delivering { z-index:2; }
.guide-chapter.is-delivering > * { transform-origin:50% 50%; }
@media print { .guide-chapter > * { opacity:1 !important; transform:none !important; } }

.guide-delivery { display:flow-root; width:100%; min-width:0; }

/* Alternating stages share one track, leaving the opposite side for the buddy. */
@media(min-width:761px) {
  .mcp-guide { grid-template-columns:minmax(0,1fr); gap:0; }
  .guide-story { grid-area:1 / 1; max-width:none; width:100%; }
  .guide-chapter { padding-bottom:calc(6rem + 18svh); }
  .guide-intro,.guide-delivery { width:60%; }
  .has-guide-motion .guide-chapter:nth-child(even) .guide-delivery { margin-left:auto; }
  .guide-companion { grid-area:1 / 1; justify-self:end; align-self:start; width:32%; z-index:3; pointer-events:none; }
}
@media(prefers-reduced-motion:reduce) and (min-width:761px) {
  .guide-chapter:nth-child(even) .guide-delivery { margin-left:0; }
}
@media print {
  .guide-delivery,.guide-intro { width:100%; margin-left:0 !important; }
  .guide-companion { display:none; }
}
.guide-chapter:focus { outline:none; }
