/* The practice room (web/quest/runtime.js, play-ui.js): docs/brand/src/mock-course.html. The left column is the task
   card with the step's to-dos, the coach and the level track; the right is the step (or the practice copy of the
   company's screen); the key bar sits at the bottom. Yellow is the one next move: the Next step key. */
.wrap.pl-wrap { max-width: none; padding: 0; }
.pl { position: relative; min-height: calc(100vh - 64px); display: grid; grid-template-rows: 1fr auto; }
.pl-stage { display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: 22px; padding: 22px 24px; align-items: start; max-width: 1320px; width: 100%; margin: 0 auto; }
.pl-brief { display: grid; gap: 14px; align-content: start; position: sticky; top: 86px; min-width: 0; }
.pl-work { min-width: 0; align-self: stretch; display: flex; flex-direction: column; }
.qg-stage { flex: 1; display: flex; flex-direction: column; min-height: 120px; }
.qg-step { flex: 1; display: flex; flex-direction: column; animation: qg-in .3s ease both; transition: opacity .2s ease, transform .2s ease; }
.qg-step.out { opacity: 0; transform: translateY(4px); }
.qg-end { flex: 0 0 auto; }
@keyframes qg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* the task card: what you are doing, and the steps of this level as to-dos */
.pl-task { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.pl-eyebrow { display: inline-flex; align-items: center; gap: 7px; font: 700 13px/1 var(--display); letter-spacing: .02em; color: var(--muted); }
.pl-h { font: 800 25px/1.12 var(--display); letter-spacing: -.01em; margin: 10px 0 10px; overflow-wrap: anywhere; }
.pl-q { color: var(--ink-3); font-size: 15.5px; }
.pl-q:empty { display: none; }
.pl-q .qs-q, .pl-q .qs-task { font: 400 15.5px/1.5 var(--text); }
.pl-q p { margin: 0 0 8px; }
.pl-q .qs-task { background: none; border: 0; padding: 0; margin: 8px 0 0; }
.pl-todo { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.td-go { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font: 500 15px/1.3 var(--text); color: var(--muted); cursor: pointer; min-height: 44px; }
.td-go:hover:not(:disabled) { background: var(--mist); }
.td-go:disabled { cursor: default; }
.td-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.td-sc { color: var(--muted); font-size: 13px; }
.box { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; font: 700 12.5px/1 var(--display); color: var(--muted); }
.box .i { width: 15px; height: 15px; stroke-width: 3; }
.pl-todo li.now > .td-go { background: var(--sun-soft); color: var(--ink); font-weight: 600; }
.pl-todo li.now .box { border-color: var(--ink); background: var(--sun); color: var(--ink); }
.pl-todo li.done > .td-go { color: var(--ink); }
.pl-todo li.done .box { border-color: var(--pass); background: var(--pass); color: #fff; animation: pop .3s; }
.pl-todo li.notyet .box { border-color: var(--stuck); background: var(--stuck-soft); color: var(--stuck-ink); }
.pl-todo li.waiting .box, .pl-todo li.draft .box { border-color: var(--going); background: var(--going-soft); color: var(--going-ink); }
.td-items { list-style: none; margin: 2px 0 6px 45px; padding: 0; display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.td-items li, .qt-items li { display: flex; align-items: flex-start; gap: 8px; }
.td-items li.on, .qt-items li.on { color: var(--pass-ink); }
.td-items .i, .qt-items .i { width: 14px; height: 14px; margin-top: 4px; stroke-width: 3; }
.qt-dot { width: 10px; height: 10px; margin: 5px 2px; flex: none; border: 2px solid var(--line-2); border-radius: 50%; display: inline-block; }

/* the coach: one line on what happened, one on the next move */
.coach { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px; min-height: 76px; }
.coach-i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--mist-2); color: var(--ink-3); }
.coach b { display: block; font: 700 15.5px/1.25 var(--display); overflow-wrap: anywhere; }
.coach p { font-size: 14.5px; color: var(--ink-3); line-height: 1.4; margin: 2px 0 0; overflow-wrap: anywhere; }
.coach.good { background: var(--pass-soft); border-color: transparent; } .coach.good .coach-i { background: var(--pass); color: #fff; }
.coach.bad { background: var(--stuck-soft); border-color: transparent; } .coach.bad .coach-i { background: var(--stuck); color: #fff; }
.coach.tip { background: var(--sun-soft); border-color: transparent; } .coach.tip .coach-i { background: var(--sun); color: var(--ink); }
.coach.wait { background: var(--going-soft); border-color: transparent; } .coach.wait .coach-i { background: var(--going); color: #fff; }
.coach.bad, .coach.good, .coach.tip, .coach.wait { animation: pop .22s; }
.pl-mcoach { display: none; }

/* the way through the course, the final test at the end */
.pl-path { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px 14px; }
.path-h { display: flex; justify-content: space-between; gap: 8px; font: 600 13px/1.2 var(--text); color: var(--muted); margin-bottom: 14px; }
.path-h b { color: var(--ink); }
.path-ol { position: relative; }
.path-ol::before { content: ''; position: absolute; left: 12px; right: 12px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--line); border-radius: 2px; }
.path-fill { position: absolute; left: 12px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--pass); border-radius: 2px; max-width: calc(100% - 24px); }
.pl-path ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: space-between; position: relative; }
.pi { position: relative; z-index: 1; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: var(--mist-2); color: var(--faint); font: 700 12px/1 var(--display); box-shadow: 0 0 0 3px var(--paper); cursor: pointer; }
.pi:disabled { cursor: default; }
.pi .i { width: 14px; height: 14px; stroke-width: 3; }
.pl-path li.done .pi { background: var(--pass); color: #fff; }
.pl-path li.now .pi { background: var(--sun); color: var(--ink); width: 32px; height: 32px; border-radius: 11px; font-size: 14px; box-shadow: 0 0 0 3px var(--paper), 0 6px 0 0 var(--sun-edge); transform: translateY(-3px); }
.pl-path li.boss .pi { width: 32px; height: 32px; border-radius: 11px; background: var(--ink); color: var(--sun); }
.pl-path li.boss .pi .i { width: 16px; height: 16px; stroke-width: 2.2; }

/* the key bar */
.pl-bottom { position: sticky; bottom: 0; z-index: 5; }
.pl-foot { display: flex; align-items: center; gap: 12px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.pl-foot .btn { margin-bottom: 4px; } .pl-foot .btn-quiet { margin-bottom: 0; }
.pl-hintslot { display: contents; }
.pl-hintslot .btn[hidden] { display: none; }
.pl-sp { margin-left: auto; color: var(--muted); font-size: 14px; }
.pl-next.pop { animation: pop .3s; }
.qg-nudge { animation: ring 1.1s 3; }
.pl.fin .pl-brief, .pl.fin .pl-bottom { display: none; }
.pl.fin .pl-stage { grid-template-columns: minmax(0, 640px); justify-content: center; padding-top: 48px; }
.qg-unknown { padding: 14px; border: 1px solid var(--no-line); background: var(--stuck-soft); border-radius: var(--r); color: var(--stuck-ink); }

/* the end of a level or of the exam */
.qg-end { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; text-align: center; }
.end-i { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--mist-2); color: var(--ink-3); animation: pop .35s; }
.end-i .i { width: 30px; height: 30px; stroke-width: 2.4; }
.end-ok { background: var(--pass); color: #fff; } .end-no { background: var(--stuck); color: #fff; } .end-wait { background: var(--going); color: #fff; } .end-going { background: var(--mist-2); color: var(--ink); }
.end-t { font: 800 28px/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 8px; }
.end-p { color: var(--ink-3); max-width: 46ch; margin: 0 auto 18px; }
.end-acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.qg-left { display: grid; gap: 6px; margin: 0 0 18px; text-align: left; }
.qg-lrow { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r); text-align: left; font: 500 15px var(--text); color: var(--ink); cursor: pointer; }
.qg-lrow:hover { background: var(--mist); }
.qt-sc { margin-left: auto; color: var(--muted); font-size: 13px; }

/* the part screen's "what is left" list, and the icons of a step's state */
.qt-count { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.qt-none { color: var(--pass-ink); font-size: 14px; }
.qt-h { font: 700 14px/1.3 var(--display); margin: 12px 0 4px; }
.qt-h .s, .qt-from { color: var(--muted); font: 400 12px var(--text); font-style: normal; }
.qt-from { display: block; margin-bottom: 2px; }
.qt-lv.fog { opacity: .55; }
.qt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.qt-go { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-s); text-align: left; font: 14px/1.3 var(--text); color: var(--ink); cursor: pointer; }
.qt-go:hover:not(:disabled) { background: var(--mist); }
.qt-go:disabled { cursor: default; color: var(--muted); }
.qt-ic { flex: 0 0 18px; display: grid; place-items: center; color: var(--muted); }
.qt-ic .i { width: 16px; height: 16px; stroke-width: 2.5; }
.qt-step.done .qt-ic, .qg-lrow.done .qt-ic { color: var(--pass-ink); } .qt-step.notyet .qt-ic, .qg-lrow.notyet .qt-ic { color: var(--stuck-ink); } .qt-step.waiting .qt-ic, .qt-step.draft .qt-ic, .qg-lrow.waiting .qt-ic, .qg-lrow.draft .qt-ic { color: var(--going-ink); }
.qt-lab { flex: 1 1 auto; min-width: 0; }
.qt-items { margin: 0 0 4px 34px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }

/* the Lessons panel */
.qg-ov { position: absolute; inset: 0; z-index: 20; background: rgba(22, 19, 45, .4); display: flex; justify-content: center; align-items: flex-start; padding: 24px 12px; }
.qg-ov-card { background: var(--paper); border-radius: var(--r-l); width: min(680px, 100%); max-height: calc(100vh - 140px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.qg-ov-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); font: 700 17px var(--display); }
.qg-ov-b { padding: 14px 18px; overflow: auto; }
.ql-lv h4 { margin: 8px 0 4px; font: 700 16px var(--display); }
.ql-why { color: var(--muted); margin: 0 0 8px; font-size: 14px; }
.ql-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; }
.ql-t { font: 700 15px var(--display); margin-bottom: 4px; }
.ql-src { color: var(--muted); font-size: 13px; margin-top: 6px; }
.pinned { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); }

/* the phone: task card on top, the copy below, the key bar fixed at the thumb */
@media (max-width: 900px) {
  .pl { min-height: calc(100vh - 56px); }
  .pl-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px 14px 18px; }
  .pl-brief { position: static; gap: 14px; }
  .pl-brief .coach, .pl-path { display: none; }
  .pl-task { padding: 16px; }
  .pl-h { font-size: 21px; margin: 8px 0 6px; }
  .pl-q { font-size: 14.5px; }
  .pl-todo { margin-top: 10px; gap: 2px; }
  .td-go { padding: 6px 8px; font-size: 14.5px; min-height: 44px; }
  .pl-mcoach { display: block; padding: 10px 14px 0; background: var(--paper); border-top: 1px solid var(--line); }
  .pl-mcoach .coach { min-height: 0; padding: 10px 12px; border-radius: 14px; }
  .pl-mcoach .coach p { font-size: 14px; }
  .pl-foot { border-top: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .pl-sp, .pl-lessons span, .pl-again span { display: none; }
  .pl-lessons, .pl-again { padding: 10px; min-width: 44px; }
  .pl-next { margin-left: auto; flex: 1; }
  .pl.fin .pl-stage { padding-top: 20px; }
  .qg-end { padding: 22px 16px; }
}
