/* VA Training (src/modules/training): the course outline, the path, lessons, quizzes, the progress view and the editor.
   Built on the design tokens (tokens.css) and the shared components (rows, pills, folds, fields); the page's CSP allows
   no inline style, so every look is a class here. */

.tr-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.tr-tabs { margin-top: -4px; }
.tr-kicker { margin: 0; font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.tr-title { margin: 0; font-family: var(--font-head); font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; color: var(--heading); }
.tr-lead { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.tr-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.tr-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.tr-count { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.tr-h2 { margin: 12px 0 0; font-family: var(--font-head); font-size: var(--fs-3, 20px); color: var(--heading); }
.tr-h3 { margin: 16px 0 6px; font-family: var(--font-head); font-size: 16px; color: var(--heading); }
.tr-h4 { margin: 10px 0 4px; font-family: var(--font-head); font-size: 14px; color: var(--ink-2); }

/* search */
.tr-search { display: flex; gap: 8px; }
.tr-search .field-input { flex: 1; min-width: 0; }
.tr-search .btn { flex: none; }

/* the path */
.tr-pathcard { gap: 10px; }
.tr-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tr-step { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2, 10px); background: var(--surface-2); }
.tr-path.is-small .tr-step { grid-template-columns: 1fr auto; padding: 8px 10px; }
.tr-step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--neu-soft); color: var(--neu); font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.tr-step-n svg { width: 18px; height: 18px; }
.tr-step.is-done .tr-step-n { background: var(--ok-soft); color: var(--ok); }
.tr-step.is-now { border-color: var(--accent); background: var(--accent-soft); }
.tr-step.is-now .tr-step-n { background: var(--accent); color: #fff; }
.tr-step-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-step-t { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--heading); }
.tr-step-d { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tr-step .pill { align-self: center; }

/* the course outline */
.tr-coursehead { display: flex; flex-direction: column; gap: 4px; }
.tr-outline { display: flex; flex-direction: column; gap: 14px; }
.tr-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3, 14px); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tr-sec.is-locked { opacity: .72; }
.tr-sec-h { display: flex; align-items: center; gap: 10px; }
.tr-sec-h h2, .tr-sec-h h3 { flex: 1; margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 17px; color: var(--heading); }
.tr-sec-h h3 a { color: inherit; }
.tr-sec-n { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); font-size: 13px; }
.tr-sec-s { margin: 0; font-size: 14px; color: var(--muted); }
.tr-rows { margin: 0; }
.tr-rows .row.is-locked { cursor: default; color: var(--muted); }
.tr-rows .row-name small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }

