/* ============================================================
   PACKED OUT — course reader styles
   Loads on top of ../styles.css (shares all design tokens).
   Premium, light, on-brand to match the landing page.
   ============================================================ */

/* ---------- course top bar ---------- */
.cbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.82); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--border); }
.cbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.cbar__back { font-size: .9rem; color: var(--text-soft); font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }
.cbar__back:hover { color: var(--text); }
.cbar__title { font-weight: 700; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .55rem; }
.cbar__title .brand__mark { width: 11px; height: 11px; }
.cbar__cta { font-size: .9rem; }

/* ---------- course home hero ---------- */
.chero { background: radial-gradient(60% 80% at 85% -20%, var(--accent-soft) 0%, transparent 55%), var(--bg); padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--border); }
.chero__tag { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 1.1rem; }
.chero h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); letter-spacing: -.03em; max-width: 18ch; }
.chero p { color: var(--text-soft); font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); max-width: 56ch; margin: 1.2rem 0 0; }
.chero__meta { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2rem; }
.chero__meta div { display: grid; }
.chero__meta dt { font-size: .8rem; color: var(--text-mute); font-weight: 500; }
.chero__meta dd { margin: .2rem 0 0; font-weight: 700; font-size: 1.4rem; letter-spacing: -.02em; }

/* ---------- P.A.C.K.E.D. legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.legend__chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .85rem; box-shadow: var(--shadow-sm); }
.legend__chip b { color: var(--accent-ink); }

/* ---------- module list (home) ---------- */
.mods { display: grid; gap: 1rem; }
.modcard { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; padding: 1.4rem 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.modcard:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow); }
.modcard__num { width: 3rem; height: 3rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }
.modcard__body h3 { font-size: 1.2rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.modcard__body p { margin: .25rem 0 0; color: var(--text-soft); font-size: .92rem; }
.modcard__meta { display: flex; align-items: center; gap: .9rem; text-align: right; }
.phase-tag { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-mute); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .6rem; white-space: nowrap; }
.status { font-size: .78rem; font-weight: 600; }
.status--ready { color: var(--accent-ink); }
.status--soon { color: var(--text-mute); }
@media (max-width: 640px) {
  .modcard { grid-template-columns: auto 1fr; }
  .modcard__meta { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- reader layout ---------- */
.reader { display: grid; grid-template-columns: 264px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.reader__nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding: 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.reader__nav h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin: 0 0 .9rem; font-weight: 700; }
.toc { display: grid; gap: .1rem; }
.toc a { display: flex; gap: .65rem; padding: .5rem .7rem; border-radius: 9px; font-size: .9rem; color: var(--text-soft); line-height: 1.3; font-weight: 500; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc a.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc a span { color: var(--text-mute); font-variant-numeric: tabular-nums; min-width: 1.6rem; }
.toc a.is-active span { color: var(--accent-ink); }
@media (max-width: 880px) {
  .reader { grid-template-columns: 1fr; }
  .reader__nav { position: static; max-height: none; margin-bottom: 1rem; }
}

/* ---------- reader content (prose) ---------- */
.content { max-width: 52rem; }
.content > header { margin-bottom: 3rem; }
.content > header .eyebrow { margin-bottom: 1rem; }
.content h1 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.1rem); letter-spacing: -.035em; line-height: 1.03; }
.content .sub { color: var(--text-soft); font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); margin: 1.1rem 0 0; line-height: 1.45; max-width: 46ch; }

.content section { padding-top: 2.6rem; margin-top: 2.6rem; border-top: 1px solid var(--border); }
.content section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.content h2 { font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.15rem); letter-spacing: -.03em; margin: 0 0 1.1rem; scroll-margin-top: 88px; line-height: 1.08; }
.content h3 { font-size: 1.22rem; letter-spacing: -.02em; margin: 1.8rem 0 .6rem; }
.content p { color: var(--text-soft); margin: 0 0 1.15rem; font-size: 1.06rem; line-height: 1.65; }
.content strong { color: var(--text); font-weight: 700; }
.content em { color: var(--text); font-style: italic; }
.content code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: .1rem .35rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; }
.content ul.list { display: grid; gap: .7rem; margin: 0 0 1.5rem; }
.content ul.list li { position: relative; padding-left: 1.7rem; color: var(--text-soft); font-size: 1.05rem; line-height: 1.55; }
.content ul.list li strong { color: var(--text); }
.content ul.list li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; border-radius: 2px; background: var(--accent); }
.content a.inline { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }

