/* Course builder → Review panel (web/js/cb-review.js): comments, insights, accessibility, history.
   Docked beside the lesson from 1100px; a panel over the lesson on tablets; full screen on phones. */
.cr-open { position: relative; }
.cr-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--maroon); color: var(--on-maroon); font-size: 11px; font-weight: 700; line-height: 1; }
.cr-open .cr-n { position: absolute; top: -6px; right: -6px; margin: 0; box-shadow: 0 0 0 2px var(--card); }

.cr-panel { flex: none; width: clamp(380px, calc(24vw / var(--zf, 1)), 560px); display: flex; flex-direction: column; min-height: 0; background: var(--card); border-left: 1px solid var(--line); font-family: var(--sans); }
.cr-panel[hidden] { display: none; }
@media (max-width: 1099px) {
  .cr-panel { position: fixed; top: 58px; right: 0; bottom: 0; width: min(420px, 100%); z-index: 46; box-shadow: -12px 0 32px rgba(16, 24, 40, .14); animation: cr-in .16s ease-out; }
  .cb-app.full .cr-panel { top: 0; }
}
@media (max-width: 600px) { .cr-panel { top: 0; width: 100%; z-index: 60; padding-bottom: env(safe-area-inset-bottom); } }
@keyframes cr-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.cr-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; padding-top: max(14px, env(safe-area-inset-top)); }
.cr-head .jb-grow { min-width: 0; }
.cr-title { display: block; font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-close { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 22px; line-height: 1; cursor: pointer; }
.cr-close:hover { background: var(--chip-soft); }
.cr-close:focus-visible, .cr-tabs button:focus-visible, .cr-seg button:focus-visible, .cr-where:focus-visible, .cr-blocks button:focus-visible, .cr-issue:focus-visible, .cr-callout:focus-visible, .cr-pin:focus-visible { outline: 2px solid var(--cb-accent, var(--maroon)); outline-offset: 2px; }

.cr-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cr-tabs::-webkit-scrollbar { display: none; }
.cr-tabs button { flex: 1 0 auto; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--ink-3); font: 600 13.5px var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.cr-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--cb-accent, var(--maroon)); }
.cr-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 84px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.cr-row { display: flex; align-items: center; gap: 8px; }
.cr-row .jb-grow { min-width: 0; }
.cr-hint { margin: 0; font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; line-height: 1.4; }
.cr-hint .jb-ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.cr-new { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fbf8f3); }
.cr-new textarea, .cr-editf textarea { width: 100%; resize: vertical; min-height: 64px; font: 14px/1.45 var(--sans); }
.cr-on, .cr-where { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-where { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.cr-where:disabled { cursor: default; opacity: .6; }
.cr-ontype { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cb-accent, var(--maroon)); background: var(--cb-tint, var(--maroon-wash)); padding: 4px 8px; border-radius: 6px; }
.cr-onq { min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-clear { flex: none; margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--ink-3); font-size: 18px; cursor: pointer; }
.cr-clear:hover { background: var(--chip-soft); }

.cr-seg { display: flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--chip-soft); }
.cr-seg button { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: none; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; }
.cr-seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.cr-seg b { font-weight: 700; margin-left: 4px; color: var(--ink-4); }

