/* Course builder + lesson blocks (cb-). The same block styles serve the builder canvas and the student lesson. */
.cb-theme-maroon, .cb-lesson { --cb-accent: var(--maroon); --cb-accent-2: #A2453F; --cb-tint: var(--maroon-wash); }
.cb-theme-sage { --cb-accent: var(--sage); --cb-accent-2: #6E8B5E; --cb-tint: var(--sage-mist); }
.cb-theme-gold { --cb-accent: #8A5A00; --cb-accent-2: #C08A2E; --cb-tint: #F7EEDB; }
.cb-theme-navy { --cb-accent: #2F4A6B; --cb-accent-2: #5C7FA6; --cb-tint: #E7EDF4; }
.cb-theme-ink { --cb-accent: #2B2B2B; --cb-accent-2: #6B6B6B; --cb-tint: #EFEDE8; }

/* ---------- the lesson page (learner and builder canvas) ---------- */
.cb-lesson { background: var(--card); color: var(--ink); }
.cb-col { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.cb-lhead { display: flex; flex-direction: column; gap: 8px; padding: 48px 0 28px; }
.cb-lof { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.cb-ltitle { font-family: var(--serif); font-size: 44px; line-height: 1.08; font-weight: 600; margin: 0; }
.cb-lauthor { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; }
.cb-lauthor .jb-avatar.sm { width: 26px; height: 26px; font-size: 11px; background: var(--cb-tint); color: var(--cb-accent); }
.cb-lbar { width: 88px; height: 4px; border-radius: 2px; background: var(--cb-accent); margin-top: 10px; }
.cb-block { padding: 14px 0; position: relative; }
.cb-block[hidden] { display: none; }
.cb-heading { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 10px 0 0; }
h3.cb-heading { font-size: 23px; }
.cb-para { font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.cb-para p { margin: 0 0 .7em; } .cb-para p:last-child { margin-bottom: 0; }
.cb-para a, .cb-acc-b a, .cb-tabpane a { color: var(--cb-accent); }
.cb-statement { border-top: 4px solid var(--cb-accent); border-bottom: 4px solid var(--cb-accent); padding: 26px 8px; text-align: center; }
.cb-statement p { font-family: var(--serif); font-size: 30px; line-height: 1.25; margin: 0; }
.cb-quote { margin: 0; padding: 18px 26px; border-left: 4px solid var(--cb-accent); background: var(--cb-tint); border-radius: 0 var(--r) var(--r) 0; }
.cb-quote p { font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.35; margin: 0 0 8px; }
.cb-quote footer { color: var(--ink-3); font-size: 14px; }
.cb-note { padding: 14px 18px; border-radius: var(--r); background: var(--cb-tint); display: flex; flex-direction: column; gap: 4px; }
.cb-note b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cb-accent); }
.cb-note p { margin: 0; font-size: 17px; }
.cb-note.warning { background: var(--amber-tint); } .cb-note.warning b { color: var(--amber-ink); }
.cb-note.info { background: #E9EEF4; } .cb-note.info b { color: #2F4A6B; }
.cb-list { font-family: var(--serif); font-size: 19px; line-height: 1.5; padding-left: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cb-list.bullets li { padding-left: 22px; position: relative; } .cb-list.bullets li::before { content: ''; position: absolute; left: 4px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--cb-accent); }
.cb-list.numbers { counter-reset: n; } .cb-list.numbers li { counter-increment: n; padding-left: 46px; position: relative; min-height: 32px; }
.cb-list.numbers li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--cb-accent); color: #fff; font: 600 14px var(--sans); display: flex; align-items: center; justify-content: center; }
.cb-list.checklist li { display: flex; gap: 10px; align-items: baseline; } .cb-list.checklist input { accent-color: var(--cb-accent); width: 18px; height: 18px; }
.cb-image { margin: 0; } .cb-image img { width: 100%; border-radius: var(--r); display: block; } .cb-image.center img { max-width: 520px; margin: 0 auto; }
.cb-image figcaption { color: var(--ink-3); font-size: 14px; text-align: center; margin-top: 8px; }
.cb-image-ph { min-height: 220px; border-radius: var(--r); background: var(--chip-soft); border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-4); text-align: center; padding: 16px; }
.cb-image-ph .jb-ico { width: 30px; height: 30px; }
.cb-video { border-radius: var(--r); overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.cb-video iframe, .cb-video video { width: 100%; height: 100%; border: 0; display: block; }
.cb-video-ph { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; color: #fff; text-align: center; padding: 20px; background: radial-gradient(circle at 30% 20%, #3a3a3a, #111); }
.cb-video-ph .cap { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .7; } .cb-video-ph .ttl { font-family: var(--serif); font-size: 24px; }
.cb-video-ph .play { width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.cb-video-ph .play .jb-ico { fill: #fff; stroke: none; } .cb-video-ph .hint { font-size: 13px; opacity: .7; }
.cb-audio, .cb-download { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.cb-audio > .jb-ico { width: 28px; height: 28px; color: var(--cb-accent); } .cb-audio audio { width: 100%; margin-top: 8px; display: block; } .cb-audio .jb-grow { display: flex; flex-direction: column; }
.cb-file { width: 46px; height: 54px; border-radius: 6px; background: var(--cb-accent); color: #fff; font: 700 11px var(--sans); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; flex: none; }
.cb-embed .jb-embed { aspect-ratio: auto; height: var(--cb-embed-h, 560px); }
.cb-embed iframe { width: 100%; border: 1px solid var(--line); border-radius: var(--r); display: block; } .cb-embed .jb-muted { margin-top: 6px; font-size: 14px; }
.cb-accordion { border-top: 1px solid var(--line); }
.cb-acc { border-bottom: 1px solid var(--line); }
.cb-acc-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 4px; cursor: pointer; list-style: none; font-size: 18px; }
.cb-acc-h::-webkit-details-marker { display: none; } .cb-acc-h > span { color: var(--cb-accent); transition: transform .2s; } details[open] > .cb-acc-h > span { transform: rotate(180deg); }
.cb-acc-b { padding: 0 4px 16px; font-family: var(--serif); font-size: 18px; line-height: 1.55; } .cb-acc-b p { margin: 0 0 .6em; }
.cb-tabbar { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.cb-tabbar [role=tab] { border: 0; background: none; font: 600 15px var(--sans); padding: 10px 16px; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap; }
.cb-tabbar [role=tab][aria-selected="true"] { color: var(--cb-accent); border-bottom-color: var(--cb-accent); }
.cb-tabpane { padding: 18px 4px 4px; font-family: var(--serif); font-size: 18px; line-height: 1.55; } .cb-tabpane p { margin: 0 0 .6em; }
.cb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cb-card { position: relative; height: 150px; border: 0; padding: 0; background: none; perspective: 900px; cursor: pointer; font: inherit; }
.cb-card .f, .cb-card .bk { position: absolute; inset: 0; border-radius: var(--r); display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; backface-visibility: hidden; transition: transform .45s; font-size: 18px; }
.cb-card .f { background: var(--cb-accent); color: #fff; font-family: var(--serif); font-size: 22px; } .cb-card .bk { background: var(--cb-tint); color: var(--ink); transform: rotateY(180deg); }
.cb-card.flipped .f { transform: rotateY(180deg); } .cb-card.flipped .bk { transform: rotateY(360deg); }
.cb-card.edit { height: auto; display: grid; grid-template-rows: 1fr 1fr; cursor: default; }
.cb-card.edit .f, .cb-card.edit .bk { position: static; transform: none; min-height: 70px; } .cb-card.edit .f { border-radius: var(--r) var(--r) 0 0; } .cb-card.edit .bk { border-radius: 0 0 var(--r) var(--r); }
.cb-center { text-align: center; }
.cb-process { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; background: var(--cb-tint); }
.cb-pstep { display: flex; flex-direction: column; gap: 6px; } .cb-pstep h3 { font-family: var(--serif); font-size: 24px; margin: 0; }
.cb-pstep > div { font-family: var(--serif); font-size: 18px; line-height: 1.55; } .cb-pstep p { margin: 0 0 .5em; }
.cb-pnum { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cb-accent); font-weight: 700; }
.cb-pnav { display: flex; justify-content: space-between; margin-top: 18px; }
/* in the builder all steps show, one under the other */
.cb-edit-mode .cb-process .cb-pstep + .cb-pstep { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line); }
.cb-check, .cb-response, .cb-upload, .cb-form { border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.cb-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cb-accent); font-weight: 700; }
.cb-check .q, .cb-response .q { font-family: var(--serif); font-size: 21px; margin: 0; }
.cb-choices { display: flex; flex-direction: column; gap: 8px; }
.cb-choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-size: 17px; }
.cb-choice input { accent-color: var(--cb-accent); width: 18px; height: 18px; flex: none; }
.cb-choice.right { border-color: var(--sage); background: var(--sage-mist); } .cb-choice.wrong { border-color: var(--maroon); background: var(--maroon-wash); }
.cb-right { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--sage-text); white-space: nowrap; }
.cb-checkfoot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cb-feedback { margin: 0; font-weight: 600; } .cb-feedback.right { color: var(--sage-text); } .cb-feedback.wrong { color: var(--maroon-text); }
.cb-divider { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.cb-continue { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.cb-continue .jb-btn { background: var(--cb-accent); min-width: 220px; } .cb-continue.done .jb-btn { display: none; }
.cb-hotspots { position: relative; } .cb-hotspots img { width: 100%; border-radius: var(--r); display: block; }
.cb-spot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); background: var(--cb-accent); color: #fff; font: 700 18px var(--sans); cursor: pointer; box-shadow: 0 0 0 6px rgba(255, 255, 255, .35); animation: cb-pulse 2s infinite; }
.cb-spot.on { background: #fff; color: var(--cb-accent); animation: none; }
@keyframes cb-pulse { 50% { box-shadow: 0 0 0 11px rgba(255, 255, 255, .15); } }
.cb-spotcard { position: absolute; width: min(280px, 60%); background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; z-index: 2; } .cb-spotcard p { margin: 4px 0 0; }
.cb-sorting { display: flex; flex-direction: column; gap: 14px; }
.cb-sortdeck { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 40px; }
.cb-sortcard { border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 10px 14px; font: 500 16px var(--sans); cursor: grab; display: inline-flex; flex-direction: column; gap: 2px; }
.cb-sortcard.picked { border-color: var(--cb-accent); box-shadow: 0 0 0 3px var(--cb-tint); } .cb-sortcard.placed { border-color: var(--sage); background: var(--sage-mist); cursor: default; }
.cb-sortcard.shake { animation: cb-shake .35s; } @keyframes cb-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.cb-piles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.cb-pile { border: 2px dashed var(--line); border-radius: var(--r); padding: 12px; min-height: 120px; background: var(--cb-tint); cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.cb-pile > b { text-align: center; color: var(--cb-accent); } .cb-pilecards { display: flex; flex-direction: column; gap: 6px; }
.cb-chart { margin: 0; } .cb-chart figcaption { font-weight: 600; text-align: center; margin-bottom: 12px; font-size: 18px; }
.cb-pie { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; } .cb-pie svg { width: 220px; height: 220px; }
.cb-pie ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; } .cb-pie li { display: flex; align-items: center; gap: 8px; }
.cb-pie li span { width: 12px; height: 12px; border-radius: 3px; }
.cb-bars { display: flex; flex-direction: column; gap: 10px; } .cb-bars .row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 48px; align-items: center; gap: 10px; }
.cb-bars .bar { background: var(--chip-soft); border-radius: 6px; height: 22px; overflow: hidden; } .cb-bars .bar i { display: block; height: 100%; border-radius: 6px; }
.cb-lfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 36px 0 56px; border-top: 1px solid var(--line); margin-top: 24px; }
.cb-lfoot .jb-btn.accent { background: var(--cb-accent); }
.cb-quizresult { text-align: center; padding: 26px; border-radius: var(--r); background: var(--cb-tint); }
.cb-quizresult .v { font-family: var(--serif); font-size: 48px; color: var(--cb-accent); }

/* ---------- builder ---------- */
.cb-app { position: fixed; inset: 0; z-index: 40; background: var(--page); display: flex; flex-direction: column; }
.cb-top { height: 58px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.cb-top .jb-grow { min-width: 0; }
.cb-ttl { border: 0; background: none; font: 600 17px var(--sans); display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cb-ttl:hover { background: var(--chip-soft); }
.cb-save { font-size: 13px; color: var(--ink-4); white-space: nowrap; }
.cb-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--chip-soft); }
.cb-seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; }
.cb-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.cb-body { flex: 1; display: flex; min-height: 0; }
.cb-outline { width: 300px; flex: none; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 10px 40px; display: flex; flex-direction: column; gap: 4px; }
.cb-outline.collapsed { width: 44px; padding: 12px 4px; } .cb-outline.collapsed > :not(.cb-ohead) { display: none; } .cb-outline.collapsed .cb-ohead b { display: none; }
.cb-ohead { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; }
.cb-ohead b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); }
.cb-oitem { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 14px; border: 1px solid transparent; }
.cb-oitem:hover { background: var(--chip-soft); } .cb-oitem[aria-current="page"] { background: var(--cb-tint, var(--sage-mist)); border-color: var(--line); font-weight: 600; }
.cb-oitem .jb-ico { width: 16px; height: 16px; flex: none; color: var(--ink-4); }
.cb-oitem .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cb-ounit { margin-top: 10px; } .cb-ounit-h { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.cb-ounit-h .n { flex: 1; cursor: text; } .cb-ounit-h [contenteditable]:focus { outline: 2px solid var(--sage-soft); border-radius: 4px; text-transform: none; }
.cb-olessons { display: flex; flex-direction: column; gap: 2px; min-height: 8px; }
.cb-oitem.dragging { opacity: .4; } .cb-olessons.over { background: var(--sage-mist); border-radius: 8px; }
.cb-oacts { display: flex; gap: 4px; padding: 2px 8px; flex-wrap: wrap; }
.cb-oacts button, .cb-outline > .cb-oadd { border: 0; background: none; color: var(--sage-text); font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; padding: 6px 4px; cursor: pointer; }
.cb-mini { border: 0; background: none; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--ink-4); display: inline-flex; } .cb-mini:hover { background: var(--chip); color: var(--ink); } .cb-mini .jb-ico { width: 16px; height: 16px; }
.cb-canvas { flex: 1; overflow-y: auto; padding: 22px; }
.cb-stage { margin: 0 auto; max-width: 980px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); min-height: 100%; transition: max-width .25s; }
.cb-stage.tablet { max-width: 768px; } .cb-stage.phone { max-width: 390px; } .cb-stage.phone .cb-ltitle { font-size: 32px; } .cb-stage.phone .cb-col { padding: 0 16px; }
.cb-edit { outline: none; border-radius: 4px; min-width: 1ch; display: inline-block; }
div.cb-edit, h1.cb-edit, h2.cb-edit, h3.cb-edit, p.cb-edit, figcaption.cb-edit, .cb-statement .cb-edit, .cb-quote p.cb-edit { display: block; }
.cb-edit:hover { box-shadow: 0 0 0 1px var(--line); } .cb-edit:focus { box-shadow: 0 0 0 2px var(--sage-soft); }
.cb-edit:empty::before { content: attr(data-ph); color: var(--ink-4); }
.cb-edit.rich:has(> p:only-child:empty)::before, .cb-edit.rich:has(> p:only-child > br:only-child)::before { content: attr(data-ph); color: var(--ink-4); position: absolute; pointer-events: none; }
.cb-edit-k { font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 4px; }
.cb-wrap { position: relative; }
.cb-edit-mode .cb-block { padding: 14px 0; }
.cb-edit-mode .cb-block:hover > .cb-wrap::before, .cb-edit-mode .cb-block.sel > .cb-wrap::before { content: ''; position: absolute; inset: -8px -14px; border: 1.5px dashed var(--line); border-radius: var(--r); pointer-events: none; }
.cb-edit-mode .cb-block.sel > .cb-wrap::before { border: 1.5px solid var(--sage-soft); }
.cb-tools { position: absolute; top: -8px; right: -14px; transform: translateY(-60%); display: none; gap: 2px; background: var(--ink); border-radius: 8px; padding: 3px; z-index: 3; }
.cb-tools button { border: 0; background: none; color: #fff; padding: 5px 7px; border-radius: 6px; cursor: pointer; font: 600 12px var(--sans); display: inline-flex; align-items: center; gap: 4px; }
.cb-tools button:hover { background: rgba(255, 255, 255, .16); } .cb-tools .jb-ico { width: 15px; height: 15px; stroke: #fff; }
.cb-tools .lbl { padding: 5px 8px; color: rgba(255, 255, 255, .7); font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.cb-edit-mode .cb-block:hover .cb-tools, .cb-edit-mode .cb-block.sel .cb-tools { display: flex; }
.cb-ins { height: 18px; position: relative; display: flex; align-items: center; justify-content: center; }
.cb-ins button { opacity: 0; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--sage); color: var(--on-sage); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .15s; z-index: 2; }
.cb-ins button .jb-ico { stroke: #fff; width: 16px; height: 16px; } .cb-ins:hover button, .cb-ins button:focus { opacity: 1; }
.cb-ins::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--sage-soft); opacity: 0; } .cb-ins:hover::before { opacity: 1; }
.cb-quick { padding: 18px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cb-quick-h { margin: 0; color: var(--ink-3); font-size: 14px; }
.cb-quick-row { display: flex; gap: 6px; align-items: stretch; max-width: 100%; min-width: 0; }
.cb-qall { background: var(--ink); color: #fff; border: 0; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 11px var(--sans); cursor: pointer; flex: none; }
.cb-qall .jb-ico { stroke: #fff; width: 18px; height: 18px; }
.cb-qset { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; border: 1px dashed var(--line); border-radius: 8px; padding: 4px; background: var(--card); min-width: 0; flex: 1 1 auto; }
.cb-qset button { border: 0; background: none; border-radius: 6px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 11px var(--sans); color: var(--ink-3); cursor: pointer; flex: none; min-width: 64px; white-space: nowrap; }
.cb-qset button:hover { background: var(--chip-soft); color: var(--ink); } .cb-qset .jb-ico { width: 18px; height: 18px; }
.cb-fmt { position: fixed; z-index: 60; display: flex; gap: 2px; background: var(--ink); border-radius: 8px; padding: 3px; box-shadow: var(--shadow); }
.cb-fmt button { border: 0; background: none; color: #fff; min-width: 30px; height: 28px; border-radius: 6px; cursor: pointer; font: 600 13px var(--sans); } .cb-fmt button:hover { background: rgba(255, 255, 255, .16); }
.cb-lsettings { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
/* course overview page in the builder (Rise's course page) */
.cb-cover { padding: 56px 0 28px; } .cb-cover .cb-ltitle { font-size: 48px; }
.cb-cover-img { height: 220px; background: var(--cb-accent) center / cover; position: relative; }
.cb-cover-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, 0)); }
.cb-desc { font-family: var(--serif); font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.cb-rows { display: flex; flex-direction: column; margin: 18px 0 60px; }
.cb-unitrow { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--cb-accent); padding: 22px 0 8px; border-bottom: 2px solid var(--cb-accent); }
.cb-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.cb-row .jb-ico { color: var(--ink-4); } .cb-row .t { flex: 1; min-width: 0; } .cb-row .t b { display: block; font-weight: 600; } .cb-row .t span { font-size: 13px; color: var(--ink-4); }
.cb-row.new { background: var(--chip-soft); border-radius: 8px; border: 0; margin-top: 6px; padding: 10px 12px; }
.cb-row.new input { flex: 1; border: 0; background: none; font: 500 16px var(--sans); outline: none; }
/* course list & template gallery */
.cb-start { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cb-start h2 { font-family: var(--serif); font-size: 32px; margin: 0; }
.cb-start-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cb-start-card { width: 230px; height: 170px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font: 600 16px var(--sans); color: var(--ink); }
.cb-start-card .jb-ico { width: 30px; height: 30px; color: var(--sage-text); } .cb-start-card:hover { border-color: var(--sage); box-shadow: var(--shadow); }
.cb-start-card.drop { border-style: dashed; background: var(--chip-soft); } .cb-start-card.drop.over { border-color: var(--sage); background: var(--sage-mist); }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cb-ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-decoration: none; color: inherit; text-align: left; font: inherit; padding: 0; }
.cb-ccard:hover { box-shadow: var(--shadow); border-color: var(--line); transform: translateY(-1px); }
.cb-ccover { height: 112px; background: var(--cb-accent); position: relative; display: flex; align-items: flex-end; padding: 12px 14px; color: #fff; background-size: cover; background-position: center; }
.cb-ccover .cat { font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .1em; background: rgba(0, 0, 0, .28); padding: 3px 8px; border-radius: 4px; }
.cb-ccover .mark { position: absolute; right: 14px; top: 12px; font-family: var(--caps); font-size: 34px; opacity: .3; }
.cb-cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cb-cbody b { font-family: var(--serif); font-size: 21px; line-height: 1.15; } .cb-cbody p { margin: 0; color: var(--ink-3); font-size: 14px; }
.cb-cmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--ink-4); }
.cb-gallery { position: fixed; inset: 0; z-index: 45; background: var(--card); display: flex; flex-direction: column; animation: lp-in .18s; }
.cb-ghead { padding: 22px 28px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cb-ghead h2 { font-family: var(--serif); font-size: 34px; margin: 0; }
.cb-gtabs { display: flex; gap: 22px; padding: 14px 28px 0; border-bottom: 1px solid var(--line); }
.cb-gtabs button { border: 0; background: none; padding: 10px 0; font: 600 15px var(--sans); color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; }
.cb-gtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sage); }
.cb-gbody { flex: 1; display: flex; min-height: 0; }
.cb-gcats { width: 210px; flex: none; padding: 18px 12px 18px 28px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; border-right: 1px solid var(--line-soft); }
.cb-gcats button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font: 500 14px var(--sans); color: var(--ink-2); cursor: pointer; }
.cb-gcats button[aria-pressed="true"] { background: var(--sage-mist); color: var(--sage-ink); font-weight: 700; }
.cb-gmain { flex: 1; overflow-y: auto; padding: 18px 28px 40px; }
.cb-preview-lesson { border: 1px solid var(--line); border-radius: var(--r); max-height: calc(60vh / var(--zf, 1)); overflow-y: auto; }
.cb-preview-lesson .cb-lhead { padding-top: 24px; } .cb-preview-lesson .cb-ltitle { font-size: 30px; }
.cb-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cb-type { border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r); padding: 14px; text-align: left; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font: inherit; }
.cb-type:hover, .cb-type[aria-pressed="true"] { border-color: var(--sage); background: var(--sage-mist); }
.cb-type .jb-ico { width: 22px; height: 22px; color: var(--sage-text); flex: none; margin-top: 2px; } .cb-type b { display: block; } .cb-type span { font-size: 13px; color: var(--ink-3); }
.cb-libgrp { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); margin: 14px 0 6px; }
.cb-pairs { display: flex; flex-direction: column; gap: 10px; } .cb-pair { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.cb-pair .cb-mini { position: absolute; right: 6px; top: 6px; }
.cb-choicerow { display: flex; gap: 8px; align-items: center; } .cb-choicerow input[type=text] { flex: 1; }
.cb-imgprev { max-width: 100%; max-height: 160px; border-radius: 8px; display: block; margin-top: 8px; }
@media (max-width: 900px) {
  .cb-outline { position: absolute; z-index: 4; top: 58px; bottom: 0; box-shadow: var(--shadow); } .cb-outline.collapsed { box-shadow: none; }
  .cb-gcats { display: none; } .cb-canvas { padding: 10px; } .cb-top .hide-sm { display: none; }
}
@media (max-width: 640px) {
  .cb-ltitle { font-size: 32px; } .cb-col { padding: 0 16px; } .cb-statement p { font-size: 24px; } .cb-types { grid-template-columns: 1fr; }
  .cb-ghead, .cb-gtabs, .cb-gmain { padding-left: 16px; padding-right: 16px; }
}

/* ---- in-place editing controls (builder only) */
.cb-x { border: 0; background: var(--card); color: var(--ink-4); width: 22px; height: 22px; border-radius: 50%; font: 600 15px/1 var(--sans); cursor: pointer; flex: none; opacity: 0; transition: opacity .15s; box-shadow: 0 0 0 1px var(--line); margin-left: 6px; vertical-align: middle; }
.cb-x:hover { color: var(--maroon-text); box-shadow: 0 0 0 1px var(--maroon-line); }
.cb-edit-mode :is(li, .cb-acc, .cb-card, .cb-pstep, .cb-choice, .cb-sortcard, .cb-pile, .cb-tabbar [role=tab], .cb-spotcard):hover > .cb-x,
.cb-edit-mode :is(li, .cb-acc-h, .cb-pnum, .cb-tabbar [role=tab]):hover .cb-x, .cb-edit-mode .cb-x:focus { opacity: 1; }
.cb-card.edit, .cb-sortcard.edit, .cb-pile { position: relative; }
.cb-card.edit > .cb-x, .cb-spotcard > .cb-x { position: absolute; top: 6px; right: 6px; margin: 0; }
.cb-pile > .cb-x { position: absolute; top: 6px; right: 6px; margin: 0; }
.cb-add { border: 1.5px dashed var(--line); background: none; color: var(--ink-3); border-radius: 8px; padding: 6px 12px; font: 600 13px var(--sans); cursor: pointer; margin-top: 10px; }
.cb-add:hover { border-color: var(--cb-accent); color: var(--cb-accent); }
.cb-add.inline { margin: 0 0 0 6px; padding: 4px 10px; align-self: center; }
.cb-addcard { height: auto; min-height: 140px; border: 1.5px dashed var(--line) !important; background: none !important; color: var(--ink-3); font: 600 14px var(--sans); border-radius: var(--r); }
.cb-addpile { border-style: dashed; color: var(--ink-3); font: 600 14px var(--sans); align-items: center; justify-content: center; background: none; }
.cb-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-4); background: var(--card); flex: none; cursor: pointer; padding: 0; }
.cb-choice.right .cb-radio { border-color: var(--sage); background: radial-gradient(var(--sage) 45%, var(--card) 50%); }
.cb-edit-mode .cb-choice { cursor: default; }
.cb-hint { font-size: 13px; color: var(--ink-4); margin: 8px 0 0; }
.cb-fbedit { display: flex; flex-direction: column; gap: 4px; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 10px; } .cb-fbedit p { margin: 0; }
.cb-pilesel { font: 500 12px var(--sans); border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; background: var(--chip-soft); color: var(--ink-3); }
.cb-sortcard.edit { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; cursor: default; }
.cb-vtitle { margin-top: 8px; font-weight: 600; color: var(--ink-3); }
.cb-media { position: relative; }
.cb-mediabar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; opacity: 0; transition: opacity .15s; z-index: 3; white-space: nowrap; }
.cb-mediabar .jb-btn { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); } .cb-mediabar .jb-btn.outline { background: var(--card); }
.cb-media:hover > .cb-mediabar, .cb-media:focus-within > .cb-mediabar, .cb-block.sel .cb-mediabar { opacity: 1; }
.cb-audio .jb-btn { flex: none; }
.cb-image-ph .jb-btn { margin-top: 6px; }
/* ---- sample picture label */
.cb-sample { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(27, 27, 27, .72); color: #fff; font: 600 12px var(--sans); padding: 4px 9px; border-radius: 6px; pointer-events: none; }
/* ---- gear panel: attached to the block, not a side panel */
.cb-pop { position: absolute; top: 26px; right: -14px; width: 320px; max-width: calc(100vw / var(--zf, 1) - 32px); z-index: 6; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(40, 30, 20, .2); padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; animation: lp-in .14s ease-out; font: 14px var(--sans); text-align: left; }
.cb-pop-h { display: flex; justify-content: space-between; align-items: center; } .cb-pop-h b { display: inline-flex; align-items: center; gap: 6px; } .cb-pop-h .jb-ico { width: 16px; height: 16px; }
.cb-pop-sec { display: flex; flex-direction: column; gap: 8px; } .cb-pop-t { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); }
.cb-pop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .cb-pop-row > span { color: var(--ink-3); }
.cb-pop .cb-seg button { padding: 4px 9px; font-size: 12px; }
.cb-pop .jb-field textarea { font: 13px/1.4 ui-monospace, Menlo, monospace; }
/* ---- block styles (gear → Format): learners see these too */
.cb-size-sm > .cb-wrap > .cb-inner, .cb-size-sm > .cb-inner { zoom: .88; }
.cb-size-lg > .cb-wrap > .cb-inner, .cb-size-lg > .cb-inner { zoom: 1.18; }
.cb-align-center .cb-inner { text-align: center; } .cb-align-center .cb-list { align-items: center; } .cb-align-center .cb-note { align-items: center; }
.cb-block:is(.cb-bg-tint, .cb-bg-accent, .cb-bg-dark) { margin: 10px -24px; padding: 30px 24px; }
.cb-bg-tint { background: var(--cb-tint); }
.cb-bg-accent { background: var(--cb-accent); color: #fff; } .cb-bg-dark { background: #1F1F1F; color: #F2F0EB; }
.cb-bg-accent :is(.cb-kicker, .cb-pnum, .cb-note b, .cb-acc-h > span, .cb-pile > b), .cb-bg-dark :is(.cb-kicker, .cb-pnum, .cb-note b, .cb-acc-h > span, .cb-pile > b) { color: inherit; }
.cb-bg-accent :is(.cb-note, .cb-check, .cb-response, .cb-process, .cb-accordion), .cb-bg-dark :is(.cb-note, .cb-check, .cb-response, .cb-process) { color: var(--ink); }
.cb-bg-accent .cb-list.bullets li::before { background: #fff; } .cb-bg-accent .cb-list.numbers li::before { background: #fff; color: var(--cb-accent); }
.cb-space-compact { padding-top: 2px !important; padding-bottom: 2px !important; } .cb-space-roomy { padding-top: 34px !important; padding-bottom: 34px !important; }
/* ---- full screen: the lesson as learners see it, edge to edge */
.cb-fullbar { display: none; }
.cb-app.full .cb-top, .cb-app.full .cb-outline { display: none; }
.cb-app.full .cb-canvas { padding: 0; background: var(--card); }
.cb-app.full .cb-stage { max-width: none; border-radius: 0; box-shadow: none; min-height: 100%; }
.cb-app.full .cb-stage.tablet { max-width: 768px; } .cb-app.full .cb-stage.phone { max-width: 390px; }
.cb-app.full .cb-lsettings { display: none; }
.cb-app.full .cb-fullbar { display: flex; position: fixed; top: 14px; right: 16px; z-index: 46; align-items: center; gap: 8px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 12px; box-shadow: var(--shadow); opacity: .5; transition: opacity .2s; }
.cb-app.full .cb-fullbar:hover, .cb-app.full .cb-fullbar:focus-within { opacity: 1; }
.cb-app.full .cb-fullbar .jb-btn { border-radius: 999px; }
/* ---- inline block library */
.cb-libinline { width: 100%; text-align: left; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.cb-libinline .cb-libgrp:first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .cb-pop, .cb-libinline { animation: none; } }
.cb-stage .cb-cover-img { border-radius: var(--r-lg) var(--r-lg) 0 0; } .cb-app.full .cb-stage .cb-cover-img { border-radius: 0; }

/* the quick-insert bar at the end stays pinned to the bottom of the screen while building (Rise-style) */
.cb-quick.end { position: sticky; bottom: 0; z-index: 4; padding: 26px 0 18px; margin-top: 8px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card) 34%); }
.cb-edit-mode :is(#blocks, [data-sid="blocks"]) { padding-bottom: 8px; }
.cb-app.full .cb-quick.end { bottom: 0; }
/* headings and lists inside formatted text */
:is(.cb-para, .cb-acc-b, .cb-tabpane, .cb-pstep) h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.2; margin: 0 0 .45em; color: var(--ink); }
:is(.cb-para, .cb-acc-b, .cb-tabpane, .cb-pstep) h4 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 .4em; }
:is(.cb-para, .cb-acc-b, .cb-tabpane, .cb-pstep) :is(ul, ol) { margin: .2em 0 .7em; padding-left: 1.3em; } :is(.cb-para, .cb-acc-b, .cb-tabpane, .cb-pstep) li { margin: .25em 0; }
.cb-para b, .cb-para strong { color: var(--ink); }
.cb-bg-accent .cb-para :is(h3, b, strong), .cb-bg-dark .cb-para :is(h3, b, strong) { color: inherit; }
/* one row whenever it fits: tighter buttons, and the bar may run a little wider than the text column */
.cb-qset button { min-width: 0; padding: 6px 7px; }
.cb-quick.end .cb-quick-row { width: min(900px, calc(100vw / var(--zf, 1) - 80px)); max-width: none; }
.cb-quick.end { display: flex; flex-direction: column; align-items: center; }