/* formula */
.formula { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin: 0 0 1.5rem; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.formula small { display: block; font-weight: 500; color: var(--text-soft); margin-top: .4rem; font-size: .95rem; }

/* generic callout boxes */
.box { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.7rem; margin: 1.8rem 0; background: var(--surface); box-shadow: var(--shadow-sm); }
.box__label { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 .8rem; display: inline-flex; align-items: center; gap: .5rem; color: var(--text-soft); }
.box--ai { background: linear-gradient(180deg, var(--accent-soft), var(--surface)); border-color: rgba(244,67,54,.22); }
.box--ai .box__label { color: var(--accent-ink); }
.box--example { background: var(--surface-2); box-shadow: none; }
.box--note { border-left: 3px solid var(--accent); }
.box p:last-child { margin-bottom: 0; }

/* AI prompt code block — light, branded, not a black terminal */
.box pre { position: relative; background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; overflow-x: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86rem; line-height: 1.55; white-space: pre-wrap; box-shadow: var(--shadow-sm); }

/* data tables */
.content .tablewrap { margin: 0 0 1.6rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-sm); }
.content table.data { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--surface); }
.content table.data th, .content table.data td { text-align: left; padding: .85rem 1.1rem; font-size: .92rem; border-bottom: 1px solid var(--border); }
.content table.data thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-mute); font-weight: 700; }
.content table.data td { color: var(--text-soft); }
.content table.data tbody th { color: var(--text); font-weight: 600; }
.content table.data tbody tr:last-child th, .content table.data tbody tr:last-child td { border-bottom: none; }

/* worksheet checklist */
.checklist { display: grid; gap: .6rem; margin: 0 0 1.5rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-soft); font-size: 1.02rem; box-shadow: var(--shadow-sm); }
.checklist li::before { content: ""; width: 1.2rem; height: 1.2rem; border: 1.5px solid var(--border-2); border-radius: 6px; flex-shrink: 0; margin-top: .1em; }

/* muted footnote paragraphs (replaces inline styles) */
.mutenote { font-size: .86rem; color: var(--text-mute); margin: .6rem 0 0; }
.mutenote--center { text-align: center; }

/* ---------- reading progress bar (top) ---------- */
.readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: transparent; pointer-events: none; }
.readbar span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .1s linear; }

/* ---------- copy button on code blocks (light) ---------- */
.copybtn { position: absolute; top: .7rem; right: .7rem; background: var(--surface); color: var(--text-soft); border: 1px solid var(--border-2); border-radius: 7px; font: inherit; font-size: .74rem; font-weight: 600; padding: .3rem .65rem; cursor: pointer; transition: all .15s ease; box-shadow: var(--shadow-sm); }
.copybtn:hover { color: var(--text); border-color: var(--text-mute); }
.copybtn.copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- checklist done state + progress ---------- */
.checklist li { cursor: pointer; user-select: none; transition: border-color .15s ease, background .15s ease; }
.checklist li:hover { border-color: var(--border-2); }
.checklist li.done { background: var(--accent-soft); border-color: rgba(244,67,54,.25); color: var(--text); }
.checklist li.done::before { background: var(--accent); border-color: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/.85rem no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/.85rem no-repeat; }
.progress { margin: 0 0 1.3rem; }
.progress__track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress__track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.progress__label { font-size: .82rem; color: var(--text-soft); margin: .5rem 0 0; font-weight: 600; }

