/* The same desk, with a clear center for real, selectable teaching examples. */
.detail-hero::before {
  inset: auto 0 0; width: 100%; height: min(850px, 72%);
  background: url('../images/course-desk.webp') center bottom / cover;
  mask-image: linear-gradient(transparent, #000 24%); opacity: 1;
}
.detail-hero::after { display: none; }
.hero-instrument { isolation: isolate; }
.hero-prompt { padding: 20px 26px; background: #19374b; border-radius: 4px; }
.hero-prompt p { color: #f6f4ed; line-height: 1.3; }
.confidence-close::before {
  inset: auto 0 0; height: 290px;
  background: url('../images/course-desk.webp') center 82% / cover;
  mask-image: linear-gradient(transparent, #000 90%); opacity: .3;
}
.resource-card { border-top-width: 3px; }
.resource-icon { display: none; }
.template-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 0 clamp(24px, 8vw, 125px) 80px; background: #19374b; }
.template-levels article { border-top: 1px solid #b9d8c970; padding-top: 26px; }
.template-levels h3 { font-size: 32px; margin-bottom: 18px; color: #f6f3e9; }
.template-levels p { color: #c3d5d8; font-size: 16px; max-width: 54ch; }
body[data-course="templates"] .practice-intro { padding-bottom: 48px; }
.timing-intro { max-width: 72ch; margin-bottom: 46px; }
.timing-intro h3 { font-size: 30px; margin-bottom: 18px; }
.timing-intro p { font-size: 16px; color: #c3d5d8; }
.timing-intro .timing-note { font-size: 13px; margin-top: 18px; }
.course-switcher a { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }

/* Wrap the purchase choices when enlarged text needs more room. */
.fit { display: flex; flex-wrap: wrap; }
.fit-copy { flex: .78 1 15.35rem; min-width: 0; }
.choice-cards { flex: 1.22 1 24rem; min-width: 0; }

/* Measure the complete scene, not a device breakpoint, before pinning it. */
.practice-act { height: auto; }
.practice-stage { position: relative; height: auto; min-height: 0; padding: 40px; gap: 32px; overflow: visible; }
.practice-stage > * { flex-shrink: 0; min-width: 0; }
.practice-can-pin { height: 340svh; }
.practice-can-pin .practice-stage { position: sticky; height: 100svh; }
.practice-fit .practice-stage { padding: 20px 30px; gap: 20px; }
.practice-fit .practice-copy { row-gap: 16px; }
.practice-can-pin .instrument-row,
.practice-can-pin .soap-line { position: relative; transition: background 240ms ease-out, box-shadow 240ms ease-out; }
.practice-can-pin .instrument-row.is-current,
.practice-can-pin .soap-line.is-current { box-shadow: inset 3px 0 #a0803c; }
.practice-can-pin .step-rail { position: relative; }
.practice-can-pin .step-rail::after {
  content: ''; position: absolute; bottom: -7px; left: 0; right: 0; height: 2px;
  background: #dec895; transform: scaleX(var(--practice-progress, 0)); transform-origin: left;
}
.practice-copy,
body[data-course="templates"] .practice-copy {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto;
  row-gap: 24px; width: min(900px, 100%); min-height: 0 !important;
}
.step-rail { grid-area: 1 / 1; }
.practice-step { grid-area: 2 / 1; position: relative; inset: auto; width: 100%; min-width: 0; margin: 0; align-self: start; }
.practice-step:not(.is-active) { visibility: hidden; }
.practice-step.is-active { visibility: visible; }
.step-rail button { min-width: 44px; min-height: 44px; }
.instrument { width: min(850px, 100%); height: auto; min-height: 0; }
.instrument-paper { position: relative; inset: auto; }
.instrument-row > *, .hero-field > * { min-width: 0; }
[data-reveal-step] { opacity: 1; filter: none; }
[data-reveal-step].is-current { background: var(--accent-wash); }
.plan-strips { height: auto; padding: 0; }
.plan-strip { transform: translateX(12px); }
.clarity-meter { position: relative; inset: auto; margin: 24px 0 0; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.clarity-meter i::after { width: 100%; transform: scaleX(calc(.25 + var(--step) * .75)); transform-origin: left; transition: transform 220ms ease-out; }
.soap-instrument { display: grid; gap: 20px; }
.soap-tray { position: relative; inset: auto; min-height: 0; padding: 14px; }
.soap-chip, .soap-chip.is-revealed { opacity: 1; transform: none; font-family: var(--text); color: #19374b; }
.soap-chip.is-current { background: #dec895; }
.soap-note { position: relative; inset: auto; padding: 22px 28px; background: #f6f3e9; border-radius: 5px; }
.soap-line { min-width: 0; }
.soap-line span { font-family: var(--text); }
.closure-switches { position: relative; inset: auto; padding: 18px; grid-template-columns: minmax(125px, .32fr) minmax(0, 1fr); background: #19374b; }
.closure-route div { min-width: 0; }
.closure-route small { font-weight: 500; letter-spacing: .025em; }
.closure-document { min-width: 0; background: #f6f3e9; }
.closure-document .instrument-row { grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
.closure-route div:not(.is-current) { background: #254757; }
.closure-route div.is-current { background: #305b5c; color: #fff; }

/* The thread travels through the gutters, behind the documents, in reading order. */
.bundle-instrument { isolation: isolate; padding: 8px; }
.bundle-instrument .bundle-stack { position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 42px 36px; }
.bundle-instrument .bundle-sheet:nth-child(n) {
  position: relative; inset: auto !important; width: 100% !important; min-height: 0;
  padding: 24px !important; z-index: 1; background: #f6f3e9;
  transform: none !important; transition: background 220ms ease-out, box-shadow 220ms ease-out;
}
.bundle-instrument .bundle-sheet.is-current { background: #deece4; box-shadow: 0 15px 28px -15px #071b2899; }
.bundle-instrument .bundle-thread { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; overflow: visible; }
.bundle-thread path { stroke-width: 3; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 320ms ease-out; }
.bundle-thread path.is-connected { stroke-dashoffset: 0; }
.case-stack { min-height: 0; display: grid; gap: 18px; padding: 8px; }
.case-card:nth-child(n) { position: relative; inset: auto; width: 100%; transform: none; }
.case-card:nth-child(2) { margin-left: 8px; width: calc(100% - 8px); }

/* Readable static fallback when scripts are unavailable. */
html:not(.detail-ready) [data-in] { opacity: 1; transform: none; }
html:not(.detail-ready) .practice-step { visibility: visible; opacity: 1; transform: none; grid-area: auto; }
html:not(.detail-ready) .step-rail { display: none; }
html:not(.detail-ready) .plan-strip { transform: none; }
html:not(.detail-ready) .bundle-thread { display: none; }

@media (max-width: 1100px) {
  .detail-nav { position: relative; }
  .detail-hero { padding-top: 48px; }
  .practice-stage { padding: 56px 30px; }
  .practice-step h3 { font-size: 34px; }
  .practice-fit .practice-stage { padding: 20px 30px; }
}
@media (max-width: 760px) {
  .fit-copy, .choice-cards { flex-basis: 100%; }
  .template-levels { grid-template-columns: 1fr; gap: 30px; padding: 0 24px 60px; }
  .template-levels p, .timing-intro p { font-size: 15px; }
  .detail-nav { padding: 18px; gap: 12px; }
  .course-switcher { justify-content: center; gap: 0 6px; }
  .course-switcher a { font-size: 12px; padding: 8px; }
  .detail-hero { padding-top: 36px; }
  .detail-hero::before { height: 700px; background-size: auto 100%; }
  .hero-instrument { margin-top: 38px; }
  .hero-prompt { padding: 18px; }
  .hero-tab { flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .practice-stage { padding: 52px 22px; }
  .practice-copy { row-gap: 22px; }
  .practice-step h3 { font-size: 28px; }
  .practice-step p { font-size: 14px; }
  .soap-note { padding: 18px; }
  .soap-line { grid-template-columns: 27px minmax(0, 1fr); gap: 10px; }
  .soap-line b { width: 27px; height: 30px; }
  .closure-switches { padding: 12px; gap: 16px; grid-template-columns: minmax(0, 1fr); }
  .closure-route { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; }
  .closure-document { padding: 18px; }
  .closure-document .instrument-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .bundle-instrument .bundle-stack { gap: 28px 20px; }
  .bundle-instrument .bundle-sheet:nth-child(n) { padding: 16px !important; }
  .bundle-sheet strong { font-size: 21px !important; }
  .bundle-sheet p { font-size: 13px !important; }
  .template-compare { grid-template-columns: minmax(0, 1fr); }
  .template-pane + .template-pane { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 500px) {
  .brand-lockup strong { font-size: 18px; }
  .brand-lockup img { width: 28px; height: 28px; }
  .brand-lockup { gap: 8px; }
  .nav-buy { padding: 9px 10px; font-size: 10px; }
  .bundle-instrument .bundle-stack { grid-template-columns: minmax(0, 1fr); padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .practice-can-pin { height: auto; }
  .practice-can-pin .practice-stage { position: relative; height: auto; }
  .plan-strip, .practice-step { transform: none; }
  .bundle-thread path { transition: none; }
}
