/* ============================================================
   v12.93.0 — help for staff pages (public/js/staff-help.js)
   The bar above a page, the help panel, the ⓘ tips, the editors'
   section links, and the small layout tidies on the first 15 pages.
   ============================================================ */

/* ---------- the bar above the page ---------- */
#sh-bar-slot { padding: 14px 22px 0; width: 100%; box-sizing: border-box; }
#sh-bar-slot[hidden] { display: none; }
.sh-bar { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
  background: linear-gradient(100deg, #F4F2FF, #FFF6FB); border: 1px solid #E4DEFA; border-radius: 16px; padding: 10px 14px; }
.sh-text { min-width: 0; }
.sh-title { font: 800 15px/1.3 'Nunito', sans-serif; margin-right: 8px; color: #2B2560; }
.sh-purpose { font-size: 14px; color: #4D4A6B; }
.sh-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sh-btn { white-space: nowrap; }
.sh-btns .sh-btn:first-child { background: #4F46B8; color: #fff; border-color: #4F46B8; }
.sh-related { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sh-chip { display: inline-block; border: 1px solid #D9D3F5; background: #fff; color: #4F46B8; border-radius: 999px;
  padding: 2px 10px; font-size: 12.5px; font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.6; }
.sh-chip:hover { background: #EEEDFB; }
.sh-new { position: absolute; top: -9px; left: 14px; background: #D22CB2; color: #fff; font: 800 11px/1 'Nunito', sans-serif;
  padding: 4px 8px; border-radius: 999px; letter-spacing: .02em; }
@media (max-width: 760px) {
  #sh-bar-slot { padding: 12px 12px 0; }
  .sh-bar { grid-template-columns: 1fr; }
  .sh-btns { justify-content: flex-start; }
}

/* ---------- the help panel ---------- */
body.sh-open { overflow: hidden; }
.sh-layer { position: fixed; inset: 0; z-index: 1200; }
.sh-scrim { position: absolute; inset: 0; background: rgba(28, 22, 64, .38); animation: shFade .18s ease-out; }
.sh-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: #fff; overflow-y: auto;
  box-shadow: -18px 0 50px rgba(28, 22, 64, .22); padding: 18px 20px 24px; box-sizing: border-box; animation: shSlide .22s ease-out; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sh-kicker { margin: 0; font: 800 11.5px/1 'Nunito', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #D22CB2; }
.sh-head h2 { margin: 4px 0 0; font-size: 22px; }
.sh-x { border: 0; background: #F2F1FA; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; flex: none; }
.sh-x:hover { background: #E4E1F7; }
.sh-lead { margin: 10px 0 12px; color: #4D4A6B; }
.sh-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line, #E3E6F2); }
.sh-drawer h3 { margin: 18px 0 8px; font-size: 16px; }
.sh-task { border: 1px solid var(--line, #E3E6F2); border-radius: 12px; margin: 0 0 8px; background: #FCFCFF; }
.sh-task > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; list-style: none; position: relative; padding-right: 30px; }
.sh-task > summary::-webkit-details-marker { display: none; }
.sh-task > summary::after { content: "+"; position: absolute; right: 12px; top: 8px; font-weight: 800; color: #4F46B8; }
.sh-task[open] > summary::after { content: "–"; }
.sh-task ol { margin: 0; padding: 0 14px 12px 34px; }
.sh-task li { margin: 4px 0; line-height: 1.45; }
.sh-tips { margin: 0; padding-left: 20px; }
.sh-tips li { margin: 6px 0; line-height: 1.45; }
.sh-rel { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sh-foot { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line, #E3E6F2); }
@keyframes shFade { from { opacity: 0; } }
@keyframes shSlide { from { transform: translateX(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sh-scrim, .sh-drawer { animation: none; } }

/* ---------- ⓘ tips ---------- */
.sh-i { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin: 0 4px; padding: 0;
  border-radius: 50%; border: 1.5px solid #8C85D6; background: #fff; color: #4F46B8; font: italic 800 11px/1 Georgia, serif;
  cursor: help; position: relative; vertical-align: middle; flex: none; text-transform: none; letter-spacing: 0; }
.sh-i::before { content: "i"; }
.sh-i:hover, .sh-i:focus-visible, .sh-i.is-on { background: #4F46B8; color: #fff; border-color: #4F46B8; outline: none; }
.sh-i::after { content: attr(data-tip); position: absolute; z-index: 1100; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; background: #2B2560; color: #fff; font: 600 12.5px/1.45 'Nunito', system-ui, sans-serif;
  font-style: normal; text-align: left; white-space: normal; padding: 8px 10px; border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; }
.sh-i:hover::after, .sh-i:focus-visible::after, .sh-i.is-on::after { opacity: 1; visibility: visible; }
th .sh-i::after { left: auto; right: -8px; transform: none; }
.sh-i-demo { cursor: default; }
.sh-i-demo::after { display: none; }

/* ---------- editors: section links, booster note ---------- */
.sh-jump { position: sticky; top: -1px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  background: rgba(255,255,255,.96); backdrop-filter: blur(4px); padding: 8px 0; margin: 0 0 8px; border-bottom: 1px solid var(--line, #E3E6F2); }
.sh-flash { animation: shFlash 1.2s ease-out; border-radius: 10px; }
@keyframes shFlash { 0% { box-shadow: 0 0 0 4px rgba(210,44,178,.35); } 100% { box-shadow: 0 0 0 0 rgba(210,44,178,0); } }
#assess-form.is-booster .sh-unused { display: none !important; }
.sh-booster-note { background: #FFF7E6; border: 1px solid #F6D58E; border-radius: 10px; padding: 8px 10px; }
/* a quiz's timed sections have no passage (only a mock's are saved), so its 📖 Passage button is put away */
.st-box.st-quiz [data-st-passage], .st-box.st-quiz .st-passage { display: none !important; }

/* ---------- the tour card on a staff page ---------- */
.tour-card.is-staff { border-top: 4px solid #4F46B8; }

/* ---------- page tidies ---------- */
/* Courses: four everyday buttons, the rest under More (opens in the row) */
.teach-courses .cr-actions { white-space: normal; text-align: right; min-width: 430px; }
/* v13.18.3: User management's row actions wrap into rows like the courses page */
.ur-actions { white-space: normal; text-align: right; min-width: 380px; max-width: 470px; }
.ur-actions .btn { margin: 2px 0; }
.row-more { display: inline-block; vertical-align: top; }
.row-more[open] { display: block; margin-top: 2px; }
.row-more > summary { list-style: none; display: inline-block; }
.row-more > summary::-webkit-details-marker { display: none; }
.row-more[open] > summary { background: #EEEDFB; }
.row-more-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: flex-end; flex-basis: 100%; width: 100%; }   /* v12.95.0: always shown, under the first row */
.row-more-list [data-del] { margin-left: 8px; }
/* Results and Student progress */
.tr-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-tools { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.ts-tools input { border: 2px solid var(--line, #E3E6F2); border-radius: 999px; padding: 8px 14px; min-width: 260px; font: inherit; }
/* Instructor course view: what is on each week */
.ic-weektools { margin: 6px 0 14px; border: 1px solid #F1DFA6; background: #FFFBEB; border-radius: 14px; padding: 10px 12px; }
.ic-wt-h { margin: 0 0 8px; font-weight: 800; }
.ic-wt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ic-wt-list li { background: #fff; border: 1px solid #F1DFA6; border-radius: 10px; padding: 6px 10px; font-size: 13px; color: #5B5F7A; }
.ic-wt-list strong { display: block; color: #2B2560; font-size: 13.5px; }
/* Offline mocks: the sheets and the roster as two groups */
.om-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.om-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border: 1px solid var(--line, #E3E6F2); border-radius: 14px; padding: 8px 10px; background: #FCFCFF; }
.om-group-h { font: 800 12px/1 'Nunito', sans-serif; text-transform: uppercase; letter-spacing: .06em; color: #6B6890; margin-right: 4px; }
/* Vocabulary: the two buttons that delete, kept apart */
.av-danger { margin-top: 16px; border: 1px solid #F3C4C4; background: #FFF6F6; border-radius: 14px; padding: 10px 12px; }

/* v12.95.0: the projector view of the live board shows no help bar or tips */
body.lb-project #sh-bar-slot, body.lb-project .sh-i { display: none !important; }