/* ---------- live calculator ---------- */
.calc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 1.5rem 1.6rem; margin: 0 0 1.5rem; }
.calc__label { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1.1rem; display: inline-flex; align-items: center; gap: .5rem; }
.calc__inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.calc__field { display: grid; gap: .35rem; }
.calc__field label { font-size: .82rem; color: var(--text-soft); font-weight: 500; }
.calc__field input { font: inherit; font-weight: 600; padding: .6rem .75rem; border: 1px solid var(--border-2); border-radius: 9px; background: var(--surface); color: var(--text); }
.calc__field input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.calc__out { display: flex; flex-wrap: wrap; gap: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.calc__out div { display: grid; }
.calc__out dt { font-size: .8rem; color: var(--text-mute); font-weight: 500; }
.calc__out dd { margin: .2rem 0 0; font-weight: 700; font-size: 1.8rem; letter-spacing: -.03em; color: var(--accent-ink); }
.calc__note { font-size: .9rem; color: var(--text-soft); margin: 1.1rem 0 0; }

/* ---------- key takeaways (refined, not heavy dark) ---------- */
.takeaways { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.7rem 1.9rem; margin: 2.2rem 0; }
.takeaways h3 { margin: 0 0 1.1rem; font-size: 1.2rem; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .5rem; }
.takeaways ul { display: grid; gap: .8rem; }
.takeaways li { position: relative; padding-left: 1.8rem; color: var(--text-soft); font-size: 1.02rem; line-height: 1.5; }
.takeaways li strong { color: var(--text); }
.takeaways li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; border-radius: 2px; background: var(--accent); }

