.training-page { max-width: 1040px; margin: auto; padding: 20px; line-height: 1.6; }
.training-page header { margin: 16px 0 24px; }
.training-page h2 { font-size: clamp(26px, 5vw, 36px); line-height: 1.2; overflow-wrap: anywhere; }
.training-page h3 { margin: 10px 0; overflow-wrap: anywhere; }
.training-page .panel { margin: 16px 0; padding: 20px; }
.training-page p, .training-text { overflow-wrap: anywhere; }
.training-text { white-space: pre-wrap; margin: 12px 0 20px; }
.training-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.training-actions strong { flex-basis: 100%; }
.training-record { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.training-record > div { min-width: 0; }
.training-page button { min-height: 44px; white-space: normal; }
.training-page fieldset, [data-training-lesson], [data-training-question] { min-width: 0; border: 1px solid var(--line, #8c9eac); border-radius: 8px; padding: 14px; margin: 16px 0; }
.training-page legend { font-weight: 600; overflow-wrap: anywhere; max-width: 100%; }
.training-page .training-choice { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 8px 0; }
.training-choice input { width: 20px; height: 20px; flex: 0 0 20px; }
/* (W21) Assign a course: one or more people, and what is missing said next to its field. */
.dialog .training-people { min-width: 0; border: 1px solid var(--line, #8c9eac); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.dialog .training-people label.check { display: flex; gap: 8px; align-items: center; min-height: 36px; overflow-wrap: anywhere; }
.dialog .training-field-note { color: var(--bad-ink, #9b1c1c); font-size: 14px; margin: 4px 0 0; }
.dialog .training-field-note:empty { display: none; }
@media (max-width: 600px) {
  .training-page { padding: 12px; }
  .training-page .panel { padding: 16px; }
  .training-record { display: block; }
  .training-record button { width: 100%; }
  .training-actions button { flex: 1 1 100%; }
}

/* s317: course player and editor, schema version 2. App tokens only; visible focus everywhere; no motion when the
   person asks for less; one column at phone widths. */
.tp .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp :focus-visible, .te :focus-visible { outline: 3px solid var(--focus, #1d4ed8); outline-offset: 2px; }
.tp-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 24px; align-items: start; }
.tp-nav { position: sticky; top: 12px; border: 1px solid var(--line, #8c9eac); border-radius: var(--radius, 12px); padding: 14px; background: var(--panel, #fff); }
.tp-progress-label { margin: 0 0 6px; font-weight: 600; }
.tp-nav progress { width: 100%; height: 8px; accent-color: var(--primary, #2f5d7c); }
.tp-lesson-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.tp-nav-item { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 8px 10px; text-align: left; font: inherit; color: var(--ink, #1f2a33); background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.tp-nav-item:hover { background: var(--hover, #eef3f7); }
.tp-nav-item.current { background: var(--primary-soft, #e3edf5); border-color: var(--primary, #2f5d7c); font-weight: 600; }
.tp-nav-state { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line, #8c9eac); font-size: 13px; }
.tp-nav-item.current .tp-nav-state { border-color: var(--primary, #2f5d7c); }
.tp-stage { min-width: 0; scroll-margin-top: 12px; }
.tp-stage > .panel { margin-top: 0; }
.tp-heading { font-size: clamp(22px, 3vw, 28px); }
.tp-heading:focus { outline: none; }
.tp-heading:focus-visible { outline: 3px solid var(--focus, #1d4ed8); }
.tp-minutes, .tb-help, .tb-practice, .tp-facts dt { color: var(--ink2, #44525e); }
.tb-practice { font-size: 14px; font-weight: 600; text-transform: none; margin: 0 0 8px; }
.tp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
.tp-facts dd { margin: 0; overflow-wrap: anywhere; }
.tb { margin: 28px 0; }
.tb h4 { margin: 0 0 10px; font-size: 18px; overflow-wrap: anywhere; }
.tp-text, .tb p { white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-callout { border-left: 6px solid var(--primary, #2f5d7c); background: var(--info-bg, #eaf2f8); color: var(--ink, #1f2a33); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.tb-callout.tb-tip { border-color: var(--good, #2e7d4f); background: var(--good-bg, #e9f5ee); }
.tb-callout.tb-warning { border-color: var(--attention, #b45309); background: var(--bad-bg, #fdf0e6); }
.tb-callout-label { font-weight: 700; margin: 0 0 4px; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.tb-actions .btn, .tb-choices .btn { flex: 0 1 auto; }
.tb-feedback:empty { display: none; }
.tb-feedback { margin: 12px 0; padding: 12px 14px; border-radius: 8px; background: var(--info-bg, #eaf2f8); }
.tb-done { color: var(--good-ink, #1e5e3a); font-weight: 600; }
.tb-image, .tb-media { margin: 0; }
.tb-figure { position: relative; display: block; width: 100%; max-width: 720px; }
.tb-figure img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line, #8c9eac); }
.tb-marker { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; min-height: 44px !important; border-radius: 50%; border: 3px solid #fff; background: var(--primary, #2f5d7c); color: var(--on-primary, #fff); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); cursor: pointer; }
.tb-marker[aria-expanded="true"] { background: var(--ink, #1f2a33); }
.tb-marker-panel { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--line, #8c9eac); border-radius: 8px; background: var(--panel, #fff); }
.tb-marker-panel h5 { margin: 0 0 6px; font-size: 16px; }
.tb-image figcaption { margin: 8px 0; color: var(--ink2, #44525e); }
.tb-equivalent { margin: 8px 0; }
.tb-equivalent summary, .tb summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.tb-media video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.tb-media audio { width: 100%; }
.tb-transcript { border: 1px solid var(--line, #8c9eac); border-radius: 8px; padding: 12px 14px; max-height: 360px; overflow: auto; }
.tb-accordion .tb-acc-item { border-bottom: 1px solid var(--line, #8c9eac); }
.tb-accordion h4 { margin: 0; }
.tb-accordion h4 button { display: flex; justify-content: space-between; width: 100%; min-height: 48px; padding: 10px 4px; font: inherit; font-weight: 600; text-align: left; color: var(--ink, #1f2a33); background: none; border: 0; cursor: pointer; }
.tb-accordion h4 button::after { content: "+"; font-size: 20px; line-height: 1; }
.tb-accordion h4 button[aria-expanded="true"]::after { content: "−"; }
.tb-acc-panel { padding: 0 4px 12px; }
.tb-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line, #8c9eac); }
.tb-tablist [role="tab"] { min-height: 44px; padding: 8px 14px; font: inherit; color: var(--ink, #1f2a33); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; }
.tb-tablist [role="tab"][aria-selected="true"] { border-bottom-color: var(--primary, #2f5d7c); font-weight: 700; }
.tb-tabpanel { padding: 12px 4px; }
.tb-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tb-card { width: 100%; min-height: 140px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: var(--ink, #1f2a33); background: var(--panel, #fff); border: 2px solid var(--line, #8c9eac); border-radius: 12px; cursor: pointer; transition: transform .25s ease, background-color .25s ease; }
.tb-card-front { font-weight: 700; font-size: 17px; }
.tb-card-hint { font-size: 14px; color: var(--ink2, #44525e); }
.tb-card.flipped { background: var(--primary-soft, #e3edf5); border-color: var(--primary, #2f5d7c); transform: rotateX(360deg); }
.tb-card-back p { margin: 0; }
.tb-steps { list-style: none; padding: 0; display: grid; gap: 12px; }
.tb-steps.tb-process { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); counter-reset: none; }
.tb-steps li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 12px; border: 1px solid var(--line, #8c9eac); border-radius: 10px; background: var(--panel, #fff); }
.tb-steps.tb-timeline li { border: 0; border-left: 3px solid var(--primary, #2f5d7c); border-radius: 0; padding: 4px 0 12px 16px; margin-left: 14px; position: relative; }
.tb-steps.tb-timeline .tb-step-mark { position: absolute; left: -17px; top: 0; width: 30px; }
.tb-steps.tb-timeline li > div { padding-left: 14px; }
.tb-step-mark { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--primary, #2f5d7c); color: var(--on-primary, #fff); font-weight: 700; }
.tb-when { font-size: 14px; font-weight: 600; color: var(--primary-ink, #234a63); margin: 0; }
.tb-scenario { border: 1px solid var(--line, #8c9eac); border-radius: 12px; padding: 16px; background: var(--panel, #fff); }
.tb-scenario-prompt { font-size: 17px; }
.tb-scenario-prompt:focus { outline: none; }
.tb-choices { display: grid; gap: 8px; margin: 12px 0; }
.tb-choices .btn { text-align: left; }
.tb-choices .btn[aria-pressed="true"] { border-color: var(--primary, #2f5d7c); background: var(--primary-soft, #e3edf5); opacity: 1; }
.tb-outcome { background: var(--good-bg, #e9f5ee); }
.tb-sort-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.tb-sort-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line, #8c9eac); }
.tb-sort-row select { min-height: 44px; font: inherit; }
.tb-sort-mark { grid-column: 1 / -1; font-size: 14px; font-weight: 600; }
.tb-sort-mark:empty { display: none; }
.good { color: var(--good-ink, #1e5e3a); }
.tb-sort-mark.bad, .tb-option-feedback.bad { color: var(--bad-ink, #9b1c1c); }
.tb-check { border: 1px solid var(--line, #8c9eac); border-radius: 12px; padding: 14px; }
.tb-option-feedback { display: block; font-size: 15px; margin-top: 4px; }
.tb-option-feedback:empty { display: none; }
.tb-checklist ul { list-style: none; padding: 0; }
.tb-checklist .tb-help, .tb-checklist small { display: block; font-size: 14px; }
.tb-ack { border: 2px solid var(--primary, #2f5d7c); border-radius: 12px; padding: 16px; }
.tb-ack h4 small { font-weight: 400; color: var(--ink2, #44525e); }
.tb-helpcard { border: 1px dashed var(--primary, #2f5d7c); border-radius: 12px; padding: 14px 16px; background: var(--panel, #fff); }
.tp-lesson-foot { border-top: 1px solid var(--line, #8c9eac); padding-top: 16px; margin-top: 28px; }
.te-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--bg, #f6f8fa); }
.te-bar .btn { flex: 0 1 auto; }
.te-missing { border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: var(--info-bg, #eaf2f8); }
.te-missing:has(strong) { background: var(--bad-bg, #fdf0e6); border-left: 6px solid var(--attention, #b45309); }
.te-missing ul { margin: 6px 0 0; }
.te-alert:empty { display: none; }
.te-alert { border-left: 6px solid var(--bad-ink, #9b1c1c); background: var(--bad-bg, #fdecec); padding: 10px 14px; border-radius: 8px; margin: 8px 0; }
.te-missing-inline { color: var(--bad-ink, #9b1c1c); font-size: 14px; margin: 4px 0 0; }
.te-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.te-field { display: grid; gap: 4px; min-width: 0; }
.te-field.wide { grid-column: 1 / -1; }
.te-field label, .te-add-block label, .te-upload label, .te-new label { font-weight: 600; font-size: 15px; }
.te :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { width: 100%; min-height: 44px; font: inherit; padding: 8px 10px; border: 1px solid var(--control-line, #6b7c8a); border-radius: 8px; background: var(--panel, #fff); color: var(--ink, #1f2a33); }
.te textarea { min-height: 88px; resize: vertical; }
.te-lesson { border: 2px solid var(--primary, #2f5d7c) !important; background: var(--panel, #fff); }
.te-lesson > legend { font-size: 18px; }
.te-block { background: var(--bg, #f6f8fa); }
.te-item { border-top: 1px dashed var(--line, #8c9eac); padding: 10px 0; }
.te-item-title { font-weight: 600; margin: 0 0 6px; }
.te-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.te-controls .btn, .te-add-block .btn { flex: 0 1 auto; }
.te-delete { color: var(--bad-ink, #9b1c1c); }
.te-add-block, .te-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.te-add-block select, .te-upload input { flex: 1 1 220px; width: auto !important; }
.te-upload .btn { flex: 0 0 auto; }
.te-bool { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.te-assets { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.te-assets li { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 8px; border: 1px solid var(--line, #8c9eac); border-radius: 8px; overflow-wrap: anywhere; }
.te-assets img, .te-asset-kind { flex: 0 0 56px; width: 56px; height: 42px; object-fit: cover; border-radius: 4px; background: var(--hover, #eef3f7); display: grid; place-items: center; font-size: 12px; }
.te-list { list-style: none; padding: 0; }
.te-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, #8c9eac); }
.te-list li .btn, .te-new .btn { flex: 0 0 auto; }
.te-new { display: grid; gap: 6px; max-width: 520px; }
@media (prefers-reduced-motion: reduce) {
  .tp *, .te * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .tb-card.flipped { transform: none; }
}
@media (max-width: 800px) {
  .tp-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tp-nav { position: static; }
  .tb-sort-row { grid-template-columns: minmax(0, 1fr); }
  .tp-facts { grid-template-columns: minmax(0, 1fr); }
  .te-list li { display: block; }
  .te-list li .btn { width: 100%; margin-top: 8px; }
  .tb-actions .btn, .te-bar .btn { flex: 1 1 140px; }
}

/* CL-31: Compact, readable employee learning and its dialogs on phones. */
@media (max-width: 600px) {
  .training-page { padding: 8px; font-size: 16px; overflow-wrap: anywhere; }
  .training-page header { margin: 8px 0 12px; }
  .training-page header h2 { margin: 8px 0; }
  .training-page p { margin: 8px 0; font-size: 16px; }
  .training-page .small, .training-page small, .training-page .eyebrow { font-size: 14px; }
  .training-page .badge { font-size: 14px; height: auto; white-space: normal; }
  .training-page .panel { margin: 12px 0; padding: 12px; }
  .training-page .training-actions { gap: 8px; }
  .training-page .training-actions button { flex: 1 1 120px; }
  .training-page button { max-width: 100%; font-size: 14px; overflow-wrap: anywhere; }
  .training-page fieldset { margin: 12px 0; padding: 8px; }
  .training-page .training-choice span { min-width: 0; overflow-wrap: anywhere; }
  .dialog-bg:has(.training-dialog) { padding: 8px; }
  .dialog:has(.training-dialog) { padding: 16px; min-width: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
  .dialog:has(.training-dialog) h2 { font-size: 22px; }
  .dialog:has(.training-dialog) label { font-size: 14px; }
  .dialog:has(.training-dialog) :is(input, select, textarea) { min-width: 0; max-width: 100%; min-height: 44px; font-size: 16px; }
  .dialog:has(.training-dialog) button { min-height: 44px; max-width: 100%; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .dialog:has(.training-dialog) .btns { flex-wrap: wrap; }
  .dialog:has(.training-dialog) .btns button { flex: 1 1 100px; }
  .dialog:has(.training-dialog) :is([data-training-lesson], [data-training-question]) { padding: 8px; margin: 12px 0; }
  .dialog:has(.training-dialog) legend { max-width: 100%; overflow-wrap: anywhere; }
}