/* ---- formatting bar (one row above the selected block, word-processor style) */
.cb-edit-mode .cb-tools, .cb-fmt, .cb-pop { display: none !important; }
.cb-tb { display: none; position: absolute; left: -14px; right: -14px; bottom: calc(100% + 10px); z-index: 7; align-items: center; flex-wrap: wrap; gap: 2px; padding: 4px 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(40, 30, 20, .12); font: 500 13px var(--sans); color: var(--ink-2); text-align: left; }
.cb-block.sel > .cb-wrap > .cb-tb { display: flex; animation: lp-in .12s ease-out; }
.cb-tbl { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); padding: 0 6px; white-space: nowrap; }
.cb-tbd { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: none; }
.cb-tbgrow { flex: 1; }
.cb-tbb { border: 0; background: none; min-width: 30px; height: 30px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: 600 15px var(--serif); color: var(--ink-2); padding: 0 6px; }
.cb-tbb:hover { background: var(--chip-soft); } .cb-tbb[aria-pressed="true"] { background: var(--sage-tint); color: var(--sage-ink); }
.cb-tbb .jb-ico { width: 17px; height: 17px; }
.cb-tbs { border: 0; background: none; font: 500 13px var(--sans); color: var(--ink-2); height: 30px; padding: 0 4px; border-radius: 6px; cursor: pointer; max-width: 150px; }
.cb-tbs:hover, .cb-tbs:focus { background: var(--chip-soft); outline: none; }
.cb-tbi { border: 1px solid var(--line); border-radius: 6px; height: 28px; padding: 0 8px; font: 13px var(--sans); width: 120px; background: var(--paper); }
.cb-tbi.wide { width: 230px; } .cb-tbi[type=number] { width: 70px; }
.cb-tbsw { display: inline-flex; gap: 4px; padding: 0 4px; }
.cb-sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--sw); cursor: pointer; padding: 0; }
.cb-sw.none { background: linear-gradient(135deg, #fff 45%, var(--maroon) 46% 54%, #fff 55%); }
.cb-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sage); }
.cb-tbx { flex-basis: 100%; padding: 6px 4px 2px; } .cb-tbx label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-4); }
.cb-tbx textarea { font: 13px/1.4 ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
/* the block's name shows on hover, so it's clear what you're about to select */
.cb-hoverlbl { position: absolute; top: -8px; right: -14px; transform: translateY(-100%); font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); opacity: 0; pointer-events: none; }
.cb-edit-mode .cb-block:not(.sel):hover .cb-hoverlbl { opacity: 1; }
.cb-edit-mode .cb-block.sel > .cb-wrap::before { border: 1.5px solid var(--sage-soft); }
.cb-tb { left: -20px; right: -20px; }
@media (min-width: 1200px) { .cb-tb { left: -60px; right: -60px; } }
/* the builder looks exactly like the lesson: no outlines around blocks or text while editing.
   The formatting bar above a block is what shows it's selected. */
