/* ===================================================================================================
   Training module + contextual help
   =================================================================================================== */

/* ---------- markdown-lite ---------- */
.md { line-height: 1.6; color: var(--text); font-size: 15px; }
.md > :first-child { margin-top: 0; }
.md h2, .md h3, .md h4, .md h5 { color: var(--navy); margin: 1.3em 0 .45em; line-height: 1.25; }
.md h2.md-h1 { font-size: 26px; } .md h3.md-h2 { font-size: 20px; } .md h4.md-h3 { font-size: 17px; } .md h5.md-h4 { font-size: 15px; }
.md p { margin: 0 0 .8em; }
.md ul, .md ol { margin: 0 0 .9em; padding-left: 1.5em; }
.md li { margin: .2em 0; }
.md code { background: #eef1f3; border: 1px solid #dfe4e8; border-radius: 3px; padding: 0 5px; font-size: .9em; font-family: ui-monospace, Consolas, monospace; }
.md a { color: var(--blue-link); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md blockquote { margin: 0 0 1em; padding: 6px 14px; border-left: 4px solid var(--line); color: var(--text-2); }
.md-fig { margin: 0 0 1em; } .md-fig img { max-width: 100%; border-radius: 4px; border: 1px solid var(--line); } .md-fig figcaption { font-size: 13px; color: var(--muted); }
.md-table-wrap { overflow-x: auto; margin: 0 0 1em; }
.md-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md-table th { background: var(--bg-soft); color: var(--navy); }
.md-callout { border-radius: 4px; padding: 10px 14px 4px; margin: 0 0 1em; border: 1px solid; }
.md-callout .md { font-size: 14.5px; }
.md-callout-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.md-callout-title .ico { width: 16px; height: 16px; }
.md-callout-tip { background: #eafaf1; border-color: #b9ecd0; } .md-callout-tip .md-callout-title { color: var(--green-dark); }
.md-callout-note { background: #e9f5fc; border-color: #bfe2f6; } .md-callout-note .md-callout-title { color: #0a6aa1; }
.md-callout-warning { background: #fff7e0; border-color: #f3dc94; } .md-callout-warning .md-callout-title { color: #8a6d00; }
.md-callout-important { background: #fdecea; border-color: #f5c6c0; } .md-callout-important .md-callout-title { color: #b03a2e; }

/* ---------- help button ---------- */
.help-fab { position: fixed; right: 22px; bottom: calc(var(--rp-foot, 0px) + 14px); z-index: 95; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--blue); color: #fff;
  box-shadow: 0 4px 14px rgba(11, 152, 222, .45); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s, background .12s; }
.help-fab:hover { background: #0987c5; transform: scale(1.06); }
.help-fab.open { background: var(--navy); }
.help-fab-q { font-size: 26px; font-weight: 700; line-height: 1; font-family: Georgia, serif; }
.help-fab-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
@media print { .help-fab, .help-panel, .trn-scn-panel { display: none !important; } }

/* ---------- help panel ---------- */
.help-panel { position: fixed; top: 0; right: 0; bottom: var(--rp-foot, 0px); width: min(420px, 100vw); z-index: 96; background: #fff; box-shadow: -8px 0 30px rgba(20, 30, 45, .2);
  display: flex; flex-direction: column; animation: help-in .18s ease-out; }
.help-panel.out { animation: help-out .18s ease-in forwards; }
@keyframes help-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes help-out { to { transform: translateX(30px); opacity: 0; } }
.help-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--blue); color: #fff; }
.help-head-q { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: Georgia, serif; }
.help-head-title { flex: 1; font-size: 18px; font-weight: 700; }
.help-close { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: flex; } .help-close .ico { width: 22px; height: 22px; }
.help-search-wrap { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.help-search-wrap .ico { width: 18px; height: 18px; color: var(--muted); }
.help-search { border: 1px solid var(--line-2, #c8d0d6); }
.help-body { flex: 1; overflow-y: auto; padding: 14px 16px 24px; }
.help-screen { margin-bottom: 10px; }
.help-screen-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.help-screen-name { font-size: 18px; font-weight: 700; color: var(--navy); }
.help-tour-btn { width: 100%; margin: 4px 0 14px; }
.help-section-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; margin: 18px 0 8px; }
.help-topic { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; background: #fff; }
.help-topic > summary { list-style: none; cursor: pointer; padding: 10px 12px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.help-topic > summary::-webkit-details-marker { display: none; }
.help-topic > summary span { flex: 1; }
.help-chev { width: 16px; height: 16px; transition: transform .15s; color: var(--muted); }
.help-topic[open] > summary .help-chev { transform: rotate(180deg); }
.help-topic[open] > summary { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.help-topic-body { padding: 10px 12px; }
.help-topic-body .md { font-size: 14px; }
.help-topic-body .md-table { font-size: 13px; }
.help-lessons { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.help-lessons-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.help-lessons-title .ico { width: 14px; height: 14px; }
.help-lesson { display: block; padding: 3px 0; color: var(--blue-link); font-size: 14px; }
.help-empty { color: var(--muted); padding: 10px 0; }
.help-note { display: flex; gap: 8px; align-items: flex-start; background: #e9f5fc; border-radius: 4px; padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.help-note .ico { width: 16px; height: 16px; flex-shrink: 0; color: var(--blue); }
.help-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.help-foot .ico { width: 14px; height: 14px; }

/* ---------- training pages ---------- */
.trn-page { max-width: 1250px; }
.trn-head h1 { margin-bottom: 2px; }
.trn-sub { color: var(--text-2); font-size: 14px; }
.trn-head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.trn-head-actions .ico { width: 18px; height: 18px; }
.trn-back { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-link); text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.trn-back .ico { width: 16px; height: 16px; }
.trn-muted { color: var(--muted); font-size: 13px; }
.trn-lead { color: var(--text-2); max-width: 900px; line-height: 1.55; }
.trn-h2 { font-size: 18px; margin: 22px 0 10px; }
.trn-spacer { flex: 1; }
.trn-mt { margin-top: 18px; }
.trn-nowrap { white-space: nowrap; }
.trn-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.trn-tabs { margin-top: 18px; }
.trn-tab-body { min-height: 200px; }

.trn-bar { height: 8px; background: #e3e8ec; border-radius: 4px; overflow: hidden; flex: 1; min-width: 60px; }
.trn-bar-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width .3s; }
.trn-bar.done .trn-bar-fill { background: var(--green); }

.trn-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e0e6eb; color: var(--text-2); letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.trn-chip.req { background: #fde2df; color: #b03a2e; }
.trn-chip.aud { background: #e1f1fb; color: #0a6aa1; }
.trn-chip.good { background: #dcefe3; color: #1e7a45; }
.trn-chip.warn { background: #fff3cd; color: #8a6d00; }
.trn-chip.bad { background: #fde2df; color: #b03a2e; }
.trn-chip.diff-beginner { background: #dcefe3; color: #1e7a45; }
.trn-chip.diff-intermediate { background: #fff3cd; color: #8a6d00; }
.trn-chip.diff-advanced { background: #fde2df; color: #b03a2e; }

.trn-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 8px 0 4px; }
.trn-stat { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.trn-stat-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.trn-stat-num { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.trn-stat-num.trn-stat-small { font-size: 18px; }
.trn-stat-sub { font-size: 13px; color: var(--text-2); }
.trn-stat .trn-bar { flex: none; }

.trn-callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 4px; background: #e9f5fc; border: 1px solid #bfe2f6; margin: 12px 0; font-size: 14px; }
.trn-callout > .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--blue); }
.trn-callout.warn { background: #fff7e0; border-color: #f3dc94; } .trn-callout.warn > .ico { color: #b9770e; }
.trn-callout.good { background: #eafaf1; border-color: #b9ecd0; } .trn-callout.good > .ico { color: var(--green-dark); }
.trn-callout.bad { background: #fdecea; border-color: #f5c6c0; } .trn-callout.bad > .ico { color: var(--red); }
.trn-callout ul { margin: 4px 0 0; padding-left: 18px; }

.trn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.trn-card { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; }
.trn-card:hover { box-shadow: 0 4px 16px rgba(20, 30, 45, .1); }
.trn-card-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trn-card-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.trn-card-title { font-size: 18px; font-weight: 700; color: var(--navy); text-decoration: none; }
a.trn-card-title:hover { color: var(--blue-link); }
.trn-card-desc { font-size: 14px; color: var(--text-2); line-height: 1.5; flex: 1; }
.trn-card-types { display: flex; gap: 10px; flex-wrap: wrap; }
.trn-type { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.trn-type .ico { width: 14px; height: 14px; color: var(--blue); }
.trn-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.trn-card-prog { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 13px; color: var(--text-2); }
.trn-card-foot .ico { width: 16px; height: 16px; }

.trn-cert-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.trn-cert { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; background: #fff; }
.trn-cert-icon { width: 42px; height: 42px; border-radius: 50%; background: #fff3cd; color: #b9770e; display: flex; align-items: center; justify-content: center; }
.trn-cert-icon .ico { width: 22px; height: 22px; }
.trn-cert-main { flex: 1; } .trn-cert-title { font-weight: 700; color: var(--navy); }
.trn-cert .ico { width: 16px; height: 16px; }

/* course page */
.trn-course-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.trn-course-prog { display: flex; align-items: center; gap: 10px; min-width: 280px; font-size: 14px; color: var(--text-2); }
.trn-lesson-list { list-style: none; padding: 0; margin: 14px 0; max-width: 900px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.trn-lesson-list li + li { border-top: 1px solid var(--line); }
.trn-lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--text); background: #fff; }
.trn-lesson-row:hover { background: var(--bg-soft); }
.trn-lesson-num { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.trn-lesson-row.done .trn-lesson-num { background: var(--green); border-color: var(--green); color: #fff; }
.trn-lesson-num .ico { width: 16px; height: 16px; }
.trn-lesson-icon .ico { width: 20px; height: 20px; color: var(--blue); }
.trn-lesson-title { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.trn-lesson-type { font-size: 12px; color: var(--muted); font-weight: 400; }
.trn-chev { width: 18px; height: 18px; color: var(--muted); }

/* lesson player */
.trn-lesson-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.trn-side { position: sticky; top: 16px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.trn-side .trn-bar { flex: none; margin: 4px 0 8px; }
.trn-side-course { font-weight: 700; color: var(--navy); text-decoration: none; font-size: 15px; }
.trn-side-item { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 4px; text-decoration: none; color: var(--text); font-size: 14px; }
.trn-side-item:hover { background: var(--bg-soft); }
.trn-side-item.active { background: #e1f1fb; font-weight: 700; }
.trn-side-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; color: var(--text-2); }
.trn-side-item.done .trn-side-dot { background: var(--green); border-color: var(--green); color: #fff; }
.trn-side-dot .ico { width: 13px; height: 13px; }
.trn-lesson-main { min-width: 0; max-width: 860px; }
.trn-lesson-kicker { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .4px; }
.trn-lesson-kicker .ico { width: 16px; height: 16px; }
.trn-done-flag { margin-left: 12px; display: inline-flex; align-items: center; gap: 4px; color: var(--green-dark); }
.trn-lesson-h1 { font-size: 28px; margin: 4px 0 18px; }
.trn-lesson-content { min-height: 200px; }
.trn-lesson-nav { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.trn-lesson-nav .ico { width: 16px; height: 16px; }
.trn-sentinel { height: 1px; }
.trn-video { position: relative; padding-top: 56.25%; background: #000; border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
.trn-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trn-tour-box { display: flex; align-items: center; gap: 16px; border: 2px dashed #bfe2f6; background: #f4fbff; border-radius: 8px; padding: 18px 20px; margin-top: 12px; }
.trn-tour-box > div:nth-child(2) { flex: 1; }
.trn-tour-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.trn-tour-icon .ico { width: 26px; height: 26px; }

/* quiz */
.trn-quiz-meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.trn-q { border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px 14px; margin: 0 0 14px; background: #fff; }
.trn-q legend { font-weight: 700; color: var(--navy); padding: 0 6px; font-size: 15px; }
.trn-q.right { border-color: #9fdcb9; background: #f6fcf8; } .trn-q.wrong { border-color: #f1b7af; background: #fef8f7; }
.trn-q-num { margin-right: 6px; color: var(--muted); }
.trn-q-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.trn-q-img { max-width: 100%; max-height: 260px; margin: 6px 0; border-radius: 4px; }
.trn-q-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.trn-q-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: #fff; }
.trn-q-opt:hover { border-color: var(--blue); }
.trn-q-opt input { margin-top: 3px; }
.trn-q-opt.answer { border-color: var(--green); background: #eafaf1; font-weight: 600; }
.trn-q-opt.picked-wrong { border-color: var(--red); background: #fdecea; }
.trn-q-expl { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.trn-quiz-result { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 6px; margin-bottom: 16px; }
.trn-quiz-result.pass { background: #eafaf1; border: 1px solid #b9ecd0; } .trn-quiz-result.fail { background: #fff7e0; border: 1px solid #f3dc94; }
.trn-quiz-score { font-size: 34px; font-weight: 700; color: var(--navy); }
.trn-quiz-actions { display: flex; gap: 10px; }
.trn-quiz-actions .ico { width: 16px; height: 16px; }

/* scenario panel */
.trn-scn-panel { position: fixed; right: 86px; bottom: 18px; width: 370px; max-height: min(78vh, 760px); z-index: 90; background: #fff; border-radius: 8px;
  box-shadow: 0 8px 30px rgba(20, 30, 45, .28); display: flex; flex-direction: column; border-top: 4px solid #f39c12; overflow: hidden; }
.trn-scn-panel.collapsed { max-height: none; }
.trn-scn-panel.collapsed .trn-scn-body, .trn-scn-panel.collapsed .trn-scn-foot { display: none; }
.trn-scn-panel.collapsed .trn-scn-chev { transform: rotate(180deg); }
.trn-scn-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; background: #2d3e50; color: #fff; user-select: none; }
.trn-scn-badge { font-size: 10px; font-weight: 800; letter-spacing: .8px; background: #f39c12; color: #2d3e50; padding: 2px 6px; border-radius: 3px; }
.trn-scn-title { flex: 1; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trn-scn-chev { width: 18px; height: 18px; transition: transform .15s; }
.trn-scn-body { overflow-y: auto; padding: 4px 14px 10px; font-size: 13.5px; line-height: 1.45; flex: 1; }
.trn-scn-body p { margin: 4px 0; }
.trn-scn-sec { padding: 8px 0; border-bottom: 1px solid #eef1f3; }
.trn-scn-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 4px; }
.trn-scn-nature { font-weight: 700; color: var(--navy); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.trn-scn-body .ico { width: 14px; height: 14px; vertical-align: -2px; }
.trn-scn-notes { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #f6f8f9; padding: 6px 8px; border-radius: 3px; margin-top: 4px; }
.trn-scn-pres { font-weight: 600; }
.trn-scn-kv { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.trn-scn-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0; }
.trn-scn-actions .btn { padding: 5px 10px; font-size: 12.5px; }
.trn-scn-actions .ico { width: 15px; height: 15px; }
.trn-vgrid { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.trn-v { display: inline-flex; border: 1px solid #dfe4e8; border-radius: 3px; overflow: hidden; font-size: 12.5px; }
.trn-v-k { background: #eef1f3; padding: 1px 5px; color: var(--text-2); font-weight: 700; }
.trn-v-v { padding: 1px 6px; font-weight: 600; color: var(--navy); }
.trn-scn-note { font-size: 12.5px; color: #8a6d00; margin-top: 4px; }
.trn-scn-list { margin: 2px 0; padding-left: 16px; } .trn-scn-list li { margin: 2px 0; }
.trn-scn-tip { font-size: 12px; color: var(--muted); padding-top: 8px; display: flex; gap: 6px; }
.trn-scn-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.trn-scn-foot .ico { width: 15px; height: 15px; }
@media (max-width: 700px) { .trn-scn-panel { right: 8px; left: 8px; width: auto; bottom: 84px; } }

/* results */
.trn-results-top { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.trn-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), #e3e8ec 0); position: relative; }
.trn-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.trn-ring span { position: relative; font-size: 24px; font-weight: 700; color: var(--navy); }
.trn-ring.good { --ring: var(--green); } .trn-ring.warn { --ring: #f2c200; } .trn-ring.bad { --ring: var(--red); }
.trn-results-title { font-size: 20px; font-weight: 700; color: var(--navy); }
.trn-critical { margin-top: 6px; color: #b03a2e; font-size: 14px; display: flex; gap: 6px; align-items: flex-start; }
.trn-critical .ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.trn-rubric { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.trn-rline { display: flex; gap: 12px; padding: 10px 14px; align-items: flex-start; }
.trn-rline + .trn-rline { border-top: 1px solid var(--line); }
.trn-rline-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.trn-rline-icon .ico { width: 15px; height: 15px; }
.trn-rline.pass .trn-rline-icon { background: var(--green); } .trn-rline.fail .trn-rline-icon { background: var(--red); } .trn-rline.partial .trn-rline-icon { background: #f2c200; }
.trn-rline-main { flex: 1; }
.trn-rline-label { font-weight: 700; color: var(--navy); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.trn-rline-detail { font-size: 13px; color: var(--muted); }
.trn-rline-fb { font-size: 13.5px; color: #8a4b00; margin-top: 2px; } .trn-rline-fb.good { color: var(--green-dark); }
.trn-rline-pts { font-weight: 700; color: var(--text-2); white-space: nowrap; }
.trn-debrief { margin-top: 18px; padding: 14px 18px; background: var(--bg-soft); border-radius: 6px; }
.trn-results-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.trn-results-actions .ico { width: 16px; height: 16px; }

/* FTO */
.trn-table-wrap { overflow-x: auto; }
.trn-table td { vertical-align: middle; }
.trn-cell-prog { display: flex; align-items: center; gap: 8px; min-width: 160px; font-size: 13px; }
.trn-signed { display: inline-flex; gap: 4px; align-items: center; color: var(--green-dark); font-size: 13px; } .trn-signed .ico { width: 14px; height: 14px; }
.trn-inline-select { width: auto; min-width: 180px; }
.trn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.trn-tc { padding: 8px 0; border-bottom: 1px solid #eef1f3; } .trn-tc:last-child { border-bottom: 0; }
.trn-tc-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.trn-tc-quiz { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 4px; color: var(--text-2); }
.trn-mini { width: 100%; font-size: 14px; }
.trn-so { padding: 8px 0; border-bottom: 1px solid #eef1f3; display: flex; flex-direction: column; gap: 4px; }
.trn-so-override { color: #8a6d00; font-size: 13px; } .trn-so-override .ico { width: 14px; height: 14px; }
.trn-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.trn-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #eef1f3; font-size: 14px; }
.trn-kv span { color: var(--text-2); } .trn-kv b { text-align: right; }
.trn-issues { margin: 0; padding-left: 18px; font-size: 14px; } .trn-issues li { margin: 3px 0; }
.trn-vrow { display: flex; gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid #eef1f3; font-size: 13px; }
.trn-narr { white-space: pre-wrap; font-family: inherit; font-size: 14px; margin: 0 0 10px; background: var(--bg-soft); padding: 10px 12px; border-radius: 4px; }

/* builder */
.trn-form { display: flex; flex-direction: column; gap: 6px; }
.trn-form .field-label, .trn-led .field-label, .trn-qe .field-label { margin: 8px 0 4px; font-size: 13px; }
.trn-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.trn-form-row > * { min-width: 120px; }
.trn-grow { flex: 1; min-width: 200px; }
.trn-aud { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.trn-add-lesson { display: flex; gap: 6px; flex-wrap: wrap; }
.trn-add-lesson .ico, .trn-ed-lesson .ico { width: 14px; height: 14px; }
.trn-ed-lessons { display: flex; flex-direction: column; gap: 6px; }
.trn-ed-lesson { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; }
.trn-ed-lesson-main { flex: 1; }
.trn-req-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; max-width: 720px; }
.trn-req-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: #fff; }
.trn-req-item input { margin-top: 4px; }
.trn-led-modal .modal-body { padding: 16px 22px 30px; }
.trn-md-ed { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.trn-md-input { font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.5; min-height: 300px; }
.trn-md-preview { border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; max-height: 70vh; overflow-y: auto; background: #fff; }
.trn-md-help { font-size: 12px; color: var(--muted); margin-bottom: 4px; } .trn-md-help code { font-size: 11px; }
.trn-json { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.trn-qe-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.trn-qe { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px 14px; background: #fbfcfd; }
.trn-qe-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.trn-qe-head select.input, .trn-qe-head input.input { width: auto; }
.trn-qe-head .ico { width: 14px; height: 14px; }
.trn-qe-opts { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.trn-qe-opt { display: flex; align-items: center; gap: 8px; }
.trn-qe-opt .ico { width: 14px; height: 14px; }
.trn-pts { max-width: 80px; }
.trn-vit-ed { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; }
.trn-vit-ed .field-label { margin: 2px 0; font-size: 12px; }
.trn-test { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.trn-test .input { max-width: 340px; }
.trn-f { display: flex; flex-direction: column; }

/* dashboard card */
.trn-dash-card .trn-bar { flex: none; margin: 6px 0 4px; }
.trn-dash-row { display: flex; align-items: center; gap: 10px; }
.trn-dash-sub { font-size: 13px; color: var(--text-2); }
.trn-dash-card .btn { white-space: normal; text-align: center; }
.trn-dash-fto { text-decoration: none; color: inherit; margin-top: 10px; }
.trn-dash-link { display: block; margin-top: 10px; font-size: 13px; color: var(--blue-link); text-align: right; }

@media (max-width: 900px) {
  .trn-lesson-layout { grid-template-columns: 1fr; }
  .trn-side { position: static; }
  .trn-two, .trn-md-ed { grid-template-columns: 1fr; }
}