/* a lesson */
.tr-lesson .tr-title { margin-bottom: 2px; }
.tr-body { font-size: 16px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.tr-body > :first-child { margin-top: 0; }
.tr-body h2 { margin: 26px 0 8px; font-family: var(--font-head); font-size: 21px; line-height: 1.25; color: var(--heading); }
.tr-body h3 { margin: 20px 0 6px; font-family: var(--font-head); font-size: 17.5px; color: var(--heading); }
.tr-body h4 { margin: 16px 0 4px; font-family: var(--font-head); font-size: 15.5px; color: var(--heading); }
.tr-body p { margin: 0 0 12px; }
.tr-body ul, .tr-body ol { margin: 0 0 14px; padding-left: 24px; }
.tr-body ul { list-style: disc; }
.tr-body ol { list-style: decimal; }
.tr-body li { display: list-item; }
.tr-body li + li { margin-top: 6px; }
.tr-body code { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); font-size: .92em; }
.tr-body a { color: var(--accent-text); }
.tr-pre { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-3); overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.tr-pre code { padding: 0; background: none; white-space: pre; }
.tr-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.tr-callout { margin: 0 0 14px; padding: 12px 14px; border-left: 4px solid var(--pend); border-radius: 0 10px 10px 0; background: var(--pend-soft); }
.tr-callout p { margin: 0; }
.tr-callout.is-rule { border-left-color: var(--bad); background: var(--bad-soft); }
.tr-callout.is-tip { border-left-color: var(--ok); background: var(--ok-soft); }
.tr-table { margin: 0 0 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tr-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.tr-table th, .tr-table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tr-table th { background: var(--surface-2); font-family: var(--font-head); font-weight: 600; color: var(--heading); }
.tr-table tr:last-child td { border-bottom: 0; }
.tr-fig { margin: 4px 0 18px; }
.tr-fig img { display: block; max-width: 100%; width: auto; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.tr-fig figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tr-next { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 8px; }
.tr-next form { margin-left: auto; }
.tr-doneform .btn { min-height: 46px; }

/* a quiz */
.tr-quiz { display: flex; flex-direction: column; gap: 14px; }
.tr-q { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 8px; }
.tr-q legend { display: flex; gap: 10px; align-items: baseline; padding: 0 4px; font-weight: 600; font-size: 15.5px; line-height: 1.45; color: var(--heading); }
.tr-q-n { flex: none; font-family: var(--font-head); color: var(--muted); }
.tr-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1.45; }
.tr-choice:hover { border-color: var(--line-2); background: var(--surface-2); }
.tr-choice input { margin-top: 3px; accent-color: var(--accent); }
.tr-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tr-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tr-res { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tr-res-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; }
.tr-res-ic svg { width: 16px; height: 16px; }
.tr-res.is-ok .tr-res-ic { background: var(--ok-soft); color: var(--ok); }
.tr-res.is-bad { border-color: var(--bad); }
.tr-res.is-bad .tr-res-ic { background: var(--bad-soft); color: var(--bad); }
.tr-res p { margin: 0 0 4px; font-size: 14.5px; line-height: 1.45; }
.tr-res-q { font-weight: 600; color: var(--heading); }
.tr-res-a { color: var(--ink-2); }
.tr-q-right { color: var(--ok); font-weight: 600; }
.tr-q-why { color: var(--muted); }

/* FAQ */
.tr-faqs { display: flex; flex-direction: column; gap: 8px; }
.tr-body.is-faq { font-size: 15px; }

/* the progress view's marking */
.tr-markform { margin-top: 8px; display: grid; gap: 10px; }
.tr-shadow { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; }
.tr-shadow legend { padding: 0 4px; font-weight: 600; font-size: 14px; color: var(--heading); }
.tr-undo { margin-top: 6px; }
.tr-handfold { margin-top: 6px; }

/* the editor */
.tr-editor .tr-title { margin-bottom: 4px; }
.tr-edit { display: grid; gap: 12px; }
.tr-edit.is-row { grid-template-columns: 1fr auto; align-items: end; }
.tr-edit.is-inline { display: inline; }
.tr-mdbox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.5; }
.tr-fs { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; }
.tr-fs legend { padding: 0 4px; font-weight: 600; font-size: 14px; color: var(--heading); }
.tr-choiceedit { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: end; }
.tr-erow { display: flex; align-items: center; gap: 6px; }
.tr-erow > .row { flex: 1; min-width: 0; }
.tr-move { display: inline-flex; gap: 2px; }
.tr-move .btn-icon svg { width: 16px; height: 16px; }
.tr-move form:first-child .btn-icon svg { transform: rotate(-90deg); }
.tr-preview { padding: 16px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface); }
.tr-imgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tr-imgs li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; }
.tr-imgs img { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tr-imgs code { font-size: 12.5px; overflow-wrap: anywhere; }
.tr-imgs small { display: block; color: var(--muted); }

@media (max-width: 640px) {
  .tr-step { grid-template-columns: 28px 1fr; }
  .tr-step .pill { grid-column: 2; justify-self: start; }
  .tr-edit.is-row { grid-template-columns: 1fr; }
  .tr-choiceedit { grid-template-columns: 1fr; }
  .tr-search .btn span { display: none; }
}

/* the training pages sit straight in the list pane (no .pane-header wrapper): the same gutters and top space as the
   list screens (components.css .pane-header.lh-wrap) */
.ls-shell .pane-list > .tr-page { padding-top: 48px; }
@media (max-width: 1023px) { .ls-shell .pane-list > .tr-page { padding-top: 22px; } }
@media (max-width: 759px) { .ls-shell .pane-list > .tr-page { padding-left: 16px; padding-right: 16px; } }
/* a table keeps whole words; a wide one scrolls sideways inside its box */
.tr-table th, .tr-table td { overflow-wrap: normal; word-break: normal; }
.tr-table td:first-child, .tr-table th:first-child { min-width: 88px; }

/* J670 (Joshua 11/13/2026, t44s0 item 34): light polish on the editor's two long forms; nothing about what is saved.
   The lesson: the text and its preview side by side on a wide screen, each in its own scrolling box; stacked on a phone. */
.tr-previewnote { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.tr-mdsplit { display: grid; gap: 16px; }
.tr-mdsplit-ed, .tr-mdsplit-pv { min-width: 0; }
.tr-mdsplit-pv .tr-h2 { margin-top: 0; }
.tr-mdsplit .tr-mdbox { height: 50vh; min-height: 260px; }
.tr-mdsplit .tr-preview { max-height: 60vh; overflow: auto; }
@media (min-width: 1100px) {
  .tr-mdsplit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .tr-mdsplit .tr-mdbox { height: 58vh; min-height: 420px; }
  .tr-mdsplit-pv { position: sticky; top: 16px; }
  .tr-mdsplit .tr-preview { max-height: calc(100vh - 120px); }
}
/* the question: each answer is one row (Right, then the answer box), the right one tinted */
.tr-choicesfs { gap: 6px; }
.tr-choiceedit { grid-template-columns: 84px 1fr; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; }
.tr-choiceedit .field { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; }
.tr-choiceedit .field-input { min-height: 40px; padding: 8px 12px; }
.tr-choiceedit:has(input[type="radio"]:checked) { background: var(--ok-soft); }
@media (max-width: 640px) {
  .tr-choiceedit { grid-template-columns: 76px 1fr; }
  .tr-choiceedit .field { grid-template-columns: 1fr; gap: 2px; }
}