.cb-edit:hover, .cb-edit:focus { box-shadow: none !important; outline: none; }
.cb-edit-mode .cb-block > .cb-wrap::before, .cb-edit-mode .cb-block:hover > .cb-wrap::before, .cb-edit-mode .cb-block.sel > .cb-wrap::before { content: none !important; border: 0 !important; }
.cb-edit, .cb-edit * { caret-color: currentColor; }   /* the cursor is the text's own color: as visible as the words, on any card or background */
.cb-image img, .cb-hotspots img { height: auto; }

/* delete: two clicks — the trash can turns into a red "Confirm" first */
.cb-trash { gap: 5px; } .cb-trash-t { display: none; font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; }
.cb-trash:hover { color: var(--maroon-text); }
.cb-trash.armed { background: var(--maroon); color: var(--on-maroon); padding: 0 10px; animation: lp-in .12s ease-out; } .cb-trash.armed .cb-trash-t { display: inline; } .cb-trash.armed .jb-ico { stroke: #fff; }

/* Preview menu: from here, or from the beginning */
.cb-pvmenu { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px rgba(40, 30, 20, .18); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 270px; animation: lp-in .12s ease-out; }
.cb-pvmenu button { display: flex; align-items: flex-start; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: 14px var(--sans); color: var(--ink); }
.cb-pvmenu button:hover, .cb-pvmenu button:focus { background: var(--chip-soft); outline: none; }
.cb-pvmenu .jb-ico { width: 18px; height: 18px; margin-top: 1px; color: var(--sage-text); flex: none; } .cb-pvmenu .jb-ico.up { transform: rotate(90deg); }
.cb-pvmenu span { display: flex; flex-direction: column; gap: 1px; } .cb-pvmenu small { color: var(--ink-4); font-size: 12px; }

/* flashcards for learners: a stacked deck */
.cb-deck { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cb-stack { position: relative; width: min(440px, 100%); height: 230px; margin-bottom: 24px; }
.cb-stack .cb-card { position: absolute; inset: 0; height: auto; width: 100%; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .35s; transform-origin: 50% 100%; }
.cb-stack .cb-card .f, .cb-stack .cb-card .bk { font-size: 26px; box-shadow: 0 6px 18px rgba(40, 30, 20, .12); }
.cb-stack .cb-card .bk { font-size: 21px; }
.cb-decknav { display: flex; align-items: center; gap: 14px; } .cb-dcount { font: 600 14px var(--sans); color: var(--ink-3); min-width: 64px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .cb-stack .cb-card { transition: none; } }

/* accent color picker */
.cb-colorpick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-cp { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--c); cursor: pointer; padding: 0; position: relative; flex: none; }
.cb-cp[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.cb-cp.custom { background: conic-gradient(#e94b3c, #f5b041, #f7dc6f, #58d68d, #48c9b0, #5dade2, #a569bd, #ec7063, #e94b3c); overflow: hidden; }
.cb-cp.custom[aria-pressed="true"] { background: var(--c); }
.cb-cp.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.cb-hex { width: 104px; font: 600 14px ui-monospace, Menlo, monospace; text-transform: uppercase; }
.cb-cpprev { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.cb-cpbtn { background: var(--cb-accent); color: #fff; font: 600 14px var(--sans); padding: 7px 16px; border-radius: 8px; }
.cb-cpnote { background: var(--cb-tint); padding: 6px 10px; border-radius: 8px; font-size: 13px; } .cb-cpnote b { color: var(--cb-accent); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; }
.cb-cphead { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--cb-accent); }

/* class discussion: a tab on the right edge that slides out the conversation */
.dc-tab { position: fixed; right: 0; top: 42%; z-index: 49; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 9px; border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--card); box-shadow: -4px 4px 18px rgba(40, 30, 20, .12); cursor: pointer; color: var(--ink-2); font: 600 13px var(--sans); }
.dc-tab span { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; }
.dc-tab .jb-ico { width: 18px; height: 18px; color: var(--sage-text); } .dc-tab:hover { color: var(--ink); padding-right: 12px; }
.dc-n { background: var(--maroon); color: var(--on-maroon); border-radius: 999px; min-width: 20px; height: 20px; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.dc-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(410px, 100%); z-index: 49; background: var(--card); border-left: 1px solid var(--line); box-shadow: -10px 0 34px rgba(40, 30, 20, .14); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .9, .3, 1); height: calc(100vh / var(--zf, 1)); height: calc(100dvh / var(--zf, 1)); }
.dc-panel.open { transform: none; }
.dc-panel > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 14px 16px 0; border-bottom: 1px solid var(--line); }
.dc-tabs { display: flex; gap: 18px; }
.dc-tabs button { border: 0; background: none; padding: 8px 0 10px; font: 600 14px var(--sans); color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.dc-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sage); }
.dc-tabs span { font-weight: 500; color: var(--ink-4); margin-left: 3px; }
.dc-panel > header .jb-iconbtn { margin-bottom: 6px; }
.dc-class { display: flex; align-items: center; gap: 8px; padding: 10px 16px 0; font: 600 13px var(--sans); color: var(--ink-3); } .dc-class select { flex: 1; }
.dc-new { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.dc-new textarea { resize: vertical; min-height: 70px; }
.dc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .dc-where { font-size: 12px; color: var(--ink-4); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-list { flex: 1; overflow-y: auto; padding: 6px 8px 30px; }
.dc-c { padding: 12px 10px; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line-soft); }
.dc-c.go { cursor: pointer; } .dc-c.go:hover, .dc-c.go:focus { background: var(--chip-soft); outline: none; }
.dc-who { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dc-av { width: 28px; height: 28px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-ink); font: 700 11px var(--sans); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dc-av.staff { background: var(--maroon); color: var(--on-maroon); }
.dc-badge { font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--maroon-text); background: var(--maroon-wash); padding: 2px 6px; border-radius: 4px; }
.dc-when { font-size: 12px; color: var(--ink-4); } .dc-who .dc-when { margin-left: auto; }
.dc-text { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.dc-at { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); } .dc-at .jb-ico { width: 13px; height: 13px; color: var(--sage-text); flex: none; }
.dc-at i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-del.armed { background: var(--maroon); color: var(--on-maroon); } .dc-del.armed .jb-ico { stroke: #fff; }
.dc-empty { color: var(--ink-4); text-align: center; padding: 30px 16px; }
.cb-block.dc-flash { animation: dc-flash 2.2s ease-out; border-radius: 12px; }
@keyframes dc-flash { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-accent, #650B09) 35%, transparent), 0 0 0 9999px rgba(255, 255, 255, 0); background: color-mix(in srgb, var(--cb-accent, #650B09) 7%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; background: transparent; } }
@media print { .dc-tab, .dc-panel { display: none; } }

/* ---- the course player (students; the builder's Preview) */
.cp-app { position: fixed; inset: 0; z-index: 40; background: var(--card); display: flex; flex-direction: column; }
.cp-top { height: 54px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.cp-ctitle { font-family: var(--serif); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-grow { flex: 1; }
.cp { flex: 1; display: flex; min-height: 0; background: var(--card); }
.cp-side { width: 300px; flex: none; border-right: 1px solid var(--line); background: var(--paper); overflow-y: auto; transition: width .22s, opacity .2s; }
.cp.side-hidden .cp-side { width: 0; opacity: 0; border-right: 0; overflow: hidden; }
.cp-head { padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.cp-kick { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); }
.cp-title { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.cp-prog { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; } .cp-prog span { display: block; height: 100%; background: var(--cb-accent); border-radius: 3px; }
.cp-pct { font-size: 12px; color: var(--ink-3); }
.cp-nav { padding: 8px 10px 40px; }
.cp-uh { display: flex; justify-content: space-between; gap: 8px; padding: 14px 10px 6px; font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.cp-lock { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-4); }
.cp-l { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.cp-l:hover { background: var(--chip-soft); } .cp-l.cur { background: var(--cb-tint); font-weight: 600; }
.cp-l.locked { color: var(--ink-4); cursor: default; }
.cp-l .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; font: 700 11px var(--sans); color: #fff; }
.cp-l.done .cp-dot { background: var(--cb-accent); border-color: var(--cb-accent); } .cp-l.cur .cp-dot { border-color: var(--cb-accent); }
.cp-tag { font: 700 10px var(--sans); text-transform: uppercase; color: var(--ink-4); }
.cp-main { flex: 1; min-width: 0; overflow-y: auto; position: relative; background: var(--card); }
.cp-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-soft); }
.cp-btn { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.cp-btn:hover { background: var(--chip-soft); } .cp-btn .jb-ico { width: 20px; height: 20px; }
.cp-pos { font: 600 13px var(--sans); color: var(--ink-3); }
.cp-main .cb-lesson { background: var(--card); }
body.cp-fullscreen .cp-top, body.cp-fullscreen .cb-top { display: none; }
@media (max-width: 900px) { .cp-side { position: absolute; z-index: 5; top: 0; bottom: 0; box-shadow: var(--shadow); } .cp { position: relative; } }
/* the builder's Preview is the player, edge to edge under the builder's top bar */
.cb-app.previewing .cb-outline { display: none; }
.cb-app.previewing .cb-canvas { padding: 0; overflow: hidden; background: var(--page); }
.cb-app.previewing .cb-stage { max-width: none; border-radius: 0; box-shadow: none; height: 100%; min-height: 0; display: flex; }
.cb-app.previewing .cb-stage.tablet { max-width: 768px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.cb-app.previewing .cb-stage.phone { max-width: 390px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.cb-app.previewing .cb-stage > .cp { width: 100%; }
.cb-stage.phone .cp-side, .cb-stage.tablet .cp-side { position: absolute; z-index: 5; top: 0; bottom: 0; box-shadow: var(--shadow); }
.cb-stage.phone .cp, .cb-stage.tablet .cp { position: relative; }
/* on wide screens the lesson moves over while the discussion is open, so nothing is covered */
@media (min-width: 1100px) { body.dc-open :is(.cp-app, .cb-app) { right: min(410px, 100%); transition: right .22s; } }

/* All blocks: a panel that slides in from the left (the lesson stays in view) and scrolls on its own */
.cb-libpanel { position: absolute; top: 58px; left: 0; bottom: 0; width: min(390px, 92vw); z-index: 45; background: var(--card); border-right: 1px solid var(--line); box-shadow: 12px 0 34px rgba(40, 30, 20, .14); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .9, .3, 1); }
.cb-libpanel.open { transform: none; }
.cb-app.full .cb-libpanel { top: 0; }
.cb-libpanel > header { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.cb-libpanel > header b { font-family: var(--serif); font-size: 21px; } .cb-libpanel > header .jb-muted { flex: 1 1 100%; order: 3; font-size: 13px; }
.cb-libpanel > header .jb-iconbtn { margin-left: auto; }
.cb-libscroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 30px; }
.cb-libgrid { display: flex; flex-direction: column; gap: 6px; }
.cb-libpanel .cb-type { padding: 10px 12px; }
/* the AI block (builder only) */
.cb-aiblock { border: 1.5px dashed color-mix(in srgb, var(--cb-accent) 45%, var(--line)); border-radius: 14px; padding: 16px 18px; background: var(--ai-wash); display: flex; flex-direction: column; gap: 10px; }
.cb-aih { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cb-aih .jb-ico { color: var(--brand, var(--cb-accent)); width: 18px; height: 18px; } .cb-aih b { font-size: 16px; } .cb-aih .jb-muted { font-size: 13px; }
.cb-aiblock textarea { resize: vertical; font-size: 15px; }
.cb-aichips { display: flex; flex-wrap: wrap; gap: 6px; } .cb-aichips .jb-chip { border: 1px solid var(--line); cursor: pointer; background: var(--card); }
.cb-airow { display: flex; align-items: center; gap: 8px; } .cb-aistatus { flex: 1; font-size: 13px; color: var(--ink-3); }
.cb-aiblock.busy { animation: cb-aipulse 1.4s ease-in-out infinite; } .cb-aiblock.busy .cb-aistatus { color: var(--cb-accent); font-weight: 600; }
@keyframes cb-aipulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cb-accent) 12%, transparent); } }
@media (prefers-reduced-motion: reduce) { .cb-libpanel { transition: none; } .cb-aiblock.busy { animation: none; } }
/* the lesson fills the builder edge to edge (no margin, no card), just as it fills the screen for learners */
.cb-canvas { padding: 0; background: var(--card); }
.cb-stage { max-width: none; border-radius: 0; box-shadow: none; min-height: 100%; }

/* cover picture: preview in course settings; banner at the top of the student's course menu */
.cb-coverprev { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; background: var(--chip-soft); }
.cb-coverprev img { display: block; width: 100%; max-height: 190px; object-fit: cover; }
.cb-coverprev .jb-btn { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .92); }
.cp-cover { height: 120px; background: var(--cb-accent) center / cover no-repeat; }

/* course cards: a gear in the corner opens the course straight into its settings */
.cb-ccard-wrap { position: relative; display: flex; } .cb-ccard-wrap > .cb-ccard { flex: 1; }
.cb-cgear { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.cb-cgear:hover { background: #fff; color: var(--ink); } .cb-cgear .jb-ico { width: 18px; height: 18px; }
.cb-ccard-wrap .cb-ccover .mark { right: 54px; }

/* course list as rows */
.cb-rowsview { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cb-crow { display: grid; grid-template-columns: 44px minmax(180px, 2fr) auto minmax(110px, 1fr) minmax(140px, 1.6fr) minmax(90px, 1fr) 36px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.cb-crow:last-child { border-bottom: 0; } .cb-crow:hover { background: var(--chip-soft); }
.cb-crow-sw { width: 44px; height: 44px; border-radius: 10px; background: var(--cb-accent) center / cover; }
.cb-crow-name { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-width: 0; }
.cb-crow-name b { font-family: var(--serif); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cb-crow-name span { font-size: 13px; color: var(--ink-4); }
.cb-crow-m { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-crow-gear { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); } .cb-crow-gear:hover { background: var(--chip); color: var(--ink); }
.cb-crow-gear .jb-ico { width: 18px; height: 18px; }
.jb-page-head .cb-seg button { display: inline-flex; align-items: center; gap: 5px; } .jb-page-head .cb-seg .jb-ico { width: 15px; height: 15px; }
@media (max-width: 900px) { .cb-crow { grid-template-columns: 40px 1fr auto 36px; } .cb-crow > .cb-crow-m { display: none; } }

/* the cover keeps one shape everywhere it's large: a wide 16 × 5 banner (the preview crops the same way) */
.cb-coverprev img { aspect-ratio: 16 / 5; max-height: none; height: auto; }
/* always the full width of the page (a capped height used to shrink its width and push it to the left on wide screens);
   past the cap the picture crops evenly from its center */
.cb-cover-img { width: 100%; height: auto; aspect-ratio: 16 / 5; max-height: calc(42vh / var(--zf, 1)); background-position: center; }
.tone-warn { color: var(--amber-ink); }

/* picture cropper */
.crop-view { position: relative; width: 100%; overflow: hidden; border-radius: 10px; background: #1b1b1b; cursor: grab; touch-action: none; user-select: none; outline: none; }
.crop-view.dragging { cursor: grabbing; } .crop-view:focus-visible { box-shadow: 0 0 0 3px var(--sage-soft); }
.crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 33.333% 33.333%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); opacity: .7; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 12px; } .crop-zoom input { flex: 1; accent-color: var(--sage); } .crop-zoom .jb-ico { width: 18px; height: 18px; color: var(--ink-3); }
.cb-coveracts { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; } .cb-coveracts .jb-btn { position: static; background: rgba(255, 255, 255, .92); }

/* course card thumbnail: 16 × 9 when there's a picture */
.cb-ccover.pic { height: auto; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.cb-ccover.pic .mark { display: none; }
.cb-coverprev img { aspect-ratio: auto; width: 100%; height: 100%; object-fit: cover; }
.cb-picfield + .cb-picfield { margin-top: 14px; }
/* the banner at the top of the builder's outline (like the top of the student's course menu) */
.cb-olcover { height: 96px; margin: -12px -10px 6px; background: var(--cb-accent) center / cover no-repeat; }
.cb-outline.collapsed .cb-olcover { display: none; }
.crop-view { flex: none; margin: 0 auto; }

/* older step lessons shown inside the course player */
.cp-legacy { max-width: 880px; margin: 0 auto; padding: 28px 24px 60px; }

/* template preview (centered) */
.tp { display: flex; flex-direction: column; gap: 14px; }
.tp-hero { background: var(--cb-accent); color: #fff; border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.tp-kick { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.tp-name { font-family: var(--serif); font-size: 30px; line-height: 1.1; } .tp-hero p { margin: 0; opacity: .95; max-width: 60ch; }
.tp-size { font-size: 13px; font-weight: 600; opacity: .9; margin-top: 4px; }
.tp-h { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); margin-top: 4px; }
.tp-units { display: flex; flex-direction: column; gap: 12px; }
.tp-unit { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.tp-unit header { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; background: var(--chip-soft); border-bottom: 1px solid var(--line-soft); }
.tp-un { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); } .tp-unit header b { font-family: var(--serif); font-size: 19px; flex: 1; } .tp-count { font-size: 12px; color: var(--ink-4); }
.tp-unit ol { list-style: none; margin: 0; padding: 4px 8px; }
.tp-unit li { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; }
.tp-unit li + li { border-top: 1px solid var(--line-soft); }
.tp-no { font: 600 13px var(--sans); color: var(--ink-4); min-width: 28px; } .tp-unit li .jb-ico { width: 18px; height: 18px; color: var(--sage-text); flex: none; }
.tp-lt { flex: 1; font-weight: 600; min-width: 0; }
.tp-tag { font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 4px; background: var(--sage-tint); color: var(--sage-ink); } .tp-tag.quiz { background: var(--amber-tint); color: var(--amber-ink); }
.tp-blocks { font-size: 12px; color: var(--ink-4); min-width: 62px; text-align: right; }
.tp-namefield { margin-top: 6px; }
@media (max-width: 640px) { .tp-blocks { display: none; } }

/* every card's picture area has the same 16 × 9 shape, picture or not, so adding one never resizes the card */
.cb-ccover, .cb-ccover.pic { height: auto; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }

/* process steps slide inside their own track */
.cb-psteps { position: relative; }
.cb-pghost { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }

/* ---- box colors: the block's own card takes the color; other blocks get a soft box around their content.
   The page behind blocks always stays white. (Replaces the old full-width backgrounds.) */
.cb-block:is(.cb-bg-tint, .cb-bg-accent, .cb-bg-dark) { margin: 0; padding-left: 0; padding-right: 0; background: none; color: inherit; }
.cb-box-own :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download) { background: var(--cb-box); border-color: transparent; }
.cb-box-own .cb-statement { background: var(--cb-box); border-radius: 14px; padding: 26px 22px; }
.cb-box-wrap > .cb-wrap > .cb-inner, .cb-box-wrap > .cb-inner { background: var(--cb-box); border-radius: 14px; padding: 22px 26px; }
.cb-box-dark :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement), .cb-box-dark.cb-box-wrap .cb-inner { color: #F6F3EC; }
.cb-box-dark :is(.cb-kicker, .cb-pnum, .cb-note b, .cb-quote footer, .cb-heading, .cb-para b, .cb-para h3, .cb-acc-h > span, .cb-pile > b, .jb-muted) { color: inherit; opacity: .9; }
.cb-box-dark .cb-choice { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: inherit; }
.cb-box-dark .cb-response textarea { background: rgba(255, 255, 255, .92); }
.cb-box-dark .cb-list.bullets li::before { background: currentColor; } .cb-box-dark .cb-list.numbers li::before { background: #fff; color: #1F1F1F; }
/* swatches in the formatting bar */
.cb-sw.wheel { position: relative; overflow: hidden; background: conic-gradient(#e94b3c, #f5b041, #f7dc6f, #58d68d, #48c9b0, #5dade2, #a569bd, #ec7063, #e94b3c); }
.cb-sw.wheel.on { background: var(--sw); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sage); }
.cb-sw.wheel input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.cb-box-dark :is(h2, h3, h4, b, strong, i, em, .cb-ltitle, .cb-feedback) { color: inherit; }
.cb-box-dark .cb-pnav .jb-btn.outline { background: rgba(255, 255, 255, .9); }

/* blocks are white unless a box color is chosen (No box color = white) */
.cb-process, .cb-quote, .cb-note { background: #fff; }
.cb-note { border: 1px solid var(--line); }

/* course menu: its hide button sits on the menu itself; when hidden, a tab on the left edge brings it back */
.cp { position: relative; }
.cp-collapse { position: sticky; top: 10px; float: right; margin: 10px 10px -46px 0; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(6px); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(40, 30, 20, .1); }
.cp-collapse:hover { background: var(--card); color: var(--ink); } .cp-collapse .jb-ico { width: 18px; height: 18px; }
.cp-reopen { position: absolute; left: 0; top: 50%; transform: translate(-100%, -50%); z-index: 6; width: 30px; height: 64px; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; background: var(--card); color: var(--ink-2); box-shadow: 0 4px 14px rgba(40, 30, 20, .12); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .22s ease; }
.cp:not(.side-hidden) .cp-reopen { opacity: 0; pointer-events: none; }
.cp-reopen .jb-ico { width: 18px; height: 18px; transform: scaleX(-1); }
.cp-reopen:hover { color: var(--ink); width: 34px; }
.cp.side-hidden .cp-reopen { transform: translate(0, -50%); }

/* the course header bar (course title, the lesson's place, full screen) looks the same in Edit and Preview;
   the builder's top bar above it holds only editing tools */
.cp-btitle { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 50%; padding-left: 6px; }
.cp-btitle + .cp-pos:not(:empty)::before { content: '·'; margin: 0 8px 0 2px; color: var(--ink-4); }
.cp-bar { min-height: 52px; }
.cb-ebar { position: sticky; top: 0; z-index: 8; }
.cb-ttl .jb-ico { width: 18px; height: 18px; }
/* full screen: the Edit / Preview switch floats at the top center, clear of the bar's full-screen button */
.cb-app.full .cb-fullbar { left: 50%; right: auto; top: 8px; transform: translateX(-50%); padding: 4px 6px 4px 12px; }
/* full screen: the Edit / Preview switch sits inside the course header bar (one border, no floating pill) */
.cb-app.full .cb-fullbar { top: 0; height: 52px; transform: translateX(-50%); padding: 0; background: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; opacity: 1; }
.cb-app.full .cb-fullbar .cb-save { display: none; }

/* labeled graphic: a marker's note hovers over the marker in a small box with a pointer (editor and learners alike) */
.cb-spotcard { position: absolute; width: min(300px, 80%); transform: translate(-50%, calc(-100% - 28px)); z-index: 6; padding: 14px 16px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.cb-spotcard.below { transform: translate(-50%, 28px); }
.cb-spotcard.edge-l { transform: translate(-28px, calc(-100% - 28px)); } .cb-spotcard.edge-l.below { transform: translate(-28px, 28px); }
.cb-spotcard.edge-r { transform: translate(calc(-100% + 28px), calc(-100% - 28px)); } .cb-spotcard.edge-r.below { transform: translate(calc(-100% + 28px), 28px); }
.cb-spotcard::after { content: ''; position: absolute; left: 50%; width: 14px; height: 14px; background: var(--card); transform: translateX(-50%) rotate(45deg); }
.cb-spotcard.above::after { bottom: -8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cb-spotcard.below::after { top: -8px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cb-spotcard.edge-l::after { left: 28px; } .cb-spotcard.edge-r::after { left: calc(100% - 28px); }
.cb-spotcard > b { display: block; padding-right: 24px; }
.cb-hotspots .cb-spot { z-index: 4; } .cb-hotspots .cb-spot.on { z-index: 7; }
/* while a note is open, the picture's Choose/Upload/Link buttons step aside */
.cb-hotspots.spot-open > .cb-mediabar { display: none; }

/* the text bar: floats just above the text being typed (the block's bar stays at the top of the block) */
.cb-txtbar { position: fixed; z-index: 60; display: flex; align-items: center; gap: 2px; padding: 4px 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(40, 30, 20, .16); font: 500 13px var(--sans); color: var(--ink-2); }
.cb-txtbar[hidden], .cb-txtbar [hidden] { display: none; }

/* ---- questions: header (number, points), every question type, results */
.cb-qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.cb-qpts { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: var(--ink-3); background: var(--chip-soft, #F3F2EE); border-radius: 999px; padding: 3px 10px 3px 4px; }
.cb-qpts input { width: 56px; height: 26px; border: 1px solid var(--line); border-radius: 999px; text-align: center; font: 600 14px var(--sans); color: var(--ink); background: #fff; }
.cb-qpts input::placeholder { color: var(--ink-4); }
.cb-qptsv { font: 600 13px var(--sans); color: var(--ink-3); background: var(--chip-soft, #F3F2EE); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.cb-qhint { margin: -4px 0 0; font-size: 14px; color: var(--ink-3); }
.cb-radio.sq { border-radius: 5px; }
.cb-choice.right .cb-radio.sq { background: var(--sage); box-shadow: inset 0 0 0 3px var(--card); }
.cb-keybox { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--paper); }
.cb-keybox > b, .cb-keybox label > b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.cb-keybox p { margin: 0; font-size: 17px; }
.cb-keybox .cb-hint { margin: 0; }
.cb-numkey { flex-direction: row; flex-wrap: wrap; gap: 18px; }
.cb-numkey label { display: flex; flex-direction: column; gap: 4px; min-width: 110px; font-size: 17px; }
.cb-numrow { display: flex; align-items: center; gap: 10px; } .cb-numrow .cb-qin { max-width: 220px; }
.cb-qin { font-size: 17px; max-width: 520px; }
.cb-fill { font-size: 18px; line-height: 2.3; margin: 0; }
.cb-blank { display: inline-block; width: 9em; height: 34px; margin: 0 4px; padding: 0 10px; border: 0; border-bottom: 2px solid var(--cb-accent); border-radius: 6px 6px 0 0; background: var(--cb-tint); font: inherit; font-size: 17px; color: var(--ink); vertical-align: baseline; }
.cb-blank:focus { outline: 2px solid var(--cb-accent); outline-offset: 2px; }
.cb-pairs { display: flex; flex-direction: column; gap: 8px; }
.cb-pair { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 17px; position: relative; }
.cb-pair.learn { grid-template-columns: 1fr minmax(160px, 1fr); }
.cb-pair.learn select { font-size: 16px; }
.cb-pairarrow { color: var(--ink-4); font-weight: 700; }
.cb-edit-mode .cb-pair:hover > .cb-x { opacity: 1; }
.cb-order { margin: 0; padding: 0; list-style: none; counter-reset: ord; display: flex; flex-direction: column; gap: 8px; }
.cb-order li { counter-increment: ord; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 17px; background: var(--card); position: relative; }
.cb-order li::before { content: counter(ord); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--cb-tint); color: var(--cb-accent); font: 700 13px var(--sans); }
.cb-order li > [data-nolabel], .cb-order li > .cb-edit { flex: 1; }
.cb-omove { display: inline-flex; gap: 2px; }
.cb-order.done .cb-omove { display: none; }
.cb-edit-mode .cb-order li:hover > .cb-x { opacity: 1; }
.cb-qresult { padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; }
.cb-qresult.right { background: var(--sage-mist, #EEF2EC); color: var(--sage-text); }
.cb-qresult.wrong { background: var(--maroon-wash, #F6ECEC); color: var(--maroon-text); }
.cb-qresult.part { background: var(--amber-tint); color: var(--amber-ink, #6B4A00); }
.cb-qresult.manual { background: var(--paper); border: 1px dashed var(--line); color: var(--ink-3); }
.cb-quick.quiz .cb-qset { flex-wrap: wrap; }
/* learners: what the quiz is, the start gate for timed ones, the countdown */
.cb-quizinfo { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.cb-quizinfo span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--cb-tint); color: var(--ink-2); font: 600 13px var(--sans); }
.cb-quizinfo .jb-ico { width: 15px; height: 15px; }
.cb-qstart { text-align: center; padding: 34px 26px; border: 1.5px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cb-qstart b { font-family: var(--serif); font-size: 21px; } .cb-qstart p { margin: 0 0 8px; color: var(--ink-3); max-width: 46ch; }
.cb-qtimer { position: sticky; top: 12px; z-index: 5; margin: 0 0 16px; width: max-content; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font: 600 14px var(--sans); color: var(--ink-2); }
.cb-qtimer b { font-variant-numeric: tabular-nums; font-size: 16px; color: var(--ink); }
.cb-qtimer.low { border-color: var(--maroon); color: var(--maroon-text); } .cb-qtimer.low b { color: var(--maroon-text); }
.cb-qtimer .jb-ico { width: 16px; height: 16px; }
/* quiz / test settings */
.cb-qsettings section { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.cb-qsettings section:last-child { border: 0; margin: 0; padding-bottom: 0; }
.cb-qsettings h4 { margin: 0 0 12px; font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cb-qrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cb-qrow .jb-field { margin: 0; }
.cb-qnote { margin: 10px 0 14px; font-size: 13px; color: var(--ink-3); background: var(--paper); border-radius: var(--r-sm); }
.cb-qset-chk { align-items: flex-start; margin: 0 0 12px; }
.cb-qset-chk span { display: flex; flex-direction: column; gap: 2px; }
.cb-qset-chk small { color: var(--ink-4); font-size: 12.5px; }
.cb-qsettings .jb-field small { display: block; margin-top: 4px; font-size: 12.5px; }
.cb-qsettings [hidden] { display: none !important; }
.cb-qsettings-foot { text-align: left; }
/* grading attempts */
.cb-attempts { display: flex; flex-direction: column; gap: 10px; }
.cb-attempt { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.cb-attempt summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.cb-attempt summary::-webkit-details-marker { display: none; }
.cb-attscore { margin-left: auto; }
.cb-attq { margin: 0; padding: 4px 16px 8px 36px; display: flex; flex-direction: column; gap: 14px; }
.cb-attqh { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.cb-attpts { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.cb-attpts input { width: 64px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 8px; font: 600 14px var(--sans); }
.cb-attans { margin-top: 6px; padding: 8px 12px; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--line); white-space: pre-wrap; }
.cb-attans.right { border-left-color: var(--sage); } .cb-attans.wrong { border-left-color: var(--maroon); } .cb-attans.part { border-left-color: var(--accent); }
.cb-attans.essay { border-left-color: var(--ink-4); }
.cb-attguide { margin: 6px 0; font-size: 13px; color: var(--ink-3); }
.cb-attfoot { display: flex; justify-content: flex-end; padding: 0 16px 14px; }
@media (max-width: 640px) { .cb-qrow { grid-template-columns: 1fr; } .cb-pair { grid-template-columns: 1fr; } .cb-pairarrow { display: none; } }

/* quiz discussions that are private with the teacher */
.dc-private { display: flex; gap: 8px; align-items: flex-start; margin: 0 16px 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-tint); color: var(--amber-ink, #6B4A00); font-size: 13px; line-height: 1.4; }
.dc-private .jb-ico { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.dc-replying { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; color: var(--ink-3); }
.dc-replying .cb-mini { margin-left: auto; }
.dc-privtag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--amber-ink, #6B4A00); }
.dc-privtag .jb-ico { width: 13px; height: 13px; }
.dc-reply { margin-top: 4px; }

/* ---- assignments: what's handed out with one (web/js/assignment-kit.js) ---- */
.as-ed .re-pop:has([data-open="pic"]), .as-ed [data-attach], .as-ed .re-pop:has(.re-design), .as-ed [data-font], .as-ed [data-size] { display: none; }
.as-ed .re-doc { min-height: 140px; }
.jb-sheet.jb-drawer.as-sheet { width: min(780px, 100%); }
/* the editor's own toolbar controls, not form fields (.jb-field select would stretch them) */
.as-ed .re-bar select.re-sel { width: auto; min-height: 32px; height: 32px; padding: 0 22px 0 6px; border: 1px solid transparent; background-color: transparent; font-size: 13px; }
.as-ed .re-menu input { width: auto; min-height: 0; }
.as-ed .re-menu input[type=url], .as-ed .re-menu input[type=text], .as-ed .re-menu .jb-input { width: 100%; min-height: 36px; }
.as-pn .as-ed .re-doc { min-height: 90px; }
.as-pn > span .jb-ico { width: 16px; height: 16px; color: var(--sage-text); vertical-align: -3px; margin-right: 2px; }
.ak-ed { display: flex; flex-direction: column; gap: 10px; }
.ak-list { display: flex; flex-direction: column; gap: 8px; }
.ak-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card, #fff); min-width: 0; }
.ak-item.is-pending { opacity: .65; }
.ak-ico { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sage-mist); color: var(--sage-text); }
.ak-ico .jb-ico { width: 18px; height: 18px; }
.ak-ico.t-video { background: #FBEAEA; color: #A03030; }
.ak-ico.t-form { background: #EEF0FA; color: var(--indigo, #3D3B8E); }
.ak-ico.t-link { background: #EAF2F8; color: #2F4A6B; }
.ak-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ak-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-main small { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-ed input.ak-title { border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; padding: 2px 0; min-width: 0; min-height: 0; width: 100%; }
.ak-ed input.ak-title:focus { outline: none; border-bottom-color: var(--ink-3); }
.ak-move { display: inline-flex; gap: 2px; }
.ak-move button, .ak-x { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.ak-move button:hover:not(:disabled), .ak-x:hover { background: var(--sage-mist); color: var(--ink); }
.ak-move button:disabled { opacity: .3; cursor: default; }
.ak-move .jb-ico, .ak-x .jb-ico { width: 16px; height: 16px; }
.ak-none { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); color: var(--ink-3); font-size: 14px; }
.ak-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--sage-line); background: var(--sage-mist); border-radius: var(--r-sm); }
.ak-add [data-url] { flex: 2 1 240px; }
.ak-add [data-name] { flex: 1 1 150px; }
.ak-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.as-rich { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.as-rich > :first-child { margin-top: 0; }
.as-rich > :last-child { margin-bottom: 0; }
.as-rich img { max-width: 100%; height: auto; }
.as-forparents { background: var(--sage-mist); border-color: var(--sage-line); }
.as-fphead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.as-fphead > .jb-ico { width: 18px; height: 18px; color: var(--sage-text); }
.as-ask textarea { width: 100%; }
@media (max-width: 560px) { .ak-move { display: none; } .ak-main b, .ak-main small { white-space: normal; overflow-wrap: anywhere; } .ak-item { gap: 10px; padding: 10px; } }
.as-ed { border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; overflow: visible; }
.as-ed .re-bar { border-bottom: 1px solid var(--line); padding: 4px 6px; }
.as-ed .re-page { padding: 0; background: transparent; }
.as-ed .re-doc { padding: 12px 14px; }
.as-ed:focus-within { border-color: var(--ink-3); }
@media (min-width: 720px) { .as-sheet .jb-form { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ak-addform .ak-formpick { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ---- online questions on an assignment (web/js/question-editor.js; students: pages/learning.js) ---- */
.qe { display: flex; flex-direction: column; gap: 12px; }
.qe-list { display: flex; flex-direction: column; gap: 12px; }
.qe-q { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card, #fff); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.qe-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qe-num { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--indigo, #3D3B8E); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.qe-kind { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.qe .qe-pts { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.qe .qe-pts input { width: 64px; min-height: 32px; height: 32px; padding: 4px 8px; font-size: 14px; }
.qe-tools { display: inline-flex; gap: 2px; }
.qe-tools button, .qe-x { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.qe-tools button:hover:not(:disabled), .qe-x:hover:not(:disabled) { background: var(--sage-mist); color: var(--ink); }
.qe-tools button:disabled, .qe-x:disabled { opacity: .3; cursor: default; }
.qe-tools .jb-ico, .qe-x .jb-ico { width: 16px; height: 16px; }
.qe .jb-input { min-height: 38px; padding: 7px 10px; font-size: 15px; width: 100%; }
.qe textarea.jb-input { min-height: 0; resize: vertical; }
.qe-choices { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qe-choice { display: flex; align-items: center; gap: 8px; width: 100%; }
.qe-choice .jb-input { flex: 1 1 auto; }
.qe .qe-right input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--sage-text); }
.qe-n { width: 22px; color: var(--ink-3); font-size: 13px; text-align: right; }
.qe-pair > span { color: var(--ink-3); }
.qe-tf { display: flex; gap: 18px; }
.qe-tf label { display: inline-flex; align-items: center; gap: 6px; }
.qe .qe-tf input { width: auto; min-height: 0; }
.qe-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.qe-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qe-row3 .qe-wide { grid-column: span 2; }
.qe-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.qe .qe-inline select { width: auto; min-height: 34px; padding: 4px 28px 4px 8px; font-size: 14px; }
.qe-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sage-mist); border: 1px solid var(--sage-line); }
.qe-none { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); color: var(--ink-3); font-size: 14px; }
.qe-add { display: flex; gap: 8px; align-items: center; }
.qe .qe-add select { width: auto; min-width: 220px; }
.qe-review { float: right; margin-top: -4px; }
.as-qhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.as-qblocks { background: transparent; padding: 0; }
.as-qblocks .cb-block { margin: 0 0 14px; }
.as-qfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.qr { display: flex; flex-direction: column; gap: 8px; }
.qr-st { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card, #fff); }
.qr-st > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.qr-st > summary::-webkit-details-marker { display: none; }
.qr-sum { display: inline-flex; align-items: center; gap: 8px; }
.qr-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.qr-q { border-left: 3px solid var(--line); padding: 6px 0 6px 12px; }
.qr-q.right { border-left-color: #3E7B4F; } .qr-q.wrong { border-left-color: #B3443C; } .qr-q.part { border-left-color: #B7791F; } .qr-q.manual { border-left-color: var(--indigo, #3D3B8E); }
.qr-qhead { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.qr-pts { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.qr-pts input { width: 56px; min-height: 30px; padding: 2px 6px; border: 1px solid #D5CFC2; border-radius: 6px; }
.qr-ans { margin: 4px 0 0; white-space: pre-wrap; }
.qr-key { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.qr-grade { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.qr-grade .jb-field { flex: 1 1 260px; margin: 0; }
@media (max-width: 560px) { .qe-row3 { grid-template-columns: 1fr; } .qe-row3 .qe-wide { grid-column: auto; } .qe .qe-add select { min-width: 0; flex: 1 1 auto; } }
/* a picture on a question: editor, student view, teacher review */
.qe-pic { margin: 0; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.qe-pic img { max-width: 220px; max-height: 160px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; background: #fafafa; }
.qe-pic figcaption { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.qe-addpic { padding-left: 0; }
.as-qpic { margin: 10px 0 12px; }
.as-qpic img { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; background: #fafafa; }
.qr-pic { margin: 6px 0 0; }
.qr-pic img { max-width: 200px; max-height: 140px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; }

/* ===================== one assignment, as students and parents see it (web/js/assignment-view.js) ===================== */
.av { --av-ok: #2E7D4F; --av-ok-tint: #E3F2E8; --av-due: #B3443C; --av-due-tint: #FBEAE8; --av-soon: var(--amber-ink); --av-soon-tint: var(--amber-tint);
  max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.av-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; color: var(--maroon); width: fit-content; }
.av-back .jb-ico { width: 16px; height: 16px; }
.av-prevbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: var(--accent-tint); color: var(--amber); font-size: 14px; }
.av-prevbar .jb-ico { width: 18px; height: 18px; flex: 0 0 auto; }
/* header */
.av-hero { display: flex; gap: 20px; align-items: stretch; justify-content: space-between; flex-wrap: wrap; padding: 24px 26px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--maroon-wash) 0%, #fff 70%); border: 1px solid var(--maroon-line); }
.av-hero-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.av-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.av-class { padding: 4px 10px; border-radius: 999px; background: var(--maroon); color: var(--on-maroon); letter-spacing: .02em; text-transform: none; font-size: 13px; }
.av-title { margin: 0; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; font-weight: 750; color: var(--ink); overflow-wrap: anywhere; }
.av-meta { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.av-teacher { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.av-av { width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: var(--on-sage); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.av-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.av-chip .jb-ico { width: 15px; height: 15px; }
.av-chip.soon { background: var(--av-soon-tint); border-color: transparent; color: var(--av-soon); }
.av-chip.due { background: var(--av-due-tint); border-color: transparent; color: var(--av-due); }
.av-status { flex: 0 0 auto; align-self: center; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); min-width: 210px; }
.av-status b { display: block; font-size: 16px; }
.av-status small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.av-sico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chip-soft); color: var(--ink-3); flex: 0 0 auto; }
.av-sico .jb-ico { width: 20px; height: 20px; }
.av-status.tone-ok .av-sico { background: var(--av-ok-tint); color: var(--av-ok); }
.av-status.tone-warn .av-sico { background: var(--av-soon-tint); color: var(--av-soon); }
.av-status.tone-due .av-sico { background: var(--av-due-tint); color: var(--av-due); }
.av-status .av-ring { width: 56px; height: 56px; }
/* steps */
.av-steps { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.av-steps::-webkit-scrollbar { display: none; }
.av-step { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: border-color .15s, background .15s, transform .15s; }
.av-step:hover { border-color: var(--maroon-line); background: var(--maroon-wash); transform: translateY(-1px); }
.av-stepn { width: 24px; height: 24px; border-radius: 50%; background: var(--maroon-tint); color: var(--maroon); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.av-tick { display: none; width: 24px; height: 24px; border-radius: 50%; background: var(--av-ok); color: #fff; place-items: center; margin-left: auto; }
.av-tick .jb-ico { width: 14px; height: 14px; }
.av-step.done { border-color: #BFE0CA; background: var(--av-ok-tint); color: var(--av-ok); }
.av-step.done .av-stepn { background: #fff; color: var(--av-ok); }
.av-step.done .av-tick { display: grid; }
/* columns and cards */
.av-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.av-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.av-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(88px / var(--zf, 1)); }
.av-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.av-shead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.av-num { width: 28px; height: 28px; border-radius: 50%; background: var(--maroon); color: var(--on-maroon); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.av-num.pn { background: var(--sage); }
.av-num .jb-ico { width: 15px; height: 15px; }
.av-h2 { margin: 0; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.av-h2 .jb-ico { width: 18px; height: 18px; color: var(--maroon); }
.av-sub { color: var(--ink-3); font-size: 14px; margin-left: auto; }
.av-rich { font-size: 17px; line-height: 1.7; }
.av-rich ol, .av-rich ul { padding-left: 1.4em; }
.av-rich li { margin: 4px 0; }
.av-parents { background: var(--sage-mist); border-color: var(--sage-line); box-shadow: none; }
.av-empty { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.av-empty .jb-ico { width: 22px; height: 22px; }
.av-empty p { margin: 0; }
.av-note { display: flex; align-items: center; gap: 8px; color: var(--ink-3); margin: 0; }
.av-note .jb-ico { width: 16px; height: 16px; }
/* materials as tiles */
.av-mats .ak-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.av-mats .ak-item { position: relative; padding: 14px; border-radius: var(--r); transition: border-color .15s, box-shadow .15s, transform .15s; }
.av-mats .ak-item:hover { border-color: var(--maroon-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.av-mats .ak-item.opened::after { content: '✓'; position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; background: var(--av-ok); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.av-mats .ak-ico { width: 42px; height: 42px; border-radius: 12px; }
/* questions */
.av-qnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.av-dot { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink-3); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s; }
.av-dot:hover { border-color: var(--maroon); color: var(--maroon); }
.av-dot.on { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon); }
.av-qbar { height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; margin-bottom: 16px; }
.av-qbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--maroon), var(--av-ok)); border-radius: inherit; transition: width .3s ease; }
.av-qblocks .cb-block { padding: 0; margin: 0 0 14px; }
.av-qblocks .cb-check { border-radius: var(--r); transition: box-shadow .2s, border-color .2s; }
.av-qblocks .cb-check:focus-within { box-shadow: 0 0 0 3px var(--maroon-tint); }
.av-nudge { animation: av-nudge 1.4s ease; }
@keyframes av-nudge { 0%, 100% { box-shadow: none; } 20%, 60% { box-shadow: 0 0 0 4px var(--accent); } }
.av-turnbar { position: sticky; bottom: 12px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; padding: 12px 14px 12px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--maroon-line); box-shadow: 0 10px 30px rgba(40, 30, 80, .14); }
.av-turninfo b { display: block; font-size: 15px; }
.av-turninfo small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.av-turnbtn { min-height: 48px; padding: 0 22px; font-size: 16px; }
.av-result { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r); background: var(--av-ok-tint); }
.av-result b { display: block; font-size: 22px; }
.av-result span { color: var(--ink-2); font-size: 14px; }
.av-result.wait { background: var(--maroon-wash); }
.av-result.wait > .jb-ico { width: 28px; height: 28px; color: var(--maroon); }
.av-ring { width: 72px; height: 72px; transform: rotate(-90deg); flex: 0 0 auto; }
.av-ring circle { fill: none; stroke-width: 8; }
.av-ring .bg { stroke: rgba(0, 0, 0, .08); }
.av-ring .fg { stroke: var(--av-ok); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.av-ring text { transform: rotate(90deg); transform-origin: 40px 40px; font-size: 17px; font-weight: 800; fill: var(--ink); }
.av-confirm p { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.av-confirm .jb-ico { width: 18px; height: 18px; color: var(--maroon); flex: 0 0 auto; margin-top: 2px; }
/* turning in a file */
.av-turnform { display: flex; flex-direction: column; gap: 14px; }
.av-filed { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--av-ok-tint); }
.av-filed .jb-ico { width: 16px; height: 16px; }
.av-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed var(--maroon-line); border-radius: var(--r); background: var(--maroon-wash); cursor: pointer; transition: border-color .15s, background .15s; }
.av-drop:hover, .av-drop.has { border-color: var(--maroon); background: #fff; }
.av-drop > .jb-ico { width: 28px; height: 28px; color: var(--maroon); transform: rotate(180deg); }
.av-drop b { display: block; }
.av-drop small { color: var(--ink-3); }
.av-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.av-turnrow { display: flex; gap: 10px; flex-wrap: wrap; }
/* side: progress, feedback */
.av-progress .av-h2 { margin-bottom: 12px; }
.av-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.av-checklist li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; }
.av-cbox { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: 0 0 auto; transition: all .2s; }
.av-cbox .jb-ico { width: 13px; height: 13px; }
.av-checklist li.done { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.av-checklist li.done .av-cbox { background: var(--av-ok); border-color: var(--av-ok); color: #fff; }
.av-feedback { margin-top: 14px; padding: 12px; border-radius: var(--r-sm); background: var(--maroon-wash); }
.av-feedback b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.av-feedback b .jb-ico { width: 14px; height: 14px; }
.av-feedback p { margin: 6px 0 0; }
.av-askph p { margin: 8px 0 0; }
/* the teacher's Preview: Student / Parent */
.av-prevtabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--chip); margin: 0 auto 14px; gap: 2px; }
.av-prevtabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.av-prevtabs button .jb-ico { width: 16px; height: 16px; }
.av-prevtabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .av-cols { grid-template-columns: 1fr; }
  .av-side { position: static; }
}
@media (max-width: 560px) {
  .av-hero { padding: 18px; }
  .av-status { width: 100%; }
  .av-card { padding: 18px 16px; }
  .av-step { flex: 0 0 auto; padding: 8px 12px; }
  .av-turnbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .av-turnbar { flex-wrap: nowrap; padding: 10px 10px 10px 14px; gap: 10px; }
  .av-turnbtn { min-height: 44px; padding: 0 14px; font-size: 15px; flex: 0 0 auto; }
  .av-turninfo b { font-size: 14px; } .av-turninfo small { font-size: 12px; }
  .av-hide-sm { display: none; }
  .av-turninfo { min-width: 0; }
  .av-mats .ak-list { grid-template-columns: 1fr; }
}
.jb-full #av-prev { padding: 0 22px 24px; }
/* the full-screen sheet's body doesn't scroll (app.css .jb-full .body): the preview brings its own scroll area */
.jb-sheet.jb-full .body > .av-prevscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 14px; display: flex; flex-direction: column; }
.av-prevscroll .av-prevtabs { flex: 0 0 auto; }
.av-prevscroll .av-turnbar { bottom: 12px; }
.jb-full:has(#av-prev) .jb-sheet-body, .jb-full:has(#av-prev) > div:not(header):not(footer) { text-align: left; }
.av-prevtabs { display: flex; width: fit-content; }
.av-mats .ak-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.av-mats .ak-main b, .av-mats .ak-main small { white-space: normal; overflow-wrap: anywhere; }
/* never wider than the page: the step strip scrolls sideways instead of stretching the page on phones */
.av { min-width: 0; width: 100%; }
.av > *, .av-cols > *, .av-hero > * { min-width: 0; }
.qe-any { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.qe .qe-any input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--maroon); }
.qe-any .jb-muted { font-weight: 400; }
/* "Any answer counts" in the course builder (blocks.js ANY) */
.cb-anybox { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.cb-anybox input { width: 18px; height: 18px; margin: 0; accent-color: var(--maroon); }
.cb-anybox span { color: var(--ink-3); }

/* ---- parents: Classes (web/js/pages/learning.js classesPage / classOverview) ---- */
.pcl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.pcl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.pcl-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: hsl(var(--h) 45% 52%); }
.pcl-card:hover { border-color: hsl(var(--h) 35% 70%); box-shadow: 0 6px 18px rgba(20, 20, 30, .07); transform: translateY(-1px); }
.pcl-top { display: flex; align-items: flex-start; gap: 12px; }
.pcl-tile { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: hsl(var(--h) 55% 94%); color: hsl(var(--h) 45% 30%); }
.pcl-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcl-course { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.pcl-course:hover { text-decoration: underline; }
.pcl-sec { color: var(--ink-3); font-size: 13px; }
.pcl-grade { flex: none; }
.pcl-when { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 13.5px; align-items: center; }
.pcl-when > span { display: inline-flex; align-items: center; gap: 5px; }
.pcl-when .jb-ico { width: 15px; height: 15px; color: var(--ink-3); }
.pcl-today { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--sage-tint); color: var(--sage-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.pcl-teachers { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pcl-t { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.pcl-t .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--chip-soft); color: var(--ink-2); font-size: 11px; font-weight: 700; flex: none; }
.pcl-t small { color: var(--ink-3); font-weight: 500; }
.pcl-work { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; min-height: 22px; }
.pcl-work a { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pcl-work a:hover { text-decoration: underline; }
.pcl-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.pcl-foot .jb-btn { display: inline-flex; align-items: center; gap: 6px; }
/* the week */
.pcl-week { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.pcl-day { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; }
.pcl-day.is-today { background: var(--chip-soft); }
.pcl-day h3 { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pcl-day.is-today h3 { color: var(--ink); }
.pcl-slot { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: hsl(var(--h) 55% 96%); border-left: 4px solid hsl(var(--h) 45% 55%); color: var(--ink); text-decoration: none; font-size: 13px; min-width: 0; }
.pcl-slot b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcl-slot .jb-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pcl-slot-t { font-size: 12px; font-weight: 600; color: hsl(var(--h) 40% 32%); }
.pcl-slot:hover { background: hsl(var(--h) 55% 92%); }
.pcl-slot.now { box-shadow: 0 0 0 2px hsl(var(--h) 45% 55%); }
/* one class */
.pcl-person { padding: 8px 0 4px; }
.pcl-pacts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px 50px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.pcl-pacts:last-of-type { border-bottom: 0; }
.pcl-conf { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.pcl-dl { margin: 0 0 10px; display: grid; gap: 8px; }
.pcl-dl > div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: baseline; }
.pcl-dl dt { color: var(--ink-3); font-size: 13px; }
.pcl-dl dd { margin: 0; font-weight: 600; }
@media (max-width: 720px) {
  .pcl-grid { grid-template-columns: 1fr; }
  .pcl-week { grid-template-columns: 1fr; gap: 4px; }
  .pcl-day { padding: 8px 6px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pcl-tile, :root:not([data-theme="light"]) .pcl-slot { background: hsl(var(--h) 25% 22%); color: hsl(var(--h) 50% 85%); }
  :root:not([data-theme="light"]) .pcl-slot-t { color: hsl(var(--h) 50% 75%); }
}
:root[data-theme="dark"] .pcl-tile, :root[data-theme="dark"] .pcl-slot { background: hsl(var(--h) 25% 22%); color: hsl(var(--h) 50% 85%); }
:root[data-theme="dark"] .pcl-slot-t { color: hsl(var(--h) 50% 75%); }
.pcl-over a.jb-item { text-decoration: none; color: inherit; }
.pcl-over a.jb-item .t { color: var(--ink); }
.pcl-over a.jb-item:hover .t { text-decoration: underline; }

/* C360 parity: quiz instruction labels, one-at-a-time "Next question", upload buttons on media blocks, "Upload your work" */
.cb-qlabel { margin: -4px 0 0; font-size: 13px; color: var(--ink-3, #6b7280); font-style: italic; }
.cb-qnext { align-self: flex-start; margin-top: 4px; }
.cb-upbtn { cursor: pointer; }
.cb-upload .cb-checkfoot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cb-upload .cb-checkfoot label.jb-btn { cursor: pointer; }
.cb-upload [data-upstatus] a { font-weight: 600; }
.cb-embed iframe { width: 100%; height: var(--cb-embed-h, 560px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.cb-qtypes { margin: 4px 0 2px; } .cb-qtypes summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.cb-qrow4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 6px; }
@media (max-width: 520px) { .cb-qrow4 { grid-template-columns: 1fr; } }

/* ---- Form fields block (fillable worksheets made native; RPGM's MCT PDFs) */
.cb-form .q { font-family: var(--serif); font-size: 21px; margin: 0; }
.cb-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.cb-ffield { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cb-ffield.wide { grid-column: 1 / -1; }
.cb-flabel { font: 600 14px/1.35 var(--sans); color: var(--ink-2); }
.cb-ffield .jb-input { width: 100%; }
.cb-ffield textarea.jb-input { resize: vertical; min-height: 88px; line-height: 1.5; }
.cb-fedit { display: flex; align-items: center; gap: 8px; }
.cb-fedit b { flex: 1; min-width: 0; font: 600 14px var(--sans); }
.cb-fcheck { display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--sans); cursor: pointer; }
.cb-fcheck input { width: 18px; height: 18px; accent-color: var(--cb-accent); }
.cb-fscale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; max-width: 520px; }
.cb-fscale label { position: relative; cursor: pointer; }
.cb-fscale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cb-fscale span { display: grid; place-items: center; height: 36px; border: 1px solid var(--line); border-radius: 8px; font: 600 14px var(--sans); color: var(--ink-2); background: var(--card); transition: background .12s, border-color .12s; }
.cb-fscale label:hover span { border-color: var(--cb-accent); }
.cb-fscale input:checked + span { background: var(--cb-accent); border-color: var(--cb-accent); color: #fff; }
.cb-fscale input:focus-visible + span { outline: 2px solid var(--cb-accent); outline-offset: 2px; }
.cb-fscale input:disabled + span { cursor: default; }
.cb-form .cb-checkfoot { display: flex; align-items: center; gap: 12px; }
.cb-form :disabled { opacity: 1; }
.cb-form .jb-input:disabled { background: var(--chip-soft); color: var(--ink); -webkit-text-fill-color: var(--ink); }
@media (max-width: 640px) { .cb-fgrid { grid-template-columns: 1fr; } .cb-fscale span { height: 32px; font-size: 13px; } }

/* ---- staff: one learner's course, read-only */
.lv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 16px; background: #2B3A55; color: #F6F3EC; font: 500 14px var(--sans); }
.lv-bar .jb-ico { width: 18px; height: 18px; fill: currentColor; }
.lv-bar b { color: #fff; }
.lv-bar .jb-btn.ghost { color: #F6F3EC; border-color: rgba(255, 255, 255, .35); }
.lv-bar .jb-btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.lv-bar { border-radius: 10px; margin-bottom: 14px; }
.cp-app > .lv-bar { border-radius: 0; margin: 0; flex: none; }
.lv-ans { margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--chip-soft); font: 400 14px/1.45 var(--sans); color: var(--ink); }
.lv-ans.ok { background: var(--sage-mist); }
.lv-ans.no { background: var(--maroon-wash); }
.lv-ans.none { color: var(--ink-3); font-style: italic; }
.lv-ans em { font-style: normal; font-weight: 700; margin-left: 4px; }
.lv-ans.ok em { color: var(--sage-text); }
.lv-ans.no em { color: var(--maroon-text); }
.lv-quiz { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); font: 400 14px var(--sans); background: var(--card); }

/* ================================================================ engaging lessons
   Course looks: a palette, the gradient behind covers and sections (--cb-hero), a paper tone (--cb-paper) and heading
   type, set once per course (Course settings → Look). Classic follows the accent color. */
.cb-lesson, .cb-app, .cp-app { --cb-hero: linear-gradient(135deg, var(--cb-accent) 0%, color-mix(in srgb, var(--cb-accent) 55%, #1b2430) 100%);
  --cb-paper: repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--cb-accent) 7%, transparent) 27px 28px), color-mix(in srgb, var(--cb-tint) 55%, var(--card));
  --cb-hfont: var(--serif); }
.cb-look-ensign { --cb-accent: #1E3554; --cb-accent-2: #5B7FA0; --cb-tint: #E8EEF3; --cb-hero: linear-gradient(135deg, #1E3554 0%, #2F5674 55%, #7E979D 100%); }
.cb-look-dusk { --cb-accent: #A8402A; --cb-accent-2: #E08A3C; --cb-tint: #F6ECE3; --cb-hero: linear-gradient(160deg, #3A1F2B 0%, #A8402A 58%, #EBA757 100%); }
.cb-look-field { --cb-accent: #4C6A23; --cb-accent-2: #8FAE4E; --cb-tint: #EBF1DD; --cb-hero: radial-gradient(130% 150% at 0% 0%, #CFE0A8 0%, #8FAE4E 42%, #3D5A1F 100%); }
.cb-look-linen { --cb-accent: #5A4632; --cb-accent-2: #9C7F5E; --cb-tint: #F3ECE1; --cb-hero: linear-gradient(135deg, #5A4632 0%, #8C735A 100%); --cb-hfont: 'Crimson Text', Georgia, serif; }
.cb-lesson.cb-look-linen { background: #FBF8F2; }
.cb-look-linen .cb-para, .cb-look-linen .cb-colp > div { font-family: 'Crimson Text', Georgia, serif; font-size: 1.12em; }
.cb-look-night { --cb-accent: #F0A04B; --cb-accent-2: #8FAE4E; --cb-tint: #1D2834; --cb-hero: radial-gradient(90% 130% at 85% 0%, #2F5674 0%, #15222F 60%, #0B1016 100%); }
.cb-lesson.cb-look-night { --card: #121A23; --ink: #E8EDF2; --ink-2: #C3CDD6; --ink-3: #93A0AD; --line: #2A3643; --line-soft: #222D38; --chip-soft: #1C2631; background: #121A23; color: #E8EDF2; }
.cb-look-night :is(.cb-check, .cb-response, .cb-upload, .cb-form, .cb-verse, .cb-colp, .cb-pulse, .cb-assess, .cb-prayer, .cb-goal, .cb-memory, .cb-scenario) .jb-input { background: #0E151D; color: #E8EDF2; border-color: #2A3643; }
.cb-lesson { container-type: inline-size; }
.cb-ltitle, .cb-heading { font-family: var(--cb-hfont, var(--serif)); }

/* width: wide steps out of the reading column; full runs edge to edge */
.cb-width-wide { margin-inline: max(-96px, calc((100% - 100cqw) / 2 + 16px)); }
.cb-width-full { width: 100cqw; margin-left: calc(50% - 50cqw); }
.cb-width-full.cb-box-wrap > .cb-inner, .cb-width-full.cb-box-wrap > .cb-wrap > .cb-inner { border-radius: 0; padding-inline: max(24px, calc((100cqw - 712px) / 2)); }
.cb-width-full > .cb-wrap > .cb-tb { max-width: 760px; margin-inline: auto; }

/* lesson cover: the look's gradient (or the banner picture) behind the title, with the reading time */
.cb-lhead.cb-hero { width: 100cqw; margin-left: calc(50% - 50cqw); padding: 64px max(24px, calc((100cqw - 712px) / 2)) 40px; background: var(--cb-hero); color: #F6F8FA; margin-bottom: 28px; position: relative; isolation: isolate; }
.cb-lhead.cb-hero.pic { background: linear-gradient(180deg, rgba(10, 16, 24, .25) 0%, rgba(10, 16, 24, .72) 100%), var(--bimg) center / cover no-repeat; }
.cb-lhead.cb-hero .cb-lof, .cb-lhead.cb-hero .cb-lauthor { color: rgba(255, 255, 255, .85); }
.cb-lhead.cb-hero .cb-ltitle { color: #fff; }
.cb-lhead.cb-hero .cb-lbar { background: rgba(255, 255, 255, .7); }
.cb-lmeta { font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cb-hero .cb-lmeta { color: rgba(255, 255, 255, .8); }
.cb-stage.phone .cb-lhead.cb-hero { padding: 44px 16px 28px; }

/* paragraph: a large first letter */
.cb-drop > p:first-child::first-letter, .cb-drop:not(:has(p))::first-letter { float: left; font: 700 3.4em/.84 var(--cb-hfont, var(--serif)); margin: .08em .1em 0 0; color: var(--cb-accent); }
/* the highlighter, in authors' text and learners' highlights */
.cb-lesson mark, .lv-journal mark { background: linear-gradient(transparent 52%, color-mix(in srgb, var(--cb-accent-2, #F0B35A) 45%, transparent) 52%); color: inherit; padding: 0 1px; }
mark.lh { background: color-mix(in srgb, #F5D04C 55%, transparent); border-radius: 2px; cursor: pointer; }
mark.lh.noted { box-shadow: inset 0 -2px 0 #C9A21A; }
.cb-box-dark mark { background: color-mix(in srgb, #fff 22%, transparent); }

/* cover section */
.cb-banner { position: relative; border-radius: 18px; overflow: hidden; background: var(--cb-hero); color: #F6F8FA; min-height: 240px; display: grid; align-content: end; isolation: isolate; }
.cb-width-full .cb-banner { border-radius: 0; }
.cb-banner.pic { background: var(--bimg) center / cover no-repeat; }
.cb-banner.pic::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.cb-banner.pic.ov-dark::before { background: linear-gradient(180deg, rgba(8, 12, 18, .15), rgba(8, 12, 18, .75)); }
.cb-banner.pic.ov-accent::before { background: linear-gradient(180deg, color-mix(in srgb, var(--cb-accent) 25%, transparent), color-mix(in srgb, var(--cb-accent) 88%, transparent)); }
.cb-banner-in { padding: 56px max(28px, calc((100cqw - 712px) / 2)) 36px; display: grid; gap: 10px; max-width: 100%; }
.cb-banner .k { font: 700 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.cb-banner h2 { font: 700 clamp(30px, 5cqw, 48px)/1.04 var(--cb-hfont, var(--serif)); margin: 0; color: #fff; text-wrap: balance; }
.cb-banner p { font-size: 19px; line-height: 1.5; margin: 0; max-width: 36em; opacity: .94; }
.cb-banner-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.cb-banner-tools .cb-mediabar { margin: 0; }

/* Scripture card */
.cb-verse { margin: 0; padding: 26px 30px 22px; border-radius: 16px; background: var(--cb-tint); position: relative; display: grid; gap: 10px; }
.cb-verse::before { content: "“"; position: absolute; left: 14px; top: -10px; font: 700 84px/1 'Crimson Text', Georgia, serif; color: color-mix(in srgb, var(--cb-accent) 35%, transparent); }
.cb-verse blockquote { margin: 0; }
.cb-verse blockquote p { font: italic 400 22px/1.5 'Crimson Text', Georgia, serif; margin: 0; padding-left: 18px; color: var(--ink); }
.cb-verse figcaption { display: flex; gap: 10px; align-items: baseline; padding-left: 18px; font: 700 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--cb-accent); }
.cb-verse .ver { color: var(--ink-3); font-weight: 600; }

/* side by side */
.cb-cols { display: grid; gap: 14px; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.cb-cols.n2 { --n: 2; } .cb-cols.n3 { --n: 3; } .cb-cols.n1 { --n: 1; }
.cb-colp { position: relative; border-radius: 14px; padding: 18px 20px; background: var(--cb-tint); border-top: 4px solid var(--cb-accent); display: grid; gap: 6px; align-content: start; }
.cb-colp:nth-child(2) { border-top-color: var(--cb-accent-2); } .cb-colp:nth-child(3) { border-top-color: color-mix(in srgb, var(--cb-accent) 50%, var(--cb-accent-2)); }
.cb-colp > b { font: 700 18px var(--cb-hfont, var(--serif)); color: var(--cb-accent); }
.cb-colp > div p { margin: 0 0 8px; } .cb-colp > div p:last-child { margin-bottom: 0; }
@container (max-width: 560px) { .cb-cols { grid-template-columns: 1fr; } }

/* story cards */
.cb-story { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 290px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: thin; }
.cb-scard { position: relative; scroll-snap-align: start; aspect-ratio: 9 / 12.5; border-radius: 20px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; max-width: 100%; }
.cb-scard .n { font: 700 12px var(--sans); opacity: .85; }
.cb-scard .t { font: 700 26px/1.12 var(--cb-hfont, var(--serif)); margin: 0; }
.cb-scard small { font-size: 15px; line-height: 1.45; opacity: .92; }
.cb-scard.s0 { background: linear-gradient(160deg, var(--cb-accent), color-mix(in srgb, var(--cb-accent) 60%, #000)); }
.cb-scard.s1 { background: linear-gradient(160deg, #B5452B, #E2583B); } .cb-scard.s2 { background: linear-gradient(160deg, #B9620F, #F0912B); }
.cb-scard.s3 { background: linear-gradient(160deg, #3F5A22, #8FAE4E); } .cb-scard.s4 { background: linear-gradient(160deg, #4E6268, #7E979D); }
.cb-story.edit .cb-x { top: 10px; right: 10px; color: #fff; }
.cb-scard.cb-addcard { background: var(--chip-soft); color: var(--ink-2); border: 2px dashed var(--line); justify-content: center; align-items: center; font: 600 15px var(--sans); cursor: pointer; }
.cb-storydeck .cb-decknav { justify-content: center; margin-top: 6px; }

/* scrolling picture */
.cb-scrolly { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
.cb-scrolly .pin { position: sticky; top: 72px; align-self: start; }
.cb-scrolly .pin img { width: 100%; border-radius: 14px; transition: opacity .16s; display: block; }
.cb-scrolly .pin img.swap { opacity: .15; }
.cb-scrolly .steps { display: grid; gap: 38vh; padding-block: 8vh 30vh; }
.cb-scrolly.edit .steps { gap: 14px; padding: 0; }
.cb-sstep { border-radius: 14px; padding: 18px 20px; background: var(--chip-soft); color: var(--ink-2); transition: background .3s, box-shadow .3s, color .3s; display: grid; gap: 6px; }
.cb-sstep > b { font: 700 18px var(--cb-hfont, var(--serif)); color: var(--ink); }
.cb-sstep.on { background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(16, 24, 40, .12), inset 4px 0 0 var(--cb-accent); }
.cb-sstep-pic { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .cb-sstep-pic img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
@container (max-width: 620px) { .cb-scrolly { grid-template-columns: 1fr; } .cb-scrolly .pin { top: 56px; z-index: 1; background: var(--card); padding-bottom: 8px; } .cb-scrolly .steps { gap: 30vh; } }

/* reflect blocks share the answer-card frame */
.cb-pulse, .cb-assess, .cb-prayer, .cb-goal, .cb-memory, .cb-scenario { border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; background: var(--card); }
:is(.cb-pulse, .cb-assess, .cb-prayer, .cb-goal, .cb-memory, .cb-scenario) .q { font-family: var(--cb-hfont, var(--serif)); font-size: 21px; margin: 0; }
/* memory verse */
.cb-memory .mv { font: 400 23px/1.65 'Crimson Text', Georgia, serif; margin: 0; }
.cb-memory .w { border-radius: 4px; transition: color .25s, background .25s; cursor: default; }
.cb-memory .w.gone { color: transparent; background: var(--chip-soft); cursor: pointer; }
.cb-memory .w.gone.peek { color: var(--ink-3); background: transparent; }
.cb-memory .mref { font: 700 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--cb-accent); margin: 0; }
.cb-mlevels { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-mlevels .jb-chip[aria-pressed="true"] { background: var(--cb-accent); color: #fff; border-color: var(--cb-accent); }
/* class pulse */
.cb-poptions { display: grid; gap: 6px; } .cb-popt { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cb-pbars { display: grid; gap: 9px; }
.cb-pbar { display: grid; grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 15px; }
.cb-pbar.mine { font-weight: 700; }
.cb-pbar .tr { height: 12px; background: var(--chip-soft); border-radius: 6px; overflow: hidden; }
.cb-pbar .tr i { display: block; height: 100%; border-radius: 6px; transition: width .6s ease-out; }
.cb-pbar b { font: 600 13px var(--sans); text-align: right; font-variant-numeric: tabular-nums; }
/* self-assessment */
.cb-agrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 22px; align-items: start; }
.cb-arows { display: grid; gap: 14px; }
.cb-agroup { display: grid; gap: 6px; }
.cb-agroup.edit { position: relative; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.cb-alabel { display: flex; align-items: center; gap: 8px; font: 700 14px var(--sans); }
.cb-alabel i { width: 10px; height: 10px; border-radius: 3px; }
.cb-arate { display: grid; grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 14px; }
.cb-arate input { width: 100%; accent-color: var(--cb-accent); }
.cb-arate output { font: 600 14px var(--sans); text-align: right; font-variant-numeric: tabular-nums; } .cb-arate output.unset { color: var(--ink-3); }
.cb-afig { margin: 0; position: sticky; top: 72px; display: grid; gap: 4px; justify-items: center; }
.cb-afig figcaption { font: 600 12px var(--sans); color: var(--ink-3); text-align: center; }
.cb-asvg { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.cb-asvg .ghost { fill: var(--chip-soft); } .cb-asvg .prev { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 3; }
.cb-asvg .lab { font: 600 10px var(--sans); fill: var(--ink-2); } .cb-asvg .val { font: 600 11px var(--sans); fill: var(--ink-2); }
.cb-asvg .ctr { font: 700 16px var(--sans); fill: #fff; } .cb-asvg .ctl { font: 700 7.5px var(--sans); fill: rgba(255, 255, 255, .9); letter-spacing: .04em; text-transform: uppercase; }
.cb-asvg path, .cb-asvg rect { transition: d .3s, width .3s, height .3s, x .3s, y .3s; }
@container (max-width: 620px) { .cb-agrid { grid-template-columns: 1fr; } .cb-afig { position: static; order: -1; } }
/* prayer cards */
.cb-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cb-pcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; background: color-mix(in srgb, var(--cb-tint) 45%, var(--card)); }
.cb-pcard .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 14px var(--sans); text-transform: uppercase; }
.cb-pcard .av.s0 { background: var(--cb-accent); } .cb-pcard .av.s1 { background: #E2583B; } .cb-pcard .av.s2 { background: #F0912B; } .cb-pcard .av.s3 { background: #8FAE4E; } .cb-pcard .av.s4 { background: #7E979D; }
.cb-pweek { display: flex; gap: 4px; } .cb-pweek i { width: 14px; height: 14px; border-radius: 4px; background: var(--chip-soft); } .cb-pweek i.y { background: #8FAE4E; }
/* goal */
.cb-smart { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-chk { font: 600 12.5px var(--sans); padding: 5px 10px; border-radius: 999px; background: var(--chip-soft); color: var(--ink-3); transition: background .25s, color .25s; }
.cb-chk.ok { background: color-mix(in srgb, #8FAE4E 26%, transparent); color: var(--ink); }
.cb-gsteps { display: grid; gap: 6px; } .cb-gsteps label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; font: 600 14px var(--sans); color: var(--ink-3); }
.cb-gsupport { display: grid; gap: 4px; font: 600 13px var(--sans); color: var(--ink-2); }
.cb-gcheck { font-size: 14px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--chip-soft); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cb-gcheck:empty { display: none; }
.cb-gci { font: 600 12.5px var(--sans); padding: 3px 9px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); } .cb-gci.done { border-color: #8FAE4E; }
/* branching scenario */
.cb-sc-text { font: 400 19px/1.55 'Crimson Text', Georgia, serif; margin: 0; }
.cb-sc-choices { display: grid; gap: 8px; }
.cb-sc-choice { text-align: left; font: 500 15px var(--sans); padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.cb-sc-choice:hover:not(:disabled) { border-color: var(--cb-accent); } .cb-sc-choice:disabled { cursor: default; opacity: .55; } .cb-sc-choice.picked { opacity: 1; border-color: var(--cb-accent); background: var(--cb-tint); }
.cb-sc-fb { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--cb-tint); } .cb-sc-fb p { margin: 0; }
.cb-sc-end { display: grid; gap: 8px; justify-items: start; }
.cb-scene { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.cb-scene-h { display: flex; justify-content: space-between; align-items: center; font: 700 13px var(--sans); color: var(--ink-3); }
.cb-schoice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 8px 10px 8px 12px; border-radius: 10px; background: var(--chip-soft); font-size: 14px; }
.cb-schoice .lab { font-weight: 600; } .cb-schoice .to { font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; } .cb-schoice .fb { grid-column: 1 / -1; color: var(--ink-2); }

/* editor: long stretch marker, Make it engaging */
.cb-wall { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 14px; padding: 10px 14px; border-radius: 12px; border: 1px dashed color-mix(in srgb, #F0912B 60%, transparent); background: color-mix(in srgb, #F0912B 8%, var(--card)); font-size: 13.5px; color: var(--ink-2); }
.cb-wall .cb-grow { flex: 1; }
.cb-engage-prev { border: 1px solid var(--line); border-radius: 14px; max-height: 62vh; overflow: auto; padding-block: 10px; }
/* Make it engaging, side by side: the panel takes the right half and leaves the page usable; the lesson shifts left */
.jb-scrim.cb-compare { background: transparent; pointer-events: none; backdrop-filter: none; }
.jb-scrim.cb-compare .jb-sheet { pointer-events: auto; width: min(50vw, 820px); box-shadow: -18px 0 40px rgba(16, 24, 40, .14); }
.jb-scrim.cb-compare .cb-engage-prev { max-height: none; flex: 1 1 auto; min-height: 0; }
.jb-scrim.cb-compare .cb-engage { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.cb-app.comparing .cb-outline, .cb-app.comparing .cb-quick.end { display: none; }
.cb-app.comparing .cb-canvas { padding-right: calc(min(50vw, 820px) + 8px); }
.cb-app.comparing .dc-tab, body:has(.cb-app.comparing) .dc-tab, body:has(.cb-app.comparing) .jb-help.min { display: none; }
.cb-engage-prev .cb-edit:hover { outline: 1px dashed var(--line-2, var(--line)); outline-offset: 3px; border-radius: 4px; }
.cb-engage-prev .cb-edit:focus { outline: 2px solid var(--cb-accent, var(--ink)); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 900px) { .jb-scrim.cb-compare { background: rgba(16, 24, 40, .35); pointer-events: auto; } .jb-scrim.cb-compare .jb-sheet { width: 100%; } .cb-app.comparing .cb-canvas { padding-right: 10px; } }
.cb-engage-wait { display: flex; gap: 10px; align-items: center; padding: 18px 0; color: var(--ink-2); }
.jb-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--cb-accent, var(--maroon)); animation: jbspin .8s linear infinite; }
@keyframes jbspin { to { transform: rotate(360deg); } }
.cb-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cb-lookopt { position: relative; display: grid; gap: 2px; padding: 0 0 10px; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--card); }
.cb-lookopt input { position: absolute; opacity: 0; }
.cb-lookopt .sw { height: 46px; background: var(--cb-hero); margin-bottom: 6px; }
.cb-lookopt b, .cb-lookopt small { padding-inline: 10px; } .cb-lookopt small { color: var(--ink-3); font-size: 12px; line-height: 1.3; }
.cb-lookopt:has(input:checked) { border-color: var(--cb-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cb-accent) 30%, transparent); }
.cb-lookopt:has(input:focus-visible) { outline: 2px solid var(--cb-accent); outline-offset: 2px; }
.cb-sw[style*="gradient"], .cb-sw[style*="cb-hero"], .cb-sw[style*="cb-paper"] { background: var(--sw) !important; }

/* learner: highlight popover, reading aloud, path, journal, practice */
.lv-pop { position: fixed; z-index: 80; background: #1B2430; color: #F2F5F8; border-radius: 12px; padding: 6px; display: flex; gap: 4px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); max-width: min(340px, calc(100vw - 16px)); flex-wrap: wrap; }
.lv-pop > button { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: inherit; background: transparent; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.lv-pop > button:hover { background: rgba(255, 255, 255, .12); } .lv-pop .jb-ico { width: 16px; height: 16px; }
.lv-pop .lv-pq { display: block; width: 100%; padding: 6px 8px 2px; font: 600 12.5px var(--sans); opacity: .85; }
.lv-pop textarea { width: 100%; margin: 4px; border-radius: 8px; border: 0; padding: 8px; font: 400 14px var(--sans); }
.lv-pa { display: flex; justify-content: flex-end; gap: 6px; width: 100%; padding: 2px 4px 4px; }
.lv-pa button { font: 600 13px var(--sans); border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; background: rgba(255, 255, 255, .12); color: inherit; } .lv-pa button.go { background: #F5D04C; color: #1B2430; }
.cb-reading { outline: 3px solid color-mix(in srgb, var(--cb-accent) 45%, transparent); outline-offset: 6px; border-radius: 10px; }
.lv-pathbar { display: flex; justify-content: flex-end; }
.lv-path svg { width: 100%; height: auto; display: block; }
.lv-path .trk { fill: none; stroke: var(--line); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.lv-path .dn { fill: none; stroke: #8FAE4E; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.lv-path circle { fill: var(--card); stroke: var(--c); stroke-width: 4; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.lv-path .done circle { fill: var(--c); } .lv-path .here circle { fill: var(--c); stroke: var(--card); stroke-width: 3; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 60%, transparent)); }
.lv-path a:hover circle, .lv-path a:focus-visible circle { transform: scale(1.18); }
.lv-path .ck { font: 700 12px var(--sans); fill: #fff; text-anchor: middle; } .lv-path .lt { font: 500 11px var(--sans); fill: var(--ink-2); text-anchor: middle; } .lv-path .ut { font: 700 11px var(--sans); fill: var(--ink-3); text-anchor: middle; letter-spacing: .04em; }
.lv-path .locked { opacity: .45; }
.lv-journal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px clamp(18px, 4vw, 44px); display: grid; gap: 22px; max-width: 820px; }
.lv-journal header { display: grid; gap: 6px; justify-items: start; }
.lv-jl { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); break-inside: avoid; }
.lv-jl h3 { font: 600 21px var(--serif); margin: 0; }
.lv-je .q { font: 600 13.5px var(--sans); color: var(--ink-3); margin: 0 0 2px; } .lv-je .a { font: 400 18px/1.6 'Crimson Text', Georgia, serif; margin: 0; }
.lv-jn { padding-left: 12px; border-left: 3px solid #F5D04C; font-size: 15px; } .lv-jn p { margin: 4px 0 0; color: var(--ink-2); }
.lv-practice { display: grid; gap: 10px; }
.lv-pci { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #F0912B 10%, var(--card)); }
.lv-ppl { display: grid; gap: 6px; } .lv-pp { display: flex; gap: 10px; align-items: center; } .lv-pp .jb-grow { min-width: 0; display: grid; }
.lv-pp .av { width: 30px; height: 30px; border-radius: 50%; background: var(--sage, #6E8B5E); color: #fff; display: grid; place-items: center; font: 700 13px var(--sans); flex: none; text-transform: uppercase; }
.lv-pmem { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--chip-soft); color: inherit; text-decoration: none; }
@media print { .lv-journal { border: 0; padding: 0; } .lv-journal [data-jprint] { display: none; } }
@media (prefers-reduced-motion: reduce) { .cb-sstep, .cb-pbar .tr i, .cb-memory .w, .jb-spin { transition: none; animation: none; } }
:is(.cb-prayer, .cb-goal) .q { font-size: 18px; line-height: 1.45; }
.cb-pcard { justify-items: start; } .cb-pcard .jb-input { width: 100%; }
.cb-schoice { padding-right: 34px; } .cb-schoice > .cb-x, .cb-colp > .cb-x, .cb-agroup.edit > .cb-x { position: absolute; top: 6px; right: 6px; }
.cb-schoice .lab { grid-column: 1; } .cb-schoice .to { grid-column: 2; }
/* lessons opened one below another (moving on keeps earlier lessons on the page) */
.cp-flow + .cp-flow { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; position: relative; }
.cp-flow + .cp-flow::before { content: ""; position: absolute; left: 50%; top: -7px; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); }
.cp-flowdone { display: inline-flex; gap: 12px; align-items: center; }
.jb-outline .lesson.locked { opacity: .55; cursor: not-allowed; display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.cp-l.locked .cp-dot::after { content: "🔒"; font-size: 9px; }

/* lesson progress: an orange ring fills as the lesson is viewed (reviewed); green when complete */
.cp-l.done .cp-dot, .jb-dot.done, .lv-dot.done { background: #3E9A55; border-color: #3E9A55; color: #fff; }
.cp-dot.ring, .jb-dot.ring { border-color: transparent; background: conic-gradient(#E8892B calc(var(--v) * 1%), var(--line) 0) border-box;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.cp-pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px; background: color-mix(in srgb, #E8892B 10%, var(--card)); border-bottom: 1px solid var(--line); font: 500 13px var(--sans); color: var(--ink-2); }
.cp-pbar .jb-btn { margin-left: auto; }
.cp-legend { display: inline-flex; gap: 10px; align-items: center; font: 500 12px var(--sans); color: var(--ink-3); }
.cp-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: 3px; vertical-align: -1px; }

.tone-rev { color: #B8661A; }
.cb-stage .cp-pbar + .cp { height: calc(100% - 40px); }
.lv-path .rev circle { stroke: #E8892B; } .lv-path .done circle { fill: #3E9A55; stroke: #3E9A55; } .lv-path .dn { stroke: #3E9A55; }
.cp-pwrap { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.cp-pwrap > .cp { flex: 1; min-height: 0; }
.cp-pbar > span:first-child { flex: 1 1 260px; }
.cp-l .cp-dot.ring, .cp-l.cur .cp-dot.ring { border-color: transparent; }

/* the progress ring glides between values (and the player's own scroll adjustment is off, so content never jumps) */
@property --v { syntax: '<number>'; inherits: false; initial-value: 0; }
.cp-dot.ring, .jb-dot.ring { transition: --v .35s ease-out; }
#cp-main, .cp-main { overflow-anchor: none; }

/* Edit shows the whole course: the lesson being edited is live; the others are static copies, a click opens one */
.cb-stack { display: block; width: 100%; }
.cb-slot { position: relative; display: block; width: 100%; }
.cb-slot > .cb-lesson { width: 100%; }
.cb-slot + .cb-slot, .cb-unitsep + .cb-slot { border-top: 1px dashed var(--line); }
.cb-slot-ph { min-height: 420px; display: grid; align-content: start; gap: 6px; max-width: 760px; margin: 0 auto; padding: 56px 24px; color: var(--ink-3); }
.cb-slot-ph b { font: 600 32px var(--cb-hfont, var(--serif)); color: var(--ink-2); }
/* other lessons in Edit look and act editable exactly like the one you're in (the first touch hands it over) */
.cb-slot.static :is(video, audio, iframe) { pointer-events: none; }
/* other lessons become editable on their own as you scroll to them (no "click to edit" pill) */
.cb-unitsep { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; padding: 40px 24px 8px; font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cb-accent, var(--ink-3)); }
.cb-unitsep::after { content: ""; flex: 1; height: 2px; background: color-mix(in srgb, var(--cb-accent, #2F4A6B) 25%, transparent); }

/* Preview opening (the editor has already left the page) */
.cb-pvload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 50vh; width: 100%; color: var(--ink-2); font: 500 15px var(--sans); text-align: center; padding: 24px; }
/* full screen: a tab on the left edge brings the outline in over the page */
.cb-oltab { display: none; }
.cb-app.full .cb-oltab { display: grid; place-items: center; position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 46; width: 30px; height: 64px; border: 1px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; background: var(--card); color: var(--ink-3); cursor: pointer; box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.cb-app.full .cb-oltab .jb-ico { transform: scaleX(-1); width: 18px; height: 18px; }
.cb-app.full .cb-oltab:hover { color: var(--ink); width: 34px; }
.cb-app.full.ol-over .cb-outline { display: block; position: fixed; left: 0; top: 0; bottom: 0; z-index: 47; width: 300px; background: var(--card); box-shadow: 8px 0 30px rgba(16, 24, 40, .16); overflow-y: auto; }
.cb-app.full.ol-over .cb-oltab, .cb-app.full.previewing .cb-oltab { display: none; }

/* the outline's shaded bar slides to the lesson you're scrolling through in Edit */
@media (min-width: 901px) { .cb-app:not(.full) .cb-outline { position: relative; } }
.cb-outline > .cb-ounit, .cb-outline > .cb-oitem { position: relative; z-index: 1; }
.cb-olbar { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 8px; background: var(--cb-tint, var(--sage-mist)); border: 1px solid var(--line); pointer-events: none;
  transition: transform .45s cubic-bezier(.25, .8, .25, 1), height .45s cubic-bezier(.25, .8, .25, 1), width .45s cubic-bezier(.25, .8, .25, 1); }
.cb-outline.has-bar .cb-oitem[data-l][aria-current="page"] { background: transparent; border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .cb-olbar { transition: none; } }

/* Preview: a lesson picked from the menu fades in where you are */
.cp-flow.cp-in { animation: cp-in .32s ease-out; }
@keyframes cp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cp-flow.cp-in { animation: none; } }

/* the chain link on the line between your lesson and the proposal: closed = scroll together */
.cb-link { display: none; }
.jb-scrim.cb-compare .cb-link { display: grid; place-items: center; position: absolute; top: 50%; right: min(50vw, 820px); transform: translate(50%, -50%); z-index: 2; pointer-events: auto;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-3, var(--ink-2)); box-shadow: 0 4px 14px rgba(16, 24, 40, .14); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.jb-scrim.cb-compare .cb-link:hover { color: var(--ink); transform: translate(50%, -50%) scale(1.06); }
.jb-scrim.cb-compare .cb-link.on { background: var(--cb-accent, var(--ink)); border-color: var(--cb-accent, var(--ink)); color: #fff; }
.jb-scrim.cb-compare .cb-link:focus-visible { outline: 2px solid var(--cb-accent, var(--ink)); outline-offset: 3px; }
@media (max-width: 900px) { .jb-scrim.cb-compare .cb-link { display: none; } }

/* Make it engaging: a proposal is waiting for this lesson */
:is(#engage, [data-sid="engage"]).has-draft { color: var(--cb-accent, #3b3a8f); font-weight: 650; background: color-mix(in srgb, var(--cb-accent, #3b3a8f) 10%, transparent); }
:is(#engage, [data-sid="engage"]) .cb-dot-new { width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-left: 2px; }
.cb-engage-ask { display: flex; gap: 8px; align-items: flex-end; }
.cb-engage-ask textarea { flex: 1; resize: vertical; min-height: 44px; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.cb-engage-foot { display: flex; gap: 8px; align-items: center; } .cb-engage-foot .cb-grow { flex: 1; }
.cb-engage-note { margin: 0; display: flex; gap: 8px; align-items: center; }
.cb-engage-prev.busy { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---------------------------------------------------------------- the block library (web/js/block-library.js) */
.bl-lib { position: absolute; top: 58px; left: 0; bottom: 0; width: min(880px, 96vw); z-index: 45; background: var(--card); border-right: 1px solid var(--line); box-shadow: 12px 0 34px rgba(40, 30, 20, .14); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .9, .3, 1); }
.bl-lib.open { transform: none; }
.cb-app.full .bl-lib { top: 0; }
.bl-head { display: flex; align-items: center; gap: 14px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.bl-title { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.bl-title b { font-family: var(--serif); font-size: 21px; } .bl-title .jb-muted { font-size: 13px; }
.bl-search { display: flex; align-items: center; gap: 8px; flex: 1 1 300px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--paper, #fff); min-height: 42px; }
.bl-search:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-mist); }
.bl-search .jb-ico { width: 18px; height: 18px; color: var(--ink-4); flex: none; }
.bl-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; flex: 1; min-width: 0; color: var(--ink); }
.bl-body { flex: 1; display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 0; }
.bl-nav { border-right: 1px solid var(--line-soft); padding: 10px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; background: var(--paper-2, #faf9f6); }
.bl-nav-i { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; text-align: left; }
.bl-nav-i .jb-ico { width: 17px; height: 17px; color: var(--ink-4); flex: none; }
.bl-nav-i span { flex: 1; } .bl-nav-i em { font-style: normal; font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.bl-nav-i:hover { background: var(--card); }
.bl-nav-i[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(40, 30, 20, .08); }
.bl-nav-i[aria-pressed="true"] .jb-ico { color: var(--sage-text); }
.bl-nav-sep { height: 1px; background: var(--line-soft); margin: 6px 8px; }
.bl-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bl-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 8px; border-bottom: 1px solid var(--line-soft); }
.bl-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.bl-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bl-results { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 30px; }
.bl-sec + .bl-sec { margin-top: 6px; }
.bl-sech { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); margin: 14px 0 8px; }
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.bl-card { position: relative; display: flex; gap: 11px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r); padding: 11px 36px 11px 12px; cursor: pointer; background: var(--card); text-align: left; }
.bl-card:hover, .bl-card:focus-visible { border-color: var(--sage); background: var(--sage-mist); outline: none; }
.bl-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--sage-mist); display: grid; place-items: center; flex: none; }
.bl-ico .jb-ico { width: 19px; height: 19px; color: var(--sage-text); }
.bl-txt { display: grid; gap: 2px; min-width: 0; } .bl-txt b { font-size: 14px; display: flex; gap: 6px; align-items: center; } .bl-txt > span { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.bl-new { font-style: normal; font: 700 10px var(--sans); text-transform: uppercase; letter-spacing: .05em; background: #FBEFC5; color: #6B4E00; padding: 2px 6px; border-radius: 4px; }
.bl-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .bl-flags i { font-style: normal; font-size: 11px; color: var(--ink-4); background: var(--paper-2, #f4f2ee); border-radius: 4px; padding: 1px 6px; }
.bl-star { position: absolute; top: 7px; right: 7px; border: 0; background: transparent; width: 26px; height: 26px; border-radius: 6px; font-size: 17px; line-height: 1; color: var(--ink-4); cursor: pointer; }
.bl-star:hover { background: var(--card); color: #B7791F; } .bl-star[aria-pressed="true"] { color: #D69E2E; }
.bl-empty { color: var(--ink-3); font-size: 13.5px; margin: 4px 0 10px; }
.bl-foot { margin: 18px 0 0; }
.bl-warn { background: #FBEFD9; color: #7A4E0B; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin: 10px 0 0; }
@media (max-width: 720px) { .bl-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } .bl-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 6px; } .bl-nav-i { flex: none; } .bl-nav-sep { display: none; } .bl-nav-i em { display: none; } }
@media (prefers-reduced-motion: reduce) { .bl-lib { transition: none; } }
/* ≤900px: the collapsed outline rail (44px) sits over the canvas; keep the lesson clear of it */
@media (max-width: 900px) { .cb-app:not(.full):not(.previewing) .cb-outline.collapsed ~ .cb-canvas { margin-left: 44px; } }
/* phones: the builder's top bar keeps every control reachable (Back, settings, who's here, Review, Assistant, Edit/Preview,
   Publish); the status pill steps aside and the bar scrolls sideways within itself if a draft's Publish still doesn't fit */
@media (max-width: 600px) {
  .cb-top { gap: 6px; padding: 0 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .cb-top::-webkit-scrollbar { display: none; }
  .cb-top > * { flex: none; }
  .cb-top > .jb-grow { flex: 1 0 auto; }
  .cb-top > .jb-pill { display: none; }
}
/* small phones: the floating Edwin button already opens the course assistant, so the top bar's copy steps aside and
   the Edit/Preview switch tightens, leaving room for Review and a draft's Publish */
@media (max-width: 480px) {
  .cb-top #ai { display: none; }
  .cb-top .cb-seg button { padding: 6px 9px; }
  .cb-top #publish { padding-inline: 12px; }
}
/* narrow phones (≤400px): Edit/Preview becomes one button for the other mode ("Preview" while editing, "Edit" while
   previewing), and the bar packs to the left, so every control fits without scrolling */
@media (max-width: 400px) {
  .cb-top .cb-seg button[aria-pressed="true"] { display: none; }
  .cb-top .cb-seg button { padding: 6px 12px; color: var(--ink-2); }
  .cb-top > .jb-grow { flex: 0 0 auto; }
  .cb-top #publish { margin-left: auto; }
}

/* Block settings (course builder): inside space, corners, ambient drift and picture backgrounds on a colored block */
.cb-pad-snug.cb-box-wrap:not(.cb-width-full) > .cb-inner, .cb-pad-snug.cb-box-wrap:not(.cb-width-full) > .cb-wrap > .cb-inner { padding: 12px 16px; }
.cb-pad-roomy.cb-box-wrap:not(.cb-width-full) > .cb-inner, .cb-pad-roomy.cb-box-wrap:not(.cb-width-full) > .cb-wrap > .cb-inner { padding: 38px 42px; }
.cb-pad-snug.cb-box-wrap.cb-width-full > .cb-inner, .cb-pad-snug.cb-box-wrap.cb-width-full > .cb-wrap > .cb-inner { padding-block: 12px; }
.cb-pad-roomy.cb-box-wrap.cb-width-full > .cb-inner, .cb-pad-roomy.cb-box-wrap.cb-width-full > .cb-wrap > .cb-inner { padding-block: 40px; }
.cb-pad-snug.cb-box-own .cb-statement { padding: 14px 16px; } .cb-pad-roomy.cb-box-own .cb-statement { padding: 40px 36px; }
.cb-radius-square.cb-box-wrap:not(.cb-width-full) > .cb-inner, .cb-radius-square.cb-box-wrap:not(.cb-width-full) > .cb-wrap > .cb-inner,
.cb-radius-square.cb-box-own :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement) { border-radius: 4px; }
.cb-radius-soft.cb-box-wrap:not(.cb-width-full) > .cb-inner, .cb-radius-soft.cb-box-wrap:not(.cb-width-full) > .cb-wrap > .cb-inner,
.cb-radius-soft.cb-box-own :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement) { border-radius: 28px; }
@keyframes cb-drift { 0% { background-position: 0% 0%; } 100% { background-position: 100% 70%; } }
.cb-motion-on.cb-box-wrap:not(.cb-box-img) > .cb-inner, .cb-motion-on.cb-box-wrap:not(.cb-box-img) > .cb-wrap > .cb-inner,
.cb-motion-on.cb-box-own:not(.cb-box-img) :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement) { background-size: 170% 170%; animation: cb-drift 18s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .cb-motion-on .cb-inner, .cb-motion-on :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement) { animation: none !important; } }
.cb-box-img.cb-box-wrap > .cb-inner, .cb-box-img.cb-box-wrap > .cb-wrap > .cb-inner { min-height: 170px; }
.cb-box-bare :is(.cb-inner, .cb-statement, .cb-note, .cb-quote) { text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* the Block settings panel */
.jb-scrim.cb-bset-scrim { background: transparent; pointer-events: none; }
.jb-scrim.cb-bset-scrim > .jb-sheet { pointer-events: auto; width: min(380px, 100%); box-shadow: -12px 0 40px rgba(20, 16, 12, .16); }
.cb-bset { display: flex; flex-direction: column; gap: 18px; }
.cb-bset h3 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.cb-bset-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; background: var(--chip-soft); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.cb-bset-seg button { border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 7px 0; border-radius: 8px; cursor: pointer; }
.cb-bset-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.cb-bset-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cb-bset-tile { border: 0; padding: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.cb-bset-sw { display: block; height: 52px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); background: var(--sw); }
.cb-bset-sw.none { background: repeating-linear-gradient(45deg, var(--card) 0 6px, var(--chip-soft) 6px 12px); }
.cb-bset-tile[aria-pressed="true"] .cb-bset-sw { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--maroon); }
.cb-bset-tile small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-bset-tile:focus-visible { outline: none; } .cb-bset-tile:focus-visible .cb-bset-sw { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink-3); }
.cb-bset-wheel { position: relative; overflow: hidden; }
.cb-bset-wheel .cb-bset-sw { background: conic-gradient(#e94b3c, #f5b041, #f7dc6f, #58d68d, #48c9b0, #5dade2, #a569bd, #ec7063, #e94b3c); }
.cb-bset-wheel input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 52px; }
.cb-bset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-bset-chips button { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.cb-bset-chips button[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon); }
.cb-bset-img { display: flex; flex-direction: column; gap: 10px; }
.cb-bset-imgprev { height: 120px; border-radius: 12px; background: var(--chip-soft) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.cb-bset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-bset-note { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.cb-bset-motion { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin-top: 12px; }
.cb-tbbg { display: inline-flex; align-items: center; gap: 7px; }
.cb-tbbg i { width: 16px; height: 16px; border-radius: 5px; background: var(--sw, transparent); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); display: inline-block; }
.cb-tbbg i.none { background: repeating-linear-gradient(45deg, #fff 0 3px, #ddd 3px 6px); }
.cb-bset-def { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--chip-soft); }
.cb-bset-defnow { flex: 1 1 160px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.cb-bset-defnow .jb-ico { width: 16px; height: 16px; color: var(--sage, #5c7a5a); }
.cb-bset-reset { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.cb-bset-reset:hover { border-color: var(--ink-3); } .cb-bset-reset .jb-ico { width: 17px; height: 17px; }
/* Block settings open: the lesson moves left beside the panel (the same way as Make it engaging), in every builder layout */
@media (min-width: 641px) {
  .cb-app.bsetting .cb-canvas, .cb-app.full.bsetting .cb-canvas, .cb-app.previewing.bsetting .cb-canvas { padding-right: calc(min(380px, 100%) + 8px); transition: padding-right .2s ease; }
  .cb-app.bsetting .cb-quick.end { display: none; }
}
@media (min-width: 641px) and (max-width: 1279px) { .cb-app.bsetting .cb-outline { display: none; } }
/* phones: Block settings is a bottom sheet, so the block being styled stays in view above it */
@media (max-width: 640px) {
  .jb-scrim.cb-bset-scrim { align-items: flex-end; }
  .jb-scrim.cb-bset-scrim > .jb-sheet.jb-drawer { width: 100%; height: calc(min(62dvh, 600px) / var(--zf, 1)); border-radius: 18px 18px 0 0; animation: none; }
  .cb-bset-seg button { font-size: 12px; padding-inline: 0; }
}
@media (pointer: coarse) {
  .cb-bset-chips button, .cb-bset-seg button { min-height: 44px; }
  .cb-bset-reset { width: 44px; height: 44px; }
}
/* Fade into the next block: the background moves onto the whole block, carries on 110px below it and feathers to
   nothing over the next block (the block's own content always sits on the full background) */
.cb-fade-on.cb-boxed { isolation: isolate; }
.cb-fade-on.cb-boxed::before { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: -110px; z-index: -1; pointer-events: none; background: var(--cb-box); border-radius: 14px 14px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 150px), transparent 100%); mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 150px), transparent 100%); }
.cb-fade-on.cb-radius-square.cb-boxed::before { border-radius: 4px 4px 0 0; } .cb-fade-on.cb-radius-soft.cb-boxed::before { border-radius: 28px 28px 0 0; }
.cb-fade-on.cb-width-full.cb-boxed::before { border-radius: 0; }
.cb-fade-on.cb-box-wrap > .cb-inner, .cb-fade-on.cb-box-wrap > .cb-wrap > .cb-inner,
.cb-fade-on.cb-box-own :is(.cb-process, .cb-note, .cb-quote, .cb-check, .cb-response, .cb-audio, .cb-download, .cb-statement) { background: transparent; }
.cb-fade-on.cb-motion-on.cb-boxed:not(.cb-box-img)::before { background-size: 170% 170%; animation: cb-drift 18s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .cb-fade-on.cb-boxed::before { animation: none !important; } }
.cb-fade-on .cb-statement { border-bottom-color: transparent; }
.cb-bset-defsw { width: 28px; height: 28px; border-radius: 8px; flex: none; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cb-bset-defsw.none { background: repeating-linear-gradient(45deg, var(--card) 0 4px, var(--chip-soft) 4px 8px); }
.cb-bset-setdef:disabled { opacity: .5; cursor: default; }
/* Block settings sits below the builder's top bar (Review, Assistant, Published, Edit / Preview stay in reach), and the
   Edwin pill moves clear of it; on phones the pill steps aside while the bottom sheet is open */
@media (min-width: 641px) {
  body:has(.cb-app.bsetting) .jb-scrim.cb-bset-scrim { top: 58px; }
  body:has(.cb-app.bsetting) .jb-scrim.cb-bset-scrim > .jb-sheet.jb-drawer { height: calc(100vh / var(--zf, 1) - 58px); height: calc(100dvh / var(--zf, 1) - 58px); border-radius: 0 0 0 18px; }
  body:has(.cb-app.bsetting) .jb-help.min { right: calc(min(380px, 100%) + 20px); }
}
@media (max-width: 640px) { body:has(.cb-app.bsetting) .jb-help.min { display: none; } }
/* Block settings: "This block" (Undo, Remove background) and the course's default look card */
.cb-bset-row .jb-btn { display: inline-flex; align-items: center; gap: 6px; }
.cb-bset-row .jb-btn .jb-ico { width: 15px; height: 15px; }
.cb-bset-row .jb-btn:disabled { opacity: .45; cursor: default; }
.cb-bset-defcard { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.cb-bset-defhead { display: flex; align-items: center; gap: 10px; }
.cb-bset-defhead .cb-bset-defsw { width: 40px; height: 40px; border-radius: 10px; }
.cb-bset-defname { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-bset-on { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--sage, #5c7a5a) 16%, var(--card)); color: var(--sage-ink, #3f5a3d); }
.cb-bset-on .jb-ico { width: 13px; height: 13px; }
.cb-tbbgx .jb-ico, .cb-tbbg + .cb-tbb .jb-ico { width: 15px; height: 15px; }
/* Create new on phones: close in the corner, search across the width, From a document and Blank course side by side */
@media (max-width: 600px) {
  .cb-ghead { position: relative; padding: 18px 16px 0; }
  .cb-ghead > div:first-child { padding-right: 52px; }
  .cb-ghead > .jb-inline { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cb-ghead > .jb-inline #gq { grid-column: 1 / -1; width: 100% !important; }
  .cb-ghead > .jb-inline .jb-btn { justify-content: center; min-height: 44px; white-space: nowrap; }
  .cb-ghead > .jb-inline #gx { position: absolute; top: 16px; right: 16px; }
  .cb-ghead h2 { font-size: 28px; }
}
@media (max-width: 360px) { .cb-ghead > .jb-inline { grid-template-columns: 1fr; } }