/* ---------- Australian case study card ---------- */
.casestudy { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 1.6rem 1.8rem; margin: 2rem 0; }
.casestudy__flag { display: inline-flex; align-items: center; gap: .5rem; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: .35rem .8rem; margin: 0 0 1rem; }
.casestudy__flag::before { content: ""; width: 1rem; height: .7rem; border-radius: 2px; background: linear-gradient(180deg, #00247d 0 50%, #cf142b 50% 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.casestudy h4 { margin: 0 0 .6rem; font-size: 1.25rem; letter-spacing: -.025em; }
.casestudy p { margin: 0 0 .7rem; color: var(--text-soft); font-size: 1.02rem; line-height: 1.55; }
.casestudy p:last-child { margin-bottom: 0; }
.casestudy .stat { font-weight: 700; color: var(--accent-ink); }
.casestudy .src { display: block; font-size: .82rem; color: var(--text-mute); margin-top: .8rem; }

/* ---------- resources panel ---------- */
.resources { display: grid; gap: .8rem; margin: 1.5rem 0; }
.resitem { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .15s ease, border-color .15s ease; }
.resitem:hover { transform: translateY(-2px); border-color: var(--border-2); }
.resitem__ic { width: 2.5rem; height: 2.5rem; border-radius: 9px; background: var(--accent-soft); flex-shrink: 0; position: relative; }
.resitem__ic::before { content: ""; position: absolute; inset: 0; margin: auto; width: 1.2rem; height: 1.2rem; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm0 2 4 4h-4zM8 13h8v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zm0 2 4 4h-4zM8 13h8v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.resitem__body { flex: 1; }
.resitem__body strong { display: block; font-size: .98rem; }
.resitem__body span { font-size: .85rem; color: var(--text-mute); }
.resitem__go { font-size: .85rem; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }

/* ============================================================
   LMS PLAYER SHELL — app-like course player
   ============================================================ */
.lms-body { background: var(--bg); }

/* top app bar */
.lms-top { position: sticky; top: 0; z-index: 120; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 3vw, 1.5rem); background: var(--ink); color: var(--on-dark); }
.lms-top a { color: inherit; }
.lms-top__left, .lms-top__right { display: flex; align-items: center; gap: 1rem; }
.lms-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: -.02em; }
.lms-brand .brand__mark { width: 11px; height: 11px; }
.lms-top__course { font-size: .9rem; color: var(--on-dark-soft); padding-left: 1rem; border-left: 1px solid var(--border-dark); }
@media (max-width: 720px) { .lms-top__course { display: none; } }
.lms-prog { display: flex; align-items: center; gap: .7rem; font-size: .82rem; color: var(--on-dark-soft); font-weight: 500; }
.lms-prog__bar { width: 120px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.lms-prog__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s ease; }
@media (max-width: 560px) { .lms-prog [data-prog-label] { display: none; } }
.lms-exit { font-size: .85rem; color: var(--on-dark-soft); }
.lms-exit:hover { color: #fff; }
.lms-burger { display: none; background: none; border: none; color: var(--on-dark); cursor: pointer; padding: .3rem; }
.lms-burger svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
@media (max-width: 980px) { .lms-burger { display: inline-grid; place-items: center; } }

/* layout */
.lms { display: grid; grid-template-columns: 340px 1fr; align-items: start; }
@media (max-width: 980px) { .lms { grid-template-columns: 1fr; } }

/* sidebar curriculum */
.lms-side { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface-2); padding: 1.25rem; }
.lms-side__progress { margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.lms-side__progress p { margin: .55rem 0 0; font-size: .8rem; color: var(--text-soft); font-weight: 600; }
.curric { display: grid; gap: .45rem; }
.cmod { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.cmod--active { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.cmod__head { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: .8rem .9rem; font: inherit; color: var(--text); }
a.cmod__head:hover, button.cmod__head:hover { background: var(--surface-2); }
.cmod--soon .cmod__head { cursor: default; color: var(--text-mute); }
.cmod__n { width: 1.9rem; height: 1.9rem; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .82rem; display: grid; place-items: center; flex-shrink: 0; }
.cmod--soon .cmod__n { background: var(--surface-3); color: var(--text-mute); }
.cmod--done .cmod__n { background: var(--accent); color: #fff; }
.cmod--done .cmod__n::after { content: "✓"; }
.cmod--done .cmod__n span { display: none; }
.cmod__t { flex: 1; font-size: .89rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.cmod__go { color: var(--text-mute); flex-shrink: 0; font-size: .9rem; }
.cmod__chev { transition: transform .2s ease; width: 15px; height: 15px; stroke: var(--text-mute); stroke-width: 2.5; fill: none; flex-shrink: 0; }
.cmod--open .cmod__chev { transform: rotate(180deg); }
.cmod__lessons { display: none; padding: .2rem .5rem .6rem; }
.cmod--open .cmod__lessons { display: block; }
.lesson { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border-radius: 7px; font-size: .86rem; color: var(--text-soft); line-height: 1.3; }
.lesson:hover { background: var(--surface-2); color: var(--text); }
.lesson.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.lesson__ic { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1.5px solid var(--border-2); flex-shrink: 0; }
.lesson.is-active .lesson__ic { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 38%, transparent 42%); }

/* main player */
.lms-main { min-width: 0; padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.25rem, 4vw, 3.5rem) 0; }
.lms-stage { max-width: 52rem; margin: 0 auto 2.25rem; }
.lms-crumb { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .7rem; display: inline-flex; align-items: center; gap: .5rem; }
.lms-h1 { font-size: clamp(1.85rem, 1.2rem + 2.1vw, 2.7rem); letter-spacing: -.035em; margin: 0 0 1.6rem; line-height: 1.04; }
.lms-video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: radial-gradient(120% 120% at 70% 0%, #232732, #14161a); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.lms-video__play { width: 76px; height: 76px; border-radius: 50%; border: none; cursor: pointer; background: #fff; color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform .2s ease; }
.lms-video__play:hover { transform: scale(1.07); }
.lms-video__play svg { width: 28px; height: 28px; fill: currentColor; margin-left: 3px; }
.lms-video__tag { position: absolute; left: 14px; bottom: 14px; font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; background: rgba(0,0,0,.55); color: #fff; padding: .4rem .7rem; border-radius: 7px; backdrop-filter: blur(4px); }

.lms-content { max-width: 52rem; margin: 0 auto; }

/* video in the stage = real embed */
.lms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* inline responsive video embed */
.embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); margin: 1.6rem 0; background: #14161a; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__cap, .figure figcaption { font-size: .82rem; color: var(--text-mute); margin-top: .6rem; }

/* image figure */
.figure { margin: 1.6rem 0; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }

/* numbered step-by-step list */
.steps { display: grid; gap: 1.1rem; counter-reset: step; margin: 1.3rem 0; padding: 0; }
.steps > li { list-style: none; position: relative; padding-left: 2.8rem; color: var(--text-soft); line-height: 1.55; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -.1rem; width: 1.9rem; height: 1.9rem; background: var(--accent); color: #fff; border-radius: 9px; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.steps > li strong { display: block; color: var(--text); margin-bottom: .15rem; }
.steps > li code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: .05rem .35rem; font-size: .88em; }

/* "read more" expandable how-to */
.howto { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); margin: 1.6rem 0; overflow: hidden; }
.howto > summary { cursor: pointer; list-style: none; padding: 1rem 1.3rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .6rem; letter-spacing: -.01em; }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary::before { content: "+"; width: 1.4rem; height: 1.4rem; flex-shrink: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); border-radius: 6px; font-weight: 700; transition: transform .2s ease; }
.howto[open] > summary::before { content: "−"; }
.howto > summary .howto__tag { margin-left: auto; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mute); }
.howto__body { padding: 0 1.3rem 1.3rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.howto__body > *:first-child { margin-top: 0; }

/* sticky complete bar */
.lms-foot { position: sticky; bottom: 0; margin-top: 3rem; padding: .9rem clamp(1.25rem, 4vw, 3.5rem); background: rgba(255,255,255,.9); backdrop-filter: blur(12px) saturate(140%); border-top: 1px solid var(--border); }
.lms-foot .inner { max-width: 52rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lms-complete { white-space: nowrap; }

/* mobile drawer */
.lms-overlay { display: none; }
@media (max-width: 980px) {
  .lms-side { position: fixed; top: 60px; left: 0; bottom: 0; width: 310px; z-index: 118; transform: translateX(-100%); transition: transform .25s ease; }
  .lms-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .lms-overlay { display: block; position: fixed; inset: 60px 0 0; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .2s ease; z-index: 117; }
  .lms-overlay.show { opacity: 1; visibility: visible; }
}

/* ---------- prev / next ---------- */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 2.2rem; border-top: 1px solid var(--border); }
.pager a { display: grid; gap: .25rem; padding: 1.1rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); flex: 1 1 0; box-shadow: var(--shadow-sm); transition: border-color .18s ease, transform .18s ease; }
.pager a:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pager a.next { text-align: right; }
.pager span { font-size: .78rem; color: var(--text-mute); font-weight: 500; }
.pager strong { font-weight: 700; letter-spacing: -.02em; }
.pager a.disabled { opacity: .45; pointer-events: none; }

/* ============ My Numbers (shared venue profile) ============ */
.mynumbers { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); margin: 0 0 2rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.mynumbers__head { width: 100%; display: flex; align-items: center; gap: .7rem; padding: 1rem 1.3rem; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; color: var(--text); }
.mynumbers__head:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: -3px; }
.mynumbers__ic { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px; background: var(--accent); color: #fff; font-size: .9rem; font-weight: 800; flex: none; }
.mynumbers__title { font-weight: 700; letter-spacing: -.01em; }
.mynumbers__title span { display: block; font-weight: 500; font-size: .82rem; color: var(--text-soft); letter-spacing: 0; }
.mynumbers__chev { margin-left: auto; width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--text-mute); stroke-width: 2; transition: transform .2s ease; }
.mynumbers[open] .mynumbers__chev, .mynumbers.is-open .mynumbers__chev { transform: rotate(180deg); }
.mynumbers__body { padding: 0 1.3rem 1.3rem; }
.mynumbers__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; }
.mynumbers__field { display: grid; gap: .35rem; }
.mynumbers__field label { font-size: .82rem; color: var(--text-soft); font-weight: 500; }
.mynumbers__field input { font: inherit; font-weight: 600; padding: .6rem .75rem; border: 1px solid var(--border-2); border-radius: 9px; background: var(--surface); color: var(--text); width: 100%; }
.mynumbers__field input:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.mynumbers__out { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.mynumbers__out div { display: grid; }
.mynumbers__out dt { font-size: .78rem; color: var(--text-mute); font-weight: 500; }
.mynumbers__out dd { margin: .2rem 0 0; font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; color: var(--accent-ink); }
.mynumbers__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; flex-wrap: wrap; }
.mynumbers__note { font-size: .82rem; color: var(--text-mute); margin: 0; }
.mynumbers__reset { font: inherit; font-size: .82rem; font-weight: 600; color: var(--text-soft); background: none; border: 1px solid var(--border-2); border-radius: 8px; padding: .35rem .7rem; cursor: pointer; }
.mynumbers__reset:hover { color: var(--text); border-color: var(--text-mute); }
.calc__field input.is-synced, .mynumbers__field input.is-synced { border-color: var(--accent); }
.synced-flag { font-size: .7rem; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .04em; }