.cr-thread { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.cr-thread.focus { border-color: var(--cb-accent, var(--maroon)); box-shadow: 0 0 0 3px var(--cb-tint, var(--maroon-wash)); }
.cr-thread.done { background: var(--paper, #fbf8f3); }
.cr-msg { display: flex; gap: 10px; align-items: flex-start; }
.cr-msg .jb-grow { min-width: 0; }
.cr-msg + .cr-msg { padding-left: 14px; border-left: 2px solid var(--line-soft, var(--line)); margin-left: 15px; }
.cr-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--cb-accent, var(--maroon)); color: #fff; font-size: 11.5px; font-weight: 700; }
.cr-msg + .cr-msg .cr-av { width: 26px; height: 26px; font-size: 10.5px; background: var(--ink-3); }
.cr-meta { margin: 0 0 2px; font-size: 12.5px; color: var(--ink-3); }
.cr-meta b { color: var(--ink); font-size: 13.5px; }
.cr-body { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-own { margin: 4px 0 0; display: flex; gap: 12px; }
.cr-link { padding: 4px 0; border: 0; background: none; font: 600 12.5px var(--sans); color: var(--ink-3); cursor: pointer; }
.cr-link:hover { color: var(--ink); text-decoration: underline; }
.cr-reply { display: flex; gap: 8px; }
.cr-reply .jb-input { flex: 1; min-width: 0; min-height: 40px; }
.cr-editf { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cr-resolved { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sage-text, var(--sage)); font-weight: 600; }
.cr-resolved .jb-ico, .cr-thread .jb-btn .jb-ico { width: 15px; height: 15px; }

.cr-empty { text-align: center; padding: 26px 12px; color: var(--ink-3); }
.cr-empty .jb-ico { width: 30px; height: 30px; opacity: .45; }
.cr-empty p { margin: 8px 0 4px; font-weight: 600; color: var(--ink-2); }
.cr-empty span { font-size: 13px; line-height: 1.45; display: block; max-width: 300px; margin: 0 auto; }
.cr-load { color: var(--ink-3); display: flex; gap: 8px; align-items: center; }

/* insights */
.cr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cr-stats div { padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.cr-stats b { display: block; font: 700 22px var(--serif); color: var(--ink); }
.cr-stats span { font-size: 12px; color: var(--ink-3); }
.cr-callout { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--amber, #c58a1a); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.cr-callout.due { border-left-color: var(--maroon); }
.cr-callout b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.cr-callout span { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.cr-callout em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.cr-h { margin: 6px 0 0; font: 700 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cr-blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cr-blocks button { width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cr-blocks button:hover { background: var(--chip-soft); }
.cr-blocks .jb-grow { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-blocks .cr-ontype { align-self: flex-start; }
.cr-bn { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--chip-soft); font-size: 11px; font-weight: 700; display: grid; place-items: center; color: var(--ink-3); margin-top: 1px; }
.cr-bar { display: block; height: 6px; border-radius: 999px; background: var(--chip-soft); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: inherit; background: var(--cb-accent, var(--maroon)); }
.cr-bmeta { font-size: 12.5px; color: var(--ink-3); }
.cr-foot { margin: 4px 0 0; font-size: 12px; color: var(--ink-4); }

/* accessibility */
.cr-score { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--sage-mist, #eef3ec); }
.cr-score.warn { background: #fbf3e3; } .cr-score.due { background: var(--maroon-wash, #f8ecea); }
.cr-score .jb-ico { flex: none; width: 22px; height: 22px; }
.cr-score b { display: block; font-size: 15px; color: var(--ink); }
.cr-score span { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.cr-issue { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: inherit; cursor: pointer; }
.cr-issue:hover { border-color: var(--ink-4); }
.cr-issue .jb-pill { flex: none; margin-top: 1px; }
.cr-issue .jb-grow { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cr-issue b { font-size: 14px; color: var(--ink); }
.cr-issue span { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.cr-issue em { font-style: normal; font-size: 12px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* history */
.cr-namev .cr-row .jb-input { min-height: 40px; }
.cr-versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cr-versions li { position: relative; display: flex; gap: 8px; align-items: center; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.cr-versions li::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.cr-versions li:first-child::before { top: 50%; } .cr-versions li:last-child::before { bottom: 50%; }
.cr-dot { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink-4); }
.cr-versions li.named .cr-dot { background: var(--cb-accent, var(--maroon)); border-color: var(--cb-accent, var(--maroon)); }
.cr-versions .jb-grow { min-width: 0; }
.cr-versions b { display: block; font-size: 14px; color: var(--ink); }
.cr-versions span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 420px) { .cr-versions li { flex-wrap: wrap; } .cr-versions .jb-grow { flex-basis: 100%; } }
.cr-vscrim { z-index: 80; }
.cr-vsheet { width: min(1100px, 92vw); max-height: calc(100vh / var(--zf, 1) - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cr-vsheet .cr-head { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cr-vbody { overflow-y: auto; padding: 8px 0 24px; background: var(--card); }
.cr-vbody .cb-lesson { pointer-events: none; }
@media (max-width: 600px) { .cr-vsheet { width: 100%; max-height: none; height: calc(100vh / var(--zf, 1)); border-radius: 0; } }

/* on the lesson itself */
.cb-edit-mode .cb-block:has(> .cr-pin), .cb-edit-mode [data-block]:has(> .cr-pin), .cb-edit-mode [data-block]:has(> .cr-chip) { position: relative; }
.cr-pin { position: absolute; top: 6px; right: 6px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 10px 0 8px; border-radius: 999px 999px 999px 4px; border: 0; background: var(--amber, #c58a1a); color: #fff; font: 700 12.5px var(--sans); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; }
.cr-pin .jb-ico { width: 15px; height: 15px; fill: currentColor; }
.cr-chip { position: absolute; top: 6px; left: 6px; z-index: 6; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font: 700 12px var(--sans); background: var(--sage-mist, #eef3ec); color: var(--sage-text, #2f4a2e); pointer-events: none; }
.cr-chip.due { background: var(--maroon-wash, #f8ecea); color: var(--maroon-text); }
.cr-chip .jb-ico { width: 14px; height: 14px; }
.cr-flash { animation: cr-flash 1.6s ease-out; }
@keyframes cr-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--cb-accent, var(--maroon)); border-radius: 10px; } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .cr-panel, .cr-flash { animation: none; } }
/* while Review is open, the class-discussion edge tab steps aside (it would sit on top of the panel) */
html.cr-lock .dc-tab { display: none; }
.cr-open[aria-pressed="true"] { background: var(--cb-tint, var(--maroon-wash)); border-color: var(--cb-accent, var(--maroon)); }
/* narrow phones (320–400px): all four tabs fit without sideways scrolling */
@media (max-width: 400px) {
  .cr-tabs { padding: 0 4px; gap: 0; }
  .cr-tabs button { flex: 1 1 auto; padding: 0 6px; font-size: 12.5px; }
  .cr-tabs .cr-n { min-width: 16px; height: 16px; font-size: 10px; margin-left: 3px; padding: 0 4px; }
  .cr-head { padding-inline: 12px; } .cr-scroll { padding-inline: 12px; }
}
.cr-where { min-height: 36px; }

/* ---- presence and soft locks (web/js/cb-presence.js) ---- */
.pz-who[hidden] { display: none; }
.pz-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font: 600 12.5px var(--sans); color: var(--ink-2); }
.pz-btn:hover { background: var(--chip-soft); }
.pz-btn:focus-visible { outline: 2px solid var(--cb-accent, var(--maroon)); outline-offset: 2px; }
.pz-stack { display: inline-flex; }
.pz-stack .pz-av + .pz-av { margin-left: -8px; }
.pz-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px var(--sans); color: #fff; background: hsl(var(--pz-h, 205) 45% 42%); box-shadow: 0 0 0 2px var(--card); }
.pz-av.editing { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px hsl(142 55% 40%); }
.pz-more { font-size: 12px; color: var(--ink-3); }
@media (max-width: 600px) { .pz-count { display: none; } .pz-stack .pz-av:nth-child(n+2) { display: none; } .pz-btn { padding-right: 4px; } }
.pz-ol { margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 9px var(--sans); color: #fff; background: hsl(var(--pz-h, 205) 45% 42%); }
.pz-ol.editing { box-shadow: 0 0 0 2px hsl(142 55% 40%); }
.pz-banner { position: sticky; top: 8px; z-index: 8; display: flex; align-items: center; gap: 12px; margin: 10px auto 14px; max-width: 760px; padding: 12px 14px; border-radius: 12px; background: #fff8e6; border: 1px solid #ecd28f; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); font-family: var(--sans); }
.pz-banner.over { background: var(--card); border-color: var(--line); }
.pz-banner .jb-grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pz-banner b { font-size: 14px; color: var(--ink); }
.pz-banner span { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.pz-banner .jb-btn { flex: none; }
@media (max-width: 520px) { .pz-banner { flex-wrap: wrap; } .pz-banner .jb-grow { flex: 1 1 calc(100% - 44px); } .pz-banner .jb-btn { width: 100%; min-height: 44px; } }
.cb-lesson.pz-locked { opacity: .78; }
.pz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pz-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.pz-list .jb-grow { min-width: 0; display: flex; flex-direction: column; }
.pz-list span { font-size: 13px; color: var(--ink-3); }
.pz-note { font-size: 13px; margin-top: 14px; }

/* ---- feedback for each answer (multiple choice / select, blocks.js CFB) ---- */
.cb-cfb { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-family: var(--sans); }
.cb-cfb > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 44px; padding: 8px 14px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.cb-cfb > summary::-webkit-details-marker { display: none; }
.cb-cfb > summary::before { content: '›'; display: inline-block; width: 14px; font-size: 18px; line-height: 1; color: var(--ink-3); transition: transform .15s; }
.cb-cfb[open] > summary::before { transform: rotate(90deg); }
.cb-cfb > summary span { font-weight: 500; font-size: 12.5px; color: var(--ink-4); }
.cb-cfb > summary:focus-visible { outline: 2px solid var(--cb-accent, var(--maroon)); outline-offset: 2px; border-radius: 12px; }
.cb-cfb-list { display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 14px; }
.cb-cfb-row { display: flex; gap: 10px; align-items: flex-start; }
.cb-cfb-l { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--sans); background: var(--chip-soft); color: var(--ink-3); margin-top: 2px; }
.cb-cfb-l.right { background: var(--sage-mist, #e7efe5); color: var(--sage-text, #2f4a2e); }
.cb-cfb-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cb-cfb-ch { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-cfb-f .cb-edit { margin: 0; padding: 8px 10px; min-height: 38px; border: 1px dashed var(--line); border-radius: 8px; font-size: 14px; line-height: 1.45; }
.cb-cfb-f .cb-edit:focus { border-style: solid; border-color: var(--cb-accent, var(--maroon)); outline: none; }

/* ---- saved blocks (saved-blocks.js; All blocks → Saved blocks, and the Save block sheet) ---- */
.sb-lead { margin: 0 0 14px; }
.sb-share { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.sb-share input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--maroon); }
.sb-share span { display: flex; flex-direction: column; gap: 2px; }
.sb-share em { font-style: normal; font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.sb-card { position: relative; flex-wrap: wrap; padding-right: 12px; }
.sb-card .bl-txt { flex: 1; }
.sb-card .bl-txt { min-width: 0; }
.sb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-4); }
.sb-pill { font-style: normal; font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--chip-soft); color: var(--ink-3); }
.sb-pill.team { background: var(--sage-mist, #e7efe5); color: var(--sage-text, #2f4a2e); }
.sb-acts { flex-basis: 100%; display: flex; align-items: center; gap: 2px; margin: 8px -6px -6px; padding-top: 6px; border-top: 1px solid var(--line-soft, var(--line)); }
.sb-grow { flex: 1; }
.sb-act.txt { width: auto; gap: 6px; padding: 0 10px; display: inline-flex; font: 600 12.5px var(--sans); }
.sb-act { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.sb-act:hover { background: var(--chip-soft); color: var(--ink); }
.sb-act:focus-visible { outline: 2px solid var(--maroon); outline-offset: 1px; }
.sb-act .jb-ico { width: 16px; height: 16px; }
@media (pointer: coarse) { .sb-act { width: 44px; height: 44px; } }
.sb-empty { text-align: center; padding: 32px 16px; color: var(--ink-3); }
.sb-empty .jb-ico { width: 32px; height: 32px; opacity: .45; }
.sb-empty p { margin: 8px 0 4px; font-weight: 600; color: var(--ink-2); }
.sb-empty span { font-size: 13.5px; line-height: 1.45; display: block; max-width: 380px; margin: 0 auto; }
.cr-vdel { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.cr-vdel:hover { background: var(--chip-soft); color: var(--ink); }
.cr-vdel:focus-visible { outline: 2px solid var(--cb-accent, var(--maroon)); outline-offset: 1px; }
.cr-vdel .jb-ico { width: 16px; height: 16px; }
@media (pointer: coarse) { .cr-vdel { width: 44px; height: 44px; } }

/* ---- AI for one block (ai-block-menu.js) ---- */
.ab-body { display: flex; flex-direction: column; gap: 14px; font-family: var(--sans); }
.ab-lead { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.ab-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ab-act { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; min-height: 60px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.ab-act:hover { border-color: var(--maroon); background: var(--maroon-wash, #f8ecea); }
.ab-act:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.ab-act .jb-ico { grid-row: span 2; width: 18px; height: 18px; color: var(--maroon); }
.ab-act b { grid-column: 2; font-size: 14px; color: var(--ink); }
.ab-act span { grid-column: 2; font-size: 12.5px; color: var(--ink-3); }
.ab-act:not(:has(.jb-ico)) { grid-template-columns: 1fr; } .ab-act:not(:has(.jb-ico)) b, .ab-act:not(:has(.jb-ico)) span { grid-column: 1; }
.ab-row { display: flex; align-items: flex-end; gap: 8px; }
.ab-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ab-field .jb-input { min-height: 40px; }
.ab-row .jb-btn { flex: none; min-height: 40px; }
.ab-note { margin: 0; font-size: 12.5px; color: var(--ink-4); line-height: 1.45; }
.ab-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: var(--ink-3); }
.ab-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ab-empty p { margin: 0; }
.ab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ab-list li { padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.ab-ch { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); cursor: pointer; min-height: 28px; }
.ab-ch input { width: 18px; height: 18px; accent-color: var(--maroon); }
.ab-before { margin: 0; font-size: 13.5px; color: var(--ink-4); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); line-height: 1.45; }
.ab-after { margin: 0; font-size: 14.5px; color: var(--ink); line-height: 1.5; background: var(--sage-mist, #eef3ec); border-radius: 8px; padding: 8px 10px; }
.ab-foot { display: flex; align-items: center; gap: 8px; position: sticky; bottom: 0; padding: 10px 0 2px; background: var(--card); }
.ab-undo { margin-left: 8px; color: inherit; }
.ab-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 420px) { .ab-row { flex-wrap: wrap; } .ab-row .jb-btn { width: 100%; min-height: 44px; } .ab-acts { grid-template-columns: 1fr; } }

/* ---- course from a document (doc-import.js) ---- */
.di { display: flex; flex-direction: column; gap: 14px; font-family: var(--sans); }
.di-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; counter-reset: di; }
.di-steps li { counter-increment: di; flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-4); padding-bottom: 6px; border-bottom: 3px solid var(--line); }
.di-steps li::before { content: counter(di); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--chip-soft); color: var(--ink-3); }
.di-steps li.on { color: var(--ink); border-color: var(--maroon); } .di-steps li.on::before { background: var(--maroon); color: var(--on-maroon); }
.di-steps li.done { color: var(--ink-2); border-color: var(--sage, #3e5b3d); } .di-steps li.done::before { content: '✓'; background: var(--sage-mist, #e7efe5); color: var(--sage-text, #2f4a2e); }
.di-lead { margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.di-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; cursor: pointer; color: var(--ink-3); background: var(--paper, #fbf8f3); }
.di-drop:hover, .di-drop.over { border-color: var(--maroon); background: var(--maroon-wash, #f8ecea); }
.di-drop:focus-within { outline: 2px solid var(--maroon); outline-offset: 2px; }
.di-drop.has { border-style: solid; }
.di-drop .jb-ico { width: 26px; height: 26px; color: var(--maroon); }
.di-drop span { font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; } .di-drop b { color: var(--ink); }
.di-drop em { font-style: normal; font-size: 12.5px; color: var(--ink-4); }
.di-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.di-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.di-sizes button { display: flex; flex-direction: column; gap: 2px; text-align: left; min-height: 56px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.di-sizes button[aria-checked="true"] { border-color: var(--maroon); background: var(--maroon-wash, #f8ecea); }
.di-sizes button:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.di-sizes b { font-size: 14px; } .di-sizes span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 420px) { .di-sizes { grid-template-columns: 1fr; } }
.di-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.di-check input { width: 20px; height: 20px; flex: none; accent-color: var(--maroon); }
.di-check span { display: flex; flex-direction: column; gap: 2px; } .di-check em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.di-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 10px 0 4px; background: var(--card); }
.di-cost { font-size: 12.5px; color: var(--ink-4); min-width: 0; }
.di-wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 12px; color: var(--ink-3); }
.di-wait b { color: var(--ink); font-size: 16px; } .di-wait p { margin: 0; font-size: 14px; }
.di-unit { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.di-utitle { font-weight: 700; }
.di-unit ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.di-unit li { display: flex; gap: 8px; align-items: flex-start; }
.di-unit li .jb-grow { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.di-unit li p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.di-kind { flex: none; margin-top: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--chip-soft); color: var(--ink-3); }
.di-kind.quiz { background: #fbf3e3; color: var(--amber-ink, #7a5200); }
.di-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.di-x:hover { background: var(--chip-soft); color: var(--ink); } .di-x:focus-visible { outline: 2px solid var(--maroon); }
.di-x .jb-ico { width: 16px; height: 16px; }
.di-bar { height: 8px; border-radius: 999px; background: var(--chip-soft); overflow: hidden; }
.di-bar i { display: block; height: 100%; background: var(--maroon); border-radius: inherit; transition: width .4s; }
.di-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.di-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.di-list li .jb-grow { min-width: 0; display: flex; flex-direction: column; }
.di-list li b { font-size: 14px; color: var(--ink); } .di-list li span { font-size: 12.5px; color: var(--ink-3); }
.di-st { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--sans); background: var(--chip-soft); color: var(--ink-3); }
.di-list li.ok .di-st { background: var(--sage-mist, #e7efe5); color: var(--sage-text, #2f4a2e); } .di-list li.ok .di-st .jb-ico { width: 14px; height: 14px; }
.di-list li.fail .di-st { background: var(--maroon-wash, #f8ecea); color: var(--maroon-text); }
.di-list li.wait { opacity: .7; }

/* ---- share for review: the public review page (/review/, review-public.js) ---- */
.rv-page { margin: 0; background: var(--page, #faf8f5); font-family: var(--sans); }
.rv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rv-msg { max-width: 560px; margin: 12vh auto 0; padding: 0 20px; text-align: center; } .rv-msg h1 { font-size: 24px; margin: 0 0 8px; } .rv-msg p { color: var(--ink-3); }
.rv-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.rv-top .jb-grow { min-width: 0; display: flex; flex-direction: column; }
.rv-org { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-cname { font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-pill { flex: none; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: #fbf3e3; color: var(--amber-ink, #7a5200); }
.rv-pick { padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.rv-pick select { width: 100%; min-height: 44px; }
.rv-body { display: flex; min-height: calc(100vh / var(--zf, 1) - 58px); }
.rv-nav { display: none; }
.rv-main { flex: 1; min-width: 0; padding: 8px 0 120px; }
.rv-main .cb-lesson { background: transparent; }
.rv-lhead { padding: 18px 0 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rv-lhead h1 { margin: 0; font-size: clamp(24px, 5vw, 36px); line-height: 1.15; }
.rv-has { position: relative; padding-top: 40px; }
.rv-cbtn { position: absolute; top: 2px; right: 0; z-index: 5; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: 600 12.5px var(--sans); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.rv-cbtn .jb-ico { width: 15px; height: 15px; }
.rv-cbtn.n { background: var(--amber, #c58a1a); border-color: transparent; color: #fff; }
.rv-cbtn:hover { border-color: var(--maroon); } .rv-cbtn:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
@media (pointer: coarse) { .rv-cbtn { min-height: 40px; } }
.rv-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 78vh; max-height: 78dvh; display: flex; flex-direction: column; background: var(--card); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(16, 24, 40, .2); padding-bottom: env(safe-area-inset-bottom); animation: rv-up .18s ease-out; }
.rv-panel[hidden] { display: none; }
@keyframes rv-up { from { transform: translateY(40px); } to { transform: none; } }
@media (max-width: 1023px) { html.rv-open body::before { content: ''; position: fixed; inset: 0; z-index: 29; background: rgba(16, 24, 40, .38); } }
.rv-panel .cr-scroll { padding-bottom: 20px; }
.rv-none { margin: 0; color: var(--ink-3); font-size: 14px; }
.rv-name { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rv-name .jb-input { min-height: 40px; }
.rv-who { font-size: 12px; color: var(--ink-4); min-width: 0; }
.rv-team { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--cb-tint, var(--maroon-wash)); color: var(--maroon-text); }
.cr-av.guest { background: var(--amber, #c58a1a); }
.rv-intro { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ink, #1f2933); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.rv-intro[hidden] { display: none; } .rv-intro p { margin: 0; font-size: 13.5px; line-height: 1.45; flex: 1; } .rv-intro .jb-btn { flex: none; }
html.rv-open .rv-intro { display: none; }
@media (prefers-reduced-motion: reduce) { .rv-panel { animation: none; } }
@media (min-width: 1024px) {
  .rv-pick { display: none; }
  .rv-nav { display: block; flex: none; width: 280px; position: sticky; top: 58px; align-self: flex-start; max-height: calc(100vh / var(--zf, 1) - 58px); overflow-y: auto; padding: 14px 10px 40px; border-right: 1px solid var(--line); background: var(--card); }
  .rv-unit { margin: 14px 8px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .rv-nav a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
  .rv-nav a .jb-ico { width: 16px; height: 16px; flex: none; color: var(--ink-4); }
  .rv-nav a span { flex: 1; min-width: 0; }
  .rv-nav a em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; background: var(--amber, #c58a1a); color: #fff; }
  .rv-nav a:hover { background: var(--chip-soft); } .rv-nav a[aria-current="true"] { background: var(--cb-tint, var(--maroon-wash)); color: var(--ink); font-weight: 600; }
  .rv-panel { position: sticky; top: 58px; left: auto; right: auto; bottom: auto; align-self: flex-start; flex: none; width: clamp(340px, calc(26vw / var(--zf, 1)), 520px); height: calc(100vh / var(--zf, 1) - 58px); max-height: none; border-radius: 0; border-left: 1px solid var(--line); box-shadow: none; animation: none; }
  .rv-intro { left: auto; right: 20px; max-width: 420px; }
}

/* ---- share for review (builder side) and @mentions ---- */
.cr-share { flex: none; gap: 6px; }
.cr-share .jb-ico { width: 15px; height: 15px; }
@media (max-width: 420px) { .cr-share span { display: none; } }
.cr-rv { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: #fbf3e3; color: var(--amber-ink, #7a5200); }
.cr-new, .cr-reply { position: relative; }
.cr-mmenu { position: absolute; left: 12px; right: 12px; top: 100%; z-index: 20; margin-top: -6px; display: flex; flex-direction: column; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 24px rgba(16, 24, 40, .14); }
.cr-reply .cr-mmenu { left: 0; right: 0; margin-top: 4px; }
.cr-mmenu button { text-align: left; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.cr-mmenu button[aria-selected="true"], .cr-mmenu button:hover { background: var(--cb-tint, var(--maroon-wash)); }
.cr-sharebody { display: flex; flex-direction: column; gap: 14px; font-family: var(--sans); }
.cr-sharelead { margin: 0; font-size: 14px; line-height: 1.5; }
.cr-mklink b { font-size: 14px; }
.cr-mklink .jb-field { margin: 0; }
.cr-wrap { flex-wrap: wrap; align-items: flex-end; }
.cr-wrap > .jb-field { flex: 0 1 160px; }
.cr-check { flex: 1 1 220px; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.cr-check input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--maroon); }
.cr-check span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; } .cr-check em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.cr-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cr-links li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.cr-links li .jb-grow { min-width: 0; flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.cr-links b { font-size: 14px; color: var(--ink); } .cr-links span { font-size: 12.5px; color: var(--ink-3); }
.cr-links.old li { opacity: .7; }

/* Edwin's voice in the course builder (web/js/cb-voice.js) */
.cbv-banner { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px;
  background: #FFF4D6; border: 1px solid #E8CF8A; color: var(--ink); font-size: 14px; line-height: 1.4; }
.cbv-banner > .jb-ico { flex: none; width: 18px; height: 18px; color: #8A5A00; }
.cbv-banner > span { flex: 1 1 260px; min-width: 0; }
.cbv-banner .jb-btn { flex: none; }
.cb-app.previewing .cbv-banner, .cb-app.full .cbv-banner { display: none; }
@media (max-width: 900px) { .cbv-banner { margin-bottom: 10px; } }
.cbv-dot { flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #D99A00; box-shadow: 0 0 0 2px var(--card); }
.cr-open .cbv-n { background: #D99A00; color: #fff; }
.cbv-badge { justify-self: start; width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 8px; border-radius: 999px; background: #FFF4D6; color: #7A4F00; font-size: 12px; font-weight: 600; }
.cbv-badge .jb-ico { width: 13px; height: 13px; }
.cbv { display: grid; gap: 14px; }
.cbv-intro { margin: 0; color: var(--ink-3); }
.cbv-off { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--chip-soft); display: flex; gap: 8px; align-items: flex-start; }
.cbv-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.cbv-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.cbv-cost { display: grid; gap: 2px; min-width: 0; }
.cbv-cost span { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.cbv-prog { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--chip-soft); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.cbv-prog .jb-spin { flex: none; margin-top: 2px; }
.cbv-prog > span:last-child { min-width: 0; }
.cr-open.cbv-busy .jb-ico { animation: cbv-pulse 1.6s ease-in-out infinite; }
@keyframes cbv-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cr-open.cbv-busy .jb-ico { animation: none; } }
.cbv-unit { display: grid; gap: 2px; }
.cbv-unit h3 { margin: 4px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cbv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.cbv-main { flex: 1 1 220px; min-width: 0; display: grid; gap: 3px; }
.cbv-main b { font-weight: 600; overflow-wrap: anywhere; }
.cbv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cbv-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cbv-row.stale { background: linear-gradient(90deg, #FFF8E6, transparent 70%); }
