/* ============================================================================
   LearnAI — PDF-style left-nav layout + one-section-per-pane + Live Lab modal
   Layered on top of styles.css; purely additive. Desktop gets a fixed left rail
   and shows one lesson section at a time (like turning pages in a PDF). Mobile
   falls back to the original top bar. app.js still owns reveal / typewriter /
   image-modal / progress; section switching + the lab modal are driven by
   pdfnav.js.
   ========================================================================== */

/* One section at a time (all widths). pdfnav.js toggles .is-active. */
.lesson-section{display:none}
.lesson-section.is-active{display:block}
@media (prefers-reduced-motion: no-preference){
  .lesson-section.is-active{animation:pdfFade .34s cubic-bezier(.22,1,.36,1)}
}
@keyframes pdfFade{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* Live Lab launch button (revealed by livelab.js for the instructor only) */
.lab-launch{margin:6px 0 30px}
.lab-launch [data-lab-open]{display:inline-flex;align-items:center;gap:8px}
.lab-panel{width:min(96vw,980px);max-width:980px}
.lab-panel .modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}

/* ---- Desktop: fixed left rail ------------------------------------------- */
@media (min-width:900px){
  .site-header{
    position:fixed; inset:0 auto 0 0; width:268px; height:100vh; overflow-y:auto;
    border-right:1px solid rgba(7,20,64,.08); border-bottom:none;
  }
  .site-nav{
    flex-direction:column; align-items:stretch; justify-content:flex-start;
    gap:22px; padding:26px 18px; max-width:none; min-height:100%;
  }
  .brand-lockup{flex-wrap:wrap; gap:10px}
  .nav-links{flex-direction:column; align-items:stretch; gap:6px; flex-wrap:nowrap; justify-content:flex-start}
  .nav-links a{width:100%; text-align:left; font-size:.95rem; padding:.6rem .8rem}
  .nav-links a.active{font-weight:900}
  .progress{display:none}
  .lesson-main{margin-left:268px}
  .site-footer{margin-left:268px}
  .lesson-section{padding:64px 0; border-bottom:none}
}

/* ---- Rail sponsor: LearnAI is the lesson; postedby.ai (Voice to Community) sponsors it ---- */
.rail-sponsor{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.rail-sponsor-label{font-size:.62rem;letter-spacing:.16em;text-transform:uppercase;font-weight:800;color:rgba(7,20,64,.45)}
.rail-sponsor-brand{display:inline-flex;text-decoration:none}
.rail-sponsor .postedby-logo{white-space:nowrap;font-size:1.02rem;align-items:center}
.rail-sponsor .pbcanon-mark{width:26px;height:26px;margin-right:6px}
.rail-sponsor-series{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;font-weight:800;color:var(--teal,#0499a4)}
.rail-sponsor-series .vtc-dot{width:7px;height:7px;border-radius:50%;background:var(--teal,#0499a4);box-shadow:0 0 8px 1px rgba(4,153,164,.5)}
@media (min-width:900px){
  .rail-sponsor{width:100%;border-top:1px solid rgba(7,20,64,.08);padding-top:14px;margin-top:2px}
}
@media (max-width:899px){
  .rail-sponsor{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
  .rail-sponsor-series{width:100%}
}

/* ---- Section header: stack the title above its intro so it lines up in the pane ---- */
.section-head{grid-template-columns:1fr;align-items:start;gap:14px}
.section-head h2{font-size:clamp(1.9rem,3.2vw,3.1rem);letter-spacing:-.04em}

/* Remove the decorative orb divider — it struck through the subtitle when it wrapped */
.ai-core-orb::after{display:none}

/* Token meter (Section 4): reserve space for the gradient bar so the two labels sit cleanly beneath it instead of overlapping */
.token-meter{align-items:start;padding-top:56px;min-height:108px}

/* Live Lab: per-answer metrics + a pulsing "thinking" spark on the Run button */
.ll-meta{margin-top:8px;font-size:.8rem;font-weight:800;letter-spacing:.02em;color:rgba(7,20,64,.5)}
.ll-btn.is-running{opacity:.9}
.ll-btn.is-running::after{content:"\2726";margin-left:8px;display:inline-block;animation:llSpark 1s ease-in-out infinite}
@keyframes llSpark{0%,100%{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}
@media (prefers-reduced-motion:reduce){.ll-btn.is-running::after{animation:none}}

/* Live Model Lab: three side-by-side model columns */
.fo-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.fo-col{border-radius:16px;border:1px solid rgba(7,20,64,.10);background:#fff;padding:14px;display:flex;flex-direction:column;gap:8px}
.fo-h{font-weight:900;color:#071440;font-size:.95rem}
.fo-a{white-space:pre-wrap;color:#071440;font-weight:600;line-height:1.42;font-size:.94rem}
.fo-think{color:rgba(7,20,64,.5);font-style:italic}
.fo-think::after{content:"\2726";margin-left:6px;display:inline-block;animation:llSpark 1s ease-in-out infinite}
@media (max-width:900px){.fo-cols{grid-template-columns:1fr}}

/* Live Image Lab: two image columns */
.im-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.im-col{border-radius:16px;border:1px solid rgba(7,20,64,.10);background:#fff;padding:12px;display:flex;flex-direction:column;gap:8px}
.im-img{width:100%;border-radius:12px;display:block;background:#f4f1ea}
@media (max-width:900px){.im-cols{grid-template-columns:1fr}}