/* ============ Knowledge-check quiz ============ */
.quiz { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); padding: 1.7rem 1.8rem; margin: 2.2rem 0; }
.quiz h2 { margin-top: 0; }
.quiz__intro { color: var(--text-soft); margin: 0 0 1.4rem; }
.quiz__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.quiz__q { counter-increment: quizq; }
.quiz__prompt { font-weight: 700; color: var(--text); margin: 0 0 .8rem; }
.quiz__prompt::before { content: "Q" counter(quizq) ". "; color: var(--accent-ink); }
.quiz__opts { display: grid; gap: .55rem; }
.quiz__opt { font: inherit; text-align: left; padding: .7rem .9rem; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.quiz__opt:hover:not(:disabled) { border-color: var(--accent); }
.quiz__opt:focus-visible { outline: 3px solid var(--accent-soft); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt .mark { float: right; font-weight: 800; }
.quiz__opt.is-correct { border-color: #1a8f5a; background: rgba(26,143,90,.10); color: #0f6b42; }
.quiz__opt.is-wrong { border-color: #d23b3b; background: rgba(210,59,59,.08); color: #a52525; }
.quiz__fb { font-size: .92rem; color: var(--text-soft); margin: .7rem 0 0; padding-left: .9rem; border-left: 2px solid var(--border-2); display: none; }
.quiz__q.is-answered .quiz__fb { display: block; }
.quiz__q.is-answered .quiz__fb.is-correct { border-color: #1a8f5a; }
.quiz__q.is-answered .quiz__fb.is-wrong { border-color: #d23b3b; }
.quiz__score { margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--border); font-weight: 700; color: var(--text); }
.quiz__score span { color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { .mynumbers__chev, .quiz__opt { transition: none; } }

/* ============================================================
   Benchmark gauge — rate a number against an industry band.
   Built entirely by reader.js from data-* attributes.
   ============================================================ */
.gauge { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem 1.2rem; margin: 1.6rem 0; box-shadow: var(--shadow-sm); }
.gauge__label { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); margin: 0 0 .7rem; }
.gauge__row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.gauge__row input { width: 7.5rem; padding: .5rem .6rem; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font: inherit; font-weight: 700; background: var(--bg); color: var(--text); }
.gauge__row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gauge__unit { font-weight: 700; color: var(--text-soft); }
.gauge__bandnote { font-size: .85rem; color: var(--text-mute); }
.gauge__track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); margin: 1rem 0 .55rem; overflow: hidden; }
.gauge__band { position: absolute; top: 0; bottom: 0; background: rgba(26,143,90,.22); border-left: 2px solid #1a8f5a; border-right: 2px solid #1a8f5a; }
.gauge__pin { position: absolute; top: -4px; width: 4px; height: 20px; border-radius: 2px; background: var(--text); transition: left .18s ease; }
.gauge__scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.gauge__verdict { margin: .85rem 0 0; font-size: .93rem; line-height: 1.5; padding-left: .75rem; border-left: 3px solid var(--border-2); color: var(--text-soft); }
.gauge.is-good .gauge__verdict { border-left-color: #1a8f5a; }
.gauge.is-high .gauge__verdict, .gauge.is-low .gauge__verdict { border-left-color: #d23b3b; }
.gauge.is-good .gauge__pin { background: #1a8f5a; }
.gauge.is-high .gauge__pin, .gauge.is-low .gauge__pin { background: #d23b3b; }

/* ---------- inline glossary term ---------- */
.term { border-bottom: 1.5px dotted var(--accent); cursor: help; font-weight: 600; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.termpop { position: absolute; z-index: 200; max-width: 20rem; background: var(--text); color: var(--on-dark); padding: .7rem .85rem; border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.45; box-shadow: var(--shadow-lg); font-weight: 400; }
.termpop b { color: #fff; display: block; margin-bottom: .2rem; }

/* ---------- per-module notes ---------- */
.notes { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.1rem 1.2rem; margin: 1.8rem 0; }
.notes__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.notes__title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); margin: 0; }
.notes__saved { font-size: .78rem; color: var(--text-mute); opacity: 0; transition: opacity .2s ease; }
.notes__saved.show { opacity: 1; color: #1a8f5a; }
.notes textarea { width: 100%; min-height: 7rem; resize: vertical; padding: .7rem .8rem; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font: inherit; font-size: .95rem; line-height: 1.6; background: var(--bg); color: var(--text); }
.notes textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- action plan export ---------- */
.planbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.8rem 0; padding: 1rem 1.2rem; border: 1px dashed var(--border-2); border-radius: var(--radius); background: var(--surface-2); }
.planbar p { margin: 0; font-size: .9rem; color: var(--text-soft); flex: 1 1 16rem; }

@media print {
  .cbar, .lms-side, .lms-foot, .planbar, .quiz__opts, .notes textarea { display: none !important; }
  .lms-main, .lms-content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  a[href]::after { content: ""; }
}

/* ---------- inline resource / tool callout (used mid-lesson, where relevant) ---------- */
.resinline { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; margin: 1.4rem 0; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.resinline:hover { background: var(--surface-2); border-left-color: var(--accent-ink); }
.resinline__ic { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; font-size: .8rem; }
.resinline__body { display: grid; gap: .1rem; }
.resinline__body strong { color: var(--text); font-size: .94rem; line-height: 1.3; }
.resinline__body span { color: var(--text-mute); font-size: .84rem; line-height: 1.35; }
.resinline__go { margin-left: auto; color: var(--accent-ink); font-weight: 700; font-size: .88rem; white-space: nowrap; }

/* ============================================================
   Packed Out Plus — AI assistant upsell gate.
   The lock defines the box height; the blurred sample sits behind it,
   so nothing in the offer can ever be clipped.
   ============================================================ */
.plusgate { position: relative; margin: 2.2rem 0; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  border: 1px solid var(--border-2); background: var(--surface);
  box-shadow: 0 1px 2px rgba(20,22,26,.04), 0 12px 32px -12px rgba(20,22,26,.18); }
.plusgate::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }

/* blurred sample output, sitting behind the offer */
.plusgate__preview { position: absolute; inset: 0; z-index: 0; overflow: hidden; padding: 1.4rem 1.5rem;
  filter: blur(3px); opacity: .55; user-select: none; pointer-events: none; }
.plusgate__preview p, .plusgate__preview li { margin: 0 0 .55rem; font-size: .9rem; line-height: 1.5; color: var(--text-soft); }
.plusgate__preview strong { color: var(--text); }
.plusgate__preview ul { padding-left: 1.1rem; margin: 0; }

/* the offer itself — static flow, so it sets the height */
.plusgate__lock { position: relative; z-index: 2; padding: 1.6rem clamp(1.25rem, 3.5vw, 2.1rem) 1.5rem;
  background: linear-gradient(178deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.9) 22%, rgba(255,255,255,.97) 55%, #fff 100%); }
.plusgate__badge { display: inline-flex; align-items: center; gap: .42rem; padding: .34rem .72rem; border-radius: 999px;
  background: var(--text); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .95rem; }
.plusgate__badge svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plusgate__title { font-size: clamp(1.2rem, 1rem + .75vw, 1.55rem); letter-spacing: -.025em; margin: 0 0 .5rem;
  color: var(--text); font-weight: 800; line-height: 1.22; max-width: 40ch; }
.plusgate__sub { margin: 0 0 1.15rem; color: var(--text-soft); font-size: .94rem; line-height: 1.6; max-width: 62ch; }
.plusgate__feats { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .48rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.plusgate__feats li { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; color: var(--text-soft); line-height: 1.45; }
.plusgate__feats li::before { content: "✓"; flex: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .62rem; font-weight: 900; display: grid; place-items: center; margin-top: .14rem; }
.plusgate__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem;
  padding-top: 1.15rem; border-top: 1px solid var(--border); }
.plusgate__price { display: flex; align-items: baseline; gap: .28rem; font-weight: 800; letter-spacing: -.025em; color: var(--text); }
.plusgate__price b { font-size: 1.6rem; }
.plusgate__price span { font-size: .85rem; color: var(--text-mute); font-weight: 600; }
.plusgate__note { margin: .95rem 0 0; font-size: .79rem; color: var(--text-mute); line-height: 1.5; max-width: 68ch; }

/* unlocked state (reader.js sets this when a Plus entitlement exists) */
.plusgate.is-unlocked { box-shadow: none; }
.plusgate.is-unlocked .plusgate__lock { display: none; }
.plusgate.is-unlocked .plusgate__preview { position: static; filter: none; opacity: 1; user-select: auto; pointer-events: auto; }

.plustag { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .45rem; border-radius: 5px; background: var(--text); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; margin-left: .4rem; }
